clabel and rotation

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

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
matplotlib-devel List Signup and Options