SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S



1
(12)
2
(14)
3
(13)
4
(6)
5
(6)
6
(21)
7
(29)
8
(30)
9
(13)
10
(4)
11
(4)
12
(4)
13
(15)
14
(22)
15
(23)
16
(23)
17
(9)
18
(23)
19
(12)
20
(10)
21
(26)
22
(5)
23
(32)
24
(5)
25
(7)
26
(4)
27
(3)
28
(19)
29
(20)



Showing results of 408

1 2 3 .. 17 > >> (Page 1 of 17)
From: C M <cmp...@gm...> - 2012年02月29日 23:47:29
I'd like to use, in one case, small loaded images (pngs) as markers on an
interactive matplotlib plot (using the OO approach). I'd potentially like
to be able to point-pick these markers, too, as well as have them update
appropriately if the plot is resized.
The only example I've been to find of this is here:
http://stackoverflow.com/questions/2318288/how-to-use-custom-marker-with-plot
But that is from 2 years ago. Is this way of doing it--which the author
describes as a "kludge"--still the state of things, or is there a better
approach now? (And right now this way isn't working for me...the images
are down the bottom of the figure).
Thank you,
Che
From: questions a. <que...@gm...> - 2012年02月29日 22:29:11
I have a txt file (with an associated prj file) containing gridded weather
data.
Firstly how can I open this file and convert it to a numpy array?
and then how to plot in matplotlib, paticularly how to use the lat, lon and
nrows,ncols.
ncols=886
nrows=691
longitude west=111.975, east=156.275
latitude north=-9.975, south=-44.525
cell size=0.05
My attempt below:
--------------------------------------------------
onefile=open("E:/test_in/r19000117.txt", 'r')
map = Basemap(projection='merc',llcrnrlat=-40,urcrnrlat=-33,
 llcrnrlon=139.0,urcrnrlon=151.0,lat_ts=0,resolution='i')
