[matplotlib-devel] clabel and rotation

2009-05-08 Thread Evan Mason
Hi, would it be possible to add a keyword to clabel to optionally switch off
the angle fix in contour.py lines 384+?

# Fix angle so text is never upside-down
if rotation > 90:
rotation = rotation - 180.0
if rotation < -90:
rotation = 180.0 + rotation

Something like "clabel(CS, upsidedown=True)" with the default as False would
do it.

I am using clabel to put directional arrows on a streamline contour plot,
and this rotation causes some of the arrows to point the wrong way.  I'm
willing to try to do it myself if somebody could tell me which files I would
need to edit in addition to contour.py?

Many thanks,

Evan
--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] clabel and rotation

2009-05-08 Thread Eric Firing
Evan Mason wrote:
> Hi, would it be possible to add a keyword to clabel to optionally switch 
> off the angle fix in contour.py lines 384+?

Evan,

Done in r7097.  I called the kwarg "rightside_up", defaulting to True.

You have come up with a novel use for clabel. Longer-term, we should be 
able to support streamline plotting more directly by using the contour 
line data to place arrowhead markers at roughly uniform intervals.

Eric

> 
> # Fix angle so text is never upside-down
> if rotation > 90:
> rotation = rotation - 180.0
> if rotation < -90:
> rotation = 180.0 + rotation
> 
> Something like "clabel(CS, upsidedown=True)" with the default as False 
> would do it.
> 
> I am using clabel to put directional arrows on a streamline contour 
> plot, and this rotation causes some of the arrows to point the wrong 
> way.  I'm willing to try to do it myself if somebody could tell me which 
> files I would need to edit in addition to contour.py?
> 
> Many thanks,
> 
> Evan
> 
> 
> 
> 
> --
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> 
> 
> 
> 
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Selecting WX2.8 causes problems on wx 2.8.4

2009-05-08 Thread Tony S Yu
I'm running into the following error with the wx backend

> >>> import wx
> >>> import matplotlib.backends.backend_wxagg
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/Users/Tony/python/matplotlib/trunk/matplotlib/lib/ 
> matplotlib/backends/backend_wxagg.py", line 23, in 
> import backend_wx# already uses wxversion.ensureMinimal('2.8')
>   File "/Users/Tony/python/matplotlib/trunk/matplotlib/lib/ 
> matplotlib/backends/backend_wx.py", line 120, in 
> except wxversion.AlreadyImportedError:
> AttributeError: 'module' object has no attribute  
> 'AlreadyImportedError'

This problem seems to be related to additions made here:
http://www.nabble.com/Selecting-WX2.8-in-examples-td22380586.html

The problem is that my version of wxversion raises 'VersionError'  
instead of 'AlreadyImportedError'.

I'm running wxPython 2.8.4.0 while people in the above thread seem to  
be using at least 2.8.7.1. Do I need to upgrade, or is this a bug?

Thanks,
-Tony

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel