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



Showing 5 results of 5

From: Eric F. <ef...@ha...> - 2008年12月14日 17:18:43
LB wrote:
> Hi,
> 
> I've got two questions involving matplotlib :
> 
> 1) Is there a way to ask matplotlib to automatically adjust the size of 
> its figures to fit the size of their content ?
> I'm using axis('equal'). Therefore I often have figures with lot of 
> blank, like the figure d0.jpg attached, and I would rather have 
> something like d1.jpg.
> 
Try
axis('scaled')
or
axis('image')
> 2) Is this possible to have an horizontal colorbar ?
Yes:
colorbar(orientation='horizontal')
This kwarg seems to be missing from the docstring; I will fix that.
Eric
> 
> Thanks
> 
> -- 
> LB
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: John H. <jd...@gm...> - 2008年12月14日 17:16:21
I *think* I may have figured out what is causing some of the dynamic
linkage problems several of you have reported on our OSX installers.
I have build a new egg snapshot, and better yet, and new binary mpkg
installer for OSX. Give them a try:
 http://matplotlib.sourceforge.net/snapshots/matplotlib-0.98.5-py2.5-macosx10.5.zip
 (binary package installer)
 http://matplotlib.sourceforge.net/snapshots/matplotlib-0.98.5_r0-py2.5-macosx-10.3-fat.egg
 (binary egg)
