[ncl-talk] Plotting
Herb, Jason
jherb at albany.edu
Sat Jul 24 02:11:47 MDT 2021
Hi Rick,
Thank you for your help yesterday. With additional trial and error, I have finally got the station locations to plot based on different color coding for the ranges of data values. I have attempted to place a color bar on the figure to identify the data ranges, but are getting the following error messages:
warning:PlotManagerSetValues: LabelBar annotation cannot be added after NhlCreate
warning:lbAutoManage is not a valid resource in map.PlotManager at this time
warning:cnFillOn is not a valid resource in map at this time
warning:lbLabelBarOn is not a valid resource in map at this time
I am confused as to why this is occurring.
Attached is the updated code and plot.
Thanks,
Jason
________________________________
From: Rick Brownrigg <brownrig at ucar.edu>
Sent: Friday, July 23, 2021 12:12 PM
To: Herb, Jason <jherb at albany.edu>
Cc: ncl-talk at ucar.edu <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] Plotting
Hi Jason,
There are a several problems going on. str_get_field() is one-based in counting fields (maddenly enough), so your lat/lon variables are wrong (indexes 2 & 3, not 1 & 2). When you go to draw the markers, you assign gsMarkerColor the whole colors array, which is the source of the warnings -- did you intend something like "gsMarkerColor = colors(i,:)" ? Finally, if you print the arrays lon_new and lat_new, you'll see the arrays are of length 12, and the first 11 values contain -999's. I have not studied how those arrays were constructed.
Hope that helps...
Rick
On Fri, Jul 23, 2021 at 9:14 AM Herb, Jason via ncl-talk <ncl-talk at mailman.ucar.edu<mailto:ncl-talk at mailman.ucar.edu>> wrote:
Hello NCL users,
I am attempting to plot a series of polygons on a map of NYS that are based on a range of data from 0 to 1. I am attempting make each polygon show on the map as the proper color-code matching the label bar for a given range. Currently, I can get printout of the map with lat/lon axis data title, and for some odd reason there is a black dot over the "W" for the 75W label.
I have attached the script input file and the output png file.
thanks,
Jason
_______________________________________________
ncl-talk mailing list
ncl-talk at mailman.ucar.edu<mailto:ncl-talk at mailman.ucar.edu>
List instructions, subscriber options, unsubscribe:
https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210724/78fac540/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ozonetest.txt
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210724/78fac540/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: O3-NYS-DEC-GEOS-Rvals.png
Type: image/png
Size: 32475 bytes
Desc: O3-NYS-DEC-GEOS-Rvals.png
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210724/78fac540/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ozone.ncl
Type: application/octet-stream
Size: 5583 bytes
Desc: ozone.ncl
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210724/78fac540/attachment.obj>
More information about the ncl-talk
mailing list