For example, what is a code for plotting y = x so that y- and x-axis have the same scale ?
The axes can be made the same size using the same_xy option:
plot2d(x, [x,-1,1], [same_xy]);
or
plot2d(x, [x,-1,1], [same_xy, true]);
There is a same_xyz option for three dimensional plots.
Maxima, by default, uses gnuplot to produce 2d graphics.
If you're using this default, then you need to set the gnuplot_preamble
, e.g.
plot2d(x, [x,-1,1], [gnuplot_preamble, "set size ratio -1"])$
Note the -1
means that gnuplot tries to set the scales so that the unit has the same length on both axes, while +1
sets the aspect ratio ignoring the axis scales.
To make this the default, type
set_plot_option ([gnuplot_preamble, "set size ratio -1"])$
If you want to find out more about the gnuplot size options, run gnuplot
from your terminal and type help set size
into the console.
n.b. Most basic questions you can have about Maxima can be found somewhere in their mailing list archive: http://maxima.sourceforge.net/maximalist.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With