Multiple data series + rescaling

Multiple data series + rescaling

Post by Jaime Ree » Sat, 06 Jun 1998 04:00:00



I need to have graphics output from my Windows C++ program (a scatter
plot). I need to be able to plot different data series (i.e. sets of X-Y
values, possibly in different files) on the same graph. Using gnuplot
v3.6 I can do this using 'multiplot' *but* I don't know what the axis
limits are going to be before-hand. This means that I need gnuplot to
rescale each axis after adding a new plot (instead of just adding a new
set of axes on top of the old ones).

Is this possible using gnuplot?

Thanks,
Jaime Reed
--
Nuclear Orientation Group,
Clarendon Lab.,
Oxford.

 
 
 

Multiple data series + rescaling

Post by crawford richa » Sat, 06 Jun 1998 04:00:00




> I need to have graphics output from my Windows C++ program (a scatter
> plot). I need to be able to plot different data series (i.e. sets of X-Y
> values, possibly in different files) on the same graph. Using gnuplot
> v3.6 I can do this using 'multiplot' *but* I don't know what the axis
> limits are going to be before-hand. This means that I need gnuplot to
> rescale each axis after adding a new plot (instead of just adding a new
> set of axes on top of the old ones).

> Is this possible using gnuplot?

I don't think "multiplot" is what you want to use -- it draws completely
separate plots, even if you arrange things so that the plots are drawn
on top of each other.  There's no way that gnuplot can autoscale two
plots at once.

If you pass all the data to a single "plot" command, then gnuplot will
scale the plot to accomodate all the data.  But if you want to see the
individual data sets added one by one (that is, one plot with just the
first data set, then another with the first and second sets, another
with the first three, and so on, and still have gnuplot scale each one
appropriately, you'll want to use "replot" each time (except the first,
of course).  But "replot" needs to have all the data accessible, not
just the new data set, so it won't work if the data are being piped (I
think).  In that case, you'd be better off sending your data to a file
and plotting it from there.

I see that I have assumed that you know how to plot several different
data sets with a single command.  If that assumption is true, you don't
need to read the rest of this paragraph :-)  If it's not true ... you
can plot several data sets simply by stringing all the options on the
same "plot" command, but putting a comma between each group of options:
  plot 'file1' title 'blah' with lines, 'file2' title 'yeech' with dots
and so forth.  If several data sets use the same style (lines or points),
gnuplot will automatically choose a distinct linetype or symbol (unless
you override this with the "lt" or "pt" option).  All of the data sets
will be examined when determining the scales.  If you mix functions
with data sets, the scales will be determined from the data sets.  If
no data sets are present, you'll need to "set xrange" explicitly.  But
I'm babbling on ...



 
 
 

1. Multiple series from stdin data set

Hi,

I'm trying to plot multiple series from a data set I'm sending in from
standard input:

The current setup:
set xlabel "Date"
set xdata time
set timefmt "%Y-%m-%d %H:%M:%S"
set format x "%m/%d/%Y\n%H:%M"
set nokey
set ylabel 'Outside Temperature'
plot '-' using 1:3 with lines
2001-01-01 23:35:00 18.40
2001-01-01 23:37:00 18.40
2001-01-01 23:45:00 18.20
2001-01-01 23:55:00 18.10
2001-01-02 00:05:00 18.00
2001-01-02 00:15:00 17.70
e

But I'd like to add another column to it for another series.. From what the
manual seems to say I need to send another stream of data with the new
series.

Anyone know a better way?

Thanks,

Jay

2. glScissor Question

3. MEGA multiple series in BIG column of data

4. Extra 1 pixel row in ImageReady 2.0 HTML output

5. Newbie question: Multiple data series

6. OpenGL initialization

7. Help: Rescaling objects AND rescaling the trajectories as well

8. multiple column data file & no data point

9. plotting multiple graph from nultiple data set within one data file

10. sample multiple time-series plot?

11. Help, plotting multiple series

12. Need biomolecular tilt-series projection data, 3d density functions