Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2037 > unrolled thread

assigning specific colors with a pseudocolumn(-2) and linecolor variable?

Started byTonyG <tgozdz@gmail.com>
First post2013-09-16 20:00 -0700
Last post2013-09-19 16:50 -0700
Articles 4 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  assigning specific colors with a pseudocolumn(-2) and linecolor variable? TonyG <tgozdz@gmail.com> - 2013-09-16 20:00 -0700
    Re: assigning specific colors with a pseudocolumn(-2) and linecolor variable? sfeam <sfeam@users.sourceforge.net> - 2013-09-17 09:02 -0700
      Re: assigning specific colors with a pseudocolumn(-2) and linecolor variable? TonyG <tgozdz@gmail.com> - 2013-09-17 18:17 -0700
        Re: assigning specific colors with a pseudocolumn(-2) and linecolor variable? sfeam <sfeam@users.sourceforge.net> - 2013-09-19 16:50 -0700

#2037 — assigning specific colors with a pseudocolumn(-2) and linecolor variable?

FromTonyG <tgozdz@gmail.com>
Date2013-09-16 20:00 -0700
Subjectassigning specific colors with a pseudocolumn(-2) and linecolor variable?
Message-ID<840b29be-7641-41a6-ac5a-970fbbebf9f6@googlegroups.com>
When I use gnuplot v.4.6.3 (Win7) to plot multiple data sets separated by double blank lines via

pl 'Data.out' i 0:300:5 u ($1):($2):(column(-2)) t 'profiles' w l lc variable lw 2 

I get a chart with a suboptimal sequence of colors (for example, blue, yellow and green) for subsequent data sets.

How to assign specific colors, such as 'black', 'red' or 'blue' to various data sets?

Also, how to assign different labels for the various colors?

Thanks for any help.

[toc] | [next] | [standalone]


#2038

Fromsfeam <sfeam@users.sourceforge.net>
Date2013-09-17 09:02 -0700
Message-ID<l19ue3$jdh$1@dont-email.me>
In reply to#2037
TonyG wrote:

> When I use gnuplot v.4.6.3 (Win7) to plot multiple data sets separated
> by double blank lines via
> 
> pl 'Data.out' i 0:300:5 u ($1):($2):(column(-2)) t 'profiles' w l lc
> variable lw 2
> 
> I get a chart with a suboptimal sequence of colors (for example, blue,
> yellow and green) for subsequent data sets.
> 
> How to assign specific colors, such as 'black', 'red' or 'blue' to
> various data sets?

Offset = 100
set linetype Offset   lc rgb 'black'
set linetype Offset+1 lc rgb 'red'
set linetype Offset+2 lc rgb 'blue'
...

plot 'Data.out' ... using ($1):($2):(column(-2) + Offset) ... lc variable

> 
> Also, how to assign different labels for the various colors?

DarkCyan = 0x00DDDD               # Not sure this works on windows
set linetype Offset+3 lc rgb DarkCyan

but also see "show colors"




> Thanks for any help.

[toc] | [prev] | [next] | [standalone]


#2039

FromTonyG <tgozdz@gmail.com>
Date2013-09-17 18:17 -0700
Message-ID<f9951c85-cb31-44f2-b879-2a11ee3b3190@googlegroups.com>
In reply to#2038
On Tuesday, September 17, 2013 12:02:09 PM UTC-4, sfeam replied: 
> 
> Offset = 100
> 
> set linetype Offset   lc rgb 'black'
> 
> set linetype Offset+1 lc rgb 'red'
> 
> set linetype Offset+2 lc rgb 'blue'
> 
> ...
> 
> plot 'Data.out' ... using ($1):($2):(column(-2) + Offset) ... lc variable
> 
> > Also, how to assign different labels for the various colors?
> 
> DarkCyan = 0x00DDDD               # Not sure this works on windows
> 
> set linetype Offset+3 lc rgb DarkCyan
>  
> but also see "show colors"

Wonderful!  It works perfectly--although, in spite of reading the help files, I have a bit of a problem understanding exactly why... ;-)  I assume that you set Offset=100 to be outside the probable max number of data sets?  This color stuff gets really convoluted for a nonprogrammer, a price certainly worth paying for the flexibility.

[toc] | [prev] | [next] | [standalone]


#2041

Fromsfeam <sfeam@users.sourceforge.net>
Date2013-09-19 16:50 -0700
Message-ID<l1g2l0$sj1$1@dont-email.me>
In reply to#2039
TonyG wrote:

> On Tuesday, September 17, 2013 12:02:09 PM UTC-4, sfeam replied:
>> 
>> Offset = 100
>> 
>> set linetype Offset   lc rgb 'black'
>> 
>> set linetype Offset+1 lc rgb 'red'
>> 
>> set linetype Offset+2 lc rgb 'blue'
>> 
>> ...
>> 
>> plot 'Data.out' ... using ($1):($2):(column(-2) + Offset) ... lc
>> variable
>> 
>> > Also, how to assign different labels for the various colors?
>> 
>> DarkCyan = 0x00DDDD               # Not sure this works on windows
>> 
>> set linetype Offset+3 lc rgb DarkCyan
>>  
>> but also see "show colors"
> 
> Wonderful!  It works perfectly--although, in spite of reading the help
> files, I have a bit of a problem understanding exactly why... ;-)  I
> assume that you set Offset=100 to be outside the probable max number
> of data sets?  

Number of data sets is not a problem.
I picked 100 as being large enough so that it probably wouldn't
overwrite any previous definitions of linetypes 1, 2, 3, ...
used to determine the sequence of colors used for plotting.

	Ethan

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web