<div dir="ltr"><div class="gmail_default" style="font-size:small">Jian,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for the script. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The problem is that gsn_contour_shade is using missing values for some of the contour color fill, and for whatever reason, the EPSI output renders this in black, while all other output formats render this in white.<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I've fixed gsn_contour_shade so that it doesn't use missing values for color. If you have permissions to edit $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl, then you can fix this yourself.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">All you need to do is add one line of code (see the "HERE'S THE FIX" line)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace">;---Create array for fill, set all to transparent or white</font></div><div class="gmail_default"><font face="monospace, monospace"> if(shade_type.eq."color") then</font></div><div class="gmail_default"><font face="monospace, monospace"> colist = new((/N+1,4/),double)</font></div><div class="gmail_default"><font face="monospace, monospace"> colist = 1. ; HERE'S THE FIX</font></div><div class="gmail_default"><font face="monospace, monospace"> colist(:,3) = 0.</font></div><div class="gmail_default"><font face="monospace, monospace"> else</font></div><div class="gmail_default"><font face="monospace, monospace"> colist = new(N+1,integer)</font></div><div class="gmail_default"><font face="monospace, monospace"> colist = -1</font></div><div class="gmail_default"><font face="monospace, monospace"> end if</font></div><div class="gmail_default"><br></div><div class="gmail_default">If you can't modify gsn_code.ncl yourself, then you can use the attached fix for gsn_contour_shade. You will need to load this script after you load gsn_code.ncl:</div><div class="gmail_default"><br></div><div class="gmail_default"><font face="monospace, monospace">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</font></div><div class="gmail_default"><font face="monospace, monospace">load "gsn_contour_shade_fix.ncl"</font></div><div class="gmail_default"><br></div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">As another work-around, you can set gsnShadeLow to white for all colors below the desired level.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 4:26 AM, Jian Zheng <span dir="ltr"><<a href="mailto:jzheng8606@gmail.com" target="_blank">jzheng8606@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Attached are the script, the epsi and eps figures.</div><div><br></div><div>Best wishes,</div><div>Jian</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 1:45 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">This is likely an EPSI issue, and not gsn_contour_shade problem. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Can you provide a short script that illustrates the problem?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, May 10, 2016 at 7:49 AM, Jian Zheng <span dir="ltr"><<a href="mailto:jzheng8606@gmail.com" target="_blank">jzheng8606@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div><br></div><div>I usually output my ncl plot into epsi format, because eps has much blank space around the plot. Today when I used gsn_contour_shade to mask contours higher than a value in my contour plot, the contours lower than the value are filled with black. This happened for epsi output, but it worked well for eps or x11 output. I am wondering where does this problem come from, gsn_contour_shaded or epsi format?</div><div><br></div><div>My ncl version is 6.3.0.</div><div><br></div><div>Thanks,</div><div>Jian</div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>