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
(7) |
2
(5) |
3
(18) |
4
(9) |
5
(13) |
6
(14) |
7
(8) |
8
(7) |
9
(6) |
10
(6) |
11
(24) |
12
(14) |
13
(9) |
14
(21) |
15
(6) |
16
(1) |
17
(20) |
18
(42) |
19
(16) |
20
(21) |
21
(41) |
22
(13) |
23
(11) |
24
(15) |
25
(32) |
26
(27) |
27
(29) |
28
(10) |
29
(3) |
30
(1) |
31
(5) |
|
|
|
|
|
C M wrote: > [...] > > I don't have your answer, but for what it's worth, this aspect of not > having a way to have a graph with just the left and bottom axes and no > right and top lines--in fact, not having it as either the default or a > very easy flag to set in making graphs--rather surprised me too when I > encountered matplotlib. Many of the figures I've encountered in biology > do not have this enclosing box around it in this way. > > Would it be something that could be added in future editions of matplotlib? Yes. It should be easy, and it is a common request. Eric
On Sat, Mar 22, 2008 at 5:05 PM, Rich Shepard <rsh...@ap...> wrote: > It was suggested that a work-around to allow only the left and bottom > axes > is to turn off the plot frame and use axhline and axvline instead. When I > try this, the axes are extended left and below the origin of the lines. I > don't see a kwarg to turn this off. > > Two sample plots are attached. > > Having a plot framed on all four sides may be unusual -- in my areas of > science anyway -- but could be acceptable except when the plotted curves > are > trapezoids, and left-/right-shouldered curves. Then the top of the curve > is > overlain by the frame and cannot be seen. > > Please let me know what magic incantations will allow me to plot curves > using axhline and axvline as the actual axes (or frame if you will). > > Rich > > -- > Richard B. Shepard, Ph.D. | Integrity > Credibility > Applied Ecosystem Services, Inc. | Innovation > <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: > 503-667-8863 > I don't have your answer, but for what it's worth, this aspect of not having a way to have a graph with just the left and bottom axes and no right and top lines--in fact, not having it as either the default or a very easy flag to set in making graphs--rather surprised me too when I encountered matplotlib. Many of the figures I've encountered in biology do not have this enclosing box around it in this way. Would it be something that could be added in future editions of matplotlib?
It was suggested that a work-around to allow only the left and bottom axes is to turn off the plot frame and use axhline and axvline instead. When I try this, the axes are extended left and below the origin of the lines. I don't see a kwarg to turn this off. Two sample plots are attached. Having a plot framed on all four sides may be unusual -- in my areas of science anyway -- but could be acceptable except when the plotted curves are trapezoids, and left-/right-shouldered curves. Then the top of the curve is overlain by the frame and cannot be seen. Please let me know what magic incantations will allow me to plot curves using axhline and axvline as the actual axes (or frame if you will). Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
On 2008年3月22日, Rich Shepard wrote: > Issue #1: I am apparently not properly closing/clearing a plot. There are > three plots in the test data set, and when the last one (with three curves > on a common set of axes) is the only one plotted, it is correctly done. But, > when it follows the 2-curve plots, they are also displayed. Fixed: I discovered .close() and added that to the end of each plot's content. Still need advice on #2. > Issue #2: Is there a way to define the parameters for the Gaussian curve > so the end points are actually 0.0 on the y axis while the mid point is as > specified? Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
Hi. I've seen this problem before. I think that you need to install freetype developer. The easiest way to install this is with macports and then type "port install freetype" On Mar 21, 2008, at 9:50 PM, Andrew Charles wrote: > Yes it was the matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg I tried to > install. I've posted the entire easy_install output below. I'll let > the list know if i resolve the problem. > > Andrew > > --------------------------------------------------- > > Processing matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg > creating /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg > Extracting matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg to > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- > packages > Adding matplotlib 0.91.2 to easy-install.pth file > > Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg > Processing dependencies for matplotlib==0.91.2 > Searching for matplotlib==0.91.2 > Reading http://pypi.python.org/simple/matplotlib/ > Reading http://matplotlib.sourceforge.net > Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474 > Reading http://sourceforge.net/project/showfiles.php?group_id=80706 > Best match: matplotlib 0.91.2 > Downloading http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.2.tar.gz?modtime=1199627250&big_mirror=0 > Processing matplotlib-0.91.2.tar.gz > Running matplotlib-0.91.2/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-QGmbAu/matplotlib-0.91.2/egg-dist-tmp-hsIe8R > = > = > = > = > = > = > ====================================================================== > BUILDING MATPLOTLIB > matplotlib: 0.91.2 > python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC > 4.0.1 (Apple Computer, Inc. build 5363)] > platform: darwin > > REQUIRED DEPENDENCIES > numpy: 1.0.5.dev4897 > freetype2: 9.16.3 > > OPTIONAL BACKEND DEPENDENCIES > libpng: 1.2.24 > Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 > wxPython: no > * wxPython not found > Gtk+: no > * Building for Gtk+ requires pygtk; you must > be able > * to "import gtk" in your build/install > environment > Qt: no > Qt4: no > Cairo: no > > OPTIONAL DATE/TIMEZONE DEPENDENCIES > datetime: present, version unknown > dateutil: matplotlib will provide > pytz: matplotlib will provide > > OPTIONAL USETEX DEPENDENCIES > dvipng: no > ghostscript: 8.57 > latex: no > > EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES > configobj: matplotlib will provide > enthought.traits: matplotlib will provide > > [Edit setup.cfg to suppress the above messages] > = > = > = > = > = > = > ====================================================================== > warning: no files found matching 'NUMARRAY_ISSUES' > warning: no files found matching 'MANIFEST' > warning: no files found matching 'matplotlibrc' > warning: no files found matching 'lib/matplotlib/toolkits' > no previously-included directories found matching 'examples/_tmp_*' > In file included from > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > Python.h:8, > from ./CXX/WrapPython.h:47, > from ./CXX/Extensions.hxx:48, > from src/ft2font.h:18, > from src/ft2font.cpp:2: > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pyconfig.h:814:1: > warning: "SIZEOF_LONG" redefined > In file included from /usr/X11/include/freetype2/freetype/freetype.h: > 41, > from src/ft2font.h:12, > from src/ft2font.cpp:2: > /usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning: > this is the location of the previous definition > In file included from > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > Python.h:8, > from ./CXX/WrapPython.h:47, > from ./CXX/Extensions.hxx:48, > from src/ft2font.h:18, > from src/ft2font.cpp:2: > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pyconfig.h:814:1: > warning: "SIZEOF_LONG" redefined > In file included from /usr/X11/include/freetype2/freetype/freetype.h: > 41, > from src/ft2font.h:12, > from src/ft2font.cpp:2: > /usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning: > this is the location of the previous definition > In file included from /usr/include/math.h:26, > from > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pyport.h:231, > from > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > Python.h:57, > from ./CXX/WrapPython.h:47, > from CXX/cxxextensions.c:38: > /usr/include/architecture/ppc/math.h:675: warning: conflicting types > for built-in function ‘scalb’ > ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for > architecture ppc > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccG9WQI9.out (No such file or > directory) > error: Setup script exited with error: command 'g++' failed with > exit status 1 > Exception exceptions.OSError: (2, 'No such file or directory', > 'src/image.cpp') in <bound method CleanUpFile.__del__ of > <setupext.CleanUpFile instance at 0x1b5f4b8>> ignored > Exception exceptions.OSError: (2, 'No such file or directory', > 'src/transforms.cpp') in <bound method CleanUpFile.__del__ of > <setupext.CleanUpFile instance at 0x1b5ccd8>> ignored > Exception exceptions.OSError: (2, 'No such file or directory', > 'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of > <setupext.CleanUpFile instance at 0x1b5f030>> ignored > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On 2008年3月21日, John Hunter apparently wrote: > The source and accompanying code that generates the > figures are found in the "doc" subdirectory of the svn > trunk > [Attachment: artist_api_tut.txt : TEXT/PLAIN, 510 lines] > [Attachment: event_handling_tut.txt : TEXT/PLAIN, 361 lines] 1. Hoping you will point to this from somewhere users are more likely to find. 2. Has anyone actually complained about the use of getters and setters? I've found it a friendly (i.e., predictable) interface. Anyway, if you add properties, I hope that these will remain (instead of, say, just using the property and propset decorators). Cheers, Alan Isaac
Simson Garfinkel wrote: > Dear Francesco, > > I'm sorry --- it is hard not to read your message and laugh. You > really think that the static type checking of C++ is protecting you? > Well, it may be, but C++ is unsafe in so many other ways that you are > not doing yourself a favor by working in it. > > If you want to use a typesafe language, you really should be using > Java or Python. Java will give you both static and dynamic type > checking. Python will give you runtime type checking. C++ gives you a > good feeling until something goes wrong and it crashes. > It is certainly possible to shoot yourself in the foot with C++ if you use it like it were plain C (i.e., unsafe casts, casts to void *, pointers to functions, etc.). However the C++ programming style which is sometimes referred to as "modern" C++ (cfr. Alexandrescu's book), which makes heavy use of template (meta)programming facilities, shields you very effectively from such problems. For example, you can use functors in place of pointers to functions, and if you do something wrong the compiler will error out (in place of random crashes at runtime). If I write a generic template function which requires that its argument supports a certain method, and if I use it with an argument type that does not provide such method, a compilation error will be emitted. You can use the static_cast operator to make sure at compile time that you are not performing a "dangerous" cast. And so on... Frankly, the only cases in which I usually have to resort to the pains of plain C programming are when fiddling with lower level stuff like memory allocators, SIMD programming, etc. But usually you just have to encapsulate a small amount of dangerous code into a class and provide some abstraction to interact with it and you are done. I write mostly scientific software, so abandoning C++ tout-court is not an option. Thanks to all who replied, and best regards. Francesco.
I have three unresolved issues in the attached code, and I'd like to resolve the first two on this thread. (The third issue relates to plotting using only the left and bottom axes rather than a complete frame.) Issue #1: I am apparently not properly closing/clearing a plot. There are three plots in the test data set, and when the last one (with three curves on a common set of axes) is the only one plotted, it is correctly done. But, when it follows the 2-curve plots, they are also displayed. I probably am turning .hold() off and on in the wrong places, but I don't know where the right places are. On a side note, if I try to use plot.hold() to toggle the hold state off python throws an error. I need to explicitly use plot.hold(False). Issue #2: Is there a way to define the parameters for the Gaussian curve so the end points are actually 0.0 on the y axis while the mid point is as specified? Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
Alex Coventry <thr...@MI...> writes: > I'm trying to use some matplotlib-generated pdfs in a pdflatex document, > and seeing some extremely weird and disruptive size effects. Could you be more specific about what the problem seems to be? I looked at your pdf files, and it looks like pdflatex is taking your eight-inch wide figure (including the margins) and scaling it to 6 in. The space between the margins is about 4.8 in, so of course the figure doesn't fit, and because it has empty margins on every side, it kind of looks like it has been translated away from where it belongs. If this is not what you are seeing, could you post a screenshot from your pdf viewer? Do you mean to ask how you can make the figure take up exactly the space between the margins in your document? In that case my recommendation is to build up the figure to the correct width from the start, e.g. figure(figsize=(4.8,4.8)) or whatever the correct size is, and avoid doing any kind of resizing with \includegraphics. Create your axes explicitly instead of relying on the default (which reserves ample margins on every side in case you want to put a title on top, etc). Start with something like axes([0.1,0.1,0.9,0.9]) -- the numbers are left, bottom, width, height, so to remove the margin on the right make sure left+width=1.0. You will have to tweak this to make just enough room for your axis labels. > If I generate postscript files with matplotlib and convert > them to pdfs, I don't get this problem. Probably some step in this pipeline recomputes the bounding box for the figure from the ink on the page, so the margins disappear. -- Jouni K. Seppänen http://www.iki.fi/jks
Yes it was the matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg I tried to install. I've posted the entire easy_install output below. I'll let the list know if i resolve the problem. Andrew --------------------------------------------------- Processing matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg creating /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg Extracting matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages Adding matplotlib 0.91.2 to easy-install.pth file Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg Processing dependencies for matplotlib==0.91.2 Searching for matplotlib==0.91.2 Reading http://pypi.python.org/simple/matplotlib/ Reading http://matplotlib.sourceforge.net Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474 Reading http://sourceforge.net/project/showfiles.php?group_id=80706 Best match: matplotlib 0.91.2 Downloading http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.2.tar.gz?modtime=1199627250&big_mirror=0 Processing matplotlib-0.91.2.tar.gz Running matplotlib-0.91.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-QGmbAu/matplotlib-0.91.2/egg-dist-tmp-hsIe8R ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.91.2 python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.0.5.dev4897 freetype2: 9.16.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.24 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: 8.57 latex: no EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: matplotlib will provide [Edit setup.cfg to suppress the above messages] ============================================================================ warning: no files found matching 'NUMARRAY_ISSUES' warning: no files found matching 'MANIFEST' warning: no files found matching 'matplotlibrc' warning: no files found matching 'lib/matplotlib/toolkits' no previously-included directories found matching 'examples/_tmp_*' In file included from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:8, from ./CXX/WrapPython.h:47, from ./CXX/Extensions.hxx:48, from src/ft2font.h:18, from src/ft2font.cpp:2: /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:814:1: warning: "SIZEOF_LONG" redefined In file included from /usr/X11/include/freetype2/freetype/freetype.h:41, from src/ft2font.h:12, from src/ft2font.cpp:2: /usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning: this is the location of the previous definition In file included from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:8, from ./CXX/WrapPython.h:47, from ./CXX/Extensions.hxx:48, from src/ft2font.h:18, from src/ft2font.cpp:2: /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:814:1: warning: "SIZEOF_LONG" redefined In file included from /usr/X11/include/freetype2/freetype/freetype.h:41, from src/ft2font.h:12, from src/ft2font.cpp:2: /usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning: this is the location of the previous definition In file included from /usr/include/math.h:26, from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyport.h:231, from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:57, from ./CXX/WrapPython.h:47, from CXX/cxxextensions.c:38: /usr/include/architecture/ppc/math.h:675: warning: conflicting types for built-in function ‘scalb’ ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccG9WQI9.out (No such file or directory) error: Setup script exited with error: command 'g++' failed with exit status 1 Exception exceptions.OSError: (2, 'No such file or directory', 'src/image.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x1b5f4b8>> ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/transforms.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x1b5ccd8>> ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/backend_agg.cpp') in <bound method CleanUpFile.__del__ of <setupext.CleanUpFile instance at 0x1b5f030>> ignored
Dear Francesco, I'm sorry --- it is hard not to read your message and laugh. You really think that the static type checking of C++ is protecting you? Well, it may be, but C++ is unsafe in so many other ways that you are not doing yourself a favor by working in it. If you want to use a typesafe language, you really should be using Java or Python. Java will give you both static and dynamic type checking. Python will give you runtime type checking. C++ gives you a good feeling until something goes wrong and it crashes. On Feb 29, 2008, at 5:29 PM, Francesco Biscani wrote: > Hi all, > > Christopher Barker wrote: >> "The only difference that my users see between an app written in >> Python >> and C++ is that the Python one has more features...and fewer bugs." >> > > I'm currently working mostly in C++ and exploring integration with > Python through Boost.Python+IPython+MPL. I enjoy working in Python, > but > I'm afraid of making a more consistent switch mainly for fear of > losing > the static type checking that C++ gives me. I have the horrifying > feeling that if I were to write much code in Python I could break it > in > so many ways just because of this, and I'd have the constant > perception > of not having my back covered by the compiler, at least for this > kind of > errors. > > It's true that probably I'd get the software up and running in less > time > with Python, but I think that I would spend much more time making sure > it behaves as expected and "fortifying" it, so to speak. Am I totally > offset here? > > Francesco. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hey Matthias, Matthias Michler wrote: > maybe something like the following helps you: > ----------------------------------------------------------------------------------------- > from pylab import * > from time import sleep > > ion() # interactive mode 'on' > figure() > ax = subplot(111, autoscale_on=True) > > x, y = [0], [0] > line = plot(x, y, label="my_data")[0] > # get the line-object as the first element > # of the tuple returned by plot > legend() > for i in arange(10): > x.append(i) # append new values > y.append(i**2) > line.set_data(x,y) # reset data > ax.relim() # reset axes limits > ax.autoscale_view() # rescale axes > draw() # redraw current figure > sleep(0.5) # wait 0.5 seconds > > ioff() This is perfect, except for one little thing... My x-axis is time, and as new points are plotted, even though I'm following the above recipe pretty closely, the x-tick spacing isn't getting sorted out, so I end up with just a jumble as the tick labels for the x-axis. Do you know why this might be? > I don't know how to make this somehow interactive concerning the data input. > but maybe you save the data to a file and read them every 15 or 20 minutes. This isn't a problem, I just run in a "while True" loop and leave it running until I close the plot window. Shame I get that horrible exception when I do close the plot window, wish I knew how to make it stop :-S cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On Fri, Mar 21, 2008 at 1:40 AM, Eric Firing <ef...@ha...> wrote: > > > Out of interest, how does one tell MPL to "start a new figure and forget > > everything that's gone before"? > > You can minimize the amount of package and module-level state > information by using the oo interface: see examples/agg_oo.py. If you > change any rcParams dictionary entries, typically using the rc function, > then you can restore the dictionary to its default condition with the > rcdefaults() function. I think it is comparatively rare to modify rc params within code (and never necessary since you can achieve the same by setting properties directly using the API) so if the rc params are the only global information we are using (and I am not aware of other problems off the top of my head but you might be well served to post to the antigrain mailing list to see if agg is thread safe) it shouldn't pose a serious problem. JDH