[ncl-talk] xy-plot with markers (depending on a 3. variable)
Rick Brownrigg
brownrig at ucar.edu
Thu Jul 9 11:26:28 MDT 2015
Hi Anna,
One approach is exemplified by example #8 at:
http://ncl.ucar.edu/Applications/polyg.shtml
This approach draws the markers 1-by-1, looping over the marker array and
setting the colors for each one based upon some criterion.
Another approach, more or less the same amount of effort, is to set up an
array for the resource "xyMarkerColors" that contains a color value for
each marker to be drawn. You'd need an array the same length as your xy
data, and would have to loop over it to fill in each entry with a color
value based on your 3rd variable.
I note that you are already setting the resource xyMarkerColors with 2
colors. According to the documentation, if you have more xy data than
color-values in xyMarkerColors, the remaining markers are drawn with the
color set by the resource xyMarkerColor (singular) -- the default for that
resource is whatever the foreground color (typically black). So what you
should have gotten in your existing example is one green marker, one blue
marker, and the remainder black (?)
Make sense?
Rick
On Thu, Jul 9, 2015 at 10:25 AM, Anna Lena Bittner <anna at hbittnersth.de>
wrote:
> Hi,
>
> I would like to create a xy-plot with markers. The markers should have
> different colors. The colors should be controlled by a 3. variable.
> In my plot I already created the makers, but I don't know how to define
> the color with a 3. variable ( in my case the variable t).
> I couldn't find a description for this kind of plot. If there is a
> description on the homepage let me know.
>
> I have attached my scripts here.
>
>
> Thanks a lot for your help.
>
> Anna Lena
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150709/f4ba7192/attachment.html
More information about the ncl-talk
mailing list