use the pseudo-filename '+' to be able to use the 'using' option
and give the color value as the third component:
...
set style line 1 lt -1 lw 2 lc palette z
...
plot '+' using 1:(a($1)):(log(a($1))) with lines title 'cb=0.05' ls 1, ...
Kevin McPeak wrote:
>
> Does anyone know if it is possible to use 'set logscale cb' to color a
> set of 2d plots?
>
> I have attached a script that attempts to do this. The problem I am
> running into is that the colors on the logscaled color bar do not
> match up with the line colors. They do if I revert to a linear cb
> scale but I would really like to keep the cb scale logarithmic. For
> example, the cb=0.1 line (the middle one) should be purple but it is
> orange.
>
> I have tried running this on v4.4, v4.42 and v4.5(dev) and I get the
> same results.
>
> The code is below and I attached a file as well. Any help is most
> appreciated.
>
> Regards,
> Kevin McPeak
>
> # Gnuplot script file for attempting to use 'set logscale cb' for 2d plots
>
> reset
> set term windows color
>
> set size 0.9,1.0
> set origin 0,0
>
> set logscale cb 10
> set palette model RGB rgbformulae 7,5,15
> set cbrange [0.01:10]
>
> # Line Styles
> set style line 1 lt -1 lw 2 lc palette cb 0.05
> set style line 2 lt -1 lw 2 lc palette cb 0.1
> set style line 3 lt -1 lw 2 lc palette cb 8
>
> set lmargin 7
> set rmargin 0.5
> set tmargin 1
> set bmargin 3
>
> set colorbox vertical user origin 0.9, 0.16 size 0.02,0.80
> set cblabel "cb" rotate by 90 offset -4, 0
>
> unset label # remove any previous labels
> set mxtics 5
> set xtics 0.25
> set ytics 0.25
> set mytics 5
> set pointsize 2
> set xr [0:1]
> set yr [0:1]
>
> a(x) = 0.5*x
> b(x) = (0.5*x)+0.1
> c(x) = (0.5*x)+0.2
>
> plot a(x) title 'cb=0.05' ls 1, b(x) title 'cb=0.1' ls 2, c(x) title
> 'cb=8' ls 3
>
> reset
>
> # End
>
> --
> Kevin McPeak Ph.D.
> Postdoctoral Researcher
> ETH Zürich
> Optical Materials Engineering Laboratory
> Universitaetsstrasse 6, CNB F121
> CH-8092 Zurich, Switzerland
> Voice: +41 44 632 6594
> Email: km...@et...
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://old.nabble.com/logscale-cb-for-2d-plots-tp30541727p30544115.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|