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

Showing 11 results of 11

From: David B. <db...@ya...> - 2004年04月01日 23:50:02
It works great now. Thanks for the quick response and
the fix John!
Also to answer Todd Miller:
>I googled around on this and got a suggestion having
>to do with mainloop
> handling from an old Guido e-mail. IDLE has a -n
>switch ...
In my initial message note the IDLE info:
>IDLE 1.0 ==== No Subprocess ====
The 'No Subprocess' part indicates I'm using the -n
flag. In IDLE 1.0, from my understanding, the IDE
normally restarts the interpreter each time a program
is run. The -n flag does not do this and runs
everything together so the Tkinter mainloop does not
get confused. It's not a great solution but it works
and I have not had serious stability problems, at
least for my limited needs. This trick is needed for
the turtle module, and probably anything that uses
Tkinter.
And now back to trying matplotlib!
-- David 
>>>>> "John" == John Hunter <jdhunter@ac...> writes:
 
 John> Ahh the golden piece of information. Todd
Miller has
 John> reported that idle does not seem to respect
matplotlibrc.
 John> At this point we have no idea why. We'll
try to get this
 John> figured out ASAP!
 >>>> "John" == John Hunter <jdhunter@ac...> writes:
> I found one problem. IDLE sets the HOME variable,
>and there is a bug
> in the way matplotlib located the rc file. 
>Basically, if HOME is set,
> it expects the rc file to be there. Here is a fix.
 
 >Edit
C:\Python23\Lib\site->packages\matplotlib\__init__.py
and replace
> the function matplotlib_fname with the following
 
 def matplotlib_fname():
 'Return the path to the rc file'
 if os.environ.has_key('MATPLOTLIBRC'):
 path = os.environ['MATPLOTLIBRC']
 if os.path.exists(path):
 fname = os.path.join(path,
'.matplotlibrc')
 if os.path.exists(fname):
 return fname
 
 if os.environ.has_key('HOME'):
 path = os.environ['HOME']
 if os.path.exists(path):
 fname = os.path.join(path,
'.matplotlibrc')
 if os.path.exists(fname):
 return fname
 
 path = get_data_path() # guaranteed to exist or
raise
 fname = os.path.join(path, '.matplotlibrc')
 if not os.path.exists(fname):
 print >> sys.stderr, 'Could not find
.matplotlibrc; using defaults'
 return fname
 
> I tested this on windows with idle. Idle now
>respects matplotlibrc
> and loads TkAgg. However, at least on my system,
>there is still some
> idle bug because the Tk window launches and then
>freezes without
> displaying the figure I suspect Todd, the TkAgg
>author, will be
> looking at this soon. [Todd, I had this problem
>with or without
> window_focus set in my test].
 
 >Sorry for the troubles,
 >JDH
__________________________________
Do you Yahoo!?
Yahoo! Small Business 15ドルK Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/
From: Todd M. <jm...@st...> - 2004年04月01日 15:07:55
On Thu, 2004年04月01日 at 08:55, John Hunter wrote:
> >>>>> "John" == John Hunter <jdh...@ac...> writes:
> I tested this on windows with idle. Idle now respects matplotlibrc
> and loads TkAgg. However, at least on my system, there is still some
> idle bug because the Tk window launches and then freezes without
> displaying the figure I suspect Todd, the TkAgg author, will be
> looking at this soon. [Todd, I had this problem with or without
> window_focus set in my test].
I googled around on this and got a suggestion having to do with mainloop
handling from an old Guido e-mail. IDLE has a -n switch which you can
add to the end of the windows shortcut command line (Target:) under the
shortcut properties. When I did this, matplotlib is unfrozen. The
e-mail is a little ominous about using the switch: I think a failure in
matplotlib could also bring down IDLE and any open windows it might have
lying around (like, say, a plot script!). Guido also suggests that
running the matplotlib Tkinter mainloop in its own thread to avoid using
-n is a bad idea. This is looking dicey. We might want to make a note
that using IDLE with -n can be done but is considered risky.
Here's Guido:
http://aspn.activestate.com/ASPN/Mail/Message/edu-sig/1818398
Regards,
Todd
-- 
Todd Miller <jm...@st...>
From: John H. <jdh...@ac...> - 2004年04月01日 14:20:27
>>>>> "Steven" == Steven Pang <pk...@si...> writes:
 Steven> Hi, I need a library for my app to produce .png charts and
 Steven> is currently trying matplotlib. I would need the whole app
 Steven> to be compiled to .exe using py2exe. I wonder if
 Steven> matplotlib is suitable?
Oops, I got confused by all the "Steve" posts this morning and
accidentally responded to Steve Chaplin trying to answer your
question. Here is the same post again:
Agg is already built into the matplotlib windows installer. No need
to build it yourself. If for some reason, however, you want or need
to build it yourself, download
http://matplotlib.sourceforge.net/win32_static.tar.gz, untar it in
your matplotlib src dir, and follow the instructions in the README in
the win32_static dir and in setupext.py.
As for building matplotlib + agg into a py2exe installer, yes this is
possible. See Matt Fischler's post on this list "How to freeze your
matplotlib apps using py2exe"
 http://sourceforge.net/mailarchive/message.php?msg_id=7467225
