[ncl-talk] confused about tickmarks

Mary Haley haley at ucar.edu
Thu Aug 16 20:20:29 MDT 2018


Hi Laura,

I'm going through some older emails that look like they don't have
responses, and this is one of them.

The gsn_csm_pres_hgt function is actually two plots overlaid on top of each
other.  The base plot is a "LogLin" plot which allows us to have a log
axis. The overlaid plot is the contour plot and it's the one that's setting
all the tickmark stuff.

When you did a getvalues on plot, this is the LogLin plot and hence doesn't
have the tickmark labels.  If you call "print(plot)" you will see it has an
attribute "contour" that looks something like this:

  contour : h_lat_contour contourPlotClass 11

This is the thing you want to retrieve the labels from:

getvalues plot at contour
  "tmXBValues" : tmXBValues
end getvalues

Did you get your labeling problem figured out?

--Mary


On Thu, Aug 2, 2018 at 9:41 AM, Laura Fowler <laura at ucar.edu> wrote:

> Hello:
>
> Following the -email I sent yesterday regarding tickmarks, I simplified my
> ncl script to understand about the bottom tickmarks are labelled by default
> so that I can understand how to change them using tmXBValues and
> tmXBLabels. The simplified script is in
>
> /glade2/scratch2/laura/MPASprojects.2018/forPUBLICATION/TENDENCIES/
> rect.cu_kain_fritsch_sca.20151129-20160102 and the script is plot.ncl.
> Also see attached plot dtcup.kf.pdf.
>
>
> I tried to retrieve the default values of tmXBValues with the lines:
>
>
> res2 at tmXBMode = "Automatic"
>
> plot = gsn_csm_pres_hgt(wks,dtcup_interp_kf,res2)
>
>
> getvalues plot
>
>    "tmXBValues" : tmXBValues
>
> end getvalues
>
> print(" ")
>
> print(tmXBValues)
>
> Then I get:
>
> Variable: tmXBValues
>
> Type: float
>
> Total Size: 16 bytes
>
>             4 values
>
> Number of Dimensions: 1
>
> Dimensions and sizes: [4]
>
> Coordinates:
>
> (0) 0
>
> (1) 100
>
> (2) 200
>
> (3) 300
>
> (0)
>
> which is super confusing to me since the plot shows at least 6 values for
> the major tickmarks and not just 4. Is it possible to actually set
> different XB labels with gsn_csm_pres_hgt?
>
>
> I would really appreciate some hints on how to do this.
>
>
>
> Many thanks,
>
> Laura
>
>
>
> --
> !-----------------------------------------------------------
> --------------------------------------------------
> Laura D. Fowler
>
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
> !-----------------------------------------------------------
> --------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180816/bfdeb56b/attachment.html>


More information about the ncl-talk mailing list