You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(11) |
2
(24) |
3
(24) |
4
(31) |
5
(30) |
6
(27) |
7
(25) |
8
(8) |
9
(2) |
10
(12) |
11
(16) |
12
(33) |
13
(18) |
14
(17) |
15
(3) |
16
(7) |
17
(8) |
18
(22) |
19
(20) |
20
(25) |
21
(10) |
22
(17) |
23
(18) |
24
(23) |
25
(15) |
26
(19) |
27
(6) |
28
(7) |
29
(6) |
30
(1) |
31
(12) |
|
|
|
|
|
From: Bernard G. <ber...@gm...> - 2009-08-20 06:34:30
|
Hello, For an application, I am writing, I need the naviguation toolbar 2 and the BoxSelector and Lasso widgets. The user should be able to select with the Lasso or BoxSelector widget even when zoom or pan is active by pressing a modifier key. I have managed to do this with the following code (for now, only for the Box selector with modifier key shift): ********************************** class ShiftBoxSelector(matplotlib.widgets.RectangleSelector): def press(self, event): if ((event.guiEvent.state & gtk.gdk.SHIFT_MASK)!=gtk.gdk.SHIFT_MASK) : return return matplotlib.widgets.RectangleSelector.press(self,event) class NoShiftNavigationToolbar2(matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg): def press_pan(self, event): if ((event.guiEvent.state & gtk.gdk.SHIFT_MASK)==gtk.gdk.SHIFT_MASK) : return return matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg.press_pan(self,event) def press_zoom(self, event): if ((event.guiEvent.state & gtk.gdk.SHIFT_MASK)==gtk.gdk.SHIFT_MASK) : return return matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg.press_zoom(self,event) def pan(self,*args): x = matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg.pan(self,*args) self.canvas.widgetlock.release(self) return x def zoom(self,*args): x = matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg.zoom(self,*args) self.canvas.widgetlock.release(self) return x ********************** Is this a good solution? My application is not threaded and the only other widgets interacting with the plots are gtk buttons. However there will be several plots in different tabs each with their own naviguation toolbar, boxselector and lasso widgets. What are the risks of unlocking the canvas when zoom/pan is active? Thank you for your help, Bernard |
From: Sameer R. <re...@gm...> - 2009-08-20 06:01:53
|
We are working on plotting mesh (in hermes2d: http://hpfem.math.unr.edu/projects/hermes2d-new/) We created a python function to plot mesh but initially without curves. Later we also tried to work on curved elements but we are having some problems. In the hermes2d examples curves are defined as [4, 7, 45] where 4,7 are vertices indices, and 45 is center angle. But in matplotlib we do not see any function to plot curve with these data, we have to convert them into something more useful to those functions available in matplotlib. For ex: 1) matplot.path porvides a way to plot curve with three points http://matplotlib.sourceforge.net/api/path_api.html#module-matplotlib.path p1 -> starting Point p2 -> control point p3 -> end point iI we want to go this way we do have p1 & p3 but have to calclate p2 (control point) 2) matplot.patch.arc provides a way to plot an arc http://matplotlib.sourceforge.net/api/artist_api.html#module-matplotlib.patches but it needs -> center of circle -> start angle -> end angle -> radius of circle we have to calculate all these with data available to us We didn't find other ways of plotting curves using matplotlib...and in our view method 1 is the best way for us because currently we have implemented matplotlib.path to draw mesh without curves, and it will be easy to fill color this way. We tried the method 1 but the result was a garbled mesh. I would appreciate if anybody could guide us how we can use the matplotlib functions to draw curved elements if we are given information as described above. Thanks |
From: marc d. <mde...@ya...> - 2009-08-20 04:33:18
|
How do I embed basemap in Tk? I tried following the matplotlib example. But the following does not work (the earth does not appear): import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure from mpl_toolkits.basemap import Basemap import Tkinter as Tk root = Tk.Tk() root.wm_title("Embedding in TK") f = Figure()#figsize=(5,4), dpi=100) map = Basemap(projection='ortho', lat_0=34.0,lon_0=-117.3, resolution='l' area_thresh=1000.) map.drawcoastlines() map.drawcountries() map.fillcontinents(color='coral') map.drawmapboundary() canvas = FigureCanvasTkAgg(f, master=root) canvas.show() canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) toolbar = NavigationToolbar2TkAgg( canvas, root ) toolbar.update() canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) Tk.mainloop() thanks... Marc Desmarais Long Beach, CA, 90814 |
From: Christopher B. <c-...@as...> - 2009-08-20 00:00:19
|
Thank you, Jae-Joon. Again. :) On 8/18/2009 2:49 PM, Jae-Joon Lee wrote: > I guess you're using 0.99? > Use spines instead. > > for example, > > gca().spines["bottom"].set_linewidth(2) # it only changes the > linewidth of the bottom spine. > > also, see this example, > > http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html#pylab-examples-spine-placement-demo > > Regards, > > -JJ > > > > On Tue, Aug 18, 2009 at 5:18 PM, Christopher Brown<c-...@as...> wrote: >> I have asked this question before. How do I set the linewidth of the >> axis frame? Long ago, I used gca().get_frame().set_linewidth(2). More >> recently, I used gca().frame.set_linewidth(2), but this doesn't seem to >> work anymore. I've tried gca().patch, to no avail. Any suggestions? >> >> Thanks. >> >> ------------------------------------------------------------------------------ >> 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 >> |
From: Eric A. <Ay...@ma...> - 2009-08-19 22:44:26
|
Thank you! This is just what I was looking for. I found an "undocumented feature", though: if you use spine.set_position(), the label on that spine goes away. -ea -- --- ----- ------- ----------- ------------- Dr. Eric Ayars Associate Professor of Physics California State University, Chico ay...@ma... On Aug 19, 2009, at 12:08 PM, John Hunter wrote: > On Thu, Aug 13, 2009 at 12:59 PM, Eric Ayars<Ay...@ma...> wrote: >> Hello, >> >> I've been using Gnuplot for years, but am quite impressed with what I >> see in matplotlib and am in the process of learning enough to switch. >> One item that I haven't been able to figure out yet is how to plot on >> an "open box". >> >> For example, in Gnuplot I would give the commands >> set xtics nomirror >> set ytics nomirror >> set border 3 >> and I would get a plot that only had left and bottom axes instead >> of a >> complete box. >> >> How do I get this "open box" plot with matplotlib? >> > > This is new in matplotlib 0.99 -- is this what you are looking for > > http://matplotlib.sourceforge.net/users/whats_new.html#axis-spine-placement > > JDH |
From: Werner F. B. <wer...@fr...> - 2009-08-19 21:21:11
|
Jae-Joon Lee wrote: > You need to adjust the positions of the ticks. > bar command (by default) creates boxes so that their left side > corresponds the first argument. > > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.bar > > so, in your case, something like below will work (0.4 from 0.8/2 where > 0.8 is the default width of the bar). > > axes.set_xticks([x+0.4 for x in indx]) > That does the trick. Thanks. Although I wonder why "align='center'" does not work for me. Will review the other samples and read the doc some more. Werner |
From: Werner F. B. <wer...@fr...> - 2009-08-19 21:20:58
|
Eric, Eric Firing wrote: > Werner F. Bruhin wrote: >> Werner F. Bruhin wrote: >> ... >>> Ideally I would like to have these labels printed at an angle. >> Put my glasses on and found the rotation property in the >> documentation, only issue left is centering the labels below the bars. > > Are you using the align='center' kwarg to bar()? No I did not, tried it but no change. Werner |
From: John H. <jd...@gm...> - 2009-08-19 21:09:34
|
On Wed, Aug 19, 2009 at 3:25 PM, Christophe Dupre<chr...@vh...> wrote: > I just saw the email below from John, and I was wondering why using compound > paths are "goo-gobs" faster than using rectangles(patches)? > > I've been using the candlestick function quite a bit lately. I guess using > compound paths could make the candlestick function faster. I'll give it a > try. > I haven't profiled it, so the go-gobs was a bit speculative, but each Rectangle is a separate object with a separate graphics context and a separate draw step. By moving all this into a single object, the compound path, you get a lot of savings. JDH |
From: Christophe D. <chr...@vh...> - 2009-08-19 20:25:24
|
I just saw the email below from John, and I was wondering why using compound paths are "goo-gobs" faster than using rectangles(patches)? I've been using the candlestick function quite a bit lately. I guess using compound paths could make the candlestick function faster. I'll give it a try. Regards, Christophe -----Original Message----- From: John Hunter [mailto:jd...@gm...] Sent: Sat 08/08/2009 09:00 To: Kaushik Ghose Cc: mat...@li... Subject: Re: [Matplotlib-users] animate histogram On Sat, Aug 8, 2009 at 6:17 AM, Kaushik Ghose<Kau...@hm...> wrote: > (http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Rectangle) > e.g. set_height() to change the rectangles? > > e.g. code > ------------------------------ > import pylab > x = pylab.rand(20) > h = pylab.hist(x) > h[2][0].set_height(1) > pylab.draw() > -------------------------------- This is the right idea, but it is likely to be slow for animation, since each rectangle is a separate mpl object, each with its own graphics contexs, rendering step, etc. bar and hist were very early functions which I wrote before we had collections and compound paths. If I were rewriting it from scratch, I would use a compound path. It's a little more work upfront because you have to manually compute the vertices and path codes, but it will be goo-gobs faster. Here is the animated histogram for tk using compound paths """ This example shows how to use a path patch to draw a bunch of rectangles for an animated histogram """ import numpy as np import matplotlib matplotlib.use('TkAgg') # do this before importing pylab import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.path as path fig = plt.figure() ax = fig.add_subplot(111) # histogram our data with numpy data = np.random.randn(1000) n, bins = np.histogram(data, 100) # get the corners of the rectangles for the histogram left = np.array(bins[:-1]) right = np.array(bins[1:]) bottom = np.zeros(len(left)) top = bottom + n nrects = len(left) # here comes the tricky part -- we have to set up the vertex and path # codes arrays using moveto, lineto and closepoly # for each rect: 1 for the MOVETO, 3 for the LINETO, 1 for the # CLOSEPOLY; the vert for the closepoly is ignored but we still need # it to keep the codes aligned with the vertices nverts = nrects*(1+3+1) verts = np.zeros((nverts, 2)) codes = np.ones(nverts, int) * path.Path.LINETO codes[0::5] = path.Path.MOVETO codes[4::5] = path.Path.CLOSEPOLY verts[0::5,0] = left verts[0::5,1] = bottom verts[1::5,0] = left verts[1::5,1] = top verts[2::5,0] = right verts[2::5,1] = top verts[3::5,0] = right verts[3::5,1] = bottom barpath = path.Path(verts, codes) patch = patches.PathPatch(barpath, facecolor='green', edgecolor='yellow', alpha=0.5) ax.add_patch(patch) ax.set_xlim(left[0], right[-1]) ax.set_ylim(bottom.min(), top.max()) def animate(): # simulate new data coming in data = np.random.randn(1000) n, bins = np.histogram(data, 100) top = bottom + n verts[1::5,1] = top verts[2::5,1] = top fig.canvas.draw() def run(): for i in range(100): fig.canvas.manager.window.after(100, animate) fig.canvas.manager.window.after(100, run) plt.show() No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.49/2295 - Release Date: 08/14/09 06:10:00 |
From: John H. <jd...@gm...> - 2009-08-19 19:18:32
|
On Tue, Aug 18, 2009 at 3:55 AM, M. Hecht<mhe...@in...> wrote: > The first figure is drawn without problems but after closing it (by clicking > the cross in the upper > right corner of the window) the second figure cannot be plot anymore. What I > wanted to do was > to visualize all selected files of a directory one after the other. To do > this I want to close the old > figure and then the new figure should com up as long as there is a file to > visualize left. Unfortunaltely > only the first figure is shown as in the simple example. > So, what's wrong We don't really have support for blocking input where a program is halted until you close the open figure, and then the next one loads. You could write something using event handling, where on a key press event the next figure was loaded. You may also be able to use ginput here, which will give you a blocking input function. See http://matplotlib.sourceforge.net/users/shell.html http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure.ginput http://matplotlib.sourceforge.net/users/event_handling.html http://matplotlib.sourceforge.net/examples/pylab_examples/ginput_demo.html |
From: John H. <jd...@gm...> - 2009-08-19 19:08:41
|
On Thu, Aug 13, 2009 at 12:59 PM, Eric Ayars<Ay...@ma...> wrote: > Hello, > > I've been using Gnuplot for years, but am quite impressed with what I > see in matplotlib and am in the process of learning enough to switch. > One item that I haven't been able to figure out yet is how to plot on > an "open box". > > For example, in Gnuplot I would give the commands > set xtics nomirror > set ytics nomirror > set border 3 > and I would get a plot that only had left and bottom axes instead of a > complete box. > > How do I get this "open box" plot with matplotlib? > This is new in matplotlib 0.99 -- is this what you are looking for http://matplotlib.sourceforge.net/users/whats_new.html#axis-spine-placement JDH |
From: John H. <jd...@gm...> - 2009-08-19 19:04:25
|
On Thu, Aug 13, 2009 at 12:51 PM, Erik Schweller<oth...@gm...> wrote: > Good day, > > I've hit an issue that may be a bug. In a previous version of > matplotlib (.98.x) I had a picker set for lines plotted on two axes. > This was working until I upgraded to version 0.99.0. Now the first > axes's pick events never seem to fire even though they respond true if > queried with pickable(). The second axes's pick events still fire. > > Using the example below, clicking on the left y's line will never > print anything, but the sin from the right will if clicked on. I'm not sure why it worked before -- that surprises me. Only one axes can receive the pick event currently, so if you have overlapping axes, as you do with twinx, the one with the highest zorder will receive the pick events. By default, the zorder by the Axes is 0, so you could raise the twinx axes, by increaseing the zorder ax2.set_zorder(0.1) and then the line on that axes will respond to the pick events. With some work, we might be able to support multiple overlapping axes handling a single pick event. JDH |
From: Kim, Dae-W. <dw...@gm...> - 2009-08-19 18:49:14
|
The one 'preliminary' solution I found is using an interactive mode + raw_input. Here is and example, ion() plot([1,2,3,4,5]) raw_input('Type Enter') clf() plot([1,2,3,4,5]) raw_input('Type_Enter') clf() plot([1,2,3,4,5]) show() With this approach, I can press the enter when I want to see next figure. Though It's not as convenient as 'multiple show()'.. On Wed, Aug 19, 2009 at 1:57 PM, Kim, Dae-Won <dw...@gm...> wrote: > > > On Wed, Aug 19, 2009 at 1:02 PM, Ryan May <rm...@gm...> wrote: > >> On Wed, Aug 19, 2009 at 11:55 AM, coati <dw...@gm...> wrote: >> >>> >>> I have a problem with show() command in my macbook machine (Leopard >>> 10.5.8). >>> For example, if I run the script shown below >>> (let assume it is saved as 'test.py', and I run a command 'python >>> test.py'), >>> >>> --------------------------------------- >>> >>> plot([1,2,3,4,5]) >>> show() #first window >>> plot([1,2,3,4,5]) >>> show() #second window >>> plot([1,2,3,4,5]) >>> show() #third window >>> >>> --------------------------------------- >>> >>> Then the first window just pops up and I can see a beautiful straight >>> line >>> :) No problem so far. >>> But, after I close the first window by clicking the close button of the >>> window, >>> other two window (second and third) just pops up and close themselves >>> instantly >>> even though I didn't click the close button... >>> Also, the second and third plot is shown in the same window. >>> >>> I don't have such problem in my Ubuntu machine.. >>> >>> Does anybody know reasons? >> >> >> show() actually handles starting the GUI mainloop, so you really shouldn't >> be calling it more than once from a script. Quite frankly, it's more >> amazing that it works on your Ubuntu macine. :) If you're wanting 3 >> separate windows, try: >> >> plot([1,2,3,4,5]) >> figure() >> plot([1,2,3,4,5]) >> figure() >> plot([1,2,3,4,5]) >> show() >> >> Ryan >> >> -- >> Ryan May >> Graduate Research Assistant >> School of Meteorology >> University of Oklahoma >> > > > Thanks Ryan, > > Hm.. it's a bit strange.. I just installed matplotlib at Ubuntu using the > package manager :) > And, another linux machines (red hat enterprise) can do this too. For the > RHELs, I compiled matplotlib source code by myself. > > > figure() works very well, but what I want to do is to check the plots one > by one and thus > I can exit the script at any time I want (because I usually have lots of > figures to check and I don't want > to pop up every of them at the same time..) > > > Anyway, thank you very much! > > > |
From: Ryan M. <rm...@gm...> - 2009-08-19 18:44:37
|
On Tue, Aug 18, 2009 at 3:55 AM, M. Hecht <mhe...@in...>wrote: > > Hello, > > I'm totally new to matplotlib, so sorry if the question is stupid. > > I'm trying this slightly modified example from the examples page > > from pylab import * > A = rand(5,5) > figure(1) > imshow(A, interpolation='bicubic') > show() > close(1) > > A = rand(5,5) > figure(2) > imshow(A, interpolation='bicubic') > show() > close(2) > > The first figure is drawn without problems but after closing it (by > clicking > the cross in the upper > right corner of the window) the second figure cannot be plot anymore. What > I > wanted to do was > to visualize all selected files of a directory one after the other. To do > this I want to close the old > figure and then the new figure should com up as long as there is a file to > visualize left. Unfortunaltely > only the first figure is shown as in the simple example. > So, what's wrong? Calling show() multiple times is not supported. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
From: Darren D. <dsd...@gm...> - 2009-08-19 18:33:05
|
On Thu, Aug 13, 2009 at 1:21 PM, William Miner<wil...@en...> wrote: > When will a version of Matplotlib be available that’s compatible with Python > 2.6? matplotlib-0.99 is compatible with python 2.6 |
From: Chuck Pepe-R. <cp...@mi...> - 2009-08-19 18:27:55
|
Michael, Thanks, I rebuilt and now hist is working again. - Chuck On Wed, Aug 19, 2009 at 12:08 PM, Michael Droettboom <md...@st...>wrote: > Have you tried removing the build directory to force a full rebuild? > draw_gouraud_triangle was recently added to the _backend_agg extension, so I > would guess for some reason it is still loading an old version of that > extension. If forcing the full rebuild doesn't help, can you send the > output of your build? > > Cheers, > Mike > > > On 08/19/2009 10:59 AM, Chuck Pepe-Ranney wrote: > > I am using the svn matplotlib (1.0.svn) and when I try to plot a histogram > I get an AttributeError for draw_gouraud_triangle (traceback below). I have > not had this problem in the past. Is anyone else experiencing this? > Thanks, > - Chuck > > In [3]: x = mu + sigma*randn(100000) > > In [4]: hist(x, 50, normed=1) > Out[4]: > (array([ 7.75874990e-06, 3.87937495e-06, 1.16381249e-05, > 1.55174998e-05, 2.32762497e-05, 5.81906243e-05, > 1.08622499e-04, 1.90089373e-04, 3.06470621e-04, > 4.65524994e-04, 6.63373117e-04, 1.13277749e-03, > 1.81942685e-03, 2.57590497e-03, 3.74359683e-03, > 5.14405118e-03, 7.07985929e-03, 8.96135614e-03, > 1.12695842e-02, 1.40937692e-02, 1.68791604e-02, > 1.98623997e-02, 2.23839935e-02, 2.42577316e-02, > 2.57629290e-02, 2.64883722e-02, 2.65194072e-02, > 2.52353341e-02, 2.41995409e-02, 2.24305460e-02, > 2.01727497e-02, 1.67782967e-02, 1.41829948e-02, > 1.20764942e-02, 9.27170613e-03, 6.88589054e-03, > 5.33414056e-03, 3.73971745e-03, 2.76211497e-03, > 1.85822060e-03, 1.20648561e-03, 8.30186239e-04, > 4.65524994e-04, 2.79314996e-04, 1.70692498e-04, > 9.69843738e-05, 8.14668740e-05, 3.10349996e-05, > 3.87937495e-06, 1.55174998e-05]), > array([ 32.88436884, 35.46210369, 38.03983854, 40.61757339, > 43.19530823, 45.77304308, 48.35077793, 50.92851278, > 53.50624763, 56.08398247, 58.66171732, 61.23945217, > 63.81718702, 66.39492187, 68.97265671, 71.55039156, > 74.12812641, 76.70586126, 79.28359611, 81.86133096, > 84.4390658 , 87.01680065, 89.5945355 , 92.17227035, > 94.7500052 , 97.32774004, 99.90547489, 102.48320974, > 105.06094459, 107.63867944, 110.21641429, 112.79414913, > 115.37188398, 117.94961883, 120.52735368, 123.10508853, > 125.68282337, 128.26055822, 130.83829307, 133.41602792, > 135.99376277, 138.57149761, 141.14923246, 143.72696731, > 146.30470216, 148.88243701, 151.46017186, 154.0379067 , > 156.61564155, 159.1933764 , 161.77111125]), > <a list of 50 Patch objects>) > > Exception in Tkinter callback > Traceback (most recent call last): > File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1417, in __call__ > return self.func(*args) > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py", > line 212, in resize > self.show() > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py", > line 215, in draw > FigureCanvasAgg.draw(self) > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", > line 377, in draw > self.renderer = self.get_renderer() > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", > line 388, in get_renderer > self.renderer = RendererAgg(w, h, self.figure.dpi) > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", > line 65, in __init__ > self._update_methods() > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", > line 82, in _update_methods > self.draw_gouraud_triangle = self._renderer.draw_gouraud_triangle > AttributeError: draw_gouraud_triangle > > ------------------------------ > > ------------------------------------------------------------------------------ > 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 lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > |
From: Michael F. <ast...@gm...> - 2009-08-19 18:26:02
|
Hi all, I've come across an apparent bug in imshow when outputting to PDF and EPS files. (I haven't tested other vector formats.) It manifests as a small scaling error between the raster image and the axes coordinates. I have attached a test script to illustrate the problem. The (correct) PNG output file shows a green 'X' at the common point between four pixels near the center of the raster image. The extent is chosen such that the coordinates refer to pixel centers. The PDF and EPS output files show a misalignment between the X and the pixel boundaries -- zoom in to see it clearly. Also, the topmost row and rightmost column appear truncated. I did some digging to see if I could figure out how the image scale was being mangled. I had a hunch that it was due to some interaction between fixed-72-dpi code, rounding the number of pixels, and subsequent rescaling. However, the image scale still seems to be off even when the dpi setting is a multiple of 72. I am using svn r7395 on OSX 10.4.11. I previously posted to the matplotlib-devel list, but perhaps the larger audience here can help. Can anyone confirm this bug? I have added it to the sourceforge tracker, ID 2832896. https://sourceforge.net/tracker/?func=detail&aid=2832896&group_id=80706&atid=560720 Thank you for the attention, Mike |
From: Michael D. <md...@st...> - 2009-08-19 18:10:42
|
Have you tried removing the build directory to force a full rebuild? draw_gouraud_triangle was recently added to the _backend_agg extension, so I would guess for some reason it is still loading an old version of that extension. If forcing the full rebuild doesn't help, can you send the output of your build? Cheers, Mike On 08/19/2009 10:59 AM, Chuck Pepe-Ranney wrote: > I am using the svn matplotlib (1.0.svn) and when I try to plot a > histogram I get an AttributeError for draw_gouraud_triangle (traceback > below). I have not had this problem in the past. Is anyone else > experiencing this? > Thanks, > - Chuck > > In [3]: x = mu + sigma*randn(100000) > > In [4]: hist(x, 50, normed=1) > Out[4]: > (array([ 7.75874990e-06, 3.87937495e-06, 1.16381249e-05, > 1.55174998e-05, 2.32762497e-05, 5.81906243e-05, > 1.08622499e-04, 1.90089373e-04, 3.06470621e-04, > 4.65524994e-04, 6.63373117e-04, 1.13277749e-03, > 1.81942685e-03, 2.57590497e-03, 3.74359683e-03, > 5.14405118e-03, 7.07985929e-03, 8.96135614e-03, > 1.12695842e-02, 1.40937692e-02, 1.68791604e-02, > 1.98623997e-02, 2.23839935e-02, 2.42577316e-02, > 2.57629290e-02, 2.64883722e-02, 2.65194072e-02, > 2.52353341e-02, 2.41995409e-02, 2.24305460e-02, > 2.01727497e-02, 1.67782967e-02, 1.41829948e-02, > 1.20764942e-02, 9.27170613e-03, 6.88589054e-03, > 5.33414056e-03, 3.73971745e-03, 2.76211497e-03, > 1.85822060e-03, 1.20648561e-03, 8.30186239e-04, > 4.65524994e-04, 2.79314996e-04, 1.70692498e-04, > 9.69843738e-05, 8.14668740e-05, 3.10349996e-05, > 3.87937495e-06, 1.55174998e-05]), > array([ 32.88436884, 35.46210369, 38.03983854, 40.61757339, > 43.19530823, 45.77304308, 48.35077793, 50.92851278, > 53.50624763, 56.08398247, 58.66171732, 61.23945217, > 63.81718702, 66.39492187, 68.97265671, 71.55039156, > 74.12812641, 76.70586126, 79.28359611, 81.86133096, > 84.4390658 , 87.01680065, 89.5945355 , 92.17227035, > 94.7500052 , 97.32774004, 99.90547489, 102.48320974, > 105.06094459, 107.63867944, 110.21641429, 112.79414913, > 115.37188398, 117.94961883, 120.52735368, 123.10508853, > 125.68282337, 128.26055822, 130.83829307, 133.41602792, > 135.99376277, 138.57149761, 141.14923246, 143.72696731, > 146.30470216, 148.88243701, 151.46017186, 154.0379067 , > 156.61564155, 159.1933764 , 161.77111125]), > <a list of 50 Patch objects>) > > Exception in Tkinter callback > Traceback (most recent call last): > File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1417, in __call__ > return self.func(*args) > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py", > line 212, in resize > self.show() > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py", > line 215, in draw > FigureCanvasAgg.draw(self) > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", > line 377, in draw > self.renderer = self.get_renderer() > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", > line 388, in get_renderer > self.renderer = RendererAgg(w, h, self.figure.dpi) > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", > line 65, in __init__ > self._update_methods() > File > "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", > line 82, in _update_methods > self.draw_gouraud_triangle = self._renderer.draw_gouraud_triangle > AttributeError: draw_gouraud_triangle > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > 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 > |
From: Chuck Pepe-R. <cp...@mi...> - 2009-08-19 17:59:42
|
I am using the svn matplotlib (1.0.svn) and when I try to plot a histogram I get an AttributeError for draw_gouraud_triangle (traceback below). I have not had this problem in the past. Is anyone else experiencing this? Thanks, - Chuck In [3]: x = mu + sigma*randn(100000) In [4]: hist(x, 50, normed=1) Out[4]: (array([ 7.75874990e-06, 3.87937495e-06, 1.16381249e-05, 1.55174998e-05, 2.32762497e-05, 5.81906243e-05, 1.08622499e-04, 1.90089373e-04, 3.06470621e-04, 4.65524994e-04, 6.63373117e-04, 1.13277749e-03, 1.81942685e-03, 2.57590497e-03, 3.74359683e-03, 5.14405118e-03, 7.07985929e-03, 8.96135614e-03, 1.12695842e-02, 1.40937692e-02, 1.68791604e-02, 1.98623997e-02, 2.23839935e-02, 2.42577316e-02, 2.57629290e-02, 2.64883722e-02, 2.65194072e-02, 2.52353341e-02, 2.41995409e-02, 2.24305460e-02, 2.01727497e-02, 1.67782967e-02, 1.41829948e-02, 1.20764942e-02, 9.27170613e-03, 6.88589054e-03, 5.33414056e-03, 3.73971745e-03, 2.76211497e-03, 1.85822060e-03, 1.20648561e-03, 8.30186239e-04, 4.65524994e-04, 2.79314996e-04, 1.70692498e-04, 9.69843738e-05, 8.14668740e-05, 3.10349996e-05, 3.87937495e-06, 1.55174998e-05]), array([ 32.88436884, 35.46210369, 38.03983854, 40.61757339, 43.19530823, 45.77304308, 48.35077793, 50.92851278, 53.50624763, 56.08398247, 58.66171732, 61.23945217, 63.81718702, 66.39492187, 68.97265671, 71.55039156, 74.12812641, 76.70586126, 79.28359611, 81.86133096, 84.4390658 , 87.01680065, 89.5945355 , 92.17227035, 94.7500052 , 97.32774004, 99.90547489, 102.48320974, 105.06094459, 107.63867944, 110.21641429, 112.79414913, 115.37188398, 117.94961883, 120.52735368, 123.10508853, 125.68282337, 128.26055822, 130.83829307, 133.41602792, 135.99376277, 138.57149761, 141.14923246, 143.72696731, 146.30470216, 148.88243701, 151.46017186, 154.0379067 , 156.61564155, 159.1933764 , 161.77111125]), <a list of 50 Patch objects>) Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1417, in __call__ return self.func(*args) File "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py", line 212, in resize self.show() File "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_tkagg.py", line 215, in draw FigureCanvasAgg.draw(self) File "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", line 377, in draw self.renderer = self.get_renderer() File "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", line 388, in get_renderer self.renderer = RendererAgg(w, h, self.figure.dpi) File "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", line 65, in __init__ self._update_methods() File "/home/chuck/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_agg.py", line 82, in _update_methods self.draw_gouraud_triangle = self._renderer.draw_gouraud_triangle AttributeError: draw_gouraud_triangle |
From: Kim, Dae-W. <dw...@gm...> - 2009-08-19 17:57:43
|
On Wed, Aug 19, 2009 at 1:02 PM, Ryan May <rm...@gm...> wrote: > On Wed, Aug 19, 2009 at 11:55 AM, coati <dw...@gm...> wrote: > >> >> I have a problem with show() command in my macbook machine (Leopard >> 10.5.8). >> For example, if I run the script shown below >> (let assume it is saved as 'test.py', and I run a command 'python >> test.py'), >> >> --------------------------------------- >> >> plot([1,2,3,4,5]) >> show() #first window >> plot([1,2,3,4,5]) >> show() #second window >> plot([1,2,3,4,5]) >> show() #third window >> >> --------------------------------------- >> >> Then the first window just pops up and I can see a beautiful straight line >> :) No problem so far. >> But, after I close the first window by clicking the close button of the >> window, >> other two window (second and third) just pops up and close themselves >> instantly >> even though I didn't click the close button... >> Also, the second and third plot is shown in the same window. >> >> I don't have such problem in my Ubuntu machine.. >> >> Does anybody know reasons? > > > show() actually handles starting the GUI mainloop, so you really shouldn't > be calling it more than once from a script. Quite frankly, it's more > amazing that it works on your Ubuntu macine. :) If you're wanting 3 > separate windows, try: > > plot([1,2,3,4,5]) > figure() > plot([1,2,3,4,5]) > figure() > plot([1,2,3,4,5]) > show() > > Ryan > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > Thanks Ryan, Hm.. it's a bit strange.. I just installed matplotlib at Ubuntu using the package manager :) And, another linux machines (red hat enterprise) can do this too. For the RHELs, I compiled matplotlib source code by myself. figure() works very well, but what I want to do is to check the plots one by one and thus I can exit the script at any time I want (because I usually have lots of figures to check and I don't want to pop up every of them at the same time..) Anyway, thank you very much! |
From: Ryan M. <rm...@gm...> - 2009-08-19 17:02:53
|
On Wed, Aug 19, 2009 at 11:55 AM, coati <dw...@gm...> wrote: > > I have a problem with show() command in my macbook machine (Leopard > 10.5.8). > For example, if I run the script shown below > (let assume it is saved as 'test.py', and I run a command 'python > test.py'), > > --------------------------------------- > > plot([1,2,3,4,5]) > show() #first window > plot([1,2,3,4,5]) > show() #second window > plot([1,2,3,4,5]) > show() #third window > > --------------------------------------- > > Then the first window just pops up and I can see a beautiful straight line > :) No problem so far. > But, after I close the first window by clicking the close button of the > window, > other two window (second and third) just pops up and close themselves > instantly > even though I didn't click the close button... > Also, the second and third plot is shown in the same window. > > I don't have such problem in my Ubuntu machine.. > > Does anybody know reasons? show() actually handles starting the GUI mainloop, so you really shouldn't be calling it more than once from a script. Quite frankly, it's more amazing that it works on your Ubuntu macine. :) If you're wanting 3 separate windows, try: plot([1,2,3,4,5]) figure() plot([1,2,3,4,5]) figure() plot([1,2,3,4,5]) show() Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
From: coati <dw...@gm...> - 2009-08-19 16:55:40
|
I have a problem with show() command in my macbook machine (Leopard 10.5.8). For example, if I run the script shown below (let assume it is saved as 'test.py', and I run a command 'python test.py'), --------------------------------------- plot([1,2,3,4,5]) show() #first window plot([1,2,3,4,5]) show() #second window plot([1,2,3,4,5]) show() #third window --------------------------------------- Then the first window just pops up and I can see a beautiful straight line :) No problem so far. But, after I close the first window by clicking the close button of the window, other two window (second and third) just pops up and close themselves instantly even though I didn't click the close button... Also, the second and third plot is shown in the same window. I don't have such problem in my Ubuntu machine.. Does anybody know reasons? Thanks in advance!! -- View this message in context: http://www.nabble.com/show%28%29-problem-in-Mac-OS-X-10.5.8-tp25047335p25047335.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: George N. <gn...@go...> - 2009-08-19 16:24:08
|
Hi, I updated matplotlib to svn r 7506, but it won't build. I am having problems with the mac os backend: 10.5.8, gcc 4.0.1: python setup.py build install run from the matplotlib/matplotlib directory gives: ..... building 'matplotlib.backends._macosx' extension gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11R6/include -I/usr/X11/include -I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/_macosx.m -o build/temp.macosx-10.3-i386-2.5/src/_macosx.o src/_macosx.m:1885: error: syntax error before ‘setfont’ src/_macosx.m:1885: error: syntax error before ‘setfont’ src/_macosx.m: In function ‘setfont’:src/_macosx.m: In function ‘setfont’: src/_macosx.m:1895: error: ‘CTFontRef’ undeclared (first use in this function) Possibly some confusion about whether MAC_OS_X_VERSION_10_5 is defined?? --George Nurser. |
From: Scott S. <sco...@gm...> - 2009-08-19 06:09:50
|
> 2009/8/18 Pete Shepard <pet...@gm...>: > I have a list of X,Y coordinates and a ratio associated with each > coordinate. The X and Y coordinates are continuous but random from 50-500, I > would like to make a continuous heatmap of the ratios at each coordinate. > One caveat is that the coordinates are clustered together do some bixes > might have too little data. I am wondering if there is a way that R can > automatically adjust box sizes? Sample data set is below > > TIA > > X Y RATIO > 50 56 .1 > 50 59 .1 > 52 54 .2 > 500 393 .9 > 450 36 .7 > 250 190 .7 I'm not sure about R, this is a Python mailing list :) Are you trying to do something like this http://matplotlib.sourceforge.net/examples/pylab_examples/scatter_demo2.html or to interpolate your data from scattered points onto a regular grid? Cheers, Scott |
From: Jae-Joon L. <lee...@gm...> - 2009-08-18 22:41:13
|
On Mon, Aug 17, 2009 at 10:29 AM, Ole Streicher<ole...@gm...> wrote: > Hi, > > I want to show the same data on multiple plots. Is it possible to re-use > the Line2D object for that? t.m., > > line = axes1.plot(xdata, ydata, ...) > > ... > > axes2.lines.append(line) > > Or is a Line2D bound to a certain axes instance? > I guess you already know the answer as this can be easily tested. For the record, the answer is Yes, all matplotlib artists are bound to a certain axes. You may come up with some workaround by updating the axes-related properties before each draw call, but the easiest solution seems to be creating multiple artists. -JJ > Best regards > > Ole > > > > > ------------------------------------------------------------------------------ > 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 > |