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
(19) |
2
(30) |
3
(14) |
4
(1) |
5
(16) |
6
(7) |
7
(12) |
8
(14) |
9
(35) |
10
(16) |
11
(31) |
12
(6) |
13
(14) |
14
(13) |
15
(20) |
16
(15) |
17
(27) |
18
(5) |
19
(10) |
20
(22) |
21
(20) |
22
(30) |
23
(25) |
24
(11) |
25
(2) |
26
(2) |
27
(23) |
28
(20) |
29
(26) |
30
(25) |
31
(7) |
|
On Wed, Jul 29, 2009 at 4:38 AM, John Hunter <jd...@gm...> wrote: > On Wed, Jul 29, 2009 at 1:01 AM, Art<gre...@gm...> wrote: > > I have a scatter plot that requires some time to render. The horizontal > axis > > is time. Currently, I generate the full scatter plot each time and draw a > > axvline to indicate the progress of time, save the file as a png for each > > time, and generate a movie for all time frames. The scatter plot portion > > doesn't change, just the vertical line. > > > > I was wondering if there was a way to speed this up, to generate the > scatter > > plot once and then overlay it with a moving axvline. I would still have > to > > save the png frame by frame, but the most expensive step by far is > > replotting the scatter plot over and over. > > This is what the animation/blit api is designed to do: > > http://www.scipy.org/Cookbook/Matplotlib/Animations > > scipy.org appears down right now, so you may need to try again later. > See also these mpl examples: > > http://matplotlib.sourceforge.net/search.html?q=codex+blit > > JDH > Thanks John. That made things more than an order of magnitude faster. It's very impressive. My bottleneck now is actually saving the pngs for mencoder to make into an avi (as with the movie_demo example on your site) using savefig. Do you also know of an alternative way of generating an avi of the animation? My animation has about 9000 frames. Thanks, Art.
Hello, thru data.gov, there are several shapefile archives available, in a zip format. Do someone believe it worths to support this kind of "distribution" of shp or we'd like still to have the zip unzip'ed first and the readshapefile() the resulting file? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi
Hi everyone, I am trying to build the latest svn trunk version of MPL on OS X 10.5. I am getting the following error: ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture for architecture ppc After googling quite a bit, this seems to be quite a common problem. However, I could still not find an unambiguous solution. I have build libpng from source on my machine. The file output is: laserson@hobbes:/usr/local/lib$ file libpng* libpng.3.dylib: Mach-O dynamically linked shared library i386 libpng.a: current ar archive random library libpng.dylib: Mach-O dynamically linked shared library i386 libpng.la: ASCII English text libpng12.0.dylib: Mach-O dynamically linked shared library i386 libpng12.a: current ar archive random library libpng12.dylib: Mach-O dynamically linked shared library i386 libpng12.la: ASCII English text It appears that the compiler expects that libpng will also have libraries for ppc. What do I do? Do I need to rebuild libpng to be universal? (How is this done?) Or do I need to somehow tell distutils to build MPL only for i386? (How is thid done?) Below is the full build output. Thanks for your help! Uri ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.98.6svn python: 2.5.2 |EPD with Py2.5 4.0.30002 | (r252:60911, Oct 15 2008, 16:58:38) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.3.0 freetype2: 9.20.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.34 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: 2.8.7.1 * WxAgg extension not required for wxPython >= 2.8 Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Mac OS X native: yes Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: 1.4 pytz: 2008c OPTIONAL USETEX DEPENDENCIES dvipng: 1.11 ghostscript: 8.62 latex: 3.1415926 [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', ' matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay'] running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.macosx-10.3-i386-2.5/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.macosx-10.3-i386-2.5/matplotlib/mpl-data running build_ext building 'matplotlib.backends._tkagg' extension g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/src/agg_py_transforms.o build/temp.macosx-10.3-i386-2.5/src/_tkagg.o build/temp.macosx-10.3-i386-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3-i386-2.5/CXX/cxxsupport.o build/temp.macosx-10.3-i386-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-i386-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/local/lib -L/usr/lib -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.3-i386-2.5/matplotlib/backends/_tkagg.so -framework Tcl -framework Tk ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libfreetype.dylib, file is not of required architecture ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/Ln/LnyDoYbfGd8tkbnxDCl7Zk+++TI/-Tmp-//ccHqlli7.out (No such file or directory) error: command 'g++' failed with exit status 1 -- Uri Laserson PhD Candidate, Biomedical Engineering Harvard Medical School (Genetics) Massachusetts Institute of Technology (Mathematics) phone +1 917 742 8019 las...@mi...
Michael Droettboom wrote: > This is a long-standing known issue with the contour code. The > contouring library we are using (in cntr.c) was written for a graphics > library that did not support compound paths, so to draw a donut-shaped > objects it creates "cut paths" from the inner to outer edge. A number > of the matplotlib developers have taken stabs at changing this behavior > over the years, but it is a very opaque chunk of code, and none of us > have managed it without introducing new more serious errors. A fresh > set of eyes may be able to sort it out, and we do have compound path > support in all backends (save the mostly obsolete Gdk) now. Replacing > the contouring code with something else that is license-compatible is > also an option, but I wasn't able to find anything suitable last time I > looked (which was a long time ago now). I have been looking about every 6 months for years, with absolutely no success. There are remarkably few filled-contouring codes (or detailed algorithm descriptions) out there, under any license. Note also that the code Matlab uses (or at least used a long time ago when I last looked) handles the problem by layering the contour patches, not by leaving holes, so it is an example of a class of algorithms that would not work with non-unit alpha. I have also thought a bit about manipulating the paths generated by the present code to remove the cuts, or manipulating the non-filled contour output to generate patch boundaries, but I haven't gone into it deeply. I suspect it would quickly become very complicated. And, on top of all that, even if we solved the cut problem, there would still be backend-dependent artifacts involved in rendering the boundaries. Eric > > Cheers, > Mike > > Joseph Smidt wrote: >> I am making contourf plots with some transparency as I want to >> eventually overlay such plots. When I plot such plots I see artifacts >> or lines that shouldn't be there as seen here: >> http://josephsmidt.googlepages.com/ex.png >> >> Is this a bug or am I plotting incorrectly? My script is here: >> http://josephsmidt.googlepages.com/plotex.py and the data needed for >> the plot is here: http://josephsmidt.googlepages.com/exCHI.txt >> >> However, the relevant part of the code for plotting I'll just cut and >> paste here: >> >> levels = [x0, x1, x2, x3] >> contourf(Y,X,transpose(CHI),levels,alpha=0.7) >> show() >> >> Thanks. >> >> Joseph Smidt >> >> >> >
Thanks a lot. The code you mentioned: cs = contourf(Y,X,transpose(CHI),levels,alpha=0.7) for c in cs.collections: c.set_edgecolors('none') worked great and the extra lines are gone. Joseph Smidt PS. Good luck with this issue. I'd help but I'm not that good. -- ------------------------------------------------------------------------ Joseph Smidt <jos...@gm...> Physics and Astronomy 4129 Frederick Reines Hall Irvine, CA 92697-4575 Office: 949-824-3269
Joseph Smidt wrote: > I am making contourf plots with some transparency as I want to > eventually overlay such plots. When I plot such plots I see artifacts > or lines that shouldn't be there as seen here: > http://josephsmidt.googlepages.com/ex.png > > Is this a bug or am I plotting incorrectly? My script is here: > http://josephsmidt.googlepages.com/plotex.py and the data needed for > the plot is here: http://josephsmidt.googlepages.com/exCHI.txt > > However, the relevant part of the code for plotting I'll just cut and > paste here: > > levels = [x0, x1, x2, x3] > contourf(Y,X,transpose(CHI),levels,alpha=0.7) > show() > > Thanks. > > Joseph Smidt > > This is a problem with two parts: first, the filled-contour algorithm creates singly-connected patches, so cuts are required (the horizontal lines); second, depending on whether edges are stroked and on the antialias setting, these cuts, and the boundaries between regions, can show up as artifacts when rendered. The rendering problem can be backend-dependent. When I make a contourf plot using the agg backend (which is presumably what you are using to make the png file--either directly or indirectly via an interactive backend), I am not seeing the artifacts, so I think the default settings in svn are good for agg rendering with alpha. My guess is that you are using a version of mpl with different settings. We have struggled with this problem, trying different combinations of settings, for a long time. There doesn't seem to be a formula that works for all backends and all alpha values. I suspect that in the version of mpl you are using, the patch edges are being stroked. As a workaround, try this: cs = contourf(Y,X,transpose(CHI),levels,alpha=0.7) for c in cs.collections: c.set_edgecolors(['none']) Eric
Hi, 2009年7月29日 Jae-Joon Lee <lee...@gm...>: > On Tue, Jul 28, 2009 at 9:11 AM, Roland Koebler<r.k...@ya...> wrote: [cut] >> Any ideas? >> > > http://matplotlib.sourceforge.net/examples/animation/animation_blit_gtk2.html > > The above example does something similar to (b). > It saves the previous plot (only axes area is saved) as a bitmap. In > next run, it restores the saved bitmap after shifting. And then draw > only the new data points. > > The example requires the svn version of matplotlib. I have attached another example of blit animation that does NOT require the svn version of MPL. Antonio
This is a long-standing known issue with the contour code. The contouring library we are using (in cntr.c) was written for a graphics library that did not support compound paths, so to draw a donut-shaped objects it creates "cut paths" from the inner to outer edge. A number of the matplotlib developers have taken stabs at changing this behavior over the years, but it is a very opaque chunk of code, and none of us have managed it without introducing new more serious errors. A fresh set of eyes may be able to sort it out, and we do have compound path support in all backends (save the mostly obsolete Gdk) now. Replacing the contouring code with something else that is license-compatible is also an option, but I wasn't able to find anything suitable last time I looked (which was a long time ago now). Cheers, Mike Joseph Smidt wrote: > I am making contourf plots with some transparency as I want to > eventually overlay such plots. When I plot such plots I see artifacts > or lines that shouldn't be there as seen here: > http://josephsmidt.googlepages.com/ex.png > > Is this a bug or am I plotting incorrectly? My script is here: > http://josephsmidt.googlepages.com/plotex.py and the data needed for > the plot is here: http://josephsmidt.googlepages.com/exCHI.txt > > However, the relevant part of the code for plotting I'll just cut and > paste here: > > levels = [x0, x1, x2, x3] > contourf(Y,X,transpose(CHI),levels,alpha=0.7) > show() > > Thanks. > > Joseph Smidt > > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
I am making contourf plots with some transparency as I want to eventually overlay such plots. When I plot such plots I see artifacts or lines that shouldn't be there as seen here: http://josephsmidt.googlepages.com/ex.png Is this a bug or am I plotting incorrectly? My script is here: http://josephsmidt.googlepages.com/plotex.py and the data needed for the plot is here: http://josephsmidt.googlepages.com/exCHI.txt However, the relevant part of the code for plotting I'll just cut and paste here: levels = [x0, x1, x2, x3] contourf(Y,X,transpose(CHI),levels,alpha=0.7) show() Thanks. Joseph Smidt -- ------------------------------------------------------------------------ Joseph Smidt <jos...@gm...> Physics and Astronomy 4129 Frederick Reines Hall Irvine, CA 92697-4575 Office: 949-824-3269
n Tue, Jul 28, 2009 at 8:11 AM, Roland Koebler <r.k...@ya...> wrote: > Hi, > > I've got some performance problems with matplotlib, and would like to > ask if you know any way I can make it faster. > > If there is no such way, I have to decide to (a) either enhance matplotlib > or (b) write my own plotting-library. > (I'm currently using matplotlib to plot data "live" on the screen, > including > animation, scrolling, zoom+pam, custom scales (to zoom out some part of the > plot), and multiple X-/Y-Axes. I therefore already wrote some wrappers > around > matplotlib to implement some of these features.) > > In detail: > - I have a figure containing some plots (lines). > - About every second I "update" the plot: > - Add a few points to the lines. > (=add point to an array and call set_data(array)) > - Scroll the plot, so that the latest point is on the right of the plot. > Older points disappear on the left side of the plot. > (=set_xaxis() + draw()) > - I'm using GtkAgg, incl. animation, (re)storing the background, drawing > the artists and blit. > (canvas.restore_region(...), ax.draw_artist(...), canvas.blit(bbox)) > > This works as long as the plot only contains a few points, > although 2 figures + 5-10 lines per figure and an update every 0.5 s > already consumes about 10-20% CPU (on a 1.4 GHz Pentium). > By the way: Is this speed normal, or is matplotlib usually faster? > > But as soon as the plot contains *many* points (several 10000 up to > several 100000), the plotting becomes terribly slow -- up to 30s > per update and more! > > Do you know any way to make this faster? > > My ideas are: > - Since I only add points to the *right* of the lines, I could reduce the > number of points, by first removing all points which are outside of > the current visible plotting-window from my array, and then calling > set_data() with the reduced array. > - This unfortunately wouldn't reduce the number of points in very dense > plots. It would be possible to (a) replace several points which all > result in the same plotted point by a single point or (b) cache the > plotted points e.g. on pixel-level. I think (b) would probably require > to write a new backend. There might be some performance improvement to be had depending on how you are adding the additional points to the array. Seeing a complete, minimal of the code showing the performance problem would be needed, since it's the details that matter in this case. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Sent from Norman, Oklahoma, United States
The documentation for scatter command is out of date unfortunately. You need to use "scatterpoints" keyword. http://www.nabble.com/legend-bug--td22466216.html#a22466216 -JJ On Mon, Jul 27, 2009 at 3:44 PM, per freem<per...@gm...> wrote: > Hi all > > i am making a scatter plot and want to label one of the points in the > legend. i run > > scatter([x], [y], ..., label="mylabel") > > and then run legend as follows > > plt.legend(loc='lower right', numpoints=1, pad=0.01, labelsep=.01, > handlelen=.05) > > i set numpoints=1 because i want it to show just one point and then its > label. however, this always generates a legend with three points, i.e. > > o o o my label > > rather than > > o mylabel > > does anyone know how to fix this? thank you. > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
It looks like SourceForge has been making some pretty major changes to the file download system. That part of SourceForge was always the most confusing and frustrating part of the system. I just went in and re-specified the default files, and it appears to be working now. Please report your experiences on Windows and Mac, since I did not test those platforms. Mike Josh Hemann wrote: > I downloaded it also yesterday thinking I was getting a newer (than 0.98.5.3) > version of matplotlib. Definitely misleading, so thanks for posting this > thread. > > Josh > > Kaushik Ghose-3 wrote: > >> Hi All, >> >> I was downloading matplotlib on a windows machine and the sourceforge site >> (http://sourceforge.net/projects/matplotlib/) showed me basemap as the >> default >> download (instead of the latest matplotlib). On Mac the default download >> shows >> correctly as matplotlib. >> >> This is some autodetection from sourceforge, so I don't know if it is a >> sitewide >> problem, or it can be configured from the project page. Just to let the >> admins know. >> >> Best >> -Kaushik >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
I downloaded it also yesterday thinking I was getting a newer (than 0.98.5.3) version of matplotlib. Definitely misleading, so thanks for posting this thread. Josh Kaushik Ghose-3 wrote: > > Hi All, > > I was downloading matplotlib on a windows machine and the sourceforge site > (http://sourceforge.net/projects/matplotlib/) showed me basemap as the > default > download (instead of the latest matplotlib). On Mac the default download > shows > correctly as matplotlib. > > This is some autodetection from sourceforge, so I don't know if it is a > sitewide > problem, or it can be configured from the project page. Just to let the > admins know. > > Best > -Kaushik > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/Sourceforge-download-page-shows-basemap-as-default-download-on-windows-tp24711475p24722906.html Sent from the matplotlib - users mailing list archive at Nabble.com.
scatter() currently does not support arbitrary path as its marker. The current marker customization is limited to what can be described by RegularPolyCollection and etc. And the crosshair marker do not fit in to this category. I'm attaching a snippet of a code I have been using for an exactly same purpose as yours (to mark stars). I hope this is also useful for you. It provide a scatter-like function that takes arbitrary path (PathPatch as a matter of fact). It would not be difficult to extend the matplotlib's scatter function to support an arbitrary path. I may give it a try later this week. Regards, -JJ On Tue, Jul 28, 2009 at 5:57 PM, Paul Ray<pau...@nr...> wrote: > Hi, > > I see that scatter() has a variety of different symbols that you can > choose from, and even a way to create your own custom markers. > However, I can't figure out how to make a crosshair symbol (a plus > with non-touching lines) as my marker, which I'd like to use to show > the location of a star on an underlying image without obscuring the > star itself. > > Graphically, I'd like a marker symbol that looks like this... > > | > | > | > > ======= ======= > > | > | > | > > Does anyone know how to pull this off? > > Thanks! > > -- Paul > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On Tue, Jul 28, 2009 at 9:11 AM, Roland Koebler<r.k...@ya...> wrote: > Hi, > > I've got some performance problems with matplotlib, and would like to > ask if you know any way I can make it faster. > > If there is no such way, I have to decide to (a) either enhance matplotlib > or (b) write my own plotting-library. > (I'm currently using matplotlib to plot data "live" on the screen, including > animation, scrolling, zoom+pam, custom scales (to zoom out some part of the > plot), and multiple X-/Y-Axes. I therefore already wrote some wrappers around > matplotlib to implement some of these features.) > > In detail: > - I have a figure containing some plots (lines). > - About every second I "update" the plot: > - Add a few points to the lines. > (=add point to an array and call set_data(array)) > - Scroll the plot, so that the latest point is on the right of the plot. > Older points disappear on the left side of the plot. > (=set_xaxis() + draw()) > - I'm using GtkAgg, incl. animation, (re)storing the background, drawing > the artists and blit. > (canvas.restore_region(...), ax.draw_artist(...), canvas.blit(bbox)) > > This works as long as the plot only contains a few points, > although 2 figures + 5-10 lines per figure and an update every 0.5 s > already consumes about 10-20% CPU (on a 1.4 GHz Pentium). > By the way: Is this speed normal, or is matplotlib usually faster? > > But as soon as the plot contains *many* points (several 10000 up to > several 100000), the plotting becomes terribly slow -- up to 30s > per update and more! > > Do you know any way to make this faster? > > My ideas are: > - Since I only add points to the *right* of the lines, I could reduce the > number of points, by first removing all points which are outside of > the current visible plotting-window from my array, and then calling > set_data() with the reduced array. > - This unfortunately wouldn't reduce the number of points in very dense > plots. It would be possible to (a) replace several points which all > result in the same plotted point by a single point or (b) cache the > plotted points e.g. on pixel-level. I think (b) would probably require > to write a new backend. > > Any ideas? > http://matplotlib.sourceforge.net/examples/animation/animation_blit_gtk2.html The above example does something similar to (b). It saves the previous plot (only axes area is saved) as a bitmap. In next run, it restores the saved bitmap after shifting. And then draw only the new data points. The example requires the svn version of matplotlib. Regards, -JJ > > regards, > Roland > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Have you seen this? http://zunzun.com/ *"Online Curve Fitting and Surface Fitting Web Site*" On Wed, Jul 29, 2009 at 6:16 AM, Bala subramanian <bal...@gm... > wrote: > Friends, > > I have to define two equations and fit my data on to it. could someone > please give me some example on how to do curve fitting using matplotlib. > > Thanks, > Bala > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Gökhan
Quoting Bala subramanian <bal...@gm...>: > Friends, > > I have to define two equations and fit my data on to it. could someone > please give me some example on how to do curve fitting using matplotlib. http://docs.scipy.org/doc/numpy/reference/generated/numpy.polyfit.html (Matplotlib example at the bottom) Cheers, G -- ------------------------------------------------- Visit Pipex Business: The homepage for UK Small Businesses Go to http://www.pipex.co.uk/business-services
Friends, I have to define two equations and fit my data on to it. could someone please give me some example on how to do curve fitting using matplotlib. Thanks, Bala
On Tue, Jul 28, 2009 at 10:27 PM, Kun Hong<kun...@uq...> wrote: > Hi, > > I am new to matplotlib. Currently I have a need to change the subplot > orders after the subplts have been added to a figure. I haven't found a > way to do it easily. One of my solution is to keep an ordered list of > the subplots and re-add them in the correct order. But this way, all the > navigation information (zoom/pan) is lost. Another way I found is to > get the positions (get_position method of Axes) of the subplot and > then set the positions according to the new order, which is quite > cumbersom. I am thinking if there is a similar method like add_subplot > (that is, accepting new positional information of row, column, number > instead of Bbox), it will be great. Does anyone know any better > solution? It should work to call ax.change_geometry on the existing subplot instances. http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.SubplotBase.change_geometry Haven't tested it for this use case, but I'm pretty sure it will do what you want. Let me know! JDH
On Wed, Jul 29, 2009 at 1:01 AM, Art<gre...@gm...> wrote: > I have a scatter plot that requires some time to render. The horizontal axis > is time. Currently, I generate the full scatter plot each time and draw a > axvline to indicate the progress of time, save the file as a png for each > time, and generate a movie for all time frames. The scatter plot portion > doesn't change, just the vertical line. > > I was wondering if there was a way to speed this up, to generate the scatter > plot once and then overlay it with a moving axvline. I would still have to > save the png frame by frame, but the most expensive step by far is > replotting the scatter plot over and over. This is what the animation/blit api is designed to do: http://www.scipy.org/Cookbook/Matplotlib/Animations scipy.org appears down right now, so you may need to try again later. See also these mpl examples: http://matplotlib.sourceforge.net/search.html?q=codex+blit JDH
On Wed, Jul 29, 2009 at 1:39 AM, 3togo<fre...@gm...> wrote: > > mlab.psd and pyplot.psd are different!!!! The plotting command pyplot.psd scales the numbers in decibels (the dB in the ylabel in pyplot.psd). mlab.psd just returns the unscaled power. So in your example in subplot(3,1,3), call before plotting x = 10*np.log10(np.absolute(x)) JDH
#This program below do reveal that mlab.psd and pyplot.psd are different http://www.nabble.com/file/p24713274/psd_testpng.png psd_testpng.png import numpy as np import matplotlib.pyplot as plt import matplotlib.mlab as mlab dt = np.pi / 100. fs = 1. / dt t = np.arange(0, 8, dt) y = 10. * np.sin(2 * np.pi * 4 * t) + 5. * np.sin(2 * np.pi * 4.25 * t) y = y + np.random.randn(*t.shape) print "t=",t print "y=",y print "fs=",fs #Plot the raw time series fig = plt.figure() fig.subplots_adjust(hspace=0.6, wspace=0.5) # ax = fig.add_subplot(3, 1, 1) plt.title('Data') ax.plot(t,y) ax = fig.add_subplot(3, 1, 2) plt.title('psd using pyplot') ax.psd(y,Fs=fs,scale_by_freq=False) ax = fig.add_subplot(3, 1, 3) plt.title('psd using mlab') x,y=mlab.psd(y,Fs=fs,scale_by_freq=False) ax.plot(y,x) plt.show() Lewis, Ambrose J. wrote: > > Hi All: > > I'm trying to use the matplotlib psd function to plot some data. The > result from MATLAB's pWelch function looks vastly different. > > Any suggestions/recommendations would be greatly appreciated! > > THANXS > > amb > > > > Here is the MATLAB code: > > Fs = 13e6; > > fid = fopen('C:\asp\roseRT\ics_output.bin', 'r', 'ieee-le'); > > s = fread(fid, [2, Inf], 'int32'); > > fclose(fid); > > z = complex(s(2,:), s(1,:)); > > pwelch(z, [], [], [], Fs) > > > > And here is the (hypothetically) equivalent Python/matplotlib code: > > datatype = np.complex64 > > fd = open(self.filename, 'rb') > > read_data = np.fromfile(file=fd, dtype=datatype) > > Pxx,freqs = psd(read_data,Fs=13000000) > > self.axes.plot(freqs, 10*log10(Pxx) ) > > self.canvas.draw() > > > > Ambrose Lewis > > SAIC > > 4001 N Fairfax Drive, Suite 400 > > Arlington, VA 22203 > > 703.558.2786 > > amb...@sa... > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/psd-question...-tp21458898p24713274.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I have a scatter plot that requires some time to render. The horizontal axis is time. Currently, I generate the full scatter plot each time and draw a axvline to indicate the progress of time, save the file as a png for each time, and generate a movie for all time frames. The scatter plot portion doesn't change, just the vertical line. I was wondering if there was a way to speed this up, to generate the scatter plot once and then overlay it with a moving axvline. I would still have to save the png frame by frame, but the most expensive step by far is replotting the scatter plot over and over. Thanks!
Hi, I am new to matplotlib. Currently I have a need to change the subplot orders after the subplts have been added to a figure. I haven't found a way to do it easily. One of my solution is to keep an ordered list of the subplots and re-add them in the correct order. But this way, all the navigation information (zoom/pan) is lost. Another way I found is to get the positions (get_position method of Axes) of the subplot and then set the positions according to the new order, which is quite cumbersom. I am thinking if there is a similar method like add_subplot (that is, accepting new positional information of row, column, number instead of Bbox), it will be great. Does anyone know any better solution? Also related to this, I need to add a subplot using the add_subplot method of the Figure class, and update the previously added subplots accordingly. For example, I add a subplot using add_subplot(1, 1, 1). Then later, I need to add another subplot. The new layout should be the first plot being 211, the second one being 212. How do I change the first plot from 111 to 211? I haven't found a way other than re-add the plots. Can some one shed some light on me please? Thanks Kun
Hi All, I was downloading matplotlib on a windows machine and the sourceforge site (http://sourceforge.net/projects/matplotlib/) showed me basemap as the default download (instead of the latest matplotlib). On Mac the default download shows correctly as matplotlib. This is some autodetection from sourceforge, so I don't know if it is a sitewide problem, or it can be configured from the project page. Just to let the admins know. Best -Kaushik