|
From: Mahmood N. <nt_...@ya...> - 2014-09-10 09:28:22
|
OK I got it. One more question. What is the correct format for representing the color number? hex or dec?
I have a data file where the first column is the color number and the second column is the Y-axis.
When I write
400 10
800 20
Both points are black. Also when I write
0xAABBCC 10
0x0A0304 20
again both are black. I use the following command
plot 'test.dat' using 0:2:1 linecolor rgb variable pt 3
Regards,
Mahmood
On Wednesday, September 10, 2014 11:31 AM, Tait <gnu...@t4...> wrote:
"... linecolor" is an argument to the plot command, not the "set
terminal" command. Although the help files are not as clear as they
could be, you can see how it's used in the demos (e.g.
varcolor.dem) for additional hints. Specifically, "linecolor
variable" means the color of each point or portion of the line will
be determined by data from the user-provided file or input. If you
do not provide the additional data to color each segment, then it
probably defaults to black, which could explain your observation.
If you just want each line to be a different color, then that is
already the default behavior and you don't need to do anything
more. If you want to color each portion of each line differently,
then take a look at the demos to get you started, or something
simple like this may be illustrative enough:
unset key
set style data linespoints
# for r,g,b in range [0,1)
rgb(r,g,b)=int(r*2**24)|int(g*2**16)|(int(b)*2**8)
# make up something arbitrary...
colorfunc(x) = rgb((1+cos(x))*0.3, (1+sin(x-1))*0.15, (1+sin(x))*0.4)
plot '+' using 1:(sin($1)):(colorfunc($1)) \
linewidth 4 linecolor rgbcolor variable
Mahmood Naderan <nt_...@ya...> said (on 2014/09/10):
> Hello,
> I want to use "linecolor rgb variable". However, the final colors are all black!
> This is verified with the following commands
>
> set term wxt
> set term post eps enhanced color blacktext size 4,2.7 solid "Times-Roman" 12
>
> I didn't find any option for variable colors while setting the terms.
>
>
> Regards,
> Mahmood
|