|
From: James R. V. Z. <jr...@co...> - 2009-03-17 02:10:27
|
Ethan A Merritt wrote:
> On Sunday 15 March 2009, James R. Van Zandt wrote:
> >
...
> >
> > I would like to plot each datablock with its own title taken from the
> > third column. I can use
> >
> > plot for [n=0:3] 'lab.dat' in n title 3
> >
> > except that the first line of each datablock is not plotted.
>
> Of course it isn't. You have told the program that the first line
> contains labels, not data.
Right. But I would like a way to tell the program that the first line
contains data that I would *also* like to use for labels.
> > Maybe what I want is
> >
> > plot for [n=0:3] 'lab.dat' in n title datastring(3)
> >
> > but that isn't implemented?
>
> I don't know, because I don't quite understand what you are trying to do.
> How can every line of the data file contain a plot title?
I'm not necessarily plotting every datablock. But the significant
thing about a datablock I do plot is that it has a constant value in
the third column. So naturally I want to use that value for the
title.
> I could understand using each 3rd column value as a point symbol,
> or a color, or an xticlabel, etc, but it doesn't make sense to have
> multiple titles for the same plot.
No, just one title.
> Maybe you are over-thinking this? If that is really what your data file
> looks like, maybe you just want
>
> plot for [n=0:3] 'lab.dat' in n title sprintf("Data block %d",n)
No, because it's the parameter value rather than the block number that
is significant. In this particular case I could use
plot for [n=0:3] 'lab.dat' in n title sprintf("parameter = %d",n+2)
but that would not work if the parameter values were not linearly
spaced, and would have to be manually adjusted every time the
parameter values changed.
> > BTW my application is a simulation where several of the columns have
> > input parameters, and the rest of the columns have outputs. I can
> > plot one output as a function of two inputs using splot. However, to
> > make it possible to actually read values off the curves, I would like
> > to plot iso-<whatever> lines: output as a function of one input
> > parameter, for selected values of a second parameter, and all other
> > parameters held constant. It would be very helpful to get the curve
> > labels from the data file itself.
>
> Sorry, I still don't follow what you are aiming for.
> You are doing something to select coordinate pairs from a subset of
> lines in the file. OK. But whatever set you pick within a single "plot"
> command can have only one title, right?
Let me try again. Assuming this data file:
# R I V
2000 0.001000 2
2750 0.000727 2
3500 0.000571 2
4250 0.000471 2
5000 0.000400 2
2000 0.002500 5
2750 0.001818 5
3500 0.001429 5
4250 0.001176 5
5000 0.001000 5
2000 0.005000 10
2750 0.003636 10
3500 0.002857 10
4250 0.002353 10
5000 0.002000 10
I'd like to plot current as a function of resistance, with the title
for each curve giving the voltage.
- Jim Van Zandt
|