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

Home » Public Forums » archive » cgErrPlot with vector color
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
cgErrPlot with vector color [message #84963] Wed, 19 June 2013 18:39 Go to next message
Marios Karouzos is currently offline  Marios Karouzos
Messages: 2
Registered: June 2013
Junior Member
Hi,

I am trying to plot a set of three data points with their respective error-bars on a scatter plot each with its own coloring. According to cgErrPlot instructions, it accepts a vector for the color that should have same number of elements as X. However, when using a vector of three colors I get an error message that the color vector does not have enough elements.

My code looks like this:

cgplot,average(0,*),average(1,*),/overplot,psym=14,symsize=3
cgplots,average(0,*),average(1,*),psym=14,symsize=3,color=[' green','orange','red']
cgerrplot,average(0,*),average(1,*)-stderror(0,*),average(1, *)+stderror(0,*),color=['green','orange','red']

where average(x,*) is a float vector of 1x3 dimensions.

I found that using a color vector of size six (e.g., ['color1','color2','color3,'color1','color2','color3']) allows the cgerrplot to run without an error but then I get a mixture of colors within each error-bar.

Any idea where this problem might be coming from?

Thanks a lot!
Marios
Re: cgErrPlot with vector color [message #84966 is a reply to message #84963] Wed, 19 June 2013 21:38 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Marios Karouzos writes:

> I am trying to plot a set of three data points with their respective error-bars on a scatter plot each with its own coloring. According to cgErrPlot instructions, it accepts a vector for the color that should have same number of elements as X. However, when using a vector of three colors I get an error message that the color vector does not have enough elements.
>
> Any idea where this problem might be coming from?

A bug. Fixed now. :-)

http://www.idlcoyote.com/programs/cgerrplot.pro

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: cgErrPlot with vector color [message #84998 is a reply to message #84966] Fri, 21 June 2013 00:03 Go to previous message
Marios Karouzos is currently offline  Marios Karouzos
Messages: 2
Registered: June 2013
Junior Member
Thanks for the quick reply. I'm sure you've heard this a million times, but your work and library have saved me a ton of time while using IDL! Keep up the good work.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: P value for the regression analysis?
Next Topic: Array with float indices.

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

Current Time: Wed Oct 08 15:10:33 PDT 2025

Total time taken to generate the page: 0.00494 seconds