<div dir="ltr">
<p class="gmail-p1"><span class="gmail-s1">Hi there,</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">Thanks for help in advance.</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">I am doing something very similar to xy_2.ncl example on the NCL examples webpage. I have simplified the code to try and work out where it is going wrong.</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">I get no error message however the pdf which is produced is empty and is 0 bytes.</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">I have written out the final data to make code shorter. I can’t find where my code is any different to the example which makes me think there is something else going wrong.</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">If I replace pdf with png it gives this error message which I couldn’t find anything on:</span></p>
<p class="gmail-p3"><span class="gmail-s1"> GKS ERROR NUMBER -502 ISSUED FROM SUBROUTINE GCLRWK:</span></p>
<p class="gmail-p3"><span class="gmail-s1"> -- cairo driver error: error opening output file</span></p>
<p class="gmail-p4"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">Thank you very much,</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">Mark</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</span></p>
<p class="gmail-p1"><span class="gmail-s1">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</span></p>
<p class="gmail-p1"><span class="gmail-s1">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">; ----------------------------------------------</span></p>
<p class="gmail-p1"><span class="gmail-s1">begin</span></p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="gmail-p1"><span class="gmail-s1">wks = gsn_open_wks ("pdf", "TS") ; send graphics to PDF file</span></p></blockquote>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="gmail-p1"><span class="gmail-s1">data2 = (/(/273.1187, 273.3957, 271.8196, 268.2388, 265.0738, 263.2264, 262.0622, 261.7988, 263.2089, 266.001, 269.4273, 271.867, 273.1187/), (/275.6794, 276.363, 275.8335, 273.9187, 271.6543, 269.8786, 268.6503, 267.9535, 268.2413, 269.8357, 272.1223, 274.2099, 275.6794/), (/274.4088, 274.9937, 273.6758, 269.9453, 266.8276, 264.6391, 263.7714, 263.5388, 264.7565, 267.5732, 270.5323, 272.9919, 274.4088/)/)</span></p></blockquote>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="gmail-p1"><span class="gmail-s1">months = ispan(1,13,1)</span></p></blockquote>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="gmail-p1"><span class="gmail-s1">res = True ; plot mods desired</span></p></blockquote>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="gmail-p1"><span class="gmail-s1">res@tiMainString = "Antarctic surface temperature" ; add title</span></p></blockquote>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="gmail-p1"><span class="gmail-s1">res@xyMarkerColors = (/"blue","red","green"/)</span></p></blockquote>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="gmail-p1"><span class="gmail-s1">plot = gsn_csm_xy (wks, months, data2, res) ; create plot</span></p></blockquote>
<p class="gmail-p1"><span class="gmail-s1">end</span></p></div>