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
(14) |
2
(31) |
3
(20) |
4
(4) |
5
(2) |
6
(10) |
7
(25) |
8
(13) |
9
(3) |
10
(5) |
11
(2) |
12
(1) |
13
(19) |
14
(16) |
15
(18) |
16
(7) |
17
(17) |
18
|
19
(2) |
20
(7) |
21
(12) |
22
(14) |
23
(8) |
24
(6) |
25
(3) |
26
|
27
(21) |
28
(8) |
29
(5) |
30
(6) |
|
|
If I run the script below (taken straight from the docs except for the imports) the script fails with a message that matshow does not return a tuple, which appears true. Dropping the extra LHS variables allows the script to run, but produces 4 separate figures. Thanks, Alan Isaac ============================================ from scipy import * from pylab import * def samplemat(dims): aa = zeros(dims) for i in range(min(dims)): aa[i,i] = i return aa dimlist = [(12,12),(128,64),(64,512),(2048,256)] for d in dimlist: fig, ax, im = matshow(samplemat(d)) show()
Hi Danny, Danny Shevitz wrote: > howdy, > > I have some beginner type questions with matshow. > > I want the origin of the axes to be the lower left of the figure. I tried: > fig=matshow(data, cmap, origin='lower') > > but that didn't seem to do anything. Actually, I want to flip the figure > over upper left->lower right diagonal and I want to > do this without explicitly transposing the matrix if possible. > > I also am having trouble with the figure size. I am working on a weird dpi > (93.65) screen. I tried > fig.set_figsize_inches((5.,5.)) > fig.set_dpi(93.6585) > > But the screen dimensions still come out off. They are in fact 5 5/16" x 5 > 5/16". Any ideas? Even though I wrote matshow, I have to admit that it was very much a 'stumble in the dark' kind of code. I basically just mucked around with imshow enough to get a matrix to display in the 'traditional' way (top-down, with properly preserved aspect ratio) and that was about it. I'm sure the code can use improvements, but at the time I can't commit any effort into it, I'm afraid. If you can extend it (the code is extremely simple) in a useful way, just send a patch over and I'm sure we can apply it. Regards, f
>>>>> "zori" == zori <zo...@vi...> writes: zori> Hi, Exploring the agg.py module of the matplotlib library, I zori> have encauntered that I cannot represent smooth arcs. For zori> example, circle appears as octagon. Could you give me an zori> idea how to manage this and what is the reason for such zori> behaviour? Here is the code of the agg_test.py changed to zori> draw arc, but not giving the desired result: Hi Zori, I updated the agg_test.py example to show how to do a few more things -- drawing curves, filling and stroking, and making affine transformations of paths and curves. Down the road I would like to replace refactor backend_agg.py and _backend_agg.cpp to use this swig wrapper of agg, so that agg users would have access to the low level agg library for customized drawing over a mpl figure. # this example uses the agg python module directly there is no # documentation -- you have to know how to use the agg c++ API to use # it import matplotlib.agg as agg from math import pi ## Define some colors red = agg.rgba8(255,0,0,255) blue = agg.rgba8(0,0,255,255) green = agg.rgba8(0,255,0,255) black = agg.rgba8(0,0,0,255) white = agg.rgba8(255,255,255,255) yellow = agg.rgba8(192,192,255,255) ## Create the rendering buffer, rasterizer, etc width, height = 600,400 stride = width*4 buffer = agg.buffer(width, height, stride) rbuf = agg.rendering_buffer() rbuf.attachb(buffer) pf = agg.pixel_format_rgba(rbuf) rbase = agg.renderer_base_rgba(pf) rbase.clear_rgba8(blue) renderer = agg.renderer_scanline_aa_solid_rgba(rbase); renderer.color_rgba8( red ) rasterizer = agg.rasterizer_scanline_aa() scanline = agg.scanline_p8() ## A polygon path path = agg.path_storage() path.move_to(10,10) path.line_to(100,100) path.line_to(200,200) path.line_to(100,200) path.close_polygon() # stroke it stroke = agg.conv_stroke_path(path) stroke.width(3.0) rasterizer.add_path(stroke) agg.render_scanlines_rgba(rasterizer, scanline, renderer); ## A curved path path = agg.path_storage() path.move_to(200,10) path.line_to(350,50) path.curve3(150,200) path.curve3(100,70) path.close_polygon() curve = agg.conv_curve_path(path) # fill it rasterizer.add_path(curve) renderer.color_rgba8( green ) agg.render_scanlines_rgba(rasterizer, scanline, renderer); # and stroke it stroke = agg.conv_stroke_curve(curve) stroke.width(5.0) rasterizer.add_path(stroke) renderer.color_rgba8( yellow ) agg.render_scanlines_rgba(rasterizer, scanline, renderer); ## Transforming a path path = agg.path_storage() path.move_to(0,0) path.line_to(1,0) path.line_to(1,1) path.line_to(0,1) path.close_polygon() rotation = agg.trans_affine_rotation(pi/4) scaling = agg.trans_affine_scaling(30,30) translation = agg.trans_affine_translation(300,300) trans = rotation*scaling*translation transpath = agg.conv_transform_path(path, trans) stroke = agg.conv_stroke_transpath(transpath) stroke.width(2.0) rasterizer.add_path(stroke) renderer.color_rgba8( black ) agg.render_scanlines_rgba(rasterizer, scanline, renderer); ## Converting a transformed path to a curve path = agg.path_storage() path.move_to(0,0) path.curve3(1,0) path.curve3(1,1) path.curve3(0,1) path.close_polygon() rotation = agg.trans_affine_rotation(pi/4) scaling = agg.trans_affine_scaling(30,30) translation = agg.trans_affine_translation(300,250) trans = rotation*scaling*translation transpath = agg.conv_transform_path(path, trans) curvetrans = agg.conv_curve_trans(transpath) stroke = agg.conv_stroke_curvetrans(curvetrans) stroke.width(2.0) rasterizer.add_path(stroke) renderer.color_rgba8( white ) agg.render_scanlines_rgba(rasterizer, scanline, renderer); ## Display it with PIL s = buffer.to_string() print len(s) import Image im = Image.fromstring( "RGBA", (width, height), s) im.show()
>>>>> "Jeff" == Jeff Peery <jef...@se...> writes: Jeff> Hello, Jeff> I'm plotting a simple xy plot and I'd like to highlight Jeff> regions that are above a threshold, say for example all Jeff> points y>=1. The method I am thinking of applying is Jeff> getting the x,y position of the point that is above the Jeff> threshold and filling the region between two vertical lines Jeff> that are right and left of the point with a bright color. Jeff> I was having some difficulty filling between two vertical Jeff> lines, I don't think I can use axvline() with fill()? It sounds like axvspan is what you want def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs): """ AXVSPAN(xmin, xmax, ymin=0, ymax=1, **kwargs) axvspan : Axis Vertical Span. xcoords are in data units and y coords are in axes (relative 0-1) units Draw a vertical span (regtangle) from xmin to xmax. With the default values of ymin=0 and ymax=1, this always span the yrange, regardless of the ylim settings, even if you change them, eg with the ylim command. That is, the vertical extent is in axes coords: 0=bottom, 0.5=middle, 1.0=top but the y location is in data coordinates. kwargs are the kwargs to Patch, eg antialiased, aa linewidth, lw edgecolor, ec facecolor, fc the terms on the right are aliases return value is the patches.Polygon instance. # draw a vertical green translucent rectangle from x=1.25 to 1.55 that # spans the yrange of the axes axvspan(1.25, 1.55, facecolor='g', alpha=0.5) For another approach, see examples/fill*.py, in particular examples/fill_between.py. But if all you want is shading across the vertical extent over an xrange, axvspan is the function for you,\. JDH
>>>>> "zori" == zori <zo...@vi...> writes: zori> Hi, Exploring the agg.py module of the matplotlib library, I zori> have encauntered that I cannot represent smooth arcs. For zori> example, circle appears as octagon. Could you give me an zori> idea how to manage this and what is the reason for such zori> behaviour? Here is the code of the agg_test.py changed to zori> draw arc, but not giving the desired result: You have to call conv_curve on the path, and then stroke the result of that curve = agg.conv_curve_path(path) stroke = agg.conv_stroke_curve(curve) agg is a heavily templated library, and one or the challenges of wrapping a template library is deciding which template combinations need to be instantiated. Since matplotlib's agg wrapper is undocumented, I'll explain some of the combinations and the naming convention now. In the agg C++ library, the equivalent calls are typedef agg::conv_stroke<path_t> stroke_t; typedef agg::conv_curve<path_t> curve_t; agg::conv_curve<path_t> curve(path); agg::conv_stroke<curve_t> stroke(curve) matplotlib basically takes the template argument and appends it to the class name, eg Agg C++ : matplotlib wrapper : agg::conv_curve<path_t> agg.conv_curve_path agg::conv_stroke<curve_t> agg.conv_stroke_curve The typedefs (path_t, curve_t, etc) are defined in swig/agg_typedefs.h in the swig directory of the matplotlib src distribution. The various curves are defined in swig/agg_conv_curve.i and the strokes in swig/agg_conv_stroke.i The stroke and converter classes thus defined are conv_curve_path - convert path to curve, maps "path"->"curve" conv_curve_trans - convert a transformed path, maps "transpath"->"curvetrans" conv_stroke_path - stroke a path conv_stroke_transpath - stroke a transpath conv_stroke_curve - stroke a curve conv_stroke_transcurve - stroke a transform of a curve conv_stroke_curvetrans - stroke a curve of a transformed path Hope this helps, JDH
Dear matplotlib-users, I have made an application for tsunami wave travel time prediction (slowmo.sf.net). The application uses the basemap toolkit and is developed on Linux. I would like to offer potential Windows users an easier way to install and test it than is currently available. For this I would need a binary windows package of the basemap toolkit in a newer version than 0.21 which is currently available. Unfortunately I do not have access to the windows compilers that are necessary to make this binary package. I would therefore be very grateful if anyone from this list has the binary or could easily produce it. Kind regards, Jesper
Hi, Exploring the agg.py module of the matplotlib library, I have encauntered that I cannot represent smooth arcs. For example, circle appears as octagon. Could you give me an idea how to manage this and what is the reason for such behaviour? Here is the code of the agg_test.py changed to draw arc, but not giving the desired result: ########################## import matplotlib.agg as agg width, height = 600,400 stride = width*4 buffer = agg.buffer(width, height, stride) rbuf = agg.rendering_buffer() rbuf.attachb(buffer) red = agg.rgba8(255,0,0,255) blue = agg.rgba8(0,0,255,255) green = agg.rgba8(0,255,0,255) black = agg.rgba8(0,0,0,255) white = agg.rgba8(255,255,255,255) yellow = agg.rgba8(192,192,255,255) path = agg.path_storage() path.move_to(10,10) path.line_to(100,100) path.line_to(200,200) path.arc_to(100,100,0,0,1,100,200) path.close_polygon() stroke = agg.conv_stroke_path(path) stroke.width(3.0) pf = agg.pixel_format_rgba(rbuf) rbase = agg.renderer_base_rgba(pf) rbase.clear_rgba8(blue) renderer = agg.renderer_scanline_aa_solid_rgba(rbase); renderer.color_rgba8( red ) rasterizer = agg.rasterizer_scanline_aa() rasterizer.add_path(stroke) scanline = agg.scanline_p8() agg.render_scanlines_rgba(rasterizer, scanline, renderer); s = buffer.to_string() print len(s) import Image im = Image.fromstring( "RGBA", (width, height), s) im.show() Thank you! Regards, Z.Danevska
Steve Schmerler wrote: > Hi > > I'm using MPL 0.81 on a Debian box. When I call ipython with the pylab > option I get a GTK message which bothers me. > > > =============================================================================== > elcorto@ramrod:~$ ipython -pylab > /usr/lib/python2.3/site-packages/IPython/Shell.py:628: > GtkDeprecationWarning: gtk.timeout_add is deprecated, use > gobject.timeout_add instead > self.gtk.timeout_add(self.TIMEOUT, self.on_timer) > Python 2.3.5 (#2, May 4 2005, 08:51:39) > Type "copyright", "credits" or "license" for more information. > > IPython 0.6.13 -- 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. > > Welcome to pylab, a matplotlib-based Python environment. > For more information, type 'help(pylab)'. > =============================================================================== > > So far I discovered no problems while using MPL but I'm wondering what > this message is. This is harmless, and will go away when you upgrade to ipython 0.6.15. Best, f
howdy, I have some beginner type questions with matshow. I want the origin of the axes to be the lower left of the figure. I tried: fig=matshow(data, cmap, origin='lower') but that didn't seem to do anything. Actually, I want to flip the figure over upper left->lower right diagonal and I want to do this without explicitly transposing the matrix if possible. I also am having trouble with the figure size. I am working on a weird dpi (93.65) screen. I tried fig.set_figsize_inches((5.,5.)) fig.set_dpi(93.6585) But the screen dimensions still come out off. They are in fact 5 5/16" x 5 5/16". Any ideas? thanks, danny Here's a full file: ##################################### from pylab import * from matplotlib import cm data=zeros((10,10)) for i in range(10): for j in range(10): data[i,j]=i+j fig=matshow(data, cm.jet)#, origin='lower' fig.set_figsize_inches((5.,5.)) fig.set_dpi(72.) #93.6585 savefig('tempPic.png')
Hi I'm using MPL 0.81 on a Debian box. When I call ipython with the pylab option I get a GTK message which bothers me. =============================================================================== elcorto@ramrod:~$ ipython -pylab /usr/lib/python2.3/site-packages/IPython/Shell.py:628: GtkDeprecationWarning: gtk.timeout_add is deprecated, use gobject.timeout_add instead self.gtk.timeout_add(self.TIMEOUT, self.on_timer) Python 2.3.5 (#2, May 4 2005, 08:51:39) Type "copyright", "credits" or "license" for more information. IPython 0.6.13 -- 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. Welcome to pylab, a matplotlib-based Python environment. For more information, type 'help(pylab)'. =============================================================================== So far I discovered no problems while using MPL but I'm wondering what this message is. cheers, steve
The problem is that nearly all of the video codecs are proprietary, and encoding, in particular, usually incurs money changing hands somewhere. Some distributions (Debian) therefore are philosophically unable to include much in the way of movie tools, and others go through hoops to avoid incurring the wrath of the lawyers. I've recently heard that ffmpeg works pretty well. After spending many frustrating hours trying to get something to work, I've decided for now that using QuickTime Pro is what I'll use (30ドル for Windows or Mac version). It can generate AVIs (limited number of codecs, at least on Macs), MOVs, and MPEG-4s from image sequences, and It Just Works. Good luck, and let us know if you find anything that works well in linux. Cheers! Andrew On Jun 21, 2005, at 2:39 PM, Danny Shevitz wrote: > This is not strictly speaking a matplotlib question, but I have been > trying to get the movie_demo.py file working on > a windows box using the os.system command with mencoder. > > I'm curious if anyone has gotten this to work with vcodec=mpeg4 so > that the subsequent video can be opened with Window Media player. > I have spent all day searching the web and playing with stuff. I have > gotten readable output with wmv2 and mpeg1video. That's it. > > If you have had some success can you please contact me and I'll ask > you some questions off the list. > > thanks, > Danny > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hello, I'm plotting a simple xy plot and I'd like to highlight regions that are above a threshold, say for example all points y>=1. The method I am thinking of applying is getting the x,y position of the point that is above the threshold and filling the region between two vertical lines that are right and left of the point with a bright color. I was having some difficulty filling between two vertical lines, I don't think I can use axvline() with fill()? Is there a more efficient way to do this... maybe creating a filled shape behind the highlight points? Any help would be much appreciated! Thanks. Jeff
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes: Eric> followed what you suggested, everything was fine until the Eric> 'grep' : for some obscure reason every new install produced Eric> an empty (0 byte) backend_ps.py file (I think this may have Eric> come from a previously interrupted 'build'). I therefore Eric> erased the original matplotlib source dir (as well as the Eric> installed ones), and redetared the archive starting from Eric> scratch.. It works... Oh -- both Darren and I forgot to suggest rm -rf "build" in addition to site-packages/matplotlib. This is, however, suggested in http://matplotlib.sourceforge.net/faq.html#FAILURE The first thing to try is to remove site-packages/matplotlib and reinstall. If you are running the windows installer or using some other package, that is all you need to do. If you are compiling matplotlib yourself, you also need to remove the build subdirectory of the matplotlib src tree you are compiling from. It is not enough to do python setup.py clean. Try rebuilding and reinstalling matplotlib after removing these two directories and see if that helps. If Glad you found and fixed the problem! JDH
followed what you suggested, everything was fine until the 'grep' : for some obscure reason every new install produced an empty (0 byte) backend_ps.py file (I think this may have come from a previously interrupted 'build'). I therefore erased the original matplotlib source dir (as well as the installed ones), and redetared the archive starting from scratch.. It works... thanks a lot for the support!!!! Eric John Hunter wrote: >>>>>>"Eric" == Eric Emsellem <ems...@ob...> writes: >>>>>> >>>>>> > > Eric> Thanks for the tip, but as you and John suggested I tried a > Eric> new clean installation (both for matplotlib - removing the > Eric> site-packages and /usr/share matplotlib dir - and ipython) > Eric> but the small test I sent you still react the same. The > Eric> specific import command: > > Eric> from matplotlib.backends.backend_ps import FigureCanvasPS > > Eric> does indeed give an ImportError: > > Eric> ImportError: cannot import name FigureCanvasPS > > Eric> not sure what to do now. Thanks for any input there! > >Strange indeed. Issue these commands and let me know what you find > > >>> import matplotlib.backends.backend_ps > >>> matplotlib.__file__ > '/usr/lib/python2.4/site-packages/matplotlib/__init__.pyc' > >>> matplotlib.backends.backend_ps.__file__ > '/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.pyc' > > >>> import matplotlib > >>> matplotlib.__version__ > '0.82' > >>> matplotlib.__file__ > '/usr/lib/python2.4/site-packages/matplotlib/__init__.pyc' > > >Also, what do these commands from the unix shell return (substituting >in your path to backend_ps.py) > > peds-pc311:~> md5sum /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py > 2bb2161d70c11f56e803d7749b4fe05a /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py > peds-pc311:~> grep '^class FigureCanvas' /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py > class FigureCanvasPS(FigureCanvasBase): > >The only things I can think of are > > 1) you have an errant copy of matplotlib.backends.backend_ps > somewhere in your path > > 2) you have a corrupted backend_ps (hence the md5sum check) > > 3) You did not successfully remove site-packages/matplotlib and have > a corrupt install. > >JDH > > > -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem ===============================================================
Hello, I'm having some difficulty getting a simple timer working. I attached a quick example. I setup the timer, gave it a event handler and start the timer with .Start(). It seems to start, but the timer event doesn't happen... that is in my example the event function that I created never is called. Any help would be much appreciated! Thanks. Jeff
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes: Eric> Thanks for the tip, but as you and John suggested I tried a Eric> new clean installation (both for matplotlib - removing the Eric> site-packages and /usr/share matplotlib dir - and ipython) Eric> but the small test I sent you still react the same. The Eric> specific import command: Eric> from matplotlib.backends.backend_ps import FigureCanvasPS Eric> does indeed give an ImportError: Eric> ImportError: cannot import name FigureCanvasPS Eric> not sure what to do now. Thanks for any input there! Strange indeed. Issue these commands and let me know what you find >>> import matplotlib.backends.backend_ps >>> matplotlib.__file__ '/usr/lib/python2.4/site-packages/matplotlib/__init__.pyc' >>> matplotlib.backends.backend_ps.__file__ '/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.pyc' >>> import matplotlib >>> matplotlib.__version__ '0.82' >>> matplotlib.__file__ '/usr/lib/python2.4/site-packages/matplotlib/__init__.pyc' Also, what do these commands from the unix shell return (substituting in your path to backend_ps.py) peds-pc311:~> md5sum /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py 2bb2161d70c11f56e803d7749b4fe05a /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py peds-pc311:~> grep '^class FigureCanvas' /usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py class FigureCanvasPS(FigureCanvasBase): The only things I can think of are 1) you have an errant copy of matplotlib.backends.backend_ps somewhere in your path 2) you have a corrupted backend_ps (hence the md5sum check) 3) You did not successfully remove site-packages/matplotlib and have a corrupt install. JDH
>>>>> "Jo=E3o" =3D=3D Jo=E3o Lu=EDs Silva <rom...@ya...> writes: Jo=E3o> Hello all, I'm making a small visualization application Jo=E3o> based on matplotlib which is in turn embedded in gtk2 using Jo=E3o> pygtk. The code goes like this: Jo=E3o> fig =3D matplotlib.figure() ax =3D fig.add_subplot(111) im =3D Jo=E3o> ax.imshow(A) canvas =3D FigureCanvas(fig) [...] Jo=E3o> and it works fine. However, after an user action I need to Jo=E3o> update the image, and so I do a Jo=E3o> im.set_data(NewData) Jo=E3o> but the image remains unchanged, and will only update if I Jo=E3o> somehow move it using the toolbar. I googled a bit and found Jo=E3o> that perhaps fig.draw(renderer) would work, but I have no Jo=E3o> idea as how to get a reference to the renderer. Any ideas? call canvas.draw() which creates the renderer and calls fig.draw(renderer). The segregation between the canvas and the figure was done precisely to decouple the backend (eg renderer) from the frontend (eg figure). See examples/dynamic_image_gtkagg.py for an example of how to dynamically update the gtkagg canvas. JDH
>>>>> "Nils" == Nils Wagner <nw...@me...> writes: Nils> Hi all, Why do I get a math domain error if I import scipy Nils> before pylab in cdiff.py (see attachment) ? Hi Nils, It helps to try and reduce your error to a minimal example that exposes the bug. That will save my time and help you find the real cause of the bug. If you had done this, you would have seen that the problem is in the Numeric call to sqrt of a negative number, and does not involve matplotlib or scipy from Numeric import sqrt, sin, cos z = 2.5 print 'arg is negative', sin(z)**3+cos(z)**3 print 'this will fail', sqrt(sin(z)**3+cos(z)**3) numarray would return nan. JDH
Hi all, Why do I get a math domain error if I import scipy before pylab in cdiff.py (see attachment) ? numerix Numeric 24.0b2 Traceback (most recent call last): File "cdiff.py", line 28, in ? e1=abs((f(z+h)-f(z))/h-fd(z))/abs(fd(z)) File "cdiff.py", line 6, in f return exp(z)/sqrt(sin(z)**3+cos(z)**3) ValueError: math domain error /home/nwagner> vi cdiff.py /home/nwagner> /usr/bin/python cdiff.py numerix Numeric 24.0b2 Traceback (most recent call last): File "cdiff.py", line 30, in ? e1=abs((f(z+h)-f(z))/h-fd(z))/abs(fd(z)) File "cdiff.py", line 6, in f return exp(z)/sqrt(sin(z)**3+cos(z)**3) ValueError: math domain error Nils
Hello all, I'm making a small visualization application based on matplotlib which is in turn embedded in gtk2 using pygtk. The code goes like this: fig = matplotlib.figure() ax = fig.add_subplot(111) im = ax.imshow(A) canvas = FigureCanvas(fig) [...] and it works fine. However, after an user action I need to update the image, and so I do a im.set_data(NewData) but the image remains unchanged, and will only update if I somehow move it using the toolbar. I googled a bit and found that perhaps fig.draw(renderer) would work, but I have no idea as how to get a reference to the renderer. Any ideas? Thanks, João Silva
Thanks for the tip, but as you and John suggested I tried a new clean installation (both for matplotlib - removing the site-packages and /usr/share matplotlib dir - and ipython) but the small test I sent you still react the same. The specific import command: from matplotlib.backends.backend_ps import FigureCanvasPS does indeed give an ImportError: ImportError: cannot import name FigureCanvasPS not sure what to do now. Thanks for any input there! Eric Darren Dale wrote: >Hi Eric, > >On Tuesday 21 June 2005 11:16 am, Eric Emsellem wrote: > > >>for some reason I have now (with the new matplotlib) problems with ps >>files saving figures with savefig. >>(it works with gif, jpg, etc). >> >>[I am running Python 2.3.4, IPython 0.6.12, matplotlib 0.82 >>and verbose.level helpful, interactive is False, platform is linux2, >>numerix numarray 1.3.0] >> >>So here is what I get with a simple example: >> >>scatter(arange(0,10,1), arange(10,20,1)) >>savefig('toto.ps') >> >> > >I didnt have any trouble with this example. Your traceback shows backend_agg >cant import FigureCanvasPS. Does this work in ipython? > >from matplotlib.backends.backend_ps import FigureCanvasPS > >Did you try to removing the matplotlib directory in site-packages, and >reinstalling? > > > -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem ===============================================================
This is not strictly speaking a matplotlib question, but I have been trying to get the movie_demo.py file working on a windows box using the os.system command with mencoder. I'm curious if anyone has gotten this to work with vcodec=mpeg4 so that the subsequent video can be opened with Window Media player. I have spent all day searching the web and playing with stuff. I have gotten readable output with wmv2 and mpeg1video. That's it. If you have had some success can you please contact me and I'll ask you some questions off the list. thanks, Danny
Jeff, On 2005年6月21日, Jeff Peery wrote: > Hello, is there a way to check if a plot is currently open? I'm using > wxAgg to show plots in a frame. I want the user to be able to show > different plots in the same frame, although only one at a time. So I > need to know if a plot is already there so I can close it and create a > new one. Thanks! I think this may need to be backend dependent. For wxAgg, I put the matplotlib figure canvas on a wx.Frame, and then check whether that wx.Frame exists. That is, with 'self.plotframe' being my toplevel frame that has a FigureCanvasWxAgg, and is built with PlotFrame(), I run this prior to each plot: def ShowPlotFrame(self, do_raise=True): "make sure plot frame is enabled, and, optionally visible" # if plotframe does not exist, build it if self.plotframe == None: self.plotframe = PlotFrame(self) try: self.plotframe.Show() except wx.PyDeadObjectError: self.plotframe = PlotFrame(self) self.plotframe.Show() # make sure the plot frame is raised. if do_raise: self.plotframe.Raise() The 'except wx.PyDeadObjectError:' checks if the User has killed the Frame from the Window Manager. This could probably be made more robust, but it works well for me. Hope that helps, --Matt
Nadia, John, Thanks for the help/pointers. Unfortunately nothing worked so far. I started with gcc 3.4.3 and even compiled latest available 3.X gcc (3.4.4) but that did not help. It sounds like older versions of Solaris work. In my case downgrading the OS is not an option. Miro > The only way I can compile matplotlib on Solaris is using gcc > (by setting CC to gcc). > I am on Solaris 8 and use gcc 3.2.2. > Python was compiled with Sun's compilers, but I think as long > as python version is 2.3 or later, distutils will pick up the > compiler from the environment variable CC. > > Nadia > > John Hunter wrote: > >>>>>>"mmadecki" == mmadecki <mma...@co...> writes: > > > > > > mmadecki> Hi, I'm trying to compile Matplotlib 0.82 on Solaris 10 > > mmadecki> (SunOS 5.10_x86). I've seen similar posts but no > > mmadecki> solutions to this problem (see errors below). Any help > > mmadecki> is greatly appreciated. > > > > If you search for "error" from the beginning of your gcc output, the > > first match is > > > > error: `::btowc' has not been declared > > > > If you paste that into google, the first result you'll see is a post > > to matplotlib from Mike Rightmire, who offlist and with the help of > > Thomas Wessell, worked around this problem with a brute force > > approach. I believe Erik Curiel had a similar problem on a solaris > > box recently. > > > > The most informative google result I saw was when I took you error > > message and added some quotes to reduce false matches > > > > error: `::btowc' "has not been declared" > > > > [Aside: putting double quotes around the entire string did not match > > this result; apparently google does not handled nested quotes very > > well.] Fourth from the top and was > > http://lists.schmorp.de/pipermail/rxvt-unicode/2005q2/000092.html . > > This thread is not related to matplotlib, and first response there > > isn't too helpful, but if you follow the rest of the thread you'll get > > lots of good information. In particular, this response looks helpful > > http://lists.schmorp.de/pipermail/rxvt-unicode/2005q2/000104.html > > > > Nadia is the only person I know personally who actively compiles mpl > > on a solaris box; I hope she has some suggestions for you. > > > > Cheers, > > JDH > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
The only way I can compile matplotlib on Solaris is using gcc (by setting CC to gcc). I am on Solaris 8 and use gcc 3.2.2. Python was compiled with Sun's compilers, but I think as long as python version is 2.3 or later, distutils will pick up the compiler from the environment variable CC. Nadia John Hunter wrote: >>>>>>"mmadecki" == mmadecki <mma...@co...> writes: > > > mmadecki> Hi, I'm trying to compile Matplotlib 0.82 on Solaris 10 > mmadecki> (SunOS 5.10_x86). I've seen similar posts but no > mmadecki> solutions to this problem (see errors below). Any help > mmadecki> is greatly appreciated. > > If you search for "error" from the beginning of your gcc output, the > first match is > > error: `::btowc' has not been declared > > If you paste that into google, the first result you'll see is a post > to matplotlib from Mike Rightmire, who offlist and with the help of > Thomas Wessell, worked around this problem with a brute force > approach. I believe Erik Curiel had a similar problem on a solaris > box recently. > > The most informative google result I saw was when I took you error > message and added some quotes to reduce false matches > > error: `::btowc' "has not been declared" > > [Aside: putting double quotes around the entire string did not match > this result; apparently google does not handled nested quotes very > well.] Fourth from the top and was > http://lists.schmorp.de/pipermail/rxvt-unicode/2005q2/000092.html . > This thread is not related to matplotlib, and first response there > isn't too helpful, but if you follow the rest of the thread you'll get > lots of good information. In particular, this response looks helpful > http://lists.schmorp.de/pipermail/rxvt-unicode/2005q2/000104.html > > Nadia is the only person I know personally who actively compiles mpl > on a solaris box; I hope she has some suggestions for you. > > Cheers, > JDH > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users