Re: Drawing polygons on a time series

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 03 2013 - 08:47:29 MDT

Hi Chris,

There are a few issues:

 - gsn_add_polygon should be used on closed areas only.

 - The polygon x,y arrays must be in the same data space as the X and Y axis of the plot you are adding them to. You are using "(/1,2,3,...,30/)" for the Y axis which is not closed, and I'm not sure this is the correct data space of your plot. Your data space is represented by the arrays time(1416:6551) and wspd_70(1416:6551), so your polygon locations should be in the same space.

  - gsEdgeColor should be set to a color, and not to True.

Please fix these issues in your script and email ncl-talk if you still have problems.


On Apr 3, 2013, at 6:15 AM, Christopher Steele (ENV) wrote:

> Hi everyone,
> I've been trying to draw a time series with particular days highlighted by using the function gsn_add_polygon. Essentially I wish to draw the time series and highlight events by plotting vertical bars at different points in the time series.
> A couple of issues have sprung up. Firstly, the bars do not span the y-axis (despite increasing the y coordinate of the polygon) and I'm not sure I understand why. Secondly, I can't change the colors of the polygons, they just remain black. I've attached both the code and the resulting plot. Does anyone has any ideas as to how I can fix this?
> cheers
> Chris
> Christopher Steele,
> School of Environmental Sciences
> University of East Anglia
> Norwich
> ________________________________________
> <plt_offshore_season.png><offshore_long_tseries.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Apr 3 08:47:48 2013

This archive was generated by hypermail 2.1.8 : Thu Apr 04 2013 - 21:06:41 MDT