Hi Mark,
(answers below)
On 03/10/2011 10:28 AM, Mark Chan wrote:
> Dear NCL users,
>
> The attached files are ncl script, input data and a plot. The plot is what I
> wanted but with a trick to make it using "gsn_csm_xy".
>
> (1) why here did the "bot_plot = gsn_csm_xy (wks,tim,dots,res)" always ask
> 2-dimension data (dots), so I have to duplicate the same data one more time?
I replaced this line:
bot_plot = gsn_csm_xy (wks,tim,dots,res)
with this:
bot_plot = gsn_csm_xy (wks,tim,data(:,4),res)
or this:
dots2 = data(:,4)
bot_plot = gsn_csm_xy (wks,tim,data(:,4),res)
and I do not get any kind of error message running ncl6.0.0-beta
> (2) How to make "res@lbLabelStride= 1" work?
lbLabelStride can be used to set the labeling stride for a label bar. I
assume you want to alter the x-axis tickmark labels? If so:
res@tmXBMode = "Explicit"
res@tmXBValues = ispan(1,12,1)
res@tmXBLabels = res@tmXBValues
res@tmXBMinorValues = fspan(0,12,25)
see example #2 here:
http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex2
> (3) How to overlay "dots" on the top?
Change this:
bot_plot = gsn_csm_xy (wks,tim,data(:,4),res) ; create dots
to this:
res@xyCurveDrawOrder = "PostDraw"
bot_plot = gsn_csm_xy (wks,tim,data(:,4),res) ; create dots plot
xyCurveDrawOrder is used to alter when xy Curves are drawn. See the draw
order page here:
http://www.ncl.ucar.edu/Applications/draworder.shtml
Finally, keep in mind that you can only use the colors that are present
in the workstation colormap. As you are not loading a different colormap
by saying something like this:
gsn_define_colormap(wks,"BlGrYeOrReVi200")
you will only get the default colormap which is this:
http://www.ncl.ucar.edu/Applications/draworder.shtml
(unless you are specifying a different colormap in your .hluresfile)
So when you specify "brown", NCL will try to grab the closest color to
brown from the current colormap. If brown is not present in the
colormap, then NCL will try to grab the closest color to brown, which
may or may not be a color anywhere close to brown.
http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml
Good luck,
Adam
>
> Thanks a lot!
> Mark
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- __________________________________________________ Adam Phillips asphilli@ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 Climate and Global Dynamics Division fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Mar 10 10:55:23 2011
This archive was generated by hypermail 2.1.8 : Thu Mar 10 2011 - 21:44:37 MST