Re: multi-color (time-series) line plot [message #77068] |
Tue, 02 August 2011 06:11 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Teddy Allen writes:
> I have a very simple question that I am having trouble resolving
> (maybe because it is almost 2am)...I have a time series of 500
> points. I would like to plot a line plot that has 0:299 in red and
> 300:499 in blue. Basically, I would like a continuous time series line
> plot that changes color at a specific location.
>
> p = plot(rainall, xrange=[0,299],color='red')
> p1 = plot(rainall, xrange=[300,499],color='blue',/over)
>
> The above does not seem to work and I have played around with the
> xrange option in addition to the xstyle option. Any hints for this
> elementary request?
I would draw multi-colored lines on a plot like this:
http://www.idlcoyote.com/graphics_tips/coloredline.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|