GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • » Octave core
  • » by package
  • » alphabetical

This view

  • Original page
  • New address

GeezerVison is showing octave.sourceforge.io — Function Reference: daspect

Octave-Forge - Extra packages for GNU Octave
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code

Navigation

Operators and Keywords

Function List:

  • » Octave core
  • » by package
  • » alphabetical

C++ API

: data_aspect_ratio = daspect ()
: daspect (data_aspect_ratio)
: daspect (mode)
: data_aspect_ratio_mode = daspect ("mode")
: daspect (hax, …)

Query or set the data aspect ratio of the current axes.

The aspect ratio is a normalized 3-element vector representing the span of the x, y, and z-axis limits.

daspect (mode)

Set the data aspect ratio mode of the current axes. mode is either "auto" or "manual".

daspect ("mode")

Return the data aspect ratio mode of the current axes.

daspect (hax, …)

Operate on the axes in handle hax instead of the current axes.

See also: axis, pbaspect, xlim, ylim, zlim.

Demonstration 1

The following code

 clf;
 x = 0:0.01:4;
 plot (x,cos(x), x,sin(x));
 axis square;
 daspect ([1 1 1]);
 title ("square plot box with axis limits [0, 4, -2, 2]");

Produces the following figure

Figure 1

Demonstration 2

The following code

 clf;
 x = 0:0.01:4;
 plot (x,cos (x), x,sin (x));
 axis ([0 4 -1 1]);
 daspect ([2 1 1]);
 title ("square plot box with axis limits [0, 4, -1, 1]");

Produces the following figure

Figure 1

Demonstration 3

The following code

 clf;
 x = 0:0.01:4;
 plot (x,cos(x), x,sin(x));
 daspect ([1 2 1]);
 pbaspect ([2 1 1]);
 title ("2x1 plot box with axis limits [0, 4, -2, 2]");

Produces the following figure

Figure 1

Demonstration 4

The following code

 clf;
 x = 0:0.01:4;
 plot (x,cos(x), x, sin(x));
 axis square;
 set (gca, "activepositionproperty", "position");
 daspect ([1 1 1]);
 title ("square plot box with axis limits [0, 4, -2, 2]");

Produces the following figure

Figure 1

Demonstration 5

The following code

 clf;
 x = 0:0.01:4;
 plot (x,cos(x), x,sin(x));
 axis ([0 4 -1 1]);
 set (gca, "activepositionproperty", "position");
 daspect ([2 1 1]);
 title ("square plot box with axis limits [0, 4, -1, 1]");

Produces the following figure

Figure 1

Package: octave

SourceForge.net Logo
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.