<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hey everyone,<br>
<br>
I am having trouble understanding how to alter tickmarks on a contour plot. I want to change my index numbers on the x and y axis to lat and lon values. I have been trying to use the example given here:
<a href="http://www.ncl.ucar.edu/Applications/Scripts/tm_2.ncl" target="_blank">http://www.ncl.ucar.edu/Applications/Scripts/tm_2.ncl</a>
<br>
<br>
Here is my code ( I have only tried altering the second plot out of the 2 e.g. for plot1(1)..):<br>
<br>
;----------MPIOM vs. ICON comparison plots<br>
<br>
<br>
<span style="background-color: rgb(255, 255, 153);"><br>
<font color="FF0000">wks = gsn_open_wks("x11","MPIOM_vs_ICON_panelplot_surface")<br>
gsn_define_colormap(wks,"gui_default") <br>
<br>
<br>
plot1 = new(2,graphic) <br>
<br>
res@gsnDraw = False ; don't draw<br>
res@gsnFrame = False ; don't advance frame<br>
resP = True<br>
res@tiYAxisString = "Latitude"<br>
res@tiXAxisString = "Longitude"<br>
resP@txString = "Surface T averaged for years 01-99"<br>
res@lbOrientation = "vertical" ; vertical label bar<br>
<br>
res@trXMinF = 0 ; set minimum X-axis value<br>
res@trXMaxF = 40 ; set maximum X-axis value <br>
res@trYMinF = 0 ; set minimum Y-axis value<br>
res@trYMaxF = 120 ; set maximum Y-axis value<br>
res@tiMainString = "MPIOM exp 12"<br>
<br>
<br>
plot1(0) = gsn_csm_contour(wks,Tavg(1,:,:),res)<br>
<br>
<br>
res@trXMinF = 0 ; set minimum X-axis value<br>
res@trXMaxF = 30 ; set maximum X-axis value <br>
res@trYMinF = 0 ; set minimum Y-axis value<br>
res@trYMaxF = 80 ; set maximum Y-axis value<br>
res@tiMainString = "ICON NOSH.UPW"<br>
<br>
res@tmXBMode = "Explicit" <br>
res@tmXBValues = (/-44.5,-27.5,-5.5,14.5,34.5/)<br>
res@tmXBLabels = "" + res@tmXBValues <br>
res@tmXBMinorValues = ispan(0,30,1)<br>
<br>
<br>
<br>
<br>
plot1(1) = gsn_csm_contour(wks,potTavg(1,:,:),res)<br>
<br>
<br>
gsn_panel(wks,plot1,(/1,2/),resP) </font></span><br>
<br>
<br>
<span style="background-color: rgb(255, 255, 255);"><font color="000000">I want l<font color="000000">ongitude from -44.5
<font color="000000">E</font> to 34.5 <font color="000000">W, once I know how to do it for longitude, I can then apply the code to the lat.<br>
<br>
<font color="000000">thanks<font color="000000"><font color="000000"> in advance!</font><br>
<br>
<font color="000000">Micha<font color="000000">el</font></font><br>
</font></font></font></font></font></span></div>
</body>
</html>