Hope this helps,
JDH
From: John H. <jdh...@ac...> - 2004年04月01日 14:17:45
>>>>> "John" == John Hunter <jdh...@ac...> writes:
 John> Ahh the golden piece of information. Todd Miller has
 John> reported that idle does not seem to respect matplotlibrc.
 John> At this point we have no idea why. We'll try to get this
 John> figured out ASAP!
I found one problem. IDLE sets the HOME variable, and there is a bug
in the way matplotlib located the rc file. Basically, if HOME is set,
it expects the rc file to be there. Here is a fix.
Edit C:\Python23\Lib\site-packages\matplotlib\__init__.py and replace
the function matplotlib_fname with the following
def matplotlib_fname():
 'Return the path to the rc file'
 if os.environ.has_key('MATPLOTLIBRC'):
 path = os.environ['MATPLOTLIBRC']
 if os.path.exists(path):
 fname = os.path.join(path, '.matplotlibrc')
 if os.path.exists(fname):
 return fname
 if os.environ.has_key('HOME'):
 path = os.environ['HOME']
 if os.path.exists(path):
 fname = os.path.join(path, '.matplotlibrc')
 if os.path.exists(fname):
 return fname
 path = get_data_path() # guaranteed to exist or raise
 fname = os.path.join(path, '.matplotlibrc')
 if not os.path.exists(fname):
 print >> sys.stderr, 'Could not find .matplotlibrc; using defaults'
 return fname
I tested this on windows with idle. Idle now respects matplotlibrc
and loads TkAgg. However, at least on my system, there is still some
idle bug because the Tk window launches and then freezes without
displaying the figure I suspect Todd, the TkAgg author, will be
looking at this soon. [Todd, I had this problem with or without
window_focus set in my test].
Sorry for the troubles,
JDH
From: John H. <jdh...@ac...> - 2004年04月01日 12:45:15
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes:
 Steve> To answer my own question. Yes, AGG is tested on Windows,
 Steve> Linux, Sun, SGI, and Apple (MacOS X, X11)
Hi Steve, 
Agg is already built into the matplotlib windows installer. No need
to build it yourself. If for some reason, however, you want or need
to build it yourself, download
http://matplotlib.sourceforge.net/win32_static.tar.gz, untar it in
your matplotlib src dir, and follow the instructions in the README in
the win32_static dir and in setupext.py.
As for linux, OS X, and unix, the matplotlib src distribution comes
with agg. No need to download it separately. Ditto for CVS checkouts
(this is a recent change).
As for building matplotlib + agg into a py2exe installer, yes this is
possible. See Matt Fischler's post on this list "How to freeze your
matplotlib apps using py2exe"
 http://sourceforge.net/mailarchive/message.php?msg_id=7467225
