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
(13)
3
(4)
4
(34)
5
(14)
6
(23)
7
(26)
8
(12)
9
(7)
10
(7)
11
(9)
12
(12)
13
(20)
14
(14)
15
(13)
16
(5)
17
(4)
18
(22)
19
(29)
20
(13)
21
(9)
22
(22)
23
(3)
24
(3)
25
(29)
26
(9)
27
(10)
28
(16)
29
(16)
30
(16)
31
(9)






Showing 16 results of 16

From: Pradyumna <pv...@ps...> - 2010年10月28日 23:41:25
Hello All,
I am running into same issue except mine won't go away even when I went back
to matplotlib 0.99.
Also, something curious I noticed - when I run the examples, I don't get
this error message. 
Please let me know if you have any suggestions.
Thanks!
Pradyumna
Benjamin Root-2 wrote:
> 
> On Sat, Oct 9, 2010 at 7:41 AM, Paul Leopardi wrote:
> 
>> On Saturday 09 October 2010 22:58:04 Paul Leopardi wrote:
>> > Hello all
>> > I am seeing a problem similar to that seen by Jorge Scandaliaris.
>>
>> I downgraded from matplotlib 1.0.0 to matplotlib 0.99 and my original
>> problem
>> no longer appears:
>>
>> leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> rpm -q -a
>> |
>> grep matplotlib | sort
>> python-matplotlib-0.99.1.1-0.pm.1.8.x86_64
>> leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> ipython
>> -pylab
>> Your PyGtk has set_interactive(), so you can use the
>> more stable single-threaded Gtk mode.
>> See https://bugs.launchpad.net/ipython/+bug/270856
>> Python 2.6.2 (r262:71600, Jun 17 2010, 13:37:45)
>> Type "copyright", "credits" or "license" for more information.
>>
>> IPython 0.10 -- An enhanced Interactive Python.
>> ? -> Introduction and overview of IPython's features.
>> %quickref -> Quick reference.
>> help -> Python's own help system.
>> object? -> Details about 'object'. ?object also works, ?? prints more.
>>
>> Welcome to pylab, a matplotlib-based Python environment.
>> For more information, type 'help(pylab)'.
>>
>> In [1]: from mpl_toolkits.mplot3d import Axes3D
>>
>> In [2]: import matplotlib.pyplot as plt
>>
>> In [3]: fig=plt.figure()
>> /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py:621:
>> DeprecationWarning: Use the new widget gtk.Tooltip
>> self.tooltips = gtk.Tooltips()
>>
>> In [4]: ax=Axes3D(fig)
>>
>> In [5]: plt.show()
>>
>> In [6]: quit()
>> Do you really want to exit ([y]/n)? y
>> Closing threads... Done.
>>
>> After upgrading to Matplotlib 0.99:
>>
>> leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> rpm -q -a
>> |
>> grep matplotlib | sort
>> python-matplotlib-1.0.0-9.2.x86_64
>> python-matplotlib-tk-1.0.0-9.2.x86_64
>> python-matplotlib-wx-1.0.0-9.2.x86_64
>>
>> leopardi@linfinit:~/src/Working/Working-0.5.1/glucat/pyclical> ipython
>> -pylab
>> Python 2.6.2 (r262:71600, Jun 17 2010, 13:37:45)
>> Type "copyright", "credits" or "license" for more information.
>>
>> IPython 0.10 -- An enhanced Interactive Python.
>> ? -> Introduction and overview of IPython's features.
>> %quickref -> Quick reference.
>> help -> Python's own help system.
>> object? -> Details about 'object'. ?object also works, ?? prints more.
>>
>> Welcome to pylab, a matplotlib-based Python environment.
>> For more information, type 'help(pylab)'.
>>
>> In [1]: from mpl_toolkits.mplot3d import Axes3D
>>
>> In [2]: import matplotlib.pyplot as plt
>>
>> In [3]: fig=plt.figure()
>>
>> In [4]: ax=Axes3D(fig)
>>
>> In [5]: plt.show()
>> ^CERROR: An unexpected error occurred while tokenizing input
>> The following traceback may be corrupted or invalid
>> The error message is: ('EOF in multi-line statement', (206, 0))
>>
>> ---------------------------------------------------------------------------
>> KeyboardInterrupt Traceback (most recent call
>> last)
>>
>> /home/leopardi/src/Working/Working-0.5.1/glucat/pyclical/
>> in
>> ()
>>
>> /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_tkagg.pyc
>> in
>> show()
>> 72 for manager in Gcf.get_all_fig_managers():
>> 73 manager.show()
>> ---> 74 Tk.mainloop()
>> 75
>> 76 def new_figure_manager(num, *args, **kwargs):
>>
>> /usr/lib64/python2.6/lib-tk/Tkinter.pyc in mainloop(n)
>> 323 def mainloop(n=0):
>> 324 """Run the main loop of Tcl."""
>> --> 325 _default_root.tk.mainloop(n)
>> 326
>> 327 getint = int
>>
>> KeyboardInterrupt:
>>
>> In [6]:
>> In [6]: quit()
>> Do you really want to exit ([y]/n)? y
>>
>>
> I believe this was a known issue that came about from some fixes made to
> the
> behavior of show() for the 1.0 release. It was patched shortly thereafter
> and the maintenance branch was also patched. As a workaround, I believe
> you
> can try one of the other backends or install matplotlib from source.
> 
> Does anybody know who maintains the packages for OpenSUSE? It would
> probably be prudent to poke them to update.
> 
> Ben Root
> 
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://old.nabble.com/Confirming-problem-with-matplotlib.pyplot.show%28%29-tp29922229p30080049.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Alan G I. <ai...@am...> - 2010年10月28日 22:10:20
On 10/27/2010 9:56 PM, Ryan May wrote:
> Any idea how the clipped figure problem
> was solved in the past?
http://www.mail-archive.com/mat...@li.../msg18632.html
http://www.mail-archive.com/mat...@li.../msg18537.html
fwiw,
Alan
From: Benjamin R. <ben...@ou...> - 2010年10月28日 21:07:20
On Thu, Oct 28, 2010 at 3:31 PM, Nikolaus Rath <Nik...@ra...> wrote:
> Hello,
>
> I'm having a weird problem with a contour plot. Consider the following
> plots:
>
> import cPickle as pickle
> import matplotlib.pyplot as plt
> (Theta, Phi, Bnormal) = pickle.load(open('trouble.pickle', 'rb'))
> plt.figure(0)
> for i in [0, 300]:
> plt.plot(Theta, Bnormal[:, i], label='Bnormal at Phi=%.3g' % Phi[i])
>
> plt.ylabel('Theta')
> plt.legend()
> plt.savefig('figure0.png')
> plt.figure(1)
> plt.contourf(Phi, Theta, Bnormal)
> plt.xlabel('Phi')
> plt.ylabel('Theta')
> plt.colorbar()
> plt.savefig('figure1.png')
>
> The 'trouble.pickle' file is available on
> http://www.rath.org/trouble.pickle. At Phi=0 the contour plot agrees
> with the crossection (both show an n=7 oscillation), but at Phi=1.68 the
> contour plot shows a uniform value while the crossection shows a phase
> shifted version of oscillation at Phi=0.
>
> It seems to me that this is a blatant contradiction.
>
>
> I have also uploaded the two figures at http://www.rath.org/figure1.png
> and http://www.rath.org/figure0.png.
>
>
> Am I missing something, or is this a bug?
>
> $ python --version
> Python 2.6.5
> $ python -c 'import matplotlib; print matplotlib.__version__'
> 1.0.0
>
>
> Thanks,
>
> -Nikolaus
>
>
Nikolaus,
What might be happening is that the Theta variable isn't monotonic. It
first goes from zero to pi, then from -pi to 0. This also explains the odd
lines that appear in the line plots at the top and bottom. Try reforming
your arrays so that the domain is monotonic (note that you will have to
adjust the Phi and the Bnormal arrays as well because they were arranged
assuming a certain domain from Theta.
Ben Root
From: John <was...@gm...> - 2010年10月28日 20:46:20
Seems upgrading basemap to V 1.0 has solved it. So now I have:
In [1]: import mpl_toolkits.basemap as Basemap
In [2]: Basemap.__version__
Out[2]: '1.0'
In [3]: import matplotlib as mpl
In [4]: mpl.__version__
Out[4]: '1.0.0'
And the tutorial runs smoothly.
--john
On Thu, Oct 28, 2010 at 10:30 PM, Benjamin Root <ben...@ou...> wrote:
> On Thu, Oct 28, 2010 at 3:16 PM, John <was...@gm...> wrote:
>>
>> Hello, I've been using basemap with plt.colorbar for sometime, but I
>> just recently started to have the problem of:
>> AttributeError: 'NoneType' object has no attribute 'autoscale_None'
>>
>> I ran the fcstmaps.py example (GREAT EXAMPLE by the way), and here is
>> the full error I get:
>>
>> Traceback (most recent call last):
>> File "fcstmaps.py", line 92, in <module>
>>  plt.colorbar(cax=cax, orientation='horizontal')
>> File "/matplotlib/pyplot.py", line 1519, in colorbar
>>  ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
>> File "/matplotlib/figure.py", line 1180, in colorbar
>>  cb = cbar.Colorbar(cax, mappable, **kw)
>> File "/matplotlib/colorbar.py", line 706, in __init__
>>  mappable.autoscale_None() # Ensure mappable.norm.vmin, vmax
>> AttributeError: 'NoneType' object has no attribute 'autoscale_None'
>>
>> I did upgrade matplotlib recently to version 1.0.0
>>
>> Basemap is 0.99.4
>>
>> Thanks,
>> john
>>
>
> John,
>
> It appears the problem is in matplotlib, somehow... Could you verify which
> version of matplotlib is actually being loaded by executing the following
> commands in python?
>
> import matplotlib
> print matplotlib.__version__
>
> Currently, in version 1.0.0, the beginning of the pyplot.colorbar() function
> checks to see if mappable is None. If not, then sets mappable to gci().
> So, either you are running an older code that did not do this, or gci() is
> returning a None, which is curious...
>
> Ben Root
>
>
-- 
Configuration
``````````````````````````
Plone 2.5.3-final,
CMF-1.6.4,
Zope (Zope 2.9.7-final, python 2.4.4, linux2),
Python 2.6
PIL 1.1.6
Mailman 2.1.9
Postfix 2.4.5
Procmail v3.22 2001年09月10日
Basemap: 0.99.4
Matplotlib: 1.0.0
From: Nikolaus R. <Nik...@ra...> - 2010年10月28日 20:31:27
Hello,
I'm having a weird problem with a contour plot. Consider the following
plots:
import cPickle as pickle
import matplotlib.pyplot as plt
(Theta, Phi, Bnormal) = pickle.load(open('trouble.pickle', 'rb'))
plt.figure(0)
for i in [0, 300]:
 plt.plot(Theta, Bnormal[:, i], label='Bnormal at Phi=%.3g' % Phi[i])
plt.ylabel('Theta')
plt.legend()
plt.savefig('figure0.png')
plt.figure(1)
plt.contourf(Phi, Theta, Bnormal)
plt.xlabel('Phi')
plt.ylabel('Theta')
plt.colorbar()
plt.savefig('figure1.png')
The 'trouble.pickle' file is available on
http://www.rath.org/trouble.pickle. At Phi=0 the contour plot agrees
with the crossection (both show an n=7 oscillation), but at Phi=1.68 the
contour plot shows a uniform value while the crossection shows a phase
shifted version of oscillation at Phi=0.
It seems to me that this is a blatant contradiction.
I have also uploaded the two figures at http://www.rath.org/figure1.png
and http://www.rath.org/figure0.png.
Am I missing something, or is this a bug?
$ python --version
Python 2.6.5
$ python -c 'import matplotlib; print matplotlib.__version__'
1.0.0
Thanks,
 -Nikolaus
-- 
 »Time flies like an arrow, fruit flies like a Banana.«
 PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
From: Benjamin R. <ben...@ou...> - 2010年10月28日 20:31:20
On Thu, Oct 28, 2010 at 3:16 PM, John <was...@gm...> wrote:
> Hello, I've been using basemap with plt.colorbar for sometime, but I
> just recently started to have the problem of:
> AttributeError: 'NoneType' object has no attribute 'autoscale_None'
>
> I ran the fcstmaps.py example (GREAT EXAMPLE by the way), and here is
> the full error I get:
>
> Traceback (most recent call last):
> File "fcstmaps.py", line 92, in <module>
> plt.colorbar(cax=cax, orientation='horizontal')
> File "/matplotlib/pyplot.py", line 1519, in colorbar
> ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
> File "/matplotlib/figure.py", line 1180, in colorbar
> cb = cbar.Colorbar(cax, mappable, **kw)
> File "/matplotlib/colorbar.py", line 706, in __init__
> mappable.autoscale_None() # Ensure mappable.norm.vmin, vmax
> AttributeError: 'NoneType' object has no attribute 'autoscale_None'
>
> I did upgrade matplotlib recently to version 1.0.0
>
> Basemap is 0.99.4
>
> Thanks,
> john
>
>
John,
It appears the problem is in matplotlib, somehow... Could you verify which
version of matplotlib is actually being loaded by executing the following
commands in python?
import matplotlib
print matplotlib.__version__
Currently, in version 1.0.0, the beginning of the pyplot.colorbar() function
checks to see if mappable is None. If not, then sets mappable to gci().
So, either you are running an older code that did not do this, or gci() is
returning a None, which is curious...
Ben Root
From: John <was...@gm...> - 2010年10月28日 20:16:53
Hello, I've been using basemap with plt.colorbar for sometime, but I
just recently started to have the problem of:
AttributeError: 'NoneType' object has no attribute 'autoscale_None'
I ran the fcstmaps.py example (GREAT EXAMPLE by the way), and here is
the full error I get:
Traceback (most recent call last):
 File "fcstmaps.py", line 92, in <module>
 plt.colorbar(cax=cax, orientation='horizontal')
 File "/matplotlib/pyplot.py", line 1519, in colorbar
 ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
 File "/matplotlib/figure.py", line 1180, in colorbar
 cb = cbar.Colorbar(cax, mappable, **kw)
 File "/matplotlib/colorbar.py", line 706, in __init__
 mappable.autoscale_None() # Ensure mappable.norm.vmin, vmax
AttributeError: 'NoneType' object has no attribute 'autoscale_None'
I did upgrade matplotlib recently to version 1.0.0
Basemap is 0.99.4
Thanks,
john
From: Benjamin R. <ben...@ou...> - 2010年10月28日 19:50:36
On Thu, Oct 28, 2010 at 1:18 PM, Will Grover <wg...@mi...> wrote:
> Hello matplotlib-users,
>
> I'm using subplots to make an array of plots, but because some of the plots
> have wider y-axis tick labels than others, some of the subplots end up
> looking too close to each other. Here's an image that shows what I mean:
>
> http://web.mit.edu/wgrover/www/spacing.png
>
> I'm currently using pylab.subplots_adjust(hspace = __, vspace = __) to
> adjust the subplot spacing, but since that applies to all subplots, no one
> setting looks right for the entire array of plots. Is there any way to set
> the spacing so that the subplots *plus tick labels* are evenly distributed?
> Or can I manually specify the spacing between each subplot? Thanks,
>
> --Will
>
>
>
It is *possible*, but it is probably would be an incredible amount of work
(unless someone knows of some nifty trick that I am not aware of). My
suggestion to make things appear more "even" is to adjust the position of
the ylabels in the second column to that it takes up more room between the
first two columns.
The hard way would be to manually specify the extents in the "position"
kwarg [left, bottom, width, height] for the constructor of the axes object.
The values for those four parts would be in the coordinate system of the
figure object.
I hope that is helpful,
Ben Root
From: Will G. <wg...@mi...> - 2010年10月28日 18:18:26
Hello matplotlib-users,
I'm using subplots to make an array of plots, but because some of the plots
have wider y-axis tick labels than others, some of the subplots end up
looking too close to each other. Here's an image that shows what I mean:
 http://web.mit.edu/wgrover/www/spacing.png
I'm currently using pylab.subplots_adjust(hspace = __, vspace = __) to
adjust the subplot spacing, but since that applies to all subplots, no one
setting looks right for the entire array of plots. Is there any way to set
the spacing so that the subplots *plus tick labels* are evenly distributed?
 Or can I manually specify the spacing between each subplot? Thanks,
 --Will
From: K.-Michael A. <kmi...@gm...> - 2010年10月28日 16:02:28
I once had bus errors when i mixed gdal with Enthought, because gdal 
brought it's own numpy version, that didn't match Enthoughts.
In a pure pure Enthought environment where really nothing else is 
installed, this should not happen, I think.
BR,
Michael
On 2010年10月28日 05:06:46 +0200, Lou Wicker said:
> Gideon Simpson <simpson@...> writes:
> 
>> 
>> I'm using the prebuilt OS X dmg distribution of matplotlib with
>> the mac python 2.6.4 installation on os x
>> 10.6.3. I find that if I try to use savefig to pdf format, my
>> program terminates with a bus error. There is no
>> such error if I save to eps format.
>> 
>> -gideon
>> 
>> -----------------------------------------------------------------------
> -------
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> 
> 
> 
> Gideon: did you ever figure this out? I have been using the EPD
> python, and I get the same problem. Several incantations of EPD
> do this, on both my macbook pro and mac pro.
> 
> Thanks.
> 
> Lou Wicker
> 
> 
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Friedrich R. <fri...@gm...> - 2010年10月28日 11:43:21
SORRY
DON'T USE IT FOR NOW
There was some mistake even in the freetype instructions.
I was tooo quick. I will post once I've tested everything.
cu
Friedrich
2010年10月27日 Friedrich Romstedt <fri...@gm...>:
> Maybe you can make use of this, it's not complete but I'll work on it tomorrow.
>
> ESPECIALLY for the libpng there is a trick to make fat libpng.
>
> http://vincentdavis.info/Shared/Docs/matplotlib-installation/build/html/Macosx10.6.html
>
> Maybe you can complete the sections which are in.
>
> Friedrich
>
From: Pau <vim...@go...> - 2010年10月28日 06:17:27
Hello,
I didn't mean it bad for the people at macports. I know you are
working very hard and you have all of my respect, honestly.
I was confusing, sorry. My personal problem is that somebody convinced
me about the it's-so-easy-ness of apple's products and I thought I
would give it a shot. This was for me a nightmare because I felt like
tight up when using that mac book pro.
It was not only that I found it difficult to install matplotlib, but
many other things were hard and difficult to understand... if you want
to go *your* way and not apple's way.
For instance encryption... take this as an example
http://www.aei.mpg.de/~pau/Encrypt_Users.html
In any case, again, yo have all of my respect and I thank you for
helping me out when I had the macbook pro with your effort by porting
all of that software.
Pau
2010年10月28日 Benjamin Root <ben...@ou...>:
> On Wed, Oct 27, 2010 at 4:19 PM, Pau <vim...@go...> wrote:
>>
>> Sorry for being negative, but it's reassuring that I took the right
>> decision when I gave back my macbook pro to IT and asked for a
>> thinkpad instead and I installed UNIX on it. You know what I did to
>> install matplotlib on my OpenBSD laptop?
>>
>> pkg_add py-matplotlib
>>
>> And after 1 minute it was up and running...
>>
>> sorry!
>>
>
> Just to keep in mind, there is a lot of work that goes into getting packages
> working for any particular distribution (which then presents to you as a
> seamless operation). Along with Friedrich for his efforts in improving
> packaging for MacOS, be sure to thank your local distro maintainers for
> their tireless efforts to making the *nix environments one of the best to
> develop in.
>
> Ben Root
>
>
From: Lou W. <Lou...@no...> - 2010年10月28日 03:15:19
Gideon Simpson <simpson@...> writes:
> 
> I'm using the prebuilt OS X dmg distribution of matplotlib with
> the mac python 2.6.4 installation on os x
> 10.6.3. I find that if I try to use savefig to pdf format, my 
> program terminates with a bus error. There is no
> such error if I save to eps format.
> 
> -gideon
> 
> -----------------------------------------------------------------------
-------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> 
Gideon: did you ever figure this out? I have been using the EPD 
python, and I get the same problem. Several incantations of EPD 
do this, on both my macbook pro and mac pro.
Thanks.
Lou Wicker
From: Benjamin R. <ben...@ou...> - 2010年10月28日 02:31:33
On Wed, Oct 27, 2010 at 4:19 PM, Pau <vim...@go...> wrote:
> Sorry for being negative, but it's reassuring that I took the right
> decision when I gave back my macbook pro to IT and asked for a
> thinkpad instead and I installed UNIX on it. You know what I did to
> install matplotlib on my OpenBSD laptop?
>
> pkg_add py-matplotlib
>
> And after 1 minute it was up and running...
>
> sorry!
>
>
Just to keep in mind, there is a lot of work that goes into getting packages
working for any particular distribution (which then presents to you as a
seamless operation). Along with Friedrich for his efforts in improving
packaging for MacOS, be sure to thank your local distro maintainers for
their tireless efforts to making the *nix environments one of the best to
develop in.
Ben Root
From: Ryan M. <rm...@gm...> - 2010年10月28日 01:57:15
On Wed, Oct 27, 2010 at 5:31 PM, Alan G Isaac <ai...@am...> wrote:
> Here is another example of unwanted text clipping
> in the gallery:
> http://matplotlib.sourceforge.net/examples/api/two_scales.html#api-two-scales
> (Both y axis labels are clipped.)
>
> I also think the example would be more complete if it
> 1. set a 270 degree rotation on the second ylabel, and
> 2. showed how to make a single legend for the two lines
>
> Btw, how *does* one best do 2?
For this example, saving the line objects will do. Then you just call
legend with the objects. The new example looks thusly:
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(111)
t = np.arange(0.01, 10.0, 0.01)
s1 = np.exp(t)
line1 = ax1.plot(t, s1, 'b-')
ax1.set_xlabel('time (s)')
# Make the y-axis label and tick labels match the line color.
ax1.set_ylabel('exp', color='b')
for tl in ax1.get_yticklabels():
 tl.set_color('b')
ax2 = ax1.twinx()
s2 = np.sin(2*np.pi*t)
line2 = ax2.plot(t, s2, 'r.')
# Rotate ylabel 180 from normal y-axis label orientation
ax2.set_ylabel('sin', color='r', rotation=270.)
for tl in ax2.get_yticklabels():
 tl.set_color('r')
ax2.legend((line1, line2), ('exp(t)', '$sin(2 \pi t)$'))
plt.show()
Thanks for the suggestions. Any idea how the clipped figure problem
was solved in the past?
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Paul I. <piv...@gm...> - 2010年10月28日 00:21:37
Alan G Isaac, on 2010年10月27日 18:31, wrote:
> Here is another example of unwanted text clipping
> in the gallery:
> http://matplotlib.sourceforge.net/examples/api/two_scales.html#api-two-scales
> (Both y axis labels are clipped.)
> 
> I also think the example would be more complete if it
> 1. set a 270 degree rotation on the second ylabel, and
> 2. showed how to make a single legend for the two lines
> 
> Btw, how *does* one best do 2?
I don't know if it's best, but legend can take a list of objects 
and labels, so you can just grab all of the objects from the twin,
and put them all in one legend:
 def onelegend_twinaxes(axis,twin):
 #make a joint axis legend
 lines = twin.get_lines()
 lines.extend(axis.get_lines())
 labels = [l.get_label() for l in lines]
 return axis.legend(lines, labels)
Here's a picture of what that looks like (thought I did some
other prettifications).
<http://pirsquared.org/images/twinaxes_onelegend.png>
I wrote this in a solution set for a class I'm TAing this
semester, so you can look at the whole thing here, if you'd like.
the file is part of the solutions for Lab #1, it's called lab1.py
(but actually links to lab1.txt):
<http://redwood.berkeley.edu/wiki/VS265:_Homework_assignments>
 
-- 
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 

Showing 16 results of 16

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 によって変換されたページ (->オリジナル) /