Re: Coloring multi-column plot by column number
Debostuti Ghoshdastidar <[email protected]>
| Newsgroups | gmane.comp.graphics.gnuplot.user |
|---|---|
| Message-ID | <CAJYAmDU5awX7f2UEp9aJRF5=GT6AM0RWepVKA1jVNmndJhOYAA@mail.gmail.com> |
Eathen Thanks a lot...that worked perfectly!!! Debostuti On Tue, Feb 18, 2020 at 11:34 PM Ethan Merritt <[email protected]> wrote: > On Monday, 17 February 2020 21:43:16 PST Debostuti Ghoshdastidar wrote: > > Hi > > > > I have a data set (input.dat) which looks as below: > > > > #C1 C2 C3 ... C250 > > 1 -2.1 -1.9... -1.1 > > 2 > > . > > . > > . > > 10 -0.9 1.3 1.7 > > > > My intention was that points 1 to 10 will be joined in each column to > form > > each plot, and therefore I'll have a 249-line plot. This I am able to > > achieve by the following: > > > > N = system("awk 'NR==1{print NF}' input.dat") > > plot for [i=2:N] "input.dat" u 1:i with lines title "" linewidth 2 > > > > Using this I obtain a plot where each line is plotted with a different > > color. I want the plots to be colored by a defined palette where the > range > > is the column number itself, i.e., C2 will be the lightest blue and C250 > > the darkest blue, since the columns are arranged based on a factor. > > set palette defined (0 "white", 1 "dark-blue") > set cbrange [2:N] > plot for [i=2:N] "input.dat" using 1:i with lines lc palette i > > [oops] that should be > > plot for [i=2:N] "input.dat" using 1:i with lines lc palette cb i > > The keyword "cb" means to map the palette through the colorbox range. > > Ethan > > > -- Debostuti Ghosh Dastidar DST SERB National Post-Doctoral Fellow Molecular Biophysics Unit Indian Institute of Science, Bangalore _______________________________________________ gnuplot-info mailing list [email protected] Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info