map.drawcoastlines()
map.drawstates()
xi=N.linspace(111.975, 156.275, 886)
yi=N.linspace(-44.525, -9.975, 691)
x,y=map(*N.meshgrid(xi,yi))
plt.title('rainfall')
CS = map.contourf(x,y, onefile, cmap=plt.cm.jet)
l,b,w,h =0.1,0.1,0.8,0.8
cax = plt.axes([l+w+0.025, b, 0.025, h])
plt.colorbar(CS,cax=cax, drawedges=True)
plt.savefig((os.path.join(OutputFolder, 'rainfall.png')))
plt.show()
plt.close()
From: Federico A. <ari...@gm...> - 2012年02月29日 22:02:43
Dear all
I am a long time matplotlib user (under linux) but new to the list (second
post).
On of the things that bothers me the most is the inability of the standard
backend to change simple things (line color, labels, etc...).
I resorted to create a simple FrankeinBackend (based on the GtkAgg)
I guess I am not the only one missing this kind of features or
experimenting with similar ideas.
Some points comes to my mind:
Is there any special place where we can share and discuss this?
Is it better if I just open a googlecode place for my code.?
This is a recurring question and I have no idea what I am talking about
This is already done I am reinventing the wheel
Thanks
Federico
-- 
Y yo que culpa tengo de que ellas se crean todo lo que yo les digo?
-- Antonio Alducin --
From: Christoph G. <cg...@uc...> - 2012年02月29日 20:39:27
On 2/29/2012 11:19 AM, jos...@gm... wrote:
> On Wed, Feb 29, 2012 at 2:09 PM, Skipper Seabold<jss...@gm...> wrote:
>> On Wed, Feb 29, 2012 at 2:02 PM,<jos...@gm...> wrote:
>> <snip>
>>>
>>> I'm not able to build matplotlib myself.
>>>
>>
>> If you're interested, I've been able to build on windows since
>> Christophe provides the dependencies by doing the following
>>
>> http://old.nabble.com/Building-on-Windows-%28Was-Re%3A-Calling-all-Mac-OSX-users!%29-td32283791.html
>>
>> I have detailed instructions written down somewhere...
>
> I'd rather postpone (indefinitely?) the pleasure of building 64bit
> binaries on Windows. Especially for python 3.2, the main point is to
> test with publicly available binaries.
>
> Thanks,
>
> Josef
>
>>
>> Skipper
>
Updated installers for Python 3.x are at 
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>. Git ref d661a4871c.
Christoph
From: Christoph G. <cg...@uc...> - 2012年02月29日 19:59:15
On 2/29/2012 10:46 AM, Benjamin Root wrote:
>
>
> On Wed, Feb 29, 2012 at 7:32 AM, <jos...@gm...
> <mailto:jos...@gm...>> wrote:
>
> Sorry for reporting this here, it's the only way for matplotlib I'm
> signed up for.
>
> I'm testing scikits statsmodels on Python 3.2
>
> plt.close(fig) in the graphics tests raises an error, python 3.2,
> matplotlib 1.2.x from Gohlke for Win 64, nose 1.0.0
>
> File
> "C:\Programs\Python32\lib\site-packages\matplotlib\_pylab_helpers.py",
> line 75, in destroy_fig
> for manager in Gcf.figs.values():
> RuntimeError: dictionary changed size during iteration
>
> https://github.com/statsmodels/statsmodels/issues/152
> https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15
>
> replacing plt.close(fig) with plt.close('all') removes the test errors
> in python 3.2
>
> Since I'm not familiar with the matplotlib details, I don't know what
> this means.
>
> Josef
>
>
> Could you double-check exactly which version you have? In the master
> branch, we made a change on Nov 14th to not delete dictionary items
> while iterating. I suspect Gohlke's build was from before then.
>
> Ben Root
>
That build is from November 9, 2011, git ref 75c9beccc7 
<https://github.com/matplotlib/matplotlib/tree/75c9beccc73ef7c8b686aec58610a3da225816ee> 
plus some additional minor changes (indentation and urllib) I was 
working on at that time.
It should be easy to just patch the installed version in order to fix 
this specific issue without recompiling matplotlib 
<https://github.com/matplotlib/matplotlib/commit/f3c8caed654c311f20952ad1cf3a96e1b0293664>
Christoph
From: Mario F. <mar...@ao...> - 2012年02月29日 19:40:09
Hi there,
John Hunter <jd...@gm...> schrieb am Wed, 29. Feb 07:04:
> On Feb 28, 2012, at 4:03 PM, Benjamin Root <ben...@ou...> wrote:
> > The size of the PNG will be based on the size of your figure object. When you create your figure, you can pass a figsize kwarg which takes a tuple of width, height in inches (defaults to 8 x 6, I think).
> > 
> > fig = plt.figure(figsize=(10.0, 6.0))
> 
> With an existing Figure instance, you can also call
> 
> fig.set_figwidth(width_inches)
> 
> before saving (or set_figheight or set_size_inches)
> 
> http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure
That helps, thanks a lot! :)
Regards, Keba
From: <jos...@gm...> - 2012年02月29日 19:19:37
On Wed, Feb 29, 2012 at 2:09 PM, Skipper Seabold <jss...@gm...> wrote:
> On Wed, Feb 29, 2012 at 2:02 PM, <jos...@gm...> wrote:
> <snip>
>>
>> I'm not able to build matplotlib myself.
>>
>
> If you're interested, I've been able to build on windows since
> Christophe provides the dependencies by doing the following
>
> http://old.nabble.com/Building-on-Windows-%28Was-Re%3A-Calling-all-Mac-OSX-users!%29-td32283791.html
>
> I have detailed instructions written down somewhere...
I'd rather postpone (indefinitely?) the pleasure of building 64bit
binaries on Windows. Especially for python 3.2, the main point is to
test with publicly available binaries.
Thanks,
Josef
>
> Skipper
From: Skipper S. <jss...@gm...> - 2012年02月29日 19:10:08
On Wed, Feb 29, 2012 at 2:02 PM, <jos...@gm...> wrote:
<snip>
>
> I'm not able to build matplotlib myself.
>
If you're interested, I've been able to build on windows since
Christophe provides the dependencies by doing the following
http://old.nabble.com/Building-on-Windows-%28Was-Re%3A-Calling-all-Mac-OSX-users!%29-td32283791.html
I have detailed instructions written down somewhere...
Skipper
From: <jos...@gm...> - 2012年02月29日 19:03:07
On Wed, Feb 29, 2012 at 1:46 PM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Wed, Feb 29, 2012 at 7:32 AM, <jos...@gm...> wrote:
>>
>> Sorry for reporting this here, it's the only way for matplotlib I'm
>> signed up for.
>>
>> I'm testing scikits statsmodels on Python 3.2
>>
>> plt.close(fig) in the graphics tests raises an error, python 3.2,
>> matplotlib 1.2.x from Gohlke for Win 64, nose 1.0.0
>>
>> File
>> "C:\Programs\Python32\lib\site-packages\matplotlib\_pylab_helpers.py",
>> line 75, in destroy_fig
>>  for manager in Gcf.figs.values():
>> RuntimeError: dictionary changed size during iteration
>>
>> https://github.com/statsmodels/statsmodels/issues/152
>>
>> https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15
>>
>> replacing plt.close(fig) with plt.close('all') removes the test errors
>> in python 3.2
>>
>> Since I'm not familiar with the matplotlib details, I don't know what
>> this means.
>>
>> Josef
>>
>
> Could you double-check exactly which version you have? In the master
> branch, we made a change on Nov 14th to not delete dictionary items while
> iterating. I suspect Gohlke's build was from before then.
I'm not able to tell the exact version
>>> import matplotlib
>>> matplotlib.__version__
'1.2.x'
but the creation date of the files that have been installed in site-packages is
Wednesday, ‎November ‎09, ‎2011, ‏‎5:09:50 AM
so before Nov 14th
I'm not able to build matplotlib myself.
Thanks,
Josef
>
> Ben Root
>
From: Benjamin R. <ben...@ou...> - 2012年02月29日 18:47:28
On Wed, Feb 29, 2012 at 7:32 AM, <jos...@gm...> wrote:
> Sorry for reporting this here, it's the only way for matplotlib I'm
> signed up for.
>
> I'm testing scikits statsmodels on Python 3.2
>
> plt.close(fig) in the graphics tests raises an error, python 3.2,
> matplotlib 1.2.x from Gohlke for Win 64, nose 1.0.0
>
> File
> "C:\Programs\Python32\lib\site-packages\matplotlib\_pylab_helpers.py",
> line 75, in destroy_fig
> for manager in Gcf.figs.values():
> RuntimeError: dictionary changed size during iteration
>
> https://github.com/statsmodels/statsmodels/issues/152
>
> https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15
>
> replacing plt.close(fig) with plt.close('all') removes the test errors
> in python 3.2
>
> Since I'm not familiar with the matplotlib details, I don't know what
> this means.
>
> Josef
>
>
Could you double-check exactly which version you have? In the master
branch, we made a change on Nov 14th to not delete dictionary items while
iterating. I suspect Gohlke's build was from before then.
Ben Root
From: Benjamin R. <ben...@ou...> - 2012年02月29日 18:32:20
On Wed, Feb 29, 2012 at 5:09 AM, Nils Wagner
<nw...@ia...>wrote:
> Hi all,
>
> I tried to combine an event with an annotation.
> However, the annotation is not visible, when I click on
> the curves.
> How can I resolve the problem ?
> The code is available at http://pastebin.com/QxKBZtaX
> Any pointer would be appreciated.
>
> Thanks in advance.
>
> Nils
>
>
Looks like a typo in your annotate function. For the xy kwarg, your
x-coordinate is set as "ind[0]". Perhaps you meant "xdata[ind][0]"?
Ben Root
From: Jerzy K. <jer...@un...> - 2012年02月29日 17:43:16
David Craig :
> I'm trying to produce a map with 12 locations marked on it and straight
> lines plotted between each point and all other points on the map. I have
> the map with the locations ok but am having trouble getting the lines.
> My code is below anyone know how to do this??
> ...
> for i in range(len(lons)):
> for j in range(len(lons)):
> if i == j: continue
> m.plot([x[i],y[i]],[x[j],y[j]],'k')
I am not sure what do you really want, but perhaps replace the last 
cited line by:
m.plot([x[i],x[j]],[y[i],y[j]],'k')
==
All the best.
Jerzy Karczmarczuk
Caen, France
From: Gousios G. <gg...@wi...> - 2012年02月29日 17:43:09
Hello ,
 i have this function :
