From: James R. V. Z. <jr...@co...> - 2009-03-24 21:44:03
|
Mojca Miklavec <moj...@gm...> wrote: >On Tue, Mar 17, 2009 at 03:29, James R. Van Zandt wrote: >> >> 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. > >I understand your question, but if I had this kind of data, I would >transform the data first into this form: > ># first column: R ># header: I ># data: V >R 2 5 10 >2000 0.001000 0.002500 0.005000 >2750 0.000727 0.001818 0.003636 >3500 0.000571 0.001429 0.002857 >4250 0.000471 0.001176 0.002353 >5000 0.000400 0.001000 0.002000 > >set key autotitle columnhead >plot for [n=2:4] 'lab.dat' using 1:n That kind of transformation looks much too fragile to me. I suppose I could plot the entire data file twice, once without titles (so every point is plotted) and again, with matching line styles, taking the titles from the first row of each datablock. Still error-prone. Or I could duplicate the first line in each datablock, so there is one copy for the title and a second copy to be plotted. Not a big deal if you only do it once. >(Nobody can guarantee that the label in each row is identical in your case.) I can guarantee it. I would hardly ask anyone else to. :-) - Jim Van Zandt |