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
(6) |
3
(13) |
4
(3) |
5
(10) |
6
(4) |
7
(2) |
8
(15) |
9
(10) |
10
(44) |
11
(17) |
12
(9) |
13
(2) |
14
(2) |
15
(4) |
16
(8) |
17
(13) |
18
(11) |
19
(12) |
20
|
21
|
22
(10) |
23
(10) |
24
(11) |
25
(11) |
26
(9) |
27
(1) |
28
|
29
(15) |
30
(14) |
31
(7) |
|
|
|
Yes two dimensional mesh only of course... for 3D I already use Vtk The biggest potential problem is that matplotlib is exclusively a 2D plotting program (for now). Is the mesh that you want to plot two dimensional? Ryan --Henry
Dear Matplotlib users, I'm new to this list as well as matplot lib, but already really impressed by this library. I was wondering if there was an easy way to plot a simple (or not) fem mesh in the deformed (or not) state before starting to write such a function, I though it would be a good idea to ask to the list. Any advice or idea would be appreciated, thanks ! -- Henry Proudhon Postdoc Fellow Materials Engineering The University of British Columbia 309-3650 Stores Road V6T-1Z4 Vancouver B.C. (Canada)
Hello, I'm using scatter to plot markers that I would like to be transparent, so I use the keyword alpha = 0.2 to set transparency at 20%. But the markers are not transparent. I was informed by this list prior that there is a bug with using plot() and the transparency does not work. Is this the same bug for scatter as well?
>>>>> "Charles" == Charles Moad <cm...@in...> writes: Setting followups to matplotlib-devel Charles> I get segfaults with ipython -pylab (and without the Charles> flag) quite a bit as well. They usually seem pretty Charles> random and frequent, but I found one way to reproduce. Charles> gentoo-linux ipython-0.6.15 matplotlib-cvs Charles> plot(rand(10)) a = gca() a.bbox<return> Segmentation Charles> fault Charles> This may not be a practical example, but it is the only Charles> consistent one I can find right now. Hey Charles, Thanks for reporting this. I'm not sure this is related to Steve's bug, but it's good to know about. I can reproduce your crash on ubuntu, and only in ipython. This is independent of backends and can be reproduced with this minimal script peds-pc311:~> python Python 2.4.1 (#2, Mar 30 2005, 21:51:10) [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib.transforms import unit_bbox >>> b = unit_bbox() >>> b <Bbox object at 0x81e3a6c> >>> but in ipython I get the segfault peds-pc311:~> ipython Python 2.4.1 (#2, Mar 30 2005, 21:51:10) Type "copyright", "credits" or "license" for more information. IPython 0.6.16_cvs -- An enhanced Interactive Python. ? -> Introduction to IPython's features. %magic -> Information about IPython's 'magic' % functions. help -> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: from matplotlib.transforms import unit_bbox In [2]: b = unit_bbox() In [3]: b Segmentation fault bbox is a pycxx extension object defined in src/_transforms.cpp Something ipython is doing to represent the object is causing the crash. I can do the following in ipython In [1]: from matplotlib.transforms import unit_bbox In [2]: b = unit_bbox() In [3]: print b <Bbox object at 0x82601c4> In [4]: str(b) Out[4]: '<Bbox object at 0x82601c4>' Fernando, what kind of whacky magic are you doing when I type In [5]: b Segmentation fault We've seen segfault's before when doing type inspection in pycxx; I've reported this but haven't gotten any resolution http://sourceforge.net/tracker/index.php?func=detail&aid=1210007&group_id=3180&atid=103180 JDH
I get segfaults with ipython -pylab (and without the flag) quite a bit as well. They usually seem pretty random and frequent, but I found one way to reproduce. gentoo-linux ipython-0.6.15 matplotlib-cvs plot(rand(10)) a = gca() a.bbox<return> Segmentation fault This may not be a practical example, but it is the only consistent one I can find right now. - Charlie John Hunter wrote: >>>>>>"Steve" == Steve Schmerler <el...@gm...> writes: > > > Steve> Hi I recently posted something about segfaults I get when > Steve> plotting. Now here is a little update and I really hope > Steve> someone has an idea how I can solve this problem. > > Steve> I'm running IPython 0.6.13 on a Debian box, installed the > Steve> recent mpl 0.83.2 from source, GTKAgg backend. > > Steve> 1) > > Steve> When I start ipython (as normal user) with the -pylab > Steve> option and then say > > Steve> plot([1,2,3]) > > Steve> I get > > Steve> In [1]: plot([1,2,3]) > Steve> --------------------------------------------------------------------------- > Steve> exceptions.SystemError Traceback (most recent call last) > > > Steve> SystemError: ../Objects/moduleobject.c:48: bad argument to > Steve> internal function > > You say this is a segfault, but it looks like an exception. Does this > actually kill the ipython shell? Is this a full posting of the > traceback? > > What happens if you run the following script outside of ipython > > from pylab import plot, show > plot([1,2,3]) > show() > > with > > > python test.py --verbose-helpful > > Does this create a proper figure window -- please post all output from > the script. > > > Steve> 2) > > Steve> However when I change to root > > Steve> su <pwd> > > Steve> ipython -pylab > > Steve> then plotting works fine!? > > Perhaps this has something to do with having permission to connect to > the X11 server? As a normal user, can you launch graphical apps from > the shell, eg > > > gedit& > > > Have you done anything unusual with your system, changed the default > permission bits, done a chroot, etc? What linux distro are you > running? > > > Steve> I have no idea where this moduleobject.c lives or to which > Steve> application it belongs. > > Steve> 2) > > Steve> If I try the same with the normal python interpreter > > Steve> python > > Steve> from pylab import *; ion() plot([1,2,3]) > > Steve> a plot window pops up but shows no picture (no matter if > Steve> I'm root or not). > > > GTKAgg is not expected to work unless you are in a special threaded > environment like ipython with -gthread or -pylab. Try the same with > the TkAgg backend (edit your rc file) and let me know what happens. > > The last thing I'd advise is upgrading your ipython to the latest. > > I've never seen this one before so I'm flying by the seat of my pants. > > > JDH > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>> "Steve" == Steve Schmerler <el...@gm...> writes: Steve> Hi I recently posted something about segfaults I get when Steve> plotting. Now here is a little update and I really hope Steve> someone has an idea how I can solve this problem. Steve> I'm running IPython 0.6.13 on a Debian box, installed the Steve> recent mpl 0.83.2 from source, GTKAgg backend. Steve> 1) Steve> When I start ipython (as normal user) with the -pylab Steve> option and then say Steve> plot([1,2,3]) Steve> I get Steve> In [1]: plot([1,2,3]) Steve> --------------------------------------------------------------------------- Steve> exceptions.SystemError Traceback (most recent call last) Steve> SystemError: ../Objects/moduleobject.c:48: bad argument to Steve> internal function You say this is a segfault, but it looks like an exception. Does this actually kill the ipython shell? Is this a full posting of the traceback? What happens if you run the following script outside of ipython from pylab import plot, show plot([1,2,3]) show() with > python test.py --verbose-helpful Does this create a proper figure window -- please post all output from the script. Steve> 2) Steve> However when I change to root Steve> su <pwd> Steve> ipython -pylab Steve> then plotting works fine!? Perhaps this has something to do with having permission to connect to the X11 server? As a normal user, can you launch graphical apps from the shell, eg > gedit& Have you done anything unusual with your system, changed the default permission bits, done a chroot, etc? What linux distro are you running? Steve> I have no idea where this moduleobject.c lives or to which Steve> application it belongs. Steve> 2) Steve> If I try the same with the normal python interpreter Steve> python Steve> from pylab import *; ion() plot([1,2,3]) Steve> a plot window pops up but shows no picture (no matter if Steve> I'm root or not). GTKAgg is not expected to work unless you are in a special threaded environment like ipython with -gthread or -pylab. Try the same with the TkAgg backend (edit your rc file) and let me know what happens. The last thing I'd advise is upgrading your ipython to the latest. I've never seen this one before so I'm flying by the seat of my pants. JDH
Hi, I have just fink-installed matplotlib-py24. When I do the following, I get a 10 sec delay after the warning message until I can enter further text. >>> pylab.figure(1) /sw/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py: 960: GtkWarning: Could not find the icon 'gnome-fs-home'. The 'hicolor' theme was not found either, perhaps you need to install it. You can get a copy from: http://freedesktop.org/Software/icon-theme/releases buttons, backend) pylab.plot(x,y) gnome-fs-home.png is in: /sw/share/icons/{Flat-Blue, gnome, HighContrastLargePrint, HighContrastLargePrintInverse, LowContrastLargePrint}/48x48 hicolor exists as a directory at: /sw/share/icons/hicolor Am I missing some files? regards, Graeme
Hi I recently posted something about segfaults I get when plotting. Now here is a little update and I really hope someone has an idea how I can solve this problem. I'm running IPython 0.6.13 on a Debian box, installed the recent mpl 0.83.2 from source, GTKAgg backend. 1) When I start ipython (as normal user) with the -pylab option and then say plot([1,2,3]) I get In [1]: plot([1,2,3]) --------------------------------------------------------------------------- exceptions.SystemError Traceback (most recent call last) SystemError: ../Objects/moduleobject.c:48: bad argument to internal function 2) However when I change to root su <pwd> ipython -pylab then plotting works fine!? I have no idea where this moduleobject.c lives or to which application it belongs. 2) If I try the same with the normal python interpreter python from pylab import *; ion() plot([1,2,3]) a plot window pops up but shows no picture (no matter if I'm root or not). I'll appreciate any hints. Thanx!! cheers, steve
The behavior of the '.' marker seems anomalous, very different between gtkAgg and postscript backends, and not very useful: 1) With both backends, only the markeredgewidth property, not the markersize property has an effect on the size. More consistent with Matlab, and I suspect with what other users would expect, would be to have the markersize property control the size, as it does for all the other markers. 2) With Agg, trying to use markeredgewidth to make the size larger produces odd symbols. 3) With postscript, markeredgewidth=20, for example, does make a large circular dot. What I would prefer for all backends would be for '.' size to be controlled by markersize; the differences between 'o' and '.', as in Matlab, would be that the actual size of the dot would be a fraction of what is given in markersize (so that with a single markersize, there is a clear distinction between a dot and a filled circle), and the dot would have no edge. I suppose an alternative viewpoint is that a dot really should be a single pixel, so one shouldn't adjust its size; but this goes against the basic idea of having a plotting library in which the result depends as little as possible on the output hardware. Some backend dependence might be needed: for bitmapped output, one might specify that the dot marker should always include one full pixel, so that dots don't fade away in thumbnails, for example. Comments? Eric
Hi all, I get errors when building matplotlib with VC++ 6.00 see below. I read the bit about being masochistic in doing this, however, I am endeavouring to integrate Matplotlib into a wxWidgets App and I need debug mode to enable me to get it to work. So far I have used VC++ 6.00 to compile wxWidgets, wxPython, Numarray and Numeric in debug mode and it is just Matplotlib to go now. Failure details System is Win XP pro SP1, Python-2.4.1. Matplotlib is either matplotlib-0.83.2 or checkout from cvs. Command line is python setup.py build --debug running build_ext building 'matplotlib._agg' extension creating build\temp.win32-2.4 creating build\temp.win32-2.4\Debug creating build\temp.win32-2.4\Debug\src creating build\temp.win32-2.4\Debug\agg23 creating build\temp.win32-2.4\Debug\agg23\src E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd ...... agg.cxx E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd ...... agg_trans_affine.cpp E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd ...... agg_path_storage.cpp E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd ...... agg_bezier_arc.cpp E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd ...... agg_vcgen_dash.cpp E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd ...... agg_vcgen_stroke.cpp E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd ...... agg_rasterizer_scanline_aa.cpp E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd ...... agg_curves.cpp E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\link.exe /DLL /nologo /INCREMENTAL:no /pdb:None /DEBUG /LIBPATH:e:\Python241\libs /LIBPATH:e:\Python241\PCBuild stdc++.lib m.lib /EXPORT:init_agg build\temp.win32-2.4\Debug\src/agg.obj build\temp.win32-2.4\Debug\agg23/src/agg_trans_affine.obj build\temp.win32-2.4\Debug\agg23/src/agg_path_storage.obj build\temp.win32-2.4\Debug\agg23/src/agg_bezier_arc.obj build\temp.win32-2.4\Debug\agg23/src/agg_vcgen_dash.obj build\temp.win32-2.4\Debug\agg23/src/agg_vcgen_stroke.obj build\temp.win32-2.4\Debug\agg23/src/agg_rasterizer_scanline_aa.obj build\temp.win32-2.4\Debug\agg23/src/agg_curves.obj /OUT:build\lib.win32-2.4\matplotlib\_agg_d.pyd /IMPLIB:build\temp.win32-2.4\Debug\src\_agg_d.lib LINK : fatal error LNK1181: cannot open input file "stdc++.lib" note: cl.exe line above are truncated by me. I can get around this link error by commenting out all references to stdc++ in setup_ext.py ie #module.libraries.extend(['stdc++', 'm']) Am I correct in doing this? I then get the following error compiling _na_transforms.cpp running build_ext building 'matplotlib._na_transforms' extension E:\ProgramFiles\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Od /MDd /W3 /GX /Z7 /D_DEBUG -Isrc -I. -I -Ie:\Python241\include -Ie:\Python241\PC /TpE:\Python241\Lib\site-packages\matplotlib-cvs\src\_na_transforms.cpp /Fobuild\temp.win32-2.4\Debug\src/_na_transforms.obj -DNUMARRAY=1 _na_transforms.cpp .\CXX/Objects.hxx(9) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directory This error seems to be due to the part of the cl command line containing "-Isrc -I. -I -Ie:\Python241\include -Ie:\Python241\PC" and in particular the bit "-I" Changing the line "include_dirs = ['src', '.']+numarray_inc_dirs," to "include_dirs = ['e:\Python241\include', 'src', '.']+numarray_inc_dirs," It seems that the -I not having a directory path is a problem. I then get similar errors later building the other modules. I would appreciate it if somebody more knowledgeable in Disutils could point me in the right direction towards finding this problem. Also what does 'win32_static' mean? Thanks in anticipation, Noel Diviney -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
On 2005年8月06日, John Hunter apparently wrote: > What version of dvipng are you using, Alan? I haven't > tested with anything < 1.5 I have the version 1.6 distributed with MiKTeX. I have found a few things. (This is TKAgg only; the backend_ps works fine!) Focusing on the example at http://www.scipy.org/wikis/topical_software/UsingTex - On the xlabel and ylabel, if I use \bf I get problems (same for \textbf) but with \it I can see the axis labels. It looks like a spacing problem? - If I delete the \displaystyle command in the title, it almost displays, but all the superscripts are missing in the fraction. If I then delete \frac I see everything. Again, it looks like a spacing problem? So actually I am getting substantial functionality at this point, as long as I avoid all bold, all displaystyle math, and \frac. Alan PS Lesser questions. - Can I do the following (i.e., is the syntax right)? rc('text.tex', engine='latex') rc('font.latex', package='type1cm') Will this over-ride the settings in matplotlibrc? (For the discussion above, I set these there, as in the example at http://www.scipy.org/wikis/topical_software/UsingTex, but I want to understand the rest of the description in this example.) - I notice http://matplotlib.sourceforge.net/matplotlib.texmanager.html says "The tex and dvipng/dvips information is cached in ~/.tex.cache for reuse between sessions. Does the tilde here mean the .matplotlib directory *below* the home directory? Because that's where I find tex.cache (i.e., not right below HOME). (Note: that's tex.cache, no leading dot in conflict with the docs, but I assume that's ok because backend_ps works and I am getting some TKAgg functionality as well?) - Finally, should the tex.cache directory remain full of old cached images? Forever?
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> Oh, thats great news, finally some success on windows! TeX Darren> should work across the *Agg backends, but John did that Darren> work. Maybe he could comment. What version of dvipng are you using, Alan? I haven't tested with anything < 1.5? JDH
On Saturday 06 August 2005 02:40 am, Alan G Isaac wrote: > On Wed, 3 Aug 2005, Darren Dale apparently wrote: > > Would you try editing your backend_ps.py file to read > > the following, (but make sure gs32win is really the name of the > > executable), note there are subtle changes throughout the block: > > > > command = 'latex -interaction=nonstopmode "%s"' % texfile > > stdin, stdout, stderr = os.popen3(command) > > verbose.report(stdout.read(), 'debug-annoying') > > verbose.report(stderr.read(), 'helpful') > > command = 'dvips -R -T %fin,%fin -o "%s" "%s"' % (pw, ph, psfile, > > dvifile) stdin, stdout, stderr = os.popen3(command) > > verbose.report(stdout.read(), 'debug-annoying') > > verbose.report(stderr.read(), 'helpful') > > os.remove(epsfile) > > if ext.startswith('.ep'): > > dpi = rcParams['ps.distiller.res'] > > command = 'gs32win -dBATCH -dNOPAUSE -dSAFER -r%d \ > > -sDEVICE=epswrite -dLanguageLevel=2 -dEPSFitPage \ > > -sOutputFile="%s" "%s"'% (dpi, epsfile, psfile) > > stdin, stdout, stderr = os.popen3(command) > > verbose.report(stdout.read(), 'debug-annoying') > > verbose.report(stderr.read(), 'helpful') > > shutil.move(epsfile, outfile) > > else: shutil.move(psfile, outfile) > > Thanks. > Using the ghostscript executable gswin32c, > I can now produce beautiful EPS files. > Should I be able to see the same thing > in the TKAgg backend? (The LaTeX does > not show up; when running the example > http://www.scipy.org/wikis/topical_software/UsingTex > I see a red horizontal line for the title > and no labels on the axes.) Oh, thats great news, finally some success on windows! TeX should work across the *Agg backends, but John did that work. Maybe he could comment. -- Darren
On Wed, 3 Aug 2005, Darren Dale apparently wrote: > Would you try editing your backend_ps.py file to read > the following, (but make sure gs32win is really the name of the executable), > note there are subtle changes throughout the block: > command = 'latex -interaction=nonstopmode "%s"' % texfile > stdin, stdout, stderr = os.popen3(command) > verbose.report(stdout.read(), 'debug-annoying') > verbose.report(stderr.read(), 'helpful') > command = 'dvips -R -T %fin,%fin -o "%s" "%s"' % (pw, ph, psfile, dvifile) > stdin, stdout, stderr = os.popen3(command) > verbose.report(stdout.read(), 'debug-annoying') > verbose.report(stderr.read(), 'helpful') > os.remove(epsfile) > if ext.startswith('.ep'): > dpi = rcParams['ps.distiller.res'] > command = 'gs32win -dBATCH -dNOPAUSE -dSAFER -r%d \ > -sDEVICE=epswrite -dLanguageLevel=2 -dEPSFitPage \ > -sOutputFile="%s" "%s"'% (dpi, epsfile, psfile) > stdin, stdout, stderr = os.popen3(command) > verbose.report(stdout.read(), 'debug-annoying') > verbose.report(stderr.read(), 'helpful') > shutil.move(epsfile, outfile) > else: shutil.move(psfile, outfile) Thanks. Using the ghostscript executable gswin32c, I can now produce beautiful EPS files. Should I be able to see the same thing in the TKAgg backend? (The LaTeX does not show up; when running the example http://www.scipy.org/wikis/topical_software/UsingTex I see a red horizontal line for the title and no labels on the axes.) Thank you, Alan Isaac
I like the new file dialog that Clovis suggested for the Tk backend. I suggest two modifications before submitting a patch: 1. Could you add an error message when an unknown extension is given? Right now it does nothing, but the user should probably be warned. 2. Could you add a warning when an existing filename is given and ask if th= e=20 user wants to overwrite? When that is added, I suggest you submit a patch. Thanks Mark Message: 1 Date: 2005年8月04日 11:19:50 -0300 From: Clovis Goldemberg <cl...@pe...> To: mat...@li...urcef=20 >=20 > orge.net <http://orge.net> > Subject: [Matplotlib-users] Question about toolbar customization >=20 > Dear all, >=20 > I have two suggestions about toolbar customization: >=20 > 1. In the 'matplotlibrc' file the toolbar line should be changed in > order to include a "custom toolbar" >=20 > toolbar : toolbar2 # None | classic | toolbar2 | custom >=20 > 2. In the 'backend_tkagg.py file', inside the 'NavigationToolbar2TkAgg > class' the > save_figure procedure should be changed to somewhat: >=20 > def save_figure(self): > from tkFileDialog import asksaveasfilename > fname =3D asksaveasfilename(master=3Dself.window, > title=3D'Save the figure', > filetypes=3D[('Encapsulated Postscript > File','*.eps'), > ('Scalable Vector > Graphics','*.svg'), > ('Portable Network > Graphics','*.png')]) > # initialfile=3DInitialFilename) > if fname =3D=3D "" : > return > else: > bname, fext =3D os.path.splitext(fname) > if (fext.lower()=3D=3D'.png'): > self.canvas.print_figure(fname, dpi=3D300) > elif (fext.lower()=3D=3D'.eps'): > self.canvas.print_figure(fname) > elif (fext.lower()=3D=3D'.svg'): > self.canvas.print_figure(fname) >=20 > I think that the asksaveasfilename function provided by > tkFileDialog is "better"
>>>>> "Mark" == Mark Bakker <ma...@gm...> writes: Mark> Hello'all - I am trying to develop my own toolbar and Mark> thought the easiest way to do this was to define a new Mark> backend and change it in that file. Matplotlib includes the Mark> 'template' backend as a start. To get going, I copied the Mark> entire TkAgg backend into the template backend and set the Mark> backend to 'Template' in the matplotlibrc file. But now Mark> when I run pylab, it doesn't work interactivly anymore. Mark> When I just give a plot([1,2,3]), it draws the figure window Mark> but not the figure. draw_if_interactive() doesn't work Mark> either, even though interactive is set to True. draw() does Mark> work and creates the correct figure. Is Tk special ? I Mark> thought this should work. I'm not sure why this didn't work. You might simply copy backend_tkagg to backend_tkagg2, edit matplotlib/backends/__init__.py and add TkAgg2 to the interactive_bk list there, and reinstall. Alternatively, you could follow the examples of embedding_in_tk*.py and create your own tkapp with your own toolbar. We've discussed ways of customizing the toolbar before, but haven't gotten anything working yet. JDH
Hi John- > Go to line 455 on matplotlib/font_manager.py > and uncomment the except part so that it reads... Worked like a charm! Thanks so much for the quick reply. > Tom> After this, further attempts to import or reload pylab give > Tom> no errors, but there is no pylab.plot (or any other pylab > Tom> function I've tried). > > I'm not sure what this is about.... I probably wasn't clear enough in the original post---this was true only in the same python process that attempted the import in the first place (i.e., after the failure, I didn't quit python, but just tried 'import pylab' and 'reload(pylab)'). I suspect it has to do with how pylab appears to be doing a kind of "lazy import." In any case, all appears well now, including the TeX support. Very nice! -Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
> Hello, > > I want to plot some digital signals using matplotlib. > I want to plot some 6 digital signals (or say any arbitary number of > signals) in one figure. > For each signal I want a y-label displayed. > > One way to plot digital signals in one plot is that I add an offset to > other signals and then plot. But I thought if anyone knows a better > idea then it will be good. > Also how can I have different y-labels for each signal. I don't want > to use legends because with too many signals it will be dificult to > match the legend with where the signal is. > > I am attaching a picture which is generated by some other tools but > now I want to genrate somewhat similar way in matplotlib. > Can anyone give me some small hints? There are a few ways to do it. You could make each signal a separate axes and make the y label horizontal. This works fine for a small number of signals (4-10 say) except the extra horizontal lines and ticks around the axes may be annoying. It's on our list of things to change the way these axes lines are draw, but it isn't done yet. from pylab import figure, show, setp from matplotlib.numerix import sin, cos, exp, pi, arange yprops = dict(rotation=0, horizontalalignment='right', verticalalignment='center') axprops = dict(yticks=[]) fig = figure() t = arange(0.0, 2.0, 0.01) ax1 =fig.add_axes([0.1, 0.7, 0.8, 0.2], **axprops) ax1.plot(t, sin(2*pi*t)) ax1.set_ylabel('S1', **yprops) # force x axes to remain in register, even with toolbar navigation ax2 = fig.add_axes([0.1, 0.5, 0.8, 0.2], sharex=ax1, **axprops) ax2.plot(t, exp(-t)) ax2.set_ylabel('S2', **yprops) ax3 = fig.add_axes([0.1, 0.3, 0.8, 0.2], sharex=ax1, **axprops) ax3.plot(t, sin(2*pi*t)*exp(-t)) ax3.set_ylabel('S3', **yprops) ax4 = fig.add_axes([0.1, 0.1, 0.8, 0.2], sharex=ax1, **axprops) ax4.plot(t, sin(2*pi*t)*cos(4*pi*t)) ax4.set_ylabel('S4', **yprops) show() It turns out that I lot signals in the way you suggest all the time (EEG viewer), see a screenshot of the application that gave birth to matplotlib at http://matplotlib.sourceforge.net/screenshots/eeg_small.png . I've been meaning to refactor the EEG viewer into a "multiline" viewer and put it into matplotlib but haven't gotten around to it (the source code is at http://pbrain.sf.net). Here is an example of how I do it in my app with additional comments. Note that this will break the y behavior of the toolbar because we have changed all the default transforms. In my application I have a custom toolbar to increase or decrease the y scale. In this example, I bind the plus/minus keys to a function which increases or decreases the y gain. Perhaps I will take this and wrap it up into a function called plot_signals or something like that because the code is a bit hairy since it makes heavy use of the somewhat arcane matplotlib transforms. I suggest reading the header of http://matplotlib.sourceforge.net/matplotlib.transforms.html before trying to understand this example. from pylab import figure, show, setp, connect, draw from matplotlib.numerix import sin, cos, exp, pi, arange from matplotlib.numerix.mlab import mean from matplotlib.transforms import Bbox, Value, Point, \ get_bbox_transform, unit_bbox # load the data t = arange(0.0, 2.0, 0.01) s1 = sin(2*pi*t) s2 = exp(-t) s3 = sin(2*pi*t)*exp(-t) s4 = sin(2*pi*t)*cos(4*pi*t) s5 = s1*s2 s6 = s1-s4 s7 = s3*s4-s1 signals = s1, s2, s3, s4, s5, s6, s7 for sig in signals: sig = sig-mean(sig) lineprops = dict(linewidth=1, color='black', linestyle='-') fig = figure() ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) # The normal matplotlib transformation is the view lim bounding box # (ax.viewLim) to the axes bounding box (ax.bbox). Where are going to # define a new transform by defining a new input bounding box. See the # matplotlib.transforms module helkp for more information on # transforms # This bounding reuses the x data of the viewLim for the xscale -10 to # 10 on the y scale. -10 to 10 means that a signal with a min/max # amplitude of 10 will span the entire vertical extent of the axes scale = 10 boxin = Bbox( Point(ax.viewLim.ll().x(), Value(-scale)), Point(ax.viewLim.ur().x(), Value(scale))) # height is a lazy value height = ax.bbox.ur().y() - ax.bbox.ll().y() boxout = Bbox( Point(ax.bbox.ll().x(), Value(-0.5) * height), Point(ax.bbox.ur().x(), Value( 0.5) * height)) # matplotlib transforms can accepts an offset, which is defined as a # point and another transform to map that point to display. This # transform maps x as identity and maps the 0-1 y interval to the # vertical extent of the yaxis. This will be used to offset the lines # and ticks vertically transOffset = get_bbox_transform( unit_bbox(), Bbox( Point( Value(0), ax.bbox.ll().y()), Point( Value(1), ax.bbox.ur().y()) )) # now add the signals, set the transform, and set the offset of each # line ticklocs = [] for i, s in enumerate(signals): trans = get_bbox_transform(boxin, boxout) offset = (i+1.)/(len(signals)+1.) trans.set_offset( (0, offset), transOffset) ax.plot(t, s, transform=trans, **lineprops) ticklocs.append(offset) ax.set_yticks(ticklocs) ax.set_yticklabels(['S%d'%(i+1) for i in range(len(signals))]) # place all the y tick attributes in axes coords all = [] labels = [] ax.set_yticks(ticklocs) for tick in ax.yaxis.get_major_ticks(): all.extend(( tick.label1, tick.label2, tick.tick1line, tick.tick2line, tick.gridline)) labels.append(tick.label1) setp(all, transform=ax.transAxes) setp(labels, x=-0.01) ax.set_xlabel('time (s)') # Because we have hacked the transforms, you need a special method to # set the voltage gain; this is a naive implementation of how you # might want to do this in real life (eg make the scale changes # exponential ranther than linear) but it gives you the idea def set_ygain(direction): set_ygain.scale += direction if set_ygain.scale <=0: set_ygain.scale -= direction return for line in ax.lines: trans = line.get_transform() box1 = trans.get_bbox1() box1.intervaly().set_bounds(-set_ygain.scale, set_ygain.scale) draw() set_ygain.scale = scale def keypress(event): if event.key in ('+', '='): set_ygain(-1) elif event.key in ('-', '_'): set_ygain(1) connect('key_press_event', keypress) ax.set_title('Use + / - to change y gain') show() > Also one more point is if I want all the signal colors in plot to be > same say black then how can I do it?. The default plot function varies > the colors of the signal plotted. pass the color='black' argument to plot plot(x, y, color='black') For marker plots, you may also want to set the markerfacecolor and markeredgecolor attributes.
Tom Loredo wrote: > After this, further attempts to import or reload pylab give no errors, > but there is no pylab.plot (or any other pylab function I've tried). If some kind of error happens while importing a module, then the incomplete module object will still exist in sys.modules, so reimporting will pick up this object instead of running the code again. If something like this happens to you again, try using reload(sys.modules['modulename']) import modulename -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
>>>>> "Tom" == Tom Loredo <lo...@as...> writes: Tom> Hi folks, Tom> I've been using 0.80 on OS X (10.3.9) for a while with no Tom> problems (installed from source). I thought I'd take the Tom> plunge and install the latest version (again from source), Tom> the first time I'm trying it on the Mac with mpl's TeX Tom> capability. I am (still) using Apple's Python 2.3.0. ....snip... Tom> The font in question is a PostScript Type 1 font installed by Tom> a music app I use (Finale). There is also an accompanying Tom> JazzCord.suit font suitcase. Whether these fonts are in a Tom> readable format or not, I would guess that mpl should be able Tom> to skip any font files it can't load/identify and proceed Tom> with what it *can* load, rather than completely aborting. Or Tom> perhaps this is just a symptom of another installation issue. Tom> Any ideas on how to proceed? Or do I just go back to 0.80? Tom> 8-( Oops. I was debugging a font problem and commented out the try/except part of the font manager so I could read the traceback, and forgot to restore it. Go to line 455 on matplotlib/font_manager.py and uncomment the except part so that it reads try: font = ft2font.FT2Font(str(fpath)) except RuntimeError: warnings.warn("Could not open font file %s"%fpath) continue Then remove ~/.matplotlib/ttffont.cache before running again. Tom> After this, further attempts to import or reload pylab give Tom> no errors, but there is no pylab.plot (or any other pylab Tom> function I've tried). I'm not sure what this is about. Make sure you are running the backend you think you are by running with --verbose-helpful. As detailed in the CHANGELOG, the config file organization was recently changed -- the matplotlibrc file now resides in ~/.matplotlib. JDH
Hi all, changing from 0.82 to 0.83 and using latex fonts, the "0" label disappeared from ticks! maybe I'm wrong in something, but using the command "yticks([0.,0.2,etc...])" the problem remains. Alex.
Hi I just installed mpl 0.83.2 on a Debian box, kernel 2.4.7, ipython 0.6.13, GTKAgg backend ipython - pylab works, but when I try to plot i get ############################################################################# In [1]: plot([1,2,3]) --------------------------------------------------------------------------- exceptions.SystemError Traceback (most recent call last) SystemError: ../Objects/moduleobject.c:48: bad argument to internal function Speicherzugriffsfehler elcorto@bach:~/Install/Matplotlib/matplotlib-0.83.2$ ############################################################################# What can cause this? cheers, steve
Hi folks, I've been using 0.80 on OS X (10.3.9) for a while with no problems (installed from source). I thought I'd take the plunge and install the latest version (again from source), the first time I'm trying it on the Mac with mpl's TeX capability. I am (still) using Apple's Python 2.3.0. The installation appeared to go fine, but I cannot import pylab: >>> import pylab Traceback (most recent call last): File "<stdin>", line 1, in ? File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/pylab.py", line 1, in ? from matplotlib.pylab import * File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/pylab.py", line 198, in ? from axes import Axes, PolarAxes File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/axes.py", line 14, in ? from axis import XAxis, YAxis File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/axis.py", line 25, in ? from font_manager import FontProperties File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/ font_manager.py", line 993, in ? fontManager = FontManager() File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/ font_manager.py", line 837, in __init__ rebuild() File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/ font_manager.py", line 830, in rebuild self.ttfdict = createFontDict(self.ttffiles) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/ font_manager.py", line 456, in createFontDict font = ft2font.FT2Font(str(fpath)) RuntimeError: Could not load facefile /Library/Fonts/JazzCor; Unknown_File_Format After this, further attempts to import or reload pylab give no errors, but there is no pylab.plot (or any other pylab function I've tried). The font in question is a PostScript Type 1 font installed by a music app I use (Finale). There is also an accompanying JazzCord.suit font suitcase. Whether these fonts are in a readable format or not, I would guess that mpl should be able to skip any font files it can't load/identify and proceed with what it *can* load, rather than completely aborting. Or perhaps this is just a symptom of another installation issue. Any ideas on how to proceed? Or do I just go back to 0.80? 8-( Thanks, Tom ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
Hello'all - I am trying to develop my own toolbar and thought the easiest way to do thi= s=20 was to define a new backend and change it in that file. Matplotlib includes the 'template' backend as a start. To get going, I copied the entire TkAgg backend into the template backend= =20 and set the backend to 'Template' in the matplotlibrc file. But now when I run pylab, it doesn't work interactivly anymore. When I just give a plot([1,2,3]), it draws the figure window but not the=20 figure. draw_if_interactive() doesn't work either, even though interactive is set t= o=20 True. draw() does work and creates the correct figure. Is Tk special ? I thought this should work. Any help appreciated. Thanks, Mark
Dear all, I have two suggestions about toolbar customization: 1. In the 'matplotlibrc' file the toolbar line should be changed in order to include a "custom toolbar" toolbar : toolbar2 # None | classic | toolbar2 | custom 2. In the 'backend_tkagg.py file', inside the 'NavigationToolbar2TkAgg class' the save_figure procedure should be changed to somewhat: def save_figure(self): from tkFileDialog import asksaveasfilename fname = asksaveasfilename(master=self.window, title='Save the figure', filetypes=[('Encapsulated Postscript File','*.eps'), ('Scalable Vector Graphics','*.svg'), ('Portable Network Graphics','*.png')]) # initialfile=InitialFilename) if fname == "" : return else: bname, fext = os.path.splitext(fname) if (fext.lower()=='.png'): self.canvas.print_figure(fname, dpi=300) elif (fext.lower()=='.eps'): self.canvas.print_figure(fname) elif (fext.lower()=='.svg'): self.canvas.print_figure(fname) I think that the asksaveasfilename function provided by tkFileDialog is "better" 3. In the code above there are three problems that I don't know how to solve (I am a Python newbie): a) this solves only one backend... b) I would like to provide the 'asksaveasfilename' an InitialFilename, such as in the commented line. c) It would be much better to make my customizations by defining a "custom toolbar" instead of tweaking the original one... Thanks, Clovis Goldemberg