<div dir="ltr">Thanks Adam, I am going to try this and let you know.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 7, 2021 at 4:53 PM Adam Phillips <<a href="mailto:asphilli@ucar.edu">asphilli@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Andrew,<div>I (unfortunately) have plenty of experience with draw order issues with polygons, polylines and text. It can get quite frustrating. If memory serves, there's a weird quirk where NCL only listens to one tfPolyDrawOrder setting for all polygons/polymarkers/polylines/gsn*text, regardless if you set this 3 different ways in 3 different resource lists. </div><div><br></div><div>You spoke of two issues you are having:</div><div><i>1 - When the polygons get drawn, regardless of whether I set the draw order to PreDraw or not, they are on top of the xyline and the points/labels.</i></div><div>I don't see this issue in the plot you sent, so I must be missing something. The orange line is on top of the green and beige polygon boxes.<br></div><div><i><br></i></div><div><i>2 - The other issue I have is that I am trying to get the xy-line and the point labels to be on top of the text that I overlay (such as the "Elevated" label in the attached image).</i></div><div>This issue I do see, as the "8" on the 7am Monday reading is getting overwritten by the "Elevated" text. </div><div><br></div><div>Things to try (in no particular order):</div><div>1 - For any text that you want to be on top (and overlay everything else) call these sections of code <b>after</b> you call draw(plot). This technically should fail, but it's a work around I've used successfully before. <br></div><div>2 - Along the same lines, try moving different code sections around, calling the text/polylines etc that you want on top as near to the end as possible. Again, the order of your code shouldn't alter anything, but sometimes it does. </div><div>3 - If this is going to be a static image, the sizes of everything are not changing and the NDC coordinates of anything will not change, and you are not paneling, the big hammer would be to draw the polygons, the gsn_csn_xy line, the line value labels, and the legend. Then call draw(plot), but then use gsn_text_ndc to place the "High/Moderate..." exactly where you want it. </div><div>4 - Use gsn_add_text instead of gsn_text if you can. </div><div><br></div><div>This is definitely a weakness in NCL's graphics. It would be great if NCL had something akin to what is done with other software with layers, where you can say put this label on top of this line on top of this polygon and so on. When I have a number of polygon/polyline/polymarker calls, and I have to mess with the draw order of the various objects, I know that there's a good chance that I will have to partake in a fair bit of trial and error. Hopefully you are able to figure things out.</div><div>Hope the above helps,</div><div>Adam</div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 5, 2021 at 8:36 AM Andrew Kren - NOAA Federal via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi ncl-talk,<div><br></div><div>Sorry for the bother. I am making an xy plot where I plot the xy-line along with points labeling the values at certain intervals. I am overlapping polygons to specify different levels of the xy values using gsn_add_polygon. When the polygons get drawn, regardless of whether I set the draw order to PreDraw or not, they are on top of the xyline and the points/labels. I even set my xyline draw order to PostDraw and that does not seem to alleviate it. The other issue I have is that I am trying to get the xy-line and the point labels to be on top of the text that I overlay (such as the "Elevated" label in the attached image). I was not able to find a setting to set the draw order of text so any input is appreciated.</div><div><br></div><div>I appreciate any help you can provide. I attached my script for convenience.<br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><pre cols="72" style="white-space:pre-wrap;color:rgb(34,34,34);font-family:"arial black",sans-serif"><span style="font-family:arial,helvetica,sans-serif">Andrew Kren
Meteorologist
NOAA's National Weather Service
Raleigh Forecast Office
1005 Capability Drive, Suite 300
Raleigh, North Carolina 27606
voice: 919-326-1035
mailto: <a href="mailto:andrew.kren@noaa.gov" target="_blank">andrew.kren@noaa.gov</a></span><span style="font-family:arial,helvetica,sans-serif">
</span><a href="http://www.weather.gov/rah" style="color:rgb(17,85,204)" target="_blank"><span style="font-family:arial,helvetica,sans-serif">http://www.weather.gov/rah</span></a></pre></div><div dir="ltr"><img src="https://www.aoml.noaa.gov/pix/AOML/50th01.png" width="420" height="65"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><pre cols="72" style="white-space:pre-wrap;color:rgb(34,34,34);font-family:"arial black",sans-serif"><span style="font-family:arial,helvetica,sans-serif">Andrew Kren
Meteorologist
NOAA's National Weather Service
Raleigh Forecast Office
1005 Capability Drive, Suite 300
Raleigh, North Carolina 27606
voice: 919-326-1035
mailto: <a href="mailto:andrew.kren@noaa.gov" target="_blank">andrew.kren@noaa.gov</a></span><span style="font-family:arial,helvetica,sans-serif">
</span><a href="http://www.weather.gov/rah" style="color:rgb(17,85,204)" target="_blank"><span style="font-family:arial,helvetica,sans-serif">http://www.weather.gov/rah</span></a></pre></div><div dir="ltr"><img src="https://www.aoml.noaa.gov/pix/AOML/50th01.png" width="420" height="65"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>