|
From: doug b. <dou...@ho...> - 2006-11-14 19:22:15
|
Hi, Thank you for suggesting the use of index. However, I have many data set and writting them all out using index is painful. So, here is what I would like to do: I have many data sets in a file. The data sets are separated by two blank lines. I would like to plot all the data sets on one plot and have each one have its own "key" I have come up with a solution, but it is not to neat. My problem is that it appears that the "key" does not allow one to write out a variable as you can do with label. Is this true? To get around this I have made the following do loop to loop over the data sets and to have a key for each data set and label it. Is there a better way to do this. set multiplot n=0; n2=10 load 'cmd' Where the file 'cmd is: r=(n+1)/12 set label "%g",n at screen .6,r set key screen .9,r plot 'junkresidl' index n:n u 3:4 w l lt (n+1) pause 0 n=n+1 if(n<n2) reread Thank you, >From: "Marek W. Gutowski" <gu...@if...> >Reply-To: gu...@if... >To: doug bull <dou...@ho...> >Subject: Re: [Gnuplot-info] using different line styles for multiple plots >- from one data file >Date: Tue, 14 Nov 2006 10:49:05 +0100 > >Hi, >Please read help index first. >Later extend your 'plot' command, by plotting several >lines grouped by "index" expression and each appended >with line type number you wish. > >Marek Gutowski > >doug bull wrote: >>Hi, >> >>I have a data file that contains data separated by blank lines as in the >>following "file": >> >>1 2.2 >>2 2.4 >> >>1 2.3 >>2 2.4 >> >>I do >> >>plot 'file' u 1:2 w l >> >>and all works well, except that the lines are the same color. How do I get >>the lines to have >>different symbols or different colors? >> >>Thank you, >> > > >-- >Marek W. Gutowski >Institute of Physics, ON-3.2, Al. Lotnikow 32/46 >02-668 Warszawa, POLAND, tel. +48-22-0228436601 ext. 3122 > >> To talk or not to talk? Yes, talk, plain ASCII please << >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _________________________________________________________________ Add a Yahoo! contact to Windows Live Messenger for a chance to win a free trip! http://www.imagine-windowslive.com/minisites/yahoo/default.aspx?locale=en-us&hmtagline |