cgErrPlot with vector color [message #84963] |
Wed, 19 June 2013 18:39  |
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
|
|
|
|
|