<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi,</div>

<div>
<div>I try to realize Ricks idea. But my problem is still that all my markers have the same color.</div>

<div>&nbsp;</div>

<div><em>My problem in generel is: I have 1 data set that consists of a x- position ( in my&nbsp; script: x), a y-position ( in my script: y) and a 3. value (for example the temperature, in my script: t). I want to creat&nbsp; an x-y plot with the x/y-position and the marker should be controlled by the 3. variable t.&nbsp; So that I have an 2D-Plot in which 3 variables are presented.</em></div>

<div><em>For exemple the color of the marker gets red for higher t-values and gets green for lower t-values.</em></div>

<div>&nbsp;</div>

<div>I made an loop over the &quot;xyMarkersColors&quot;,but all makers have the same color. I want that the makers have different colors. I think for reaching this goal in every do loop only 1 markers has to be drawn. So that after n- loops all the n xyMarkers are drawn.&nbsp; How can I reach this? And how can I realize the dependent of the markersColors of variable t? If I put t into the do loop I get an segmentation fault.</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>Thanks for your help</div>

<div>&nbsp;</div>

<div>Anna Lena</div>

<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b>&nbsp;Donnerstag, 09. Juli 2015 um 19:26 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Rick Brownrigg&quot; &lt;brownrig@ucar.edu&gt;<br/>
<b>An:</b>&nbsp;&quot;Anna Lena Bittner&quot; &lt;anna@hbittnersth.de&gt;<br/>
<b>Cc:</b>&nbsp;&quot;ncl-talk@ucar.edu&quot; &lt;ncl-talk@ucar.edu&gt;<br/>
<b>Betreff:</b>&nbsp;Re: [ncl-talk] xy-plot with markers (depending on a 3. variable)</div>

<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>Hi Anna,<br/>
&nbsp;</div>
One approach is exemplified by example #8 at:<br/>
<br/>
<a href="http://ncl.ucar.edu/Applications/polyg.shtml" target="_blank">http://ncl.ucar.edu/Applications/polyg.shtml</a><br/>
&nbsp;</div>
This approach draws the markers 1-by-1, looping over the marker array and setting the colors for each one based upon some criterion.<br/>
&nbsp;</div>
Another approach, more or less the same amount of effort, is to set up an array for the resource &quot;xyMarkerColors&quot; that contains a color value for each marker to be drawn. You&#39;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.<br/>
&nbsp;</div>
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).&nbsp; So what you should have gotten in your existing example is one green marker, one blue marker, and the remainder black (?)&nbsp;<br/>
&nbsp;</div>
Make sense?<br/>
&nbsp;</div>
Rick</div>

<div class="gmail_extra">&nbsp;
<div class="gmail_quote">On Thu, Jul 9, 2015 at 10:25 AM, Anna Lena Bittner <span>&lt;<a>anna@hbittnersth.de</a>&gt;</span> wrote:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">Hi,<br/>
<br/>
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.<br/>
In my plot I already created the makers, but I don&#39;t know how to define the color with a 3. variable ( in my case the variable t).<br/>
I couldn&#39;t find a description for this kind of plot. If there is a description on the homepage let me know.<br/>
<br/>
I have attached my scripts here.<br/>
<br/>
<br/>
Thanks a lot for your help.<br/>
<br/>
<span class="HOEnZb"><font color="#888888">Anna Lena</font></span><br/>
<br/>
_______________________________________________<br/>
ncl-talk mailing list<br/>
<a>ncl-talk@ucar.edu</a><br/>
List instructions, subscriber options, unsubscribe:<br/>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br/>
&nbsp;</blockquote>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>