Re: How to draw a box over a specific region on a plot

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 15 2014 - 11:17:40 MST

Yes, NCL has that capability. I don't know whether we have an example that directly addresses your question, but you can take a look at the example polyg_13.ncl (scroll down through http://www.ncl.ucar.edu/Applications/polyg.shtml) which draws filled boxes over a map. You could replace the xx_polygon calls with xx_polyline calls, although you need to be aware that the polygon code completes the polygon if necessary by drawing from the last point given back to the first point, whereas the polyline code just stops at the last point. You might also want to be aware of the functions datatondc and ndctodata which convert back and forth between data (lat/lon in the case of maps) coordinates and NDC (normalized device coordinates -- a 0.0 to 1.0 linear coordinate system that covers the viewspace of the plot).

The next version of NCL should have more flexibility with regard to drawing straight (non-interpolated) lines between points on a map without the necessity of converting to NDC coordinates.
 -dave

On Jan 15, 2014, at 10:02 AM, Melissa Lazenby <M.Lazenby@sussex.ac.uk> wrote:

> Hi All
>
> I have created maps that I would now just like to highlight a smaller region within the map by drawing a rectangular box around that region. Is there any examples of how to do this and does NCL have that capability?
>
> Many thanks!
>
> Kind Regards
> Melissa
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 15 11:17:52 2014

This archive was generated by hypermail 2.1.8 : Sun Jan 19 2014 - 21:56:35 MST