<div dir="ltr"><div><div><div>Hi,<br><br></div>Unfortunately, this is a known problem -- this color-compositing technique only works for the image-based output formats, not the document-based formats (ps, pdf, eps). I thought this was documented, but the only place I see it mentioned is in the code for example #9 at:<br><br><a href="http://ncl.ucar.edu/Applications/rgbacolor.shtml">http://ncl.ucar.edu/Applications/rgbacolor.shtml</a><br><br></div>This limitation should be noted a bit more prominently.<br><br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 4:30 AM, sk <span dir="ltr"><<a href="mailto:sdk0084@yahoo.com" target="_blank">sdk0084@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12pt"><div>Hi,<br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">I have problem to output my figure correctly in pdf (only red layer is visible, see below) but everything is fine if i output on screen or in png format. <br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">the following pieces of the code shows how i create the plot <br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">;---Construct RGBA colormaps...<br> ramp = fspan(0., 1., 255)<br> reds = new((/255, 4/), float)<br> greens = new((/255, 4/), float)<br> blues = new((/255, 4/), float)<br> reds = 0<br> greens = 0<br> blues = 0<br> reds(:,0) = ramp<br> greens(:,1) = ramp<br> blues(:,2) = ramp<br>
reds(:,3) = 1.<br> greens(:,3) = 0.<br> blues(:,3) = 0. <br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">wks = gsn_open_wks("pdf","../figures/"+prefix)<br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"> <br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"> ......<br> sres@lbLabelBarOn =
False <br> sres@cnFillMode = "RasterFill"<br> sres@cnLevelSelectionMode = "EqualSpacedLevels"<br> sres@cnMaxLevelCount = 254<br> sres@cnFillBackgroundColor = (/ 1., 1., 1., 1./)<br> sres@cnFillColors = greens<br> greenMap = gsn_csm_contour(wks, g, sres)<br> sres@cnFillColors = blues<br> blueMap = gsn_csm_contour(wks, b, sres)</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"> sres@cnFillColors = reds<br> plots(ri,0) = gsn_csm_contour_map(wks, r, sres)<br> overlay(plots(ri,0), greenMap)<br> overlay(plots(ri,0), blueMap)<br> draw(plots(ri,0))<br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">........</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"> gsn_merge_colormaps(wks,"MPL_gist_yarg","precip3_16lev")<br> dres = res ;up to here: resources for filled contours without thickmarks<br>.....</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"> plots(ri,1) = gsn_csm_contour_map(wks,pcp,dres)<br> plot_w1 = gsn_csm_vector(wks,u,v,vres)<br> plot_p = gsn_csm_contour(wks,emi,eres)<br> overlay(plots(ri,1), plot_w1)<br> overlay(plots(ri,1), plot_p)<br> draw(plots(ri,1))<br>....</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">Is it ncl limitation or i have to do something more?</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">Regards,</div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">sk<br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div></div></div><br>_______________________________________________<br>
ncl-talk mailing list<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>
<br></blockquote></div><br></div>