gnuplot / plot (4E)
not so FAQ |
About 2-Dimensional Plot (No.4)I want to draw two axes in the different scale. Sometimes one wants to make two axes in one figure — for example, Let’s make two X-axes. At first, make the figure height smaller, set gnuplot> set size 1.0,0.7 gnuplot> set bmargin 0 gnuplot> set yrange [0:5] gnuplot> set multiplot Raise the figure slightly, and plot the first graph. In a following multiplot> set origin 0,0.3 multiplot> set xrange [0:2] multiplot> set xtics 1 multiplot> set xlabel "Time [min]" multiplot> plot exp(x)-1 notitle Now, lower the figure, and draw the multiplot> set origin 0,0.15 multiplot> set xrange [0:120] multiplot> set xtics nomirror 30 multiplot> set noytics multiplot> set xlabel "Time [sec]" multiplot> set border 1 multiplot> plot -1 notitle multiplot> set nomultiplot gnuplot> Well… probable there are more elegant ways to do it than this I want to make grid at an arbitrary position. The command set grid makes grid lines at the major tics In the following example, three tics are displayed at 0.5, 1.2, and gnuplot> set xtics ("0.5" 0.5, "1.2" 1.2, "2.3" 2.3) gnuplot> set grid ![]() In order to make the arbitrary grid keeping the tic position gnuplot> set xtics 0,1 gnuplot> set x2tics ("0.5" 0.5, "1.2" 1.2, "2.3" 2.3) gnuplot> set grid noxtics x2tics ![]() If you want to remove numbers at the top of this figure, set |