gnuplot> col(r, g, b) = sprintf('#%X%X%X', r, g, b)
gnuplot> print col(255, 23.4, 255)
#FF17FF
gnuplot> plot sin(x) w l lc rgb col(255, 23.4, 255)
works
'sprintf' returns a string, you don't have to enclose it in quotes.
renzresearch wrote:
Why can't I do this? How can I fix it? Thank you.
Zhong
gnuplot> col(r, g, b) = sprintf('"#%X%X%X"', r, g, b)
gnuplot> print col(255, 23.4, 255)
"#FF17FF"
gnuplot> plot sin(x) w l lc rgb col(255, 23.4, 255)
^
expected a known color name or a string of form "#RRGGBB"
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at:
http://p.sf.net/sfu/Challenge_______________________________________________
Gnuplot-info mailing list
Gnuplot-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-info