def Graph(data):
 """Make the plot"""
 plt.colormaps()
 n=sc.shape(data)[2]
 ims=[]
 for i in range(n):
 mydata=data[:,:,i]
 im=plt.imshow(mydata,cmap=plt.get_cmap('jet'))
 ims.append([im])
 return ims
and i use it in my application like this:
fig=plt.gcf()
ani=ArtistAnimation(fig,result,interval=10,repeat=False)
plt.show()
How can i do it so ,for every 1 sec take a plot.
Thanks!
From: <jos...@gm...> - 2012年02月29日 13:33:10
Sorry for reporting this here, it's the only way for matplotlib I'm
signed up for.
I'm testing scikits statsmodels on Python 3.2
plt.close(fig) in the graphics tests raises an error, python 3.2,
matplotlib 1.2.x from Gohlke for Win 64, nose 1.0.0
 File "C:\Programs\Python32\lib\site-packages\matplotlib\_pylab_helpers.py",
line 75, in destroy_fig
 for manager in Gcf.figs.values():
RuntimeError: dictionary changed size during iteration
https://github.com/statsmodels/statsmodels/issues/152
https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15
replacing plt.close(fig) with plt.close('all') removes the test errors
in python 3.2
Since I'm not familiar with the matplotlib details, I don't know what
this means.
Josef
From: John H. <jd...@gm...> - 2012年02月29日 13:04:47
On Feb 28, 2012, at 4:03 PM, Benjamin Root <ben...@ou...> wrote:
> The size of the PNG will be based on the size of your figure object. When you create your figure, you can pass a figsize kwarg which takes a tuple of width, height in inches (defaults to 8 x 6, I think).
> 
> fig = plt.figure(figsize=(10.0, 6.0))
With an existing Figure instance, you can also call
fig.set_figwidth(width_inches)
before saving (or set_figheight or set_size_inches)
http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure
JDH
From: David C. <dcd...@gm...> - 2012年02月29日 12:28:12
Hi,
I'm trying to produce a map with 12 locations marked on it and straight 
lines plotted between each point and all other points on the map. I have 
the map with the locations ok but am having trouble getting the lines. 
My code is below anyone know how to do this??
Thanks
D
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import matplotlib.lines as lines
import numpy as np
m = Basemap(llcrnrlon=-11.5,llcrnrlat=51.0,urcrnrlon=-4.5,urcrnrlat=56.0,
 resolution='i',projection='cass',lon_0=-4.36,lat_0=54.7)
