On Fri, 11 Sep 2015, Sven Schreiber wrote:
the common problem (with known solution) is to tell gnuplot to use
only
a single y-axis.
But now (and amazingly for the first time in all those years,
apparently) I have the opposite problem: I want to distribute the
plotted lines to two separate y-axes, but gnuplot (or rather its gretl
interface) won't let me do it. What can I do?
Gretl doesn't support this as an option to the "gnuplot" (or
"plot")
command, but it's easy enough in gnuplot. Example:
* Open data9-7 and ask for a time-series plot of PRIME and UNEMP (by
default these use a single y-axis).
* In the plot window, right-click and choose "Save to session as
icon".
* Right click on the resulting plot icon and choose "Edit plot
commands".
* In the commands, insert the lines
set ytics nomirror
set y2tics
before the actual "plot" command.
* Within the "plot" lines, insert (before the "title" spec in each
case):
axes x1y1 # for PRIME
axes x1y2 # for UNEMP
* Optionally, change the titles to "PRIME (left)" and "UNEMP
(right)". So you've got:
'-' using 1:($2) axes x1y1 title "PRIME (left)" w lines , \
'-' using 1:($2) axes x1y2 title "UNEMP (right)" w lines
* Save the plot specification.
Allin