|
From: Michael H. <mh...@us...> - 2009-02-03 23:04:32
|
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 |
|
From: Christopher B. <c-...@as...> - 2009-02-03 23:26:08
|
Hi Michael, MH> The Axes object has a method for turning on the frame: MH> set_frame_on(). How do I set the thickness of the frame that MH> appears? I use: plt.gca().get_frame().set_linewidth(2) -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University |
|
From: Christopher B. <c-...@as...> - 2009-02-04 19:54:21
|
Hi,
CM> > I use:
CM> >
CM> > plt.gca().get_frame().set_linewidth(2)
CM> >
CM>
CM> That is not working for me. Is it working now for the OP?
Actually, I just went back and found a reply from Jae-Joon to a post of
mine in November about this. He points out that get_frame() is
deprecated, but that gca().frame.set_linewidth(2) should work. This is
not working for me either now (it was at the time), and now that I
notice, I am also unable to change the tick width the way I used to:
for tl in pp.gca().get_xticklines() + pp.gca().get_yticklines():
tl.set_markeredgewidth(2)
...and I also can get invert_yaxis() (or xaxis) to work either.
I'm on windows, using 0.98.5, ang Qt4Agg backend. I get no warnings or
errors. Does anyone have any ideas?
--
Christopher Brown, Ph.D.
Department of Speech and Hearing Science
Arizona State University
|
|
From: Michael H. <mh...@us...> - 2009-02-04 20:11:37
|
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, > > MH> The Axes object has a method for turning on the frame: > MH> set_frame_on(). How do I set the thickness of the frame that > MH> appears? > > I use: > > plt.gca().get_frame().set_linewidth(2) > |
|
From: Michael H. <mh...@us...> - 2009-02-04 20:12:14
Attachments:
basemapex.py
|
Forgot the attachment... 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, >> >> MH> The Axes object has a method for turning on the frame: >> MH> set_frame_on(). How do I set the thickness of the frame that >> MH> appears? >> >> I use: >> >> plt.gca().get_frame().set_linewidth(2) >> > > |
|
From: Jeff W. <js...@fa...> - 2009-02-04 22:16:16
|
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, >>> >>> MH> The Axes object has a method for turning on the frame: >>> MH> set_frame_on(). How do I set the thickness of the frame that >>> MH> 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 > Mat...@li... > 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 : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Jae-Joon L. <lee...@gm...> - 2009-02-04 22:40:30
|
> Actually, I just went back and found a reply from Jae-Joon to a post of > mine in November about this. He points out that get_frame() is > deprecated, but that gca().frame.set_linewidth(2) should work. This is > not working for me either now (it was at the time), and now that I > notice, I am also unable to change the tick width the way I used to: > > for tl in pp.gca().get_xticklines() + pp.gca().get_yticklines(): > tl.set_markeredgewidth(2) > > ...and I also can get invert_yaxis() (or xaxis) to work either. > > I'm on windows, using 0.98.5, ang Qt4Agg backend. I get no warnings or > errors. Does anyone have any ideas? > Christopher, Everything works fine for me. Can it be just that the canvas is not redrawn after you set the linewidth? It will be helpful if you post a standalone script that reproduces your problem. Regards, -JJ |
|
From: Christopher B. <c-...@as...> - 2009-02-05 17:03:05
|
Hi Jae-Joon, JL> Everything works fine for me. JL> Can it be just that the canvas is not redrawn after you set the JL> linewidth? It will be helpful if you post a standalone script that JL> reproduces your problem. Regards, Yes, this was the problem. I don't know why the same scripts were working before, but adding draw() now does the trick. -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University |