setting thickness of axis frame

The Axes object has a method for turning on the frame: set_frame_on(). How do I set the thickness of the frame that appears?

Thanks,

Mike Hearne

Hi Michael,

The Axes object has a method for turning on the frame:
set_frame_on(). How do I set the thickness of the frame that
appears?

I use:

plt.gca().get_frame().set_linewidth(2)

···

--
Christopher Brown, Ph.D.
Department of Speech and Hearing Science
Arizona State University

Chris - Thanks for your reply. Unfortunately, it didn't seem to have any effect on the frame I created.

I notice with matplotlib 0.98.5.1, I get a warning with get_frame(), telling me to use the patch object of the axes instead of get_frame().

So, when I use this with an axes created for a Basemap, I can't get the thickness of the frame around the axes to change.

I'm using Basemap 0.99.2.

The code demonstrating the issue is attached, and the relevant lines of code are near the bottom of the script.

Thanks,

Mike

Christopher Brown wrote:

···

Hi Michael,

> The Axes object has a method for turning on the frame:
> set_frame_on(). How do I set the thickness of the frame that
> appears?

I use:

plt.gca().get_frame().set_linewidth(2)

Forgot the attachment...

Michael Hearne wrote:

basemapex.py (1.65 KB)

···

Chris - Thanks for your reply. Unfortunately, it didn't seem to have any effect on the frame I created.

I notice with matplotlib 0.98.5.1, I get a warning with get_frame(), telling me to use the patch object of the axes instead of get_frame().

So, when I use this with an axes created for a Basemap, I can't get the thickness of the frame around the axes to change.

I'm using Basemap 0.99.2.

The code demonstrating the issue is attached, and the relevant lines of code are near the bottom of the script.

Thanks,

Mike

Christopher Brown wrote:

Hi Michael,

> The Axes object has a method for turning on the frame:
> set_frame_on(). How do I set the thickness of the frame that
> appears?

I use:

plt.gca().get_frame().set_linewidth(2)

Michael Hearne wrote:

Forgot the attachment...

Michael: It's ax.frame.set_linewidth (not ax.patch).

-Jeff

···

Michael Hearne wrote:

Chris - Thanks for your reply. Unfortunately, it didn't seem to have any effect on the frame I created.

I notice with matplotlib 0.98.5.1, I get a warning with get_frame(), telling me to use the patch object of the axes instead of get_frame().

So, when I use this with an axes created for a Basemap, I can't get the thickness of the frame around the axes to change.

I'm using Basemap 0.99.2.

The code demonstrating the issue is attached, and the relevant lines of code are near the bottom of the script.

Thanks,

Mike

Christopher Brown wrote:

Hi Michael,

> The Axes object has a method for turning on the frame:
> set_frame_on(). How do I set the thickness of the frame that
> appears?

I use:

plt.gca().get_frame().set_linewidth(2)

------------------------------------------------------------------------

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg