How can we plot in maxima with different line styles (for example dash, dash-dot, etc. and not just change the color of the lines). Minimal working example:
f(x) := sin(x) $
g(x) := cos(x) $
plot2d( [f(x), g(x)], [x,0,10],
[style, [lines, 1,4], [lines, 1,3]] )$
The above can probably be done with the style option of plot2d. However, I cannot find the right option.
One way is to set linetype in gnuplot_preamble.
f(x) := sin(x) $
g(x) := cos(x) $
p: "set linetype 1 dashtype '-'
set linetype 2 dashtype '.'" $
plot2d(
[f('x), g('x)], ['x, 0, 10],
['gnuplot_preamble, p],
['style, ['lines, 4, 4], ['lines, 4, 3]])$

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