lats = [53.5519317,53.8758499, 54.2894659, 55.2333142, 
54.9846137,54.7064869, 51.5296651, 51.5536226, 51.7653115, 52.1625237, 
52.5809163, 52.9393892]
lons = [-9.9413447, -9.9621948, -8.9583439, -7.6770179, -8.3771698, 
-8.7406732, -8.9529546, -9.7907148, -10.1531573, -10.4099873, 
-9.8456417, -9.4344939]
x, y = m(lons, lats)
for i in range(len(lons)):
 for j in range(len(lons)):
 if i == j: continue
 m.plot([x[i],y[i]],[x[j],y[j]],'k')
m.plot(x, y, 'bD', markersize=10)
m.drawcoastlines()
#m.drawmapboundary()
#plt.savefig('/media/A677-86E0/dot_size'+str(i)+'.png')
plt.show()
From: Nils W. <nw...@ia...> - 2012年02月29日 11:10:17
Hi all,
I tried to combine an event with an annotation.
However, the annotation is not visible, when I click on 
the curves.
How can I resolve the problem ?
The code is available at http://pastebin.com/QxKBZtaX
Any pointer would be appreciated.
Thanks in advance.
 Nils
From: EnderWiggin <jan...@go...> - 2012年02月29日 09:09:48
Hi all,
I'm currently using the hist plot from matlibplot. Here I have the following
question: is there an easy way to set the bin content of a specified bin?
For example, I would like to call set_bin_content(bin_index=1, value=10000)
once instead of filling in 10000 times the same value.
Thank you very much.
Best regards
-- 
View this message in context: http://old.nabble.com/Setting-the-bin-content-of-a-histogram-tp33412466p33412466.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Andreas H. <li...@hi...> - 2012年02月29日 07:28:03
> I think that what you want can be achieved more simply than contouring.
> I've attached a quick example of how I would do this. I'm assuming that
> the data has the same form as pcolormesh, i.e, the z values are measured
> at grid centers but we have coordinate of the edges. This means that we
> can easily check if a given pixel is above or below the contour level and
> then we simply draw the appropriate gridlines. I'm not coalescing
> neighboring lines, but that's also possible.
>
> If you're looking for something more complex than this simple in-or-out
> partitioning, this approach might still work but I'm not sure, in that
> case, that I understand what you're actually trying to do.
Eric, I'm amazed -- thanks a lot :)
Andreas.
From: Tony Yu <ts...@gm...> - 2012年02月29日 03:53:36
On Tue, Feb 28, 2012 at 4:05 PM, Antoine Sirinelli <an...@mo...
> wrote:
> Hi,
>
> I have been using the event "draw_event" for a while with the old
> matplotlib 0.8. I have tested my program with newer versions but it seems
> the function connected to "draw_event" is never called.
>
> You can find an example of this there: https://gist.github.com/1901504
>
> With an old version the image color scale is rescaled when you zoom in.
> With matplotlib 1.x, no change is made on on the color scale.
>
> Have I missed something?
>
> Thanks in advance for your help.
>
> Antoine
>
Hey Antoine,
I'm not sure what changed in the mean time, but the problem is that the
instances of `az_imshow` aren't saved to anything (e.g. you should write
`implot2 = az_imshow(data, aspect='auto')`). I *think* what happens is that
you don't have any references to the object so it gets garbage-collected
and the events you create disappear. That's my made-up explanation.
-Tony
From: Mariusz S. <mar...@gm...> - 2012年02月28日 22:41:30
Hi
I am struggling with making graph transparent. Basically, i have wxpython
app with graph located on panel. The panel has bitmap background so i
wanted to get rid of white background of chart in order to make whole thing
nice looking.
However, i can't solve it. I was trying setting with patch.set_alpha or
set facecolor but no satisfying results.
Is there a way to get what i was trying to do?
Now i am thinkinig of generating png file and load to app but i would like
to avoid it
Thanks in advance for all clues
best regards
From: Moore, E. (NIH/N. [F] <eri...@ni...> - 2012年02月28日 22:36:39
I think that what you want can be achieved more simply than contouring. I've attached a quick example of how I would do this. I'm assuming that the data has the same form as pcolormesh, i.e, the z values are measured at grid centers but we have coordinate of the edges. This means that we can easily check if a given pixel is above or below the contour level and then we simply draw the appropriate gridlines. I'm not coalescing neighboring lines, but that's also possible. 
If you're looking for something more complex than this simple in-or-out partitioning, this approach might still work but I'm not sure, in that case, that I understand what you're actually trying to do. 
-Eric
p.s. two loops aren't necessary, really.
From: Benjamin R. <ben...@ou...> - 2012年02月28日 22:04:16
On Tue, Feb 28, 2012 at 3:48 PM, Mario Fuest <mar...@ao...> wrote:
> Hi there,
>
> Currently i use these commands to layout and save my figures:
>
> > figure
> > ...
> > gca.set_aspect('equal')
> > gca.autoscale(tight=True)
> > ...
> > plt.savefig('fpp.png', bbox_inches='tight', pad_inches=0)
>
> I would like to set the width of this png file, how to do that? If
> savefig() does not support setting the width, maybe I can set the width
> of my xaxis?
>
> Thanks in advance, Keba
>
>
The size of the PNG will be based on the size of your figure object. When
you create your figure, you can pass a figsize kwarg which takes a tuple of
width, height in inches (defaults to 8 x 6, I think).
fig = plt.figure(figsize=(10.0, 6.0))
I hope that helps!
Ben Root
From: Mario F. <mar...@ao...> - 2012年02月28日 21:52:33
Hi,
Sorry for the late reply.
Tony Yu <ts...@gm...> schrieb am Tue, 03. Jan 17:07:
> You can try
> 
> >>> ax.set_aspect('equal')
> >>> ax.autoscale(tight=True)
> 
> The order doesn't seem to matter.
That works well, thank you! :)
Kind regars, Keba.
From: Mario F. <mar...@ao...> - 2012年02月28日 21:49:16
Hi there,
Currently i use these commands to layout and save my figures:
 > figure
 > ...
 > gca.set_aspect('equal')
 > gca.autoscale(tight=True)
 > ...
 > plt.savefig('fpp.png', bbox_inches='tight', pad_inches=0)
I would like to set the width of this png file, how to do that? If
savefig() does not support setting the width, maybe I can set the width
of my xaxis?
Thanks in advance, Keba
6 messages has been excluded from this view by a project administrator.

Showing results of 408

1 2 3 .. 17 > >> (Page 1 of 17)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /