<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I have now solved the issue by attaching coordinate arrays (0-120) and by defining res@pmTitleZone.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Cheers,</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br clear="all"></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div><font size="1"><span style="font-family:tahoma,sans-serif">Tabish U Ansari<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">PhD student, Lancaster Environment Center<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">Lancaster Univeristy<br> <span>Bailrigg</span>, <span>Lancaster</span>, <br><span>LA1 4YW</span>, <span>United Kingdom</span></span></font><br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 25 Apr 2019 at 16:47, Tabish Ansari <<a href="mailto:tabishumaransari@gmail.com">tabishumaransari@gmail.com</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"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">It would also be great if I could superpose a grid of dotted lines (following the dimensions of the data, in this case 12x12) on top of the contour plot.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Cheers,</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br clear="all"></div><div><div dir="ltr" class="gmail-m_-7329140586925644734gmail_signature"><div dir="ltr"><div><div><font size="1"><span style="font-family:tahoma,sans-serif">Tabish U Ansari<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">PhD student, Lancaster Environment Center<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">Lancaster Univeristy<br> <span>Bailrigg</span>, <span>Lancaster</span>, <br><span>LA1 4YW</span>, <span>United Kingdom</span></span></font><br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 25 Apr 2019 at 16:44, Tabish Ansari <<a href="mailto:tabishumaransari@gmail.com" target="_blank">tabishumaransari@gmail.com</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"><div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I'm trying to make a contour plot from a 12x12 matrix which I'm reading from a table. The x and y axes are automatically labelled from 0 to 12 based on the default index numbers of the data (0,11). However, I want to explicitly define tickmark labels starting from 0 to 120 with each grid representing a change of 10 units. I tried using <i>res@tmXBMode = "Explicit" and res@tmXBValues = ispan(0,120,10) </i>but that then shows only two tickmarks (0 and 10) adapted to the index numbers. I have pasted my script below and attached the plot.<br><i></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br><br>begin<br><br>ncol = 2 ; THE TWO COLUMNS REPRESENT 2 DAYS: 24TH AND 30TH OCTOBER<br>data = readAsciiTable("/home/tabish/Emulation/EmulPreds_responsesurface_Run2.csv", ncol, "float", 1); THIS WILL IGNORE THE 1ST ROW WHICH IS HEADER<br>data@_FillValue = -999<br>print("table read-in successfully")<br>printVarSummary(data)<br><br>;TRANSFORMING 144X1 STRUCTURE TO 12X12 STRUCTURE FOR CONTOUR PLOT<br>c=0<br>a = new((/12,12/),float)<br>do i=0,11<br> do j=0,11<br> a(i,j) = data(c,0)<br> c = c+1<br> end do<br>end do<br><br> wks = gsn_open_wks("x11","RS") ; Send graphics to PNG file<br><br>; Set up resources.<br> res = True<br> res@gsnMaximize = True<br> res@cnFillOn = True ; Turn on contour fill<br> res@cnFillPalette = "amwg" ; Set color map<br> res@tiYAxisString = "Parameter 2"<br> res@tiXAxisString = "Parameter 1"<br> res@cnFillMode = "RasterFill"<br> res@cnLinesOn = False<br><br> ;res@tmXBMode = "Explicit"<br> ;res@tmXBValues = ispan(0,120,10)<br> plot = gsn_csm_contour(wks,a,res) ; Create filled contours<br><br>end</i><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Also, I want to shift the X-axis label above the legendbar.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Any help would be appreciated.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish<br clear="all"></div><div><div dir="ltr" class="gmail-m_-7329140586925644734gmail-m_6752076499773307064gmail_signature"><div dir="ltr"><div><div><font size="1"><span style="font-family:tahoma,sans-serif">Tabish U Ansari<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">PhD student, Lancaster Environment Center<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">Lancaster Univeristy<br> <span>Bailrigg</span>, <span>Lancaster</span>, <br><span>LA1 4YW</span>, <span>United Kingdom</span></span></font><br></div></div></div></div></div>
</blockquote></div>
</blockquote></div>