[ncl-talk] a question on overlaying significance as hatching

Adam Phillips asphilli at ucar.edu
Fri Jan 31 14:22:53 MST 2020


Hi Hui,
Thank you for sending an easy to run script that clearly shows the problem.
The array that houses the data to be hatched (var_sig) has a time
coordinate variable that runs from 0-11.
Output from printVarSummary(var_sig)

Variable: var_sig
Type: float
Total Size: 8640 bytes
            2160 values
Number of Dimensions: 3
Dimensions and sizes: [time | 12] x [lat | 1] x [lon | 180]
Coordinates:
            time: [   0..  11]
            lat: [   0..   0]
            lon: [   0.. 358]

You are overlaying the var_sig array on a plot that was created using the
var_diff array.
Output from printVarSummary(var_diff)

Variable: var_diff
Type: float
Total Size: 8640 bytes
            2160 values
Number of Dimensions: 3
Dimensions and sizes: [y | 12] x [lat | 1] x [lon | 180]
Coordinates:
            y: [   1..  12]
            lat: [   0..   0]
            lon: [   0.. 358]

In order for the two plot fields to line up, you will want to match their
y-axis range. Adding the following line fixes your issue:
var_sig&time = ispan(1,12,1)

Hope that helps!
Adam




On Thu, Jan 30, 2020 at 12:35 PM Hui Ding via ncl-talk <ncl-talk at ucar.edu>
wrote:

>
> Dear Sir or Madam,
>
> I plotted a longitude-time hovmoeller diagram. Please see the attached
> file for script, data and figure.
>
> The problem is with plotting hatching in panel (c). You can see that
> hatching stops by November. But in fact, the December should have been
> hatched. How can I solve this problem?
>
> Thank you very much!
> Best,
> Hui Ding
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200131/a5069c7c/attachment.html>


More information about the ncl-talk mailing list