Re: XY plot in polar coordinates

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 24 2011 - 16:03:12 MST

Nice work Chris! Would it be okay for me to include this example on the radar page?

--Mary

On Feb 24, 2011, at 2:22 PM, Chris Fletcher wrote:

> Hi Mary
>
> Thanks for the update.
>
> I had taken your previous example (mappoints.ncl) and hacked together solutions to label the radial circles, and to rescale the radius values to units of latitude. The former was quite easy, I just borrowed from http://www.ncl.ucar.edu/Applications/Scripts/lcmask_4.ncl. The latter was a little more convoluted because gsn_polar_map has 90N at the origin, so I had to reverse everything so that 0N was the origin.
>
> My code is attached, along with the output. I used text labels instead of markers, but the idea is the same.
>
> Hopefully it makes sense and could be of some use.
>
> Chris
>
> <mappoints2.ncl><mappoints2-0.png>
> On 23-02-2011, at 6:45 PM, Mary Haley wrote:
>
>> Hi Chris,
>>
>> I've overhauled the "radar_3.ncl" example script to draw a radial plot background, and then attach some dummy markers.
>>
>> I don't know much about plotting radial data, so I would be happy to improve this example based on any suggestions you might have.
>>
>> See:
>>
>> http://www.ncl.ucar.edu/Applications/radar.shtml#ex3
>>
>> --Mary
>>
>> On Feb 17, 2011, at 6:17 PM, Chris Fletcher wrote:
>>
>>> Hi Mary -- thanks, that looks great! In my plot each point will show the amplitude (r) and phase (theta) of a sine wave, so I will probably have to convert r to latitude in order for it to plot correctly on the lon/lat axis.
>>>
>>> Here are two possible layouts for the axis labels:
>>> <http://scienceoss.com/wp-content/uploads/2008/07/polar-bar-plot-alpha.png>
>>> <http://www.clubfarpoint.com/FarPointSupportSite/Modules/Docs/SpreadWeb5Help/plottypes-polar-point1.png>
>>>
>>> Chris
>>>
>>>
>> <radar_3_2_lg.png>
>>>
>>>
>>> On 17-02-2011, at 4:44 PM, Mary Haley wrote:
>>>
>>>> Chris,
>>>>
>>>> You can create a plot like this with NCL. See the attached script and PNG file, where I used dummy data over a polar map plot.
>>>>
>>>> I will try to create an example soon without having to use a polar map and lat/lon values. Do you have a sample of the type of labels you want?
>>>>
>>>> --Mary
>>>> <mappoints.png><mappoints.ncl>
>>>>
>>>> Do you have a sOn Feb 17, 2011, at 1:19 PM, Chris Fletcher wrote:
>>>>
>>>>> Hi Mary
>>>>>
>>>>> Thanks for pointing out this example. It is getting towards what I need, although I would ultimately like the plot to look more like this:
>>>>> http://matplotlib.sourceforge.net/_images/polar_scatter.png
>>>>> with all the appropriate labels and radial grid lines etc.
>>>>>
>>>>> Unfortunately, I am not experienced enough with NCL to know if there is a simple way (e.g. using appropriate resources) to go from radar_3.ncl to something like the above? Alternatively, perhaps one could modify the Taylor Diagram script to achieve something similar?
>>>>>
>>>>> Thanks
>>>>> Chris
>>>>>
>>>>> On 16-02-2011, at 3:01 PM, Mary Haley wrote:
>>>>>
>>>>>> Hi Chris,
>>>>>>
>>>>>> We have one example on our "radar" page showing how to do a contour plot:<radar.png>
>>>>>>
>>>>>> http://www.ncl.ucar.edu/Applications/radar.shtml
>>>>>>
>>>>>> I took this example and created something that does an XY plot with markers, although it's rather goofy looking because I colored the values based on random ranges. Also, there are a lot of points which tend to overlap. You can control this kind of thing by subscripting your data so not every point is plotting, or you can change the size of your markers (which is what I did here, but still had overlap).
>>>>>>
>>>>>> Is this what you had in mind?
>>>>>>
>>>>>> --Mary
>>>>>>
>>>>>>
>>>>>> On Feb 15, 2011, at 5:24 PM, Chris Fletcher wrote:
>>>>>>
>>>>>>> I am trying to make an XY plot in polar coordinates (r,theta space) and I was wondering how to do this in NCL? Perhaps there is some way to achieve this by combining gsn_csm_map_polar (without plotting the map) and gsn_add_polymarker?
>>>>>>>
>>>>>>> (Apologies if this has been covered elsewhere; I found some previous NCL help posts from 2003 where others were asking about this, but I couldn't see anything more recent).
>>>>>>>
>>>>>>> Thanks
>>>>>>> Chris
>>>>>>> _______________________________________________
>>>>>>> ncl-talk mailing list
>>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>
>>>
>>> -----------------------------------------------
>>> Chris Fletcher
>>> Assistant Professor & SHARCNET Research Chair
>>> EV-1, Room 340
>>> Geography & Environmental Management, University of Waterloo
>>> 200 University Ave W, Waterloo, ON, N2L 3G1
>>> (519) 888-4567 x36855
>>> http://www.env.uwaterloo.ca/u/c5fletch
>>> -----------------------------------------------
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
> -----------------------------------------------
> Chris Fletcher
> Assistant Professor & SHARCNET Research Chair
> EV-1, Room 340
> Geography & Environmental Management, University of Waterloo
> 200 University Ave W, Waterloo, ON, N2L 3G1
> (519) 888-4567 x36855
> http://www.env.uwaterloo.ca/u/c5fletch
> -----------------------------------------------
>
> _______________________________________________
> 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 Thu Feb 24 16:03:18 2011

This archive was generated by hypermail 2.1.8 : Fri Feb 25 2011 - 08:50:46 MST