[ncl-talk] Fwd: error with gsnYRefLine

Adam Phillips asphilli at ucar.edu
Tue Feb 4 15:02:51 MST 2020


Hello,
Thanks for sending along a self-contained script that shows what you are
doing. What version of NCL are you running? I was able to get a bar chart
using your script without an error message. I have attached the plot. The
NCL version that I used was v6.4.0. If you are using a version earlier than
6.4.0 I suggest upgrading to the current version 6.6.2.
Adam

On Tue, Feb 4, 2020 at 11:37 AM Jayant via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Dear,
> I am interested in plotting a bar chart for the anomaly data (attached). I
> followed the example in  example:
> https://www.ncl.ucar.edu/Applications/Scripts/bar_4.ncl
> But I am getting the following error on including the gsnYRefLine:
> fatal:conform_dims: The array to be conformed must have the same number
> of dimensions as indicated by the length of the last argument.
> I am unable to understand the error which indicates the plot command. If I
> comment the gsnYRefLine, it works and gives a simple barchart but it does
> not have +ve and -ve separation.
> Please advise.
>
>      inp = asciiread("./inp_anom.txt",(/66,2/),"float")
>    ycolc0 = inp(:,0)
>    test_anom = inp(:,1)
>    ;
>    fwks   = gsn_open_wks ("png","panom_bar")
>    res                   = True
>    res at gsnYRefLine           = 0.0
>    res at gsnXYBarChart         = True
>    res at gsnAboveYRefLineColor = "blue"
>    res at gsnBelowYRefLineColor = "red"
>    plot  = gsn_csm_xy(fwks,ycol0c,test_anom,res) ; create plot
> _______________________________________________
> 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/20200204/229df933/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: panom_bar.png
Type: image/png
Size: 29459 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200204/229df933/attachment.png>


More information about the ncl-talk mailing list