[ncl-talk] Adding text data in a contour plot

Kyle Griffin ksgriffin2 at wisc.edu
Tue Dec 1 06:51:08 MST 2015


Stefano,

It'll take some additional lines of code, but gsn_add_text has the
functionality you are most likely looking for.

https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_add_text.shtml

The biggest concern is that your x and y need to be individual pairs
corresponding to each and every grid point that you want the text at. In
essence, you would need a two-dimensional latitude array and
two-dimensional longitude array of only the points where you want text to
be plotted, as well as the values/strings you want plotted at those points.

I would recommend trying this function with a small number of grid points
first to make sure it works and does what you want before trying to make
the function apply to an entire grid. This may prove to be a bit trickier
with a WRF grid, I have not worked with them myself so I'm not sure. Let
the list know if you have any problems/questions...


Kyle

----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
Room 1407
1225 W Dayton St, Madison, WI 53706
Email: ksgriffin2 at wisc.edu

On Tue, Dec 1, 2015 at 5:31 AM, Stefano Guerra <guerras90 at gmail.com> wrote:

> Hi,
>
> I tried to search this function, but I couldn't find how can I add text
> data (from a WRF output) on a contour plot.
>
> Maybe I can explain better with an example, I want realize something like this:
>
>
> http://modeles2.meteociel.fr/modeles_gfs/runs/2015120106/3-580.GIF?01-6
>
>
> Thank you for your help,
> Stefano.
>
> _______________________________________________
> 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/20151201/b2c2e438/attachment.html 


More information about the ncl-talk mailing list