Hope this helps,
JDH
From: Steve C. <ste...@ya...> - 2004年04月01日 06:06:27
To answer my own question. Yes, AGG is tested on Windows, Linux, Sun,
SGI, and Apple (MacOS X, X11)
The website is a little out of date. Here's some info the author sent
me:
=============================================================
AGG has been considerably modified last time and its development is
still in
process, but major design issues are stabilized now.
The good news is that there many new things were implemented, such as:
- Gradients and Gouraud Shading
- Image affine transformations
- Strokes with different types of line joins and line caps
- Dashed line generator
- Markers, such as arrowheads/arrowtails
- Fast vectorial polygon clipping to a rectangle
- Low-level clipping to multiple rectangular regions
- Alpha-Masking
- New fast anti-aliased line algorithm
- Using arbitrary images as line patterns
- Rendering in separate color channels
- Perspective and bilinear transformations of vector and image data
- General polygon clipping (and, or, xor, sub) based on Alan Murta's GPC
The library is platform independent and it's considerably redesigned.
You can find many examples, including image transformation ones in
agg2/examples. The examples are platform independent too and you
can find the building environments in the respective directories.
If you use Win32 platform with VC++ 6 or later just open
the projects, the library doesn't need any preliminary building. If you
use
Unix/Linux with X11 and gcc, first execute make in the agg2 directory
and then make in examples/X11/.
There is also a simple SVG viewer, it's in agg2/svg. You will
need Expat XML parser.
The latest snapshot of AGG is always here:
http://www.antigrain.com/agg2.zip (MS-DOS end-of-line style)
http://www.antigrain.com/agg2.tar.gz (Unix end-of-line style)
or in the CVS repository at SourceForge:
http://sourceforge.net/cvs/?group_id=42020
Also there's a lite, minimalistic version:
http://www.antigrain.com/lite/agg2_lite.zip
There is a mailing list:
http://lists.sourceforge.net/lists/listinfo/vector-agg-general
where I publish news from time to time and where some very nice people
are
discussing AGG issues. They are giving me a lot of recommendations and
new
ideas.
I'd recommend you to subscribe and take part in it. Look at the mailing
archives for details:
http://sourceforge.net/mailarchive/forum.php?forum=vector-agg-general
====================================================
From: Steve C. <ste...@ya...> - 2004年04月01日 05:44:55
> Hi Steve, thanks for letting me know. There is an off-by-one error
> and it looks like and easy fix. For future reference, you may want to
> consider using GTKAgg as your default GUI. This has the GTK widget
> but uses agg for rendering. Agg supports subpixel rendering and so
> isn't susceptible to one pixel errors that crop up in GTK in a number
> of contexts. At low resolutions, these become particularly
> noticeable. Other benefits over the GTK backend are alpha blending,
> anti-aliased drawing, and faster image support -
> http://matplotlib.sourceforge.net/backends.html#GTKAgg
I had a look at http://www.antigrain.com/ and downloaded
agg-2002年05月21日.zip.
There's no install document, configure.ac file or Makefile that would
allow me to compile the software. It does not look like this is portable
software that will compile on Linux.
Regards,
Steve
From: Steven P. <pk...@si...> - 2004年04月01日 04:51:02
Hi,
I need a library for my app to produce .png charts and is
currently trying matplotlib. I would need the whole app
to be compiled to .exe using py2exe. I wonder if
matplotlib is suitable?
I come across some instructions from John on how
to do this using Agg without a GUI:
Download the src distribution, edit setup.py and
set BUILD_AGG = True, do a normal setup.py install.
However, I got this error on my Win98:
running build_ext
error: Python was built with version 6 of Visual Studio, and extensions 
need to
be built with the same version of the compiler, but it isn't installed.
Thanks for any help,
Steven.
From: Steve C. <ste...@ya...> - 2004年04月01日 04:46:58
> Now on to your problem.
> 
> In backend_gtk draw_rectangle, change
> 
> x, y = int(x), self.height-int(math.ceil(y+height))
> 
> to
> x, y = int(x), self.height-int(y+height)
> 
> and the GraphicsContext.set_clip_rectangle method to
> 
> def set_clip_rectangle(self, rectangle):
> GraphicsContextBase.set_clip_rectangle(self, rectangle)
> l,b,w,h = rectangle
> rectangle = (int(l), self.renderer.height-int(b+h)+1,
> int(w), int(h))
> self.gdkGC.set_clip_rectangle(rectangle) 
I tried this but it made things worse. With simple_plot.py the plot now
extends above the top axis line.
Steve
From: John H. <jdh...@ac...> - 2004年04月01日 02:04:13
>>>>> "David" == David Brown <db...@ya...> writes:
 David> I installed the matplotlib-1.52.win32-py2.3 binary on
 David> python23 (Enthought). I don't want to install a lot of
 David> extra packages so I found the existing .matplotlibrc in
 David> C:\Python23\share\matplotlib and modified the backend to
 David> "backend : TkAgg". But when I try to import matplotlib it
 David> appears to be still looking for the default Gtk backend.
 David> I noticed that sys.path did not contain
 David> C:\Python23\share\matplotlib so I tried adding it. Still
 David> no luck.
It has nothing to do with sys.path, so you can safely ignore this.
 David> Here's the error message:
 David> IDLE 1.0 ==== No Subprocess ====
 ^^^
Ahh the golden piece of information. Todd Miller has reported that
idle does not seem to respect matplotlibrc. At this point we have no
idea why. We'll try to get this figured out ASAP!
As a test case, try to run a matplotlib script from the DOS prompt
C:> python somefile.py
and see if TkAgg launches. If so, we can be fairly sure it's idle.
Probably just double clicking on one of the examples from the zip
distribution will be enough, but you lose the traceback this way if
there is an error.
Let me know,
JDH
From: David B. <db...@ya...> - 2004年04月01日 00:43:30
I installed the matplotlib-1.52.win32-py2.3 binary on
python23 (Enthought). I don't want to install a lot
of extra packages so I found the existing
.matplotlibrc in C:\Python23\share\matplotlib and
modified the backend to "backend : TkAgg". But
when I try to import matplotlib it appears to be still
looking for the default Gtk backend. 
I noticed that sys.path did not contain
C:\Python23\share\matplotlib so I tried adding it. 
Still no luck.
Here's the error message:
IDLE 1.0 ==== No Subprocess ====
>>> from matplotlib.matlab import *
No module named pygtk
matplotlib requires pygtk-1.99.16 or greater -- trying
anyway. Please hold on
Traceback (most recent call last):
 File "<pyshell#0>", line 1, in ?
 from matplotlib.matlab import *
 File
"C:\Python23\Lib\site-packages\matplotlib\matlab.py",
line 127, in ?
 from backends import new_figure_manager,
error_msg, \
 File
"C:\Python23\Lib\site-packages\matplotlib\backends\__init__.py",
line 16, in ?
 from backend_gtk import \
 File
"C:\Python23\Lib\site-packages\matplotlib\backends\backend_gtk.py",
line 13, in ?
 import gobject
ImportError: No module named gobject
>>> 
Any ideas on why this does not work? Should my python
path contain the path to share\matplotlib ?
-- David
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

Showing 11 results of 11

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