Y axis 10 times the x axis

I output ‘line(x,y)’ but I want the aspect ratio of UNIT LENGTH of axes be 1 for x and 10 for y.

‘pbaspect([1 10 1])’ does not work as I expected. Instead it does 1x the FULL length of x axis and 10x the FULL length of y axis.

Instead, I want 1x the UNIT length of x axis and 10x the UNIT length of y axis.
So if one y unit takes 10cm in my screen, then one x unit must take 1cm.

How can I do this?

Hi chameleon, welcome to octave forum, I hope you have a good time in this community :wink:

Answering to your problem, you can try with axis octave built-in function

minx = -1; # lower limit of x 
miny = 0; # lower limit of y 
maxx = 1; # upper limit of x
maxy = 6; # upper limit of y

axis([minx maxx miny maxy]);

axis must be after you’ve made your plot or stem or whatever have you graphed.

Have a nice day :slight_smile:

1 Like

I’m not sure whether I understood correctly. Does daspect do what you are looking for?
See also: Aspect Ratio (GNU Octave (version 6.4.0))

1 Like

Are you looking for daspect (control data aspect ratio rather than plot box)? See first entry in the link @mmuetzel provided.

plot (1:10)
daspect ([10 1 1])
1 Like