<div dir="ltr"><div class="gmail_default" style="font-size:small">If you simply want to create a map plot with scattered dots or some other kind of markers on it, then you should use gsn_csm_map to create the map, and gsn_add_polymarker to add the dots to the map.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">We have a few examples of this at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style><a href="http://www.ncl.ucar.edu/Applications/polyg.shtml">http://www.ncl.ucar.edu/Applications/polyg.shtml</a><br></div><div class="gmail_default" style><br></div><div class="gmail_default" style>See examples polyg_8.ncl, polyg_14.ncl, polyg_15.ncl.</div><div class="gmail_default" style><br></div><div class="gmail_default" style>If this is not what you want, then please be very specific about what you mean by a &quot;scatter lat lon&quot; plot.</div><div class="gmail_default" style><br></div><div class="gmail_default" style>--Mary</div><div class="gmail_default" style><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 9:39 AM, Kunal Bali <span dir="ltr">&lt;<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>&gt;</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>Dear Mary<br><br></div>Thanks for your reply but as you mentioned gsn_csm_xy for a scatter plot , its not what i am looking for. I am trying to create scatter lat lon map  that why i used  gsn_csm_contour_map<br><br><br><br>;*************************************************<br>; corel_3.ncl<br>;<br>; Concepts illustrated:<br>;   - Calculating a two-dimensional correlation in time<br>;   - Reordering an array                        <br>;   - Copying attributes from one variable to another<br>;   - Copying coordinate arrays from one variable to another<br>;<br>;************************************************<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>begin<br>;************************************************<br>; open file and read in variable<br>;***********************************************<br>  in1  = addfile(&quot;/home/kunal/Pictures/NCL_Scripts/plot/AOD_04-11.nc&quot;,&quot;r&quot;)<br>  in2  = addfile(&quot;/home/kunal/Pictures/NCL_Scripts/plot/CO_4-11.nc&quot;,&quot;r&quot;)<br>  <br>  tmp1 = in1-&gt;Optical_Depth_Land_And_Ocean_Mean_Mean<br>  tmp2 = in2-&gt;CO_total_column_A<br><br>  lon@units = &quot;degrees_east&quot;<br>  lat@units = &quot;degrees_north&quot;<br><br>  <br>;************************************************<br><br>;***********************************************<br>  var1 = tmp1(lat|:,lon|:)<br>  var2 = tmp2(lat|:,lon|:)<br>;************************************************<br>; calculate cross correlations<br>;************************************************<br>  maxlag = 2                                    ; set lag<br><br>  <br>  ccr = esccr(var1,var2,maxlag)                   ; calc cross correlations<br><br>; copy meta data and coordinate variables using contributed functions<br>  copy_VarAtts(var1, ccr)                    <br>  copy_VarCoords_1(var2,ccr)<br><br>;************************************************<br>; plot the correlations<br>;************************************************<br>  wks  = gsn_open_wks(&quot;ps&quot;,&quot;corel&quot;)              ; open a ps plot<br>  gsn_define_colormap(wks,&quot;BlWhRe&quot;)              ; choose colormap<br> <br>  res                      = True                ; make plot mods<br><br>  res@cnFillOn             = True                ; turn on color<br><br><br>  res@gsnSpreadColors      = True                ; use full colormap<br><br><br>  res@lbLabelAutoStride    = True                ; automatic lb label stride<br><br>  res@cnLinesOn            = False               ; turn off contour lines<br>  res@cnLevelSelectionMode = &quot;ManualLevels&quot;      ; manually set cn levels<br>  res@cnMinLevelValF       = -1.                 ; min level<br>  res@cnMaxLevelValF       =  1.                 ; max level<br>  res@cnLevelSpacingF      = .1                  ; contour level spacing<br><br>  lag                      = 0<br>  res@tiMainString         = &quot;Correlations at lag &quot;<br>  plot = gsn_csm_contour_map_ce(wks,ccr,res) <br>;************************************************<br>end<br><br><br><br></div><div class="gmail_extra"><span class=""><br clear="all"><div><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio &amp; Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br><br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Fri, Nov 7, 2014 at 8:35 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</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">Kunal,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The error message is telling you exactly what the problem is: you are trying to subscript an array as if it were a 3D array, when it is really a 2D array:</div><span><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px">fatal:Number of subscripts do not match number of dimensions of variable,(3) Subscripts used, (2) Subscripts expected</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">fatal:[&quot;Execute.c&quot;:8567]:</span><span style="font-family:arial,sans-serif;font-size:13px">Execute: Error occurred at or near line 63 in file scatter.ncl</span><br></div><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></span><div class="gmail_default" style="font-size:small"><span style="font-family:arial,sans-serif;font-size:13px">You are subscripting &quot;ccr&quot; with (:,:,lag), but it is only 2D, so you need (:,lag)</span></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You said you are trying to create a scatter graph, but you are calling gsn_csm_contour_map, which is trying to put contours over a map. This won&#39;t work because this is not lat/lon data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Do you mean to call gsn_csm_xy for a scatter plot? If so, see example xy_4.ncl at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/xy.shtml#ex4" target="_blank">http://www.ncl.ucar.edu/Applications/xy.shtml#ex4</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">or the scatter plot page:</div><div class="gmail_default"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/scatter.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/scatter.shtml</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">--Mary<br></div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, Nov 7, 2014 at 3:20 AM, Kunal Bali <span dir="ltr">&lt;<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>&gt;</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"><div><div><div>Dear NCL users<br><br></div>I have been trying to plor scatter graph but getting an error <br><br>fatal:Number of subscripts do not match number of dimensions of variable,(3) Subscripts used, (2) Subscripts expected<br>fatal:[&quot;Execute.c&quot;:8567]:Execute: Error occurred at or near line 63 in file scatter.ncl<br><br></div>please see the attached script <br><br></div>Thank You<span><font color="#888888"><br><div><br><br clear="all"><div><div><div><div><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio &amp; Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br><br></div><div><br></div><div><br></div><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div>
</div></div></div></div></font></span></div>
<br></div></div>_______________________________________________<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>
</blockquote></div><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>