Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#352 Easy : Extend <colorspec> on p.34 to take R G B triple

closed-fixed
nobody
None
5
2012-11-14
2012-11-08
dylan
No

I find it a bit inconsistent (and annoying) that the way of specifying
color is not completely consistent, cf. page 139 of manual for
set palette defined, which does allow R G B numeric triples.

the latter are easier to do color calculations with.

unless i am missing something, this is easy to do?

Discussion

  • Ethan Merritt
    Ethan Merritt
    2012-11-08

    I do not understand your question.
    What kind of plot or coloring scheme are you trying to use?

     
  • Ethan Merritt
    Ethan Merritt
    2012-11-08

    Are you just looking for a function definition? Try

    RGB(R,G,B) = int(256.*256.*255.*R + 256.*255.*G + 255.*B)

    Put that in your ~/.gnuplot file so that it is always defined.
    Now you can plot:

    plot ... with lines linecolor rgb RGB(1,0.5,0)

     
  • Ethan Merritt
    Ethan Merritt
    2012-11-08

    Oops. I apologize. That particular syntax doesn't work.
    You would have to use
    plot ... using 1:2:(RGB(r,g,b)) with lines lc variable

    So yeah, it might be worth allowing "lc rgb <expr>" work when
    <expr> evaluates to an integer value.

     
  • Ethan Merritt
    Ethan Merritt
    2012-11-14

    • status: open --> closed-fixed
     
  • Ethan Merritt
    Ethan Merritt
    2012-11-14

    Now in CVS