You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But multiplots aren't currently possible for maxima's png and pngcairo output that wxMaxima uses - and what draw is missing is the possibility to add raw gnuplot commands: There is gnuplot_preamble, but you cannot insert a
set ytics offset -8, 0
into exactly the current place in the gnuplot file maxima creates. Both features would be possible feature requests for the maxima project, though: At least the latter I would use from time to time.
Well - if the function can be expressed using Gnuplot commands and you just want to include it in a wxMaxima worksheet, the following trick may help:
(Code taken from the Stackoverflow page you referenced).
Here I am plotting the function y=0 (with x= 0-10), so it is not shown - and afterwards I insert the gnuplot commands using gnuplot_postamble. Quotes need to be escaped, of course.
wxplot2d(0,[x,0,10],[gnuplot_postamble,"
set multiplot
clear
set xrange[0:10]
# We need place to the left, so make the left margin 30% of screen
set lmargin screen 0.3
##### first plot
set ytics 0.4
set yrange[-1.2:1.2]
set ylabel \"Voltage\" textcolor rgb \"red\"
plot sin(x)
##### Second plot
set ytics 1
set yrange[-3:3]
set ytics offset -8, 0
set ylabel \"Current\" offset -8, 0 textcolor rgb \"green\"
plot 3*cos(x) linecolor 2
##### Third plot
set ytics 0.5
set yrange[-1.5:1.5]
set ytics offset -16, 0
set ylabel \"Power\" offset -16, 0 textcolor rgb \"blue\"
plot 3*sin(x)*cos(x) linecolor 3
unset multiplot"])$
Would it be possible to implement some gnuplot code that makes plots like this possible?
https://stackoverflow.com/questions/27390317/how-to-plot-multiple-y-axes
The text was updated successfully, but these errors were encountered: