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

Showing 13 results of 13

From: John H. <jdh...@ac...> - 2005年12月10日 19:01:58
>>>>> "Matt" == Matt Newville <new...@ca...> writes:
 >> > I've seen the matplotlib code, and have used a fair number of
 >> plotting >libraries in my day. The matplotlib results are
 >> wonderful, but the API is a bit goofy, don't you think? Does
 >> FigureCanvas->Figure->Axes make sense to you? I'd be OK with
 >> two of those, but I don't understand how three possibly 
 >> helps.
 >> 
 >> I don't think it's goofy at all. You have FigureCanvas because
 >> seperating out the thing that "draws" the figure is the best
 >> way to implement backend neutrality. You have Figure and Axes
 >> (rather than just Axes) because that's the best way to
 >> implement things like subplots, plotting overlapped axes, and
 >> figimage(), colorbars, and figure legends.
 Matt> I think we agree: the hierarchy is implementation driven,
 Matt> not use driven.
It depends on your perspective I guess. Originally there was only a
Figure and Axes, and when we started supporting other backends than
GTK (eg WX) we needed to segregate the Figure from it's container to
provide a GUI independent way of representing the Figure. In my view,
this was a use driven detail, since we wanted to use matplotlib with
other GUIs, but you may view it as an implementation driven, which it
is also.
If you are only using matplotlib in a single context, eg a WX App,
then yes, it is more overhead than you need. But it is fairly useful
in a GUI neutral plotting library.
Because the GUI neutrality imposes some extra syntactic overhead when
working with OO matplotlib, I think it is a good idea to have GUI
specific OO wrappers to ease the common tasks, like you and Ken have
provided.
JDH
From: John H. <jdh...@ac...> - 2005年12月10日 18:56:28
>>>>> "Graeme" == Graeme Lufkin <gra...@gm...> writes:
 Graeme> experience with matplotlib+PyGTK on platforms other than
 Graeme> Linux. (Ahh, the joys of scientific programming: now
 Graeme> Windows.) Perhaps wxWindows handles cross-platform apps
 Graeme> better, I'm not qualified to answer. If other people are
 Graeme> interested, I could try writing up a Wiki page with one of
 Graeme> my small "matplotlib embedded in a GTK app" programs. --
FYI, gtk was the first and only matplotlib backend for many releases,
then came PS and WX. I use GTK/GTKAgg backends primarily for
application development with embedded matplotlib, and these apps run
on win32, OS X, linux and solaris. So pygtk + matplotlib is a very
good combination for cross platform GUI developement, in my opinion.
JDH
From: Paul B. <peb...@gm...> - 2005年12月10日 18:55:27
On 12/9/05, Randewijk P-J <pjr...@su...> <pjr...@su...> wrote:
>
> Dear Paul,
>
>
> > It should depend on font.size in the rc file.
>
>
> That's what I thought.
>
> I changed the font.size to 5.
>
> Only my figtext's fontsize changed. The legend's fontsize remained at
> (what appears to be) 12...
>
> I'm still running 0.84, can that be the problem ?
No. This is a bug in the legend code. The code initializes the text size
when the object is created, but does not update it at any later time. This
should be fixed.
 -- Paul
--
Paul Barrett, PhD Johns Hopkins University
Assoc. Research Scientist Dept of Physics and Astronomy
Phone: 410-516-5190 Baltimore, MD 21218
From: John H. <jdh...@ac...> - 2005年12月10日 18:53:50
>>>>> "Michael" == Michael McKerns <mmc...@it...> writes:
 Michael> Matplotlib is currently too slow to render large
 Michael> datasets. This needs improvement. Is anyone working on
 Michael> this problem? I believe this issue was also brought up
 Michael> at the last SciPy...
Hey Michael,
Performance questions are best addressed in the context of an example
script, with matplotlib version number and backend. All of these can
have a big effect on the performance you are seeing.
Some commands (pcolor, scatter) are known to be too slow generally.
Others, like plotting markers, are highly optimized in recent version
of mpl for backend agg but not other backends. imshow is about as
fast as we can make it for now...
So it would help to know in what context you are seeing performance
problems. Sometimes it's as simple as improper use of mpl. Eg
for line in some_big_data_set:
 plot(line)
will be an order of magnitude slower than using a line collection,
usually.
JDH
From: John H. <jdh...@ac...> - 2005年12月10日 18:50:25
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
 Charlie> So I was fairly successful at performing the horrid act
 Charlie> known as building mpl for windows. The problem I run
 Charlie> into (py24) is the "--install-script postinstall.py"
 Charlie> flag. Where/what is this script? The build works if I
 Charlie> omit this.
Historical detritus I think -- you can safely remove this from your
build and the mpl docs / setup code.
JDH
From: John H. <jdh...@ac...> - 2005年12月10日 18:49:42
>>>>> ""Strauss" == "Strauss JM <jst...@su...>" <jst...@su...> writes:
 "Strauss> My problem however is that I am unable to change my font
 "Strauss> style (it seems to be Times New Roman or similar and I
 "Strauss> want it to be Arial) for the labels ext., even though I
 "Strauss> can change just about everything else there is to
 "Strauss> change, including font size, the coverage of the canvas
 "Strauss> by the figure and so forth. This I do be merely
 "Strauss> changing the matplotlibrc file copied to my application
 "Strauss> directory. Are there any suggestions or may be a
 "Strauss> request for more detail information regarding my
 "Strauss> problem?
Not sure -- maybe matplotlib is not finding your fonts. Have you seen
http://matplotlib.sourceforge.net/fonts.html which gives some info
about setting font paths. I suggest removing your matplotlib
generated font cache (~/.matplotlib/ttffont.cache) and then rerunning
your script with the --verbose-debug flag to see what fonts it's
looking for, finding and using.
JDH
From: John H. <jdh...@ac...> - 2005年12月10日 18:47:03
>>>>> "Mike" == Mike Dewhirst <mi...@de...> writes:
 Mike> The entities are linked with named n:m relationships and I'd
 Mike> like to select one and display it in a box (with the entity
 Mike> name) and all related entities likewise in boxes linked to
 Mike> each other by lines representing the relationships tagged
 Mike> with the names of those relationships.
matplotlib may not be the best choice (someone already pointed you to
graphviz and pydot). See also pyx.
But there is a graph drawing module for matplotlib -- see
 http://networkx.sf.net
JDH
From: John H. <jdh...@ac...> - 2005年12月10日 18:42:20
>>>>> "Mark" == Mark Bakker <ma...@gm...> writes:
 Mark> Does anybody know a way to mix mathtext and regular text,
 Mark> for example in the axis label?
 Mark> Something like
 Mark> xlabel(r'$\rho^2$ along axis')
 Mark> doesn't work. I know this is mentioned in the manual. Just
 Mark> wondering if somebody knows a workaround rather than using
 Mark> the full Latex option.
This isn't supported yet, but it would be nice to do this. The two
things that have kept me from focusing more attention to mathtext are
the fact that the bakoma fonts we use are so bad noone wants to use
them (Nicholas recently submitted a patch for PS which allows
matplotlib mathtext to work with native PS AFM fonts) and that there
is not TeX/LaTeX integration. Nonetheless, it would be nice to
support this syntax. 
The current workaround is to use the roman fonts
 Mark> xlabel(r'$\rho^2$\ \rm{along\ axis}')
but since kerning is not supported in the bakoma fonts it doesn't look
that good, typically.
JDH
From: John H. <jdh...@ac...> - 2005年12月10日 18:39:04
>>>>> "psong" == psong <ps...@br...> writes:
 psong> Hi guys, I need to make a figure with custom axis
 psong> location. I would like to be able to put xaxis and yaxis at
 psong> arbitrary location (instead of the default location of top,
 psong> bottom, left, right). One such example would be the
 psong> symbolline example at
 psong> http://pyx.sourceforge.net/examples/graphs/index.html. I
 psong> could not figure out how to do this with matplotlib after
 psong> reading the manual and going through the examples on
 psong> matplotlib website. I can draw the axis line myself (with
 psong> axhline and axvline) but it was very tedious and the result
 psong> does not look good. Can this be readily done with
 psong> matplotlib? Any suggestion will be appreciated.
There is no better way to do it current;y than they way you are doing
it. It's a limitation and fixing it is on the goals list. If you
want to take a crack at it, check out the code in axis.py....
JDH
From: John H. <jdh...@ac...> - 2005年12月10日 18:36:40
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
 Charlie> Bump...... Anybody.........
You might want to look at Mark's work on axis equal and axis scaled.
It might help to place the radio widgets into an axes that has the
equal property set.
See Axes.set_aspect.
JDH
From: Darren D. <dd...@co...> - 2005年12月10日 15:35:28
On Saturday 10 December 2005 10:25 am, Jiri Polcar wrote:
> Hallo,
>
> when I use
>
> rc('text', usetex=True)
>
> and then
>
> savefig('main.eps')
>
> file 'main.eps' is very strange. BBox is bigger than plot and when I use
> 'ps2epsi' it's failed. Wihtout
>
> rc('text', usetex=True)
>
> line works 'main.eps' normaly. What I must to do to get "correct" EPS
> file with TeX processing?
try updating to gnu-ghostscript-8.16
From: Jiri P. <po...@ph...> - 2005年12月10日 15:26:06
 Hallo,
when I use
 rc('text', usetex=True)
and then
 savefig('main.eps')
file 'main.eps' is very strange. BBox is bigger than plot and when I use
'ps2epsi' it's failed. Wihtout
 rc('text', usetex=True)
line works 'main.eps' normaly. What I must to do to get "correct" EPS
file with TeX processing?
--
JP
From: Peter G. <pgr...@ge...> - 2005年12月10日 00:24:38
>/usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py
> 4 def fn_name(): return sys._getframe(1).f_code.co_name
> 5
>----> 6 import gobject
> 7 import gtk; gdk = gtk.gdk
> 8 import pango
>
>ImportError: No module named gobject
>
>
>If someone has seen this befor, please tell me how to solve the problem...
>
> 
>
looks like for me the gobject module is here:
/usr/lib/python2.3/site-packages/gtk-2.0/gobject.so
so probably you don't have the python gtk-2.0 bindings installed...
you don't mention which distro you use.. but say if it's debian based 
(or fedora/redhat with apt-get installed), do:
$> apt-cache search pygtk
then
$> apt-get install <pygtk2 package>
... might need pygtk2-devel as well, if you're building matplotlib... 
can't remember.
cheers,
peter
-- 
Peter Groszkowski Gemini Observatory
Tel: +1 808 9742509 670 N. A'ohoku Place
Fax: +1 808 9359235 Hilo, Hawai'i 96720, USA 

Showing 13 results of 13

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