and let me know if these fix the problems you all are having.
Fingers crossed,
JDH
From: Joshua L. <dis...@gm...> - 2008年12月14日 11:28:04
If your goal is to build only for Intel, edit the Makefile inside your
(wherever your python installation is)/lib/python2.5/config directory
and delete "-arch ppc" everywhere you see it. Then try a clean build
of matplotlib. I'd make a backup copy of the original somewhere just
in case something goes wrong in editing the Makefile, though. You
don't need to worry about the -Os optimization flag unless you're
running Leopard, in which case setup.py has a build_osx105 target that
will handle that for you. Given your arch issues, though, I'd edit
setup.py in the matplotlib source and take out the -arch ppc flags
there too if you decide to use the target.
Josh
On Sat, Dec 13, 2008 at 12:47 PM, Robin <ro...@gm...> wrote:
> Oops.. I'll continue
>
> I am having a problem building matplotlib on OS X. It seems it has
> come up quite a few times, but I haven't seen an answer. The problem
> is that it seems to be trying to build a fat binary (-arch i386 -arch
> ppc) but some of the depencies (installed via macports) are i386 only
> so I get a "file is not of required architecture for architecture ppc"
> error on linking. (See below)
>
> How can I stop setup.py from trying to build ppc architecture?
> I tried
> CFLAGS="-Os -arch i386" LDFLAGS="-Os -arch i386" python setup.py build
> but it didn't seem to make any difference.
>
> Thanks
>
> Robin
>
> ============================================================================
> BUILDING MATPLOTLIB
> matplotlib: 0.98.5
> python: 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) [GCC
> 4.0.1 (Apple Computer, Inc. build 5367)]
> platform: darwin
>
> REQUIRED DEPENDENCIES
> numpy: 1.3.0.dev6050
> freetype2: 9.18.3
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.33
> Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
> wxPython: 2.8.6.0
> * WxAgg extension not required for wxPython >= 2.8
> Gtk+: no
> * Building for Gtk+ requires pygtk; you must be able
> * to "import gtk" in your build/install environment
> Mac OS X native: yes
> Qt: no
> Qt4: no
> Cairo: no
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
> datetime: present, version unknown
> dateutil: matplotlib will provide
> pytz: matplotlib will provide
> adding pytz
>
> OPTIONAL USETEX DEPENDENCIES
> dvipng: 1.11
> ghostscript: 8.62
> latex: 3.1415926
> pdftops: 3.02
>
> EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
> configobj: matplotlib will provide
> enthought.traits: no
>
> [Edit setup.cfg to suppress the above messages]
> ============================================================================
> pymods ['pylab', 'configobj']
> packages ['matplotlib', 'matplotlib.backends',
> 'matplotlib.projections', 'mpl_toolkits', 'matplotlib.numerix',
> 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma',
> 'matplotlib.numerix.npyma', 'matplotlib.numerix.linear_algebra',
> 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft',
> 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo',
> 'matplotlib.config']
> running build
> running build_py
> copying lib/matplotlib/mpl-data/matplotlibrc ->
> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
> copying lib/matplotlib/mpl-data/matplotlib.conf ->
> build/lib.macosx-10.3-fat-2.5/matplotlib/mpl-data
> running build_ext
> building 'matplotlib.ft2font' extension
> g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
> -bundle -undefined dynamic_lookup
> build/temp.macosx-10.3-fat-2.5/src/ft2font.o
> build/temp.macosx-10.3-fat-2.5/src/mplutils.o
> build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o
> build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o
> build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o
> build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/opt/local/lib
> -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lz
> -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so
> -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices
> ld: warning in build/temp.macosx-10.3-fat-2.5/src/ft2font.o, file is
> not of required architecture
> ld: warning in build/temp.macosx-10.3-fat-2.5/src/mplutils.o, file is
> not of required architecture
> ld: warning in build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o,
> file is not of required architecture
> ld: warning in build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o, file
> is not of required architecture
> ld: warning in build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o,
> file is not of required architecture
> ld: warning in build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o,
> file is not of required architecture
> ld: warning in /opt/local/lib/libfreetype.dylib, file is not of
> required architecture
> ld: warning in /opt/local/lib/libz.dylib, file is not of required architecture
> ld: in /opt/local/lib/libJPEG.dylib, file is not of required
> architecture for architecture ppc
> collect2: ld returned 1 exit status
> ld: warning, duplicate dylib /opt/local/lib/libz.1.dylib
> lipo: can't open input file:
> /var/folders/8s/8sR4EeeWGVKm6eizf-nS9U+++TI/-Tmp-//cchTIwch.out (No
> such file or directory)
> error: command 'g++' failed with exit status 1
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: mtcoder <jbe...@gm...> - 2008年12月14日 02:50:52
All, 
Thanks for the quick and informative responses. I've attached the code
(testode.c). It requires the GSL library. I've also attached the script I
was using to read and plot the data (odetest.py). [Note: If you do any tests
with the python script make sure to change the savefig directory in plot()
to something local. ]
http://www.nabble.com/file/p20996825/testode.zip testode.zip test code
John: I'm using evince to view pdf's (but acroread produces the same
behavior as Michael's attachments showed). 
Michael: I changed the backend to Cairo and saved the figures directly to
pdf. Same results. To be clear, to do this I changed the matplotlibrc file
(backend GTKAgg -> Cairo) and then changed the filename in savefig to end
with ".pdf". I assume that is what you had in mind. 
In addition, as requested here are two screenshots in png format of the
actual pylab/matplotlib output:
http://www.nabble.com/file/p20996825/odetest_pylabimg.png
odetest_pylabimg.png output
http://www.nabble.com/file/p20996825/odetest_pylabimg_zoom.png
odetest_pylabimg_zoom.png output zoomed. 
Thanks for the help,
-Jesse
Michael Droettboom-3 wrote:
> 
> Also -- for mtcoder:
> 
> Can you send us the script that generates your plot?
> 
> Also, if you set your backend to Cairo, and then generate the pdf, to 
> you get the same result?
> 
> Cheers,
> Mike
> 
> Michael Droettboom wrote:
>> There's something funny going on with line caps, maybe? It looks like 
>> the corners aren't getting capped in the same way as Agg does.
>>
>> I've created screenshots of Jesse's pdf file in acrobat and evince.
>>
>> Any thought, Jouni?
>>
>> Cheers,
>> Mike
>>
>> John Hunter wrote:
>>> On Thu, Dec 11, 2008 at 11:16 PM, mtcoder <jbe...@gm...> wrote:
>>>
>>> 
>>>> http://www.nabble.com/file/p20970084/testode.rk45.a0.99.eps1e-07.pdf
>>>> testode.rk45.a0.99.eps1e-07.pdf . This comes from a completely 
>>>> deterministic
>>>> ode. But is looks like I've added a tiny amount of noise.
>>>>
>>>> On a technical note, I'm running Ubuntu 8.04, python2.5.1, 
>>>> matplotlib0.91.2
>>>> (with GTKAgg backend).
>>>>
>>>> (Hopefully I didn't miss a similar question--and solution--elsewhere 
>>>> in the
>>>> forum.)
>>>> 
>>>
>>> My guess is that you may be seeing the antialiasing of your pdf
>>> renderer. matplotlib has a pretty good antialiasing renderer for the
>>> screen display (antigrain) but your mileage may vary for your pdf
>>> renderer. Since pdf is a vector output, we have no control over the
>>> renderering. What pdf viewer are you using? The best way for us to
>>> see what you are seeing is to take a PNG screenshot of your PDF file
>>> displayed in your viewer and then post the PNG. Ie, here is what I am
>>> seeing in the Preview app: the fuzziness is from the antialiasing, but
>>> I am used to seeing this.
>>> 
>>> ------------------------------------------------------------------------
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ------------------------------------------------------------------------------ 
>>>
>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, 
>>> Nevada.
>>> The future of the web can't happen without you. Join us at MIX09 to 
>>> help
>>> pave the way to the Next Web now. Learn more and register at
>>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ 
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>> 
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
>> Nevada.
>> The future of the web can't happen without you. Join us at MIX09 to help
>> pave the way to the Next Web now. Learn more and register at
>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
> 
> 
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
> Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/Fuzzy-plots-of-ode-solutions-tp20970084p20996825.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: John M. <ma...@nr...> - 2008年12月14日 02:05:26
I had the same problem with the matplotlib-0.98.5-py2.5-macosx-10.3.egg on OS X 10.5 and finally determined that it expected the latest png library. The one on the most recent release of the OS is a littler earlier. I compiled the library from the png website and redid the easy_install and everything worked fine.
John M.
-----Original Message-----
Date: 2008年12月13日 22:08:37 +0000
From: Robin <ro...@gm...>
Subject: Re: [Matplotlib-users] problem with
	matplotlib-0.98.5-py2.5-macosx-10.3.egg
To: "John Hunter" <jd...@gm...>
Cc: mat...@li...
Message-ID:
	<b14...@ma...>
Content-Type: text/plain; charset=ISO-8859-1
On Sat, Dec 13, 2008 at 9:17 PM, John Hunter <jd...@gm...> wrote:
> On Sat, Dec 13, 2008 at 3:01 PM, Robin <ro...@gm...> wrote:
>
>> As in my other mail I am having trouble building from source.
>> Previously I used the mac .egg to get around this, but the
>> matplotlib-0.98.5-py2.5-macosx-10.3.egg for 0.98.5 doesn't appear to
>> work.
>
> I think the egg may be broken. Try grabbing the tarball and following
> the instructions at
>
> http://ipython.scipy.org/moin/Py4Science/InstallationOSX
Right - following these exactly worked (I had been missing out the
pkgconfig bit)
Thanks,
Robin
1 message has been excluded from this view by a project administrator.

Showing 5 results of 5

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