[ncl-talk] fiddling with tickmarks

Mary Haley haley at ucar.edu
Thu Jun 28 10:06:49 MDT 2018


Hi Laura,

Instead of using the precision resource, I would suggest using the
tmYLFormat resource. The documentation for this is a little scary, but I
use example tm_8.ncl on the tickmark page to help me:

http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex8

I think maybe all you need is:

res at tmYLFormat = "f"

Although this removes the zero before the decimal point too. You should
look at this example and see if any other settings would work for you.

As for offsetting the data, I would need to see what your X array looks
like in order to understand how the data is being plotted. Does each line
have its own X values, or are you using gsn_csm_y to do the plotting?

In order to get the data offsetted in the way you want, you need to
associate X values with each of the curves. I've attached a simple example
of this.

Let ncl-talk know if this is not what you were asking.

Thanks,

--Mary



On Wed, Jun 27, 2018 at 2:23 PM, Laura Fowler <laura at ucar.edu> wrote:

> Hello:
>
> I am confused about tickmarks..... Here are my two questions (see
> attached plot).
>
>
> 1. For the left axis, when I do not set res at tmYLPrecision, when the
> labels of the Y axis are 0.00, 0.20, 0.30 instead of 0.0, 0.2, 0.3,
> etc... When I set
>
> res at tmYLPrecision           = 1
>
> then I get the warning
> warning:AutoComputeMajorTickMarks: The precision specified is smaller
> than the precision needed tick mark labels may not be correct
>
> but I do get the right labels for the Y axis. Not sure what to do
> about the warning?
>
>
> 2. For the GF, MSK, and NTIED lines, the data should be offset by 30
> minutes, and start in the middle between the major tick mark "00UTC"
> and the first minor tick marks. Is there a function that will offset
> the data relative to the tickmarks?
>
>
> Any suggestions? I looked around the "tm" examples but did not find
> what I needed.
>
> 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/20180628/1c9c6e36/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xy_1.ncl
Type: application/octet-stream
Size: 679 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180628/1c9c6e36/attachment.obj>


More information about the ncl-talk mailing list