comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Easy colours?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Easy colours? [message #82074] Thu, 15 November 2012 16:23
markjamie is currently offline  markjamie
Messages: 30
Registered: November 2012
Member
I often find myself needing to plot graphs (in direct or new graphics) for an unknown number of data series. To differentiate between them in the plot I colour each line / symbols. Since most of the time I have less than 10 series I usually just define an array of 10 specific colours and select from this on the plot command. However, this method has problems if you breach the number of pre-defined colours.

Ideally, I'd like to be able to load a colour table and then have an easy way to select 'x' equally spaced colours across the colour table.

For example, if my colour table went from blue-yellow-pink-green-red and I had 5 data series, I would like to be able to access each colour using a fractional number specifying how far across th colour table

E.g.
Loadct,39
Plot, Series1, color=mycolour(0)
OPlot,Series2, color= mycolour(0.25)
OPlot,series3, color=mycolour(0.5)
OPlot,series4, color=mycolour(0.75)
OPlot,series5,color=mycolour(1)

I've never found a way to do this in IDL - perhaps I'm missing something really simple...

Any thoughts?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: sorting out polygon connectivity in a simple 2D rectangular dataset...
Next Topic: Transparent Overlay

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:11:47 PDT 2025

Total time taken to generate the page: 0.00515 seconds