From help-octave-request at bevo dot che dot wisc dot edu Tue Feb 3 12:33:17 1998 Subject: multiplot From: "Wonkoo Kim" To: "Octave Users" Date: Tue, 03 Feb 98 11:10:15 -0500 I'm using Octave 2.0.9 for OS/2 (Patchlevel 2.09-b03). I want a few plots on a page, and the number of graphs per plot is not fixed but depends on data set. This variable number of graph in a plot works well for one plot mode. An example code would be hold on for k = 2 : ncols+1 gplot phi using 1:k with lines endfor hold off where phi is my function data set in which column 1 has x values, the other 'ncols' columns have function values. (You may consider them as 'ncols' channels of signals.) I want to plot them together in a plot. This number 'ncols' is determined by input data file. There was no problem in ploting until I tried multiplot. In multiplot, plot sizes and ranges were different between gplot's in the above loops. The resulting plot was completely messed up with misaligned several axes, ticks, numbers, lines. Thus, to get well-aligned (i.e. perfectly overlapped) graph axes, I wanted to set xrange and yrange before the above code like gset xrange [xmin:xmax] gset yrange [ymin:ymax] where the range variables are determined by data set. However, passing range with variables seems not possible. Could you suggest any other better way? (I know the above loop generates multiple 'plot' commands rather than just one plot command like "plot data using 1:2 w l, using 1:3 w l, ...", but I couldn't find a good solution.) Another quick question: How do I clear plot in multiplot mode? I get accumulated plots unless I close gnuplot window, even after clearplot. Single plot mode works fine, though. Thanks. //-------------------------------------------------------------------- // Wonkoo Kim (wkim+ at pitt dot edu)