|
From: Ng, E. <enr...@lm...> - 2009-04-30 21:37:19
|
The rotation and resetting of the labels isn't a big issue.
The issues is when I reverse the direction. Matplotlib seems to only
want to plot in an anti-clockwise direction. I can transform the data
to be backwards so that it looks ok, however when it tries to connect
the start and end points, it goes back around and draws a circle instead
of just connecting the two points using a straight line.
On Tuesday 21 April 2009 08:36:35 Michler, Matthias wrote:
Hi Enrico,
I'm afraid that this functionality is missing in matplotlib, but I'm not
an
expert so there is still hope that this can be easily achieved.
A work around, that comes to my mind is resetting the label values using
an
idea from another mail on this list
( thetagrids( range(0,360,45), ('E', 'NE', 'N','NW', 'W', 'SW', 'S',
'SE') ) )
label_values = [item % 360 for item in range(90, -260, -45)]
thetagrids( range(0,360,45), label_values)
and using some well defined (linear) transformation for plotting -
translating
your data to the actual tick positions and corresponding labels.
best regards Matthias
|
|
From: Eric F. <ef...@ha...> - 2009-04-30 22:13:42
|
Ng, Enrico wrote:
> The rotation and resetting of the labels isn't a big issue.
> The issues is when I reverse the direction. Matplotlib seems to only
> want to plot in an anti-clockwise direction. I can transform the data
> to be backwards so that it looks ok, however when it tries to connect
> the start and end points, it goes back around and draws a circle instead
> of just connecting the two points using a straight line.
What version of mpl are you using? This sounds like behavior that is
not current.
Eric
>
> On Tuesday 21 April 2009 08:36:35 Michler, Matthias wrote:
> Hi Enrico,
>
> I'm afraid that this functionality is missing in matplotlib, but I'm not
> an
> expert so there is still hope that this can be easily achieved.
>
> A work around, that comes to my mind is resetting the label values using
> an
> idea from another mail on this list
> ( thetagrids( range(0,360,45), ('E', 'NE', 'N','NW', 'W', 'SW', 'S',
> 'SE') ) )
>
> label_values = [item % 360 for item in range(90, -260, -45)]
> thetagrids( range(0,360,45), label_values)
>
> and using some well defined (linear) transformation for plotting -
> translating
> your data to the actual tick positions and corresponding labels.
>
> best regards Matthias
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Michael D. <md...@st...> - 2009-05-01 12:34:46
|
To emulate the current behavior (which doesn't try to interpolate
between points) you can pass "resolution=1" to the polar command. But I
agree with Eric -- it sounds like updating my resolve this issue.
Mike
Eric Firing wrote:
> Ng, Enrico wrote:
>
>> The rotation and resetting of the labels isn't a big issue.
>> The issues is when I reverse the direction. Matplotlib seems to only
>> want to plot in an anti-clockwise direction. I can transform the data
>> to be backwards so that it looks ok, however when it tries to connect
>> the start and end points, it goes back around and draws a circle instead
>> of just connecting the two points using a straight line.
>>
>
> What version of mpl are you using? This sounds like behavior that is
> not current.
>
> Eric
>
>
>> On Tuesday 21 April 2009 08:36:35 Michler, Matthias wrote:
>> Hi Enrico,
>>
>> I'm afraid that this functionality is missing in matplotlib, but I'm not
>> an
>> expert so there is still hope that this can be easily achieved.
>>
>> A work around, that comes to my mind is resetting the label values using
>> an
>> idea from another mail on this list
>> ( thetagrids( range(0,360,45), ('E', 'NE', 'N','NW', 'W', 'SW', 'S',
>> 'SE') ) )
>>
>> label_values = [item % 360 for item in range(90, -260, -45)]
>> thetagrids( range(0,360,45), label_values)
>>
>> and using some well defined (linear) transformation for plotting -
>> translating
>> your data to the actual tick positions and corresponding labels.
>>
>> best regards Matthias
>>
>> ------------------------------------------------------------------------------
>> Register Now & Save for Velocity, the Web Performance & Operations
>> Conference from O'Reilly Media. Velocity features a full day of
>> expert-led, hands-on workshops and two days of sessions from industry
>> leaders in dedicated Performance & Operations tracks. Use code vel09scf
>> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Ng, E. <enr...@lm...> - 2009-05-01 14:47:26
|
I am using the 0.98.5 That works for me too but its gets messed up if I modify theta in order to rotate the graph Theta = pi/2 - theta will cause the circles to appear If I modify r, then it works ok -----Original Message----- From: Eric Firing [mailto:ef...@ha...] Sent: Friday, May 01, 2009 2:14 AM To: Ng, Enrico Subject: Re: [Matplotlib-users] Polar plotting clockwise and rotated With mpl from svn (and using ipython -pylab), the following works: rr = rand(36) r = np.hstack((rr, [rr[0]])) theta = linspace(0, 2*pi, 37) polar(theta, r) Eric |