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
(16) |
2
(16) |
3
(5) |
4
(4) |
5
(4) |
6
(10) |
7
(33) |
8
(11) |
9
(20) |
10
(7) |
11
(8) |
12
(18) |
13
(27) |
14
(21) |
15
(15) |
16
(10) |
17
(12) |
18
(3) |
19
(12) |
20
(12) |
21
(14) |
22
(32) |
23
(15) |
24
(20) |
25
(12) |
26
(32) |
27
(29) |
28
(17) |
29
(25) |
30
(12) |
31
(5) |
From: David M. <dav...@gm...> - 2010-07-28 14:40:41
|
Thanks so much guys! This finally worked! f=gcf() for i in f.canvas.callbacks.callbacks: if i=='key_press_event': f.canvas.mpl_disconnect(f.canvas.callbacks.callbacks[i].keys()[0]) Thanks! -David Aha! I thought you were using 1.0. For 1.0, these things are rc settings; I had no idea they even existed back in 0.99.0. I only tripped over "f" very recently. The key bindings are coded in the key_press() method of FigureManagerBase. The callback is connected to the canvas in the __init__ method. The trick is to disconnect the callback: fig = figure() fig.canvas.mpl_disconnect(3) plot([1,2,3]) Now key presses have no effect in that figure. The bad thing here is that I used the cid 3, a seemingly random number. I suspect, though, that once you find out what it is in your version of mpl (and it may still be 3), you will be able to rely on it for your purposes. To find it, print out fig.canvas.callbacks.callbacks and look for key_press_event. You could have your program use this dictionary to look it up. Eric |
From: Mario L. 2 <mar...@ub...> - 2010-07-28 14:10:25
|
Hello, I am trying to create clickable images for HTML. For transforming the coordinates in the examples I found they are using the function "seq_x_y()". But that function is not available anymore. How can I get transform the coordinates with the newer versions of Matplotlib? Thanks Mario |
From: Phil R. <phi...@as...> - 2010-07-28 00:57:02
|
Hi, I'm 6 months into learning python and haven't been able to find a way to do this, so I hope you don't mind a basic question. I'd like to use the polygons contour makes but I can't figure out how to get them from ContourSet. Any examples or links to helpful information would be excellent. Thanks, Phil -- Phil Rosenfield Graduate Student: UW Astronomy Additional contact info: http://www.astro.washington.edu/philrose |
From: Mathew Y. <mat...@gm...> - 2010-07-27 22:14:04
|
My bad. Since I wanted to draw a plane, I thought I wanted to use a polygon. Instead, using plot_surface I get what I want. -Mathew On Tue, Jul 27, 2010 at 1:40 PM, Mathew Yeates <mat...@gm...> wrote: > your code works fine. But I thought it wasnt working because when I do > zs=[0,0.1,0.2,0.3] > #pdb.set_trace() > poly = PolyCollection([verts]) > ax.add_collection3d(poly,zs=zs) > > I just get a flat plane. > > On Tue, Jul 27, 2010 at 12:50 PM, Eric Firing <ef...@ha...> wrote: >> On 07/27/2010 09:43 AM, Mathew Yeates wrote: >>> I tried >>> xs=[0,0,8,8] >>> ys=[0,8,8,0] >>> verts=zip(xs,ys) >>> poly = PolyCollection([verts]) >>> >>> already but it doesn't work >> >> Yes, I saw you say that, but---did you actually try running the script I >> attached? >> >> Please run it from the command line ("python pctest.py"), and if it >> fails, send the traceback. >> >> Eric >> >>> >>> on line 581 of collections.py >>> >>> there is >>> for xy in verts: >>> >>> but >>> verts=[[(0, 0), (0, 8), (8, 8), (8, 0)]] i.e. a list with a single element. >>> so the loop happens only once >>> >>> -Mathew >>> >>> >>> On Tue, Jul 27, 2010 at 12:29 PM, Eric Firing<ef...@ha...> wrote: >>>> On 07/27/2010 08:55 AM, Mathew Yeates wrote: >>>>> >>>>> I still get the error >>>>> ValueError: arrays must have same number of dimensions >>>>> at line 587 in collections.py >>>> >>>> I think you are not actually doing what you think you are doing, and what >>>> was explained by Tony. >>>> >>>> Try the attached script. >>>> >>>> Eric >>>> >>>>> >>>>> This is on Windows. >>>>> >>>>> >>>>> On Tue, Jul 27, 2010 at 11:42 AM, Eric Firing<ef...@ha...> wrote: >>>>>> >>>>>> On 07/27/2010 08:14 AM, Mathew Yeates wrote: >>>>>>> >>>>>>> I installed matplotlib 1.0 and now I get a different error >>>>>>> s=[0,0,8,8] >>>>>>> ys=[0,8,8,0] >>>>>>> verts=zip(xs,ys) >>>>>>> poly = PolyCollection(verts) >>>>>>> >>>>>>> fails at line 587 in collections because >>>>>>> xy = array([0, 0]) # xy.shape = (2,) >>>>>>> and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) >>>>>>> >>>>>>> What do I do? >>>>>> >>>>>> With 1.0: >>>>>> >>>>>> In [8]: verts >>>>>> Out[8]: [(0, 0), (0, 8), (8, 8), (8, 0)] >>>>>> >>>>>> In [9]: p = PolyCollection([verts]) >>>>>> >>>>>> Eric >>>>>> >>>>>>> >>>>>>> -Mathew >>>>>>> >>>>>>> >>>>>>> On Tue, Jul 27, 2010 at 9:51 AM, Mathew Yeates<mat...@gm...> >>>>>>> wrote: >>>>>>>> >>>>>>>> why doesn't this work? >>>>>>>> xs=[0,0,8,8] >>>>>>>> ys=[0,8,8,0] >>>>>>>> verts=zip(xs,ys) >>>>>>>> poly = PolyCollection(verts) >>>>>>>> >>>>>>>> >>>>>>>> I tried >>>>>>>> poly = PolyCollection([verts]) but that doesn't work either >>>>>>>> >>>>>>>> -Mathew >> >> ------------------------------------------------------------------------------ >> The Palm PDK Hot Apps Program offers developers who use the >> Plug-In Development Kit to bring their C/C++ apps to Palm for a share >> of $1 Million in cash or HP Products. Visit us here for more details: >> http://ad.doubleclick.net/clk;226879339;13503038;l? >> http://clk.atdmt.com/CRS/go/247765532/direct/01/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > |
From: Benjamin R. <ben...@ou...> - 2010-07-27 21:29:35
|
On Tue, Jul 27, 2010 at 3:10 PM, <cop...@gm...> wrote: > Hallo Ben Root, > > I put together some snippets > > #----CODE---- > import matplotlib.pyplot as plt > from matplotlib.patches import Circle > import mpl_toolkits.mplot3d.art3d as art3d > from mpl_toolkits.mplot3d import Axes3D > import numpy > import matplotlib > > step = 0.04 > maxval = 1.0 > > fig = plt.figure() > ax = Axes3D(fig,aspect='equal') > > ri = 0.625 > rj = 1.25 > l = 5 > > ##CONE > r = numpy.linspace(rj,rj,6) > r[0]= numpy.zeros(r[0].shape) > r[1] *= ri/rj > r[5] *= ri/rj > r[3]= numpy.zeros(r[3].shape) > > p = numpy.linspace(0,2*numpy.pi,50) > R,P = numpy.meshgrid(r,p) > > X,Y = R*numpy.cos(P),R*numpy.sin(P) > > tmp=list() > for i in range(50): > tmp.append([0,0,l,l,l,0]) > Z = numpy.array(tmp) > ax.plot_surface(X, Z,Y, rstride=1, cstride=1, color="b") > > ##CIRCLES > p=Circle((0,0),rj,color="red") > ax.add_patch(p) > art3d.patch_2d_to_3d(p, z=l, zdir="y") > > p=Circle((0,0),ri,color="red") > ax.add_patch(p) > art3d.patch_2d_to_3d(p, z=0, zdir="y") > > ax.set_ylim3d(-0.5, l+.5) > ax.set_xlim3d(-l*0.5-0.5, l*0.5+0.5) > ax.set_zlim3d(-l*0.5-0.5, l*0.5+0.5) > > plt.show() > #----CODE---- > > greetz > > Frank > Am 27.07.2010 21:36, schrieb Benjamin Root: > > On Tue, Jul 27, 2010 at 2:25 PM, <cop...@gm... > > <mailto:cop...@gm...>> wrote: > > > > Hallo, > > > > I got a depth problem with Axes3D. I made a plot_surface and add 2 > > Circle object with add_patch and > > mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. > > > > The problem is that the circles are always in front. I upload a > > picture here http://yfrog.com/nd3dproblemp . The gui is rotatable, > > so I can't just remove the second Circle (like I did for the > > screenshot). > > > > How to get right order to the object? > > > > greetz > > > > Frank > > > Thanks, At first glance, I am wondering if the problem is that the Circle objects are not properly getting a zsort value when converted to a 3d object. I will see if there is an inconsistency in behavior between different types of patches. Ben Root |
From: Mathew Y. <mat...@gm...> - 2010-07-27 20:40:47
|
your code works fine. But I thought it wasnt working because when I do zs=[0,0.1,0.2,0.3] #pdb.set_trace() poly = PolyCollection([verts]) ax.add_collection3d(poly,zs=zs) I just get a flat plane. On Tue, Jul 27, 2010 at 12:50 PM, Eric Firing <ef...@ha...> wrote: > On 07/27/2010 09:43 AM, Mathew Yeates wrote: >> I tried >> xs=[0,0,8,8] >> ys=[0,8,8,0] >> verts=zip(xs,ys) >> poly = PolyCollection([verts]) >> >> already but it doesn't work > > Yes, I saw you say that, but---did you actually try running the script I > attached? > > Please run it from the command line ("python pctest.py"), and if it > fails, send the traceback. > > Eric > >> >> on line 581 of collections.py >> >> there is >> for xy in verts: >> >> but >> verts=[[(0, 0), (0, 8), (8, 8), (8, 0)]] i.e. a list with a single element. >> so the loop happens only once >> >> -Mathew >> >> >> On Tue, Jul 27, 2010 at 12:29 PM, Eric Firing<ef...@ha...> wrote: >>> On 07/27/2010 08:55 AM, Mathew Yeates wrote: >>>> >>>> I still get the error >>>> ValueError: arrays must have same number of dimensions >>>> at line 587 in collections.py >>> >>> I think you are not actually doing what you think you are doing, and what >>> was explained by Tony. >>> >>> Try the attached script. >>> >>> Eric >>> >>>> >>>> This is on Windows. >>>> >>>> >>>> On Tue, Jul 27, 2010 at 11:42 AM, Eric Firing<ef...@ha...> wrote: >>>>> >>>>> On 07/27/2010 08:14 AM, Mathew Yeates wrote: >>>>>> >>>>>> I installed matplotlib 1.0 and now I get a different error >>>>>> s=[0,0,8,8] >>>>>> ys=[0,8,8,0] >>>>>> verts=zip(xs,ys) >>>>>> poly = PolyCollection(verts) >>>>>> >>>>>> fails at line 587 in collections because >>>>>> xy = array([0, 0]) # xy.shape = (2,) >>>>>> and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) >>>>>> >>>>>> What do I do? >>>>> >>>>> With 1.0: >>>>> >>>>> In [8]: verts >>>>> Out[8]: [(0, 0), (0, 8), (8, 8), (8, 0)] >>>>> >>>>> In [9]: p = PolyCollection([verts]) >>>>> >>>>> Eric >>>>> >>>>>> >>>>>> -Mathew >>>>>> >>>>>> >>>>>> On Tue, Jul 27, 2010 at 9:51 AM, Mathew Yeates<mat...@gm...> >>>>>> wrote: >>>>>>> >>>>>>> why doesn't this work? >>>>>>> xs=[0,0,8,8] >>>>>>> ys=[0,8,8,0] >>>>>>> verts=zip(xs,ys) >>>>>>> poly = PolyCollection(verts) >>>>>>> >>>>>>> >>>>>>> I tried >>>>>>> poly = PolyCollection([verts]) but that doesn't work either >>>>>>> >>>>>>> -Mathew > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Joe K. <jki...@wi...> - 2010-07-27 20:36:59
|
On Tue, Jul 27, 2010 at 1:37 PM, Friedrich Romstedt < fri...@gm...> wrote: > 2010/7/26 Mathew Yeates <mat...@gm...>: > > Is there a simple function call for this? And finding the distance of > > a point to the plane? > > Hmm, when you are interested in the z distance alone, it should be a > matrix equation: > > Z = X * m_x + Y * m_y + 1 * n > > Meaning you can invert it with Moore-Penrose pseudoinversion, i.e., > numpy.lstsq()? > > When you have weights on Z, normalise first. > > Friedrich Just one quick note on this: If you fit Z = aX + bY + c, you won't be able to resolve vertical planes. Likewise, if you fit x = aY + Bz + c or y = aX + bZ + c you won't be able to resolve horizontal planes. If you need to robustly fit a plane to a point cloud, you'll need to try all three formulations. See here for a quick example of what Friedrich mentioned using all three formulations and choosing the most robust result: http://code.google.com/p/python-geoprobe/source/browse/geoprobe/common.py#198 As far as finding the distance of a given point (x0, y0, z0) to the plane defined by "0 = ax + by + cz + d", the equation is just abs(a * x0 + b * y0 + c * z0 + d) / sqrt(a**2 + b**2 + c**2). See here<http://mathworld.wolfram.com/Point-PlaneDistance.html> for a more detailed explanation. -Joe |
From: <cop...@gm...> - 2010-07-27 20:10:27
|
Hallo Ben Root, I put together some snippets #----CODE---- import matplotlib.pyplot as plt from matplotlib.patches import Circle import mpl_toolkits.mplot3d.art3d as art3d from mpl_toolkits.mplot3d import Axes3D import numpy import matplotlib step = 0.04 maxval = 1.0 fig = plt.figure() ax = Axes3D(fig,aspect='equal') ri = 0.625 rj = 1.25 l = 5 ##CONE r = numpy.linspace(rj,rj,6) r[0]= numpy.zeros(r[0].shape) r[1] *= ri/rj r[5] *= ri/rj r[3]= numpy.zeros(r[3].shape) p = numpy.linspace(0,2*numpy.pi,50) R,P = numpy.meshgrid(r,p) X,Y = R*numpy.cos(P),R*numpy.sin(P) tmp=list() for i in range(50): tmp.append([0,0,l,l,l,0]) Z = numpy.array(tmp) ax.plot_surface(X, Z,Y, rstride=1, cstride=1, color="b") ##CIRCLES p=Circle((0,0),rj,color="red") ax.add_patch(p) art3d.patch_2d_to_3d(p, z=l, zdir="y") p=Circle((0,0),ri,color="red") ax.add_patch(p) art3d.patch_2d_to_3d(p, z=0, zdir="y") ax.set_ylim3d(-0.5, l+.5) ax.set_xlim3d(-l*0.5-0.5, l*0.5+0.5) ax.set_zlim3d(-l*0.5-0.5, l*0.5+0.5) plt.show() #----CODE---- greetz Frank Am 27.07.2010 21:36, schrieb Benjamin Root: > On Tue, Jul 27, 2010 at 2:25 PM, <cop...@gm... > <mailto:cop...@gm...>> wrote: > > Hallo, > > I got a depth problem with Axes3D. I made a plot_surface and add 2 > Circle object with add_patch and > mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. > > The problem is that the circles are always in front. I upload a > picture here http://yfrog.com/nd3dproblemp . The gui is rotatable, > so I can't just remove the second Circle (like I did for the > screenshot). > > How to get right order to the object? > > greetz > > Frank > > > Frank, > > Could you please include a script that reproduces this? There have been > some issues like this reported before, but it would only occur at > certain viewing angles. Is this problem occurring regardless of what > viewing angle you are looking at the plot? It would be useful to have > an example that *always* looks bad for fixing purposes. > > Ben Root |
From: John H. <jd...@gm...> - 2010-07-27 20:09:39
|
On Tue, Jul 27, 2010 at 2:50 PM, Eric Firing <ef...@ha...> wrote: > On 07/27/2010 09:43 AM, Mathew Yeates wrote: >> I tried >> xs=[0,0,8,8] >> ys=[0,8,8,0] >> verts=zip(xs,ys) >> poly = PolyCollection([verts]) >> >> already but it doesn't work > > Yes, I saw you say that, but---did you actually try running the script I > attached? > > Please run it from the command line ("python pctest.py"), and if it > fails, send the traceback. The reason Eric suggests running it from the command line is because if you are running a persistent python session with a current figure/axes, the old, bad collection may still be residing in your axes. Running from the command line will insure a clean environment. To test whether this explanation is correct, run plt.close('all') before rerunning your code. But do take Eric's suggestion to run from the shell and post output. |
From: Eric F. <ef...@ha...> - 2010-07-27 19:51:02
|
On 07/27/2010 09:43 AM, Mathew Yeates wrote: > I tried > xs=[0,0,8,8] > ys=[0,8,8,0] > verts=zip(xs,ys) > poly = PolyCollection([verts]) > > already but it doesn't work Yes, I saw you say that, but---did you actually try running the script I attached? Please run it from the command line ("python pctest.py"), and if it fails, send the traceback. Eric > > on line 581 of collections.py > > there is > for xy in verts: > > but > verts=[[(0, 0), (0, 8), (8, 8), (8, 0)]] i.e. a list with a single element. > so the loop happens only once > > -Mathew > > > On Tue, Jul 27, 2010 at 12:29 PM, Eric Firing<ef...@ha...> wrote: >> On 07/27/2010 08:55 AM, Mathew Yeates wrote: >>> >>> I still get the error >>> ValueError: arrays must have same number of dimensions >>> at line 587 in collections.py >> >> I think you are not actually doing what you think you are doing, and what >> was explained by Tony. >> >> Try the attached script. >> >> Eric >> >>> >>> This is on Windows. >>> >>> >>> On Tue, Jul 27, 2010 at 11:42 AM, Eric Firing<ef...@ha...> wrote: >>>> >>>> On 07/27/2010 08:14 AM, Mathew Yeates wrote: >>>>> >>>>> I installed matplotlib 1.0 and now I get a different error >>>>> s=[0,0,8,8] >>>>> ys=[0,8,8,0] >>>>> verts=zip(xs,ys) >>>>> poly = PolyCollection(verts) >>>>> >>>>> fails at line 587 in collections because >>>>> xy = array([0, 0]) # xy.shape = (2,) >>>>> and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) >>>>> >>>>> What do I do? >>>> >>>> With 1.0: >>>> >>>> In [8]: verts >>>> Out[8]: [(0, 0), (0, 8), (8, 8), (8, 0)] >>>> >>>> In [9]: p = PolyCollection([verts]) >>>> >>>> Eric >>>> >>>>> >>>>> -Mathew >>>>> >>>>> >>>>> On Tue, Jul 27, 2010 at 9:51 AM, Mathew Yeates<mat...@gm...> >>>>> wrote: >>>>>> >>>>>> why doesn't this work? >>>>>> xs=[0,0,8,8] >>>>>> ys=[0,8,8,0] >>>>>> verts=zip(xs,ys) >>>>>> poly = PolyCollection(verts) >>>>>> >>>>>> >>>>>> I tried >>>>>> poly = PolyCollection([verts]) but that doesn't work either >>>>>> >>>>>> -Mathew |
From: Mathew Y. <mat...@gm...> - 2010-07-27 19:43:06
|
I tried xs=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection([verts]) already but it doesn't work on line 581 of collections.py there is for xy in verts: but verts=[[(0, 0), (0, 8), (8, 8), (8, 0)]] i.e. a list with a single element. so the loop happens only once -Mathew On Tue, Jul 27, 2010 at 12:29 PM, Eric Firing <ef...@ha...> wrote: > On 07/27/2010 08:55 AM, Mathew Yeates wrote: >> >> I still get the error >> ValueError: arrays must have same number of dimensions >> at line 587 in collections.py > > I think you are not actually doing what you think you are doing, and what > was explained by Tony. > > Try the attached script. > > Eric > >> >> This is on Windows. >> >> >> On Tue, Jul 27, 2010 at 11:42 AM, Eric Firing<ef...@ha...> wrote: >>> >>> On 07/27/2010 08:14 AM, Mathew Yeates wrote: >>>> >>>> I installed matplotlib 1.0 and now I get a different error >>>> s=[0,0,8,8] >>>> ys=[0,8,8,0] >>>> verts=zip(xs,ys) >>>> poly = PolyCollection(verts) >>>> >>>> fails at line 587 in collections because >>>> xy = array([0, 0]) # xy.shape = (2,) >>>> and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) >>>> >>>> What do I do? >>> >>> With 1.0: >>> >>> In [8]: verts >>> Out[8]: [(0, 0), (0, 8), (8, 8), (8, 0)] >>> >>> In [9]: p = PolyCollection([verts]) >>> >>> Eric >>> >>>> >>>> -Mathew >>>> >>>> >>>> On Tue, Jul 27, 2010 at 9:51 AM, Mathew Yeates<mat...@gm...> >>>> wrote: >>>>> >>>>> why doesn't this work? >>>>> xs=[0,0,8,8] >>>>> ys=[0,8,8,0] >>>>> verts=zip(xs,ys) >>>>> poly = PolyCollection(verts) >>>>> >>>>> >>>>> I tried >>>>> poly = PolyCollection([verts]) but that doesn't work either >>>>> >>>>> -Mathew > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Paul I. <piv...@gm...> - 2010-07-27 19:41:26
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tony S Yu, on 07/27/2010 11:53 AM, wrote: > On Jul 27, 2010, at 1:31 PM, ms wrote: >> On 27/07/10 15:05, Benjamin Root wrote: >>> On Tue, Jul 27, 2010 at 6:01 AM, German Ocampo<ger...@gm...> wrote: >>>> Good morning >>>> >>>> Do you know where I could get examples of case stories about >>>> commercial or open source software that has been developed using the >>>> Matplotlib library? >>>> >>>> Many Thanks >>>> >>>> German >>>> >>> German, >>> >>> Interesting idea. Might be something nice to add to the project page, >>> maybe? >> >> I have no ready "case story" about it, but I developed and published a >> MPL-based open source software here: >> >> http://code.google.com/p/hooke >> >> which has been presented in a peer-reviewed academic publication on >> "Bioinformatics" ( >> http://bioinformatics.oxfordjournals.org/cgi/content/abstract/btp180?ijkey=B9QGeobopuepKnZ&keytype=ref >> ) >> >> If you need information to build a "case story", ask me -perhaps I can >> help you if it's not too much work. >> >> cheers, >> M. > > > German, > > You might be interested in CellProfiler Analyst (http://www.cellprofiler.org/). Also, matplotlib is an optional dependency for FiPy (http://www.ctcms.nist.gov/fipy/). > > Best, > -Tony German, I've always loved the NASA JPL Mars mission story: see page 28 of this talk[1] by Fernando Perez, I inlined the highlight below: From: Name Elided <nam...@jp...> Date: Oct 2, 2007 7:15 PM Subject: Fwd: matplotlib bug numbers To: John Hunter <jd...@gm...> One of my lead developers mentioned that they had sent a bug to you about the annotations feature of MatPlotLib. Would you be able to let me know what the timeline is to resolve that bug? The reason is that the feature is needed for the Phoenix project and their arrival at Mars will be in March sometime, but they are doing their testing in the coming few months. This annotation feature is used on reports that present the analysis of the trajectory to the navigation team and it shows up on our schedule. It would really help me to know approximately when it could be resolved. [1] <http://fperez.org/talks/0904_parlab_scipy.pdf> best, Paul Ivanov - -- I only use the 314 gmail account for mailinglists. Please send off-list personal correspondence to my initials (two letters) at berkeley dot edu. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxPNloACgkQe+cmRQ8+KPelJACfVPTUXgceOEHeimYnKHbzN5o1 HzwAnjb7kcEUdC7w1m/tE0qhAemd8xL8 =75vU -----END PGP SIGNATURE----- |
From: Benjamin R. <ben...@ou...> - 2010-07-27 19:37:21
|
On Tue, Jul 27, 2010 at 2:25 PM, <cop...@gm...> wrote: > Hallo, > > I got a depth problem with Axes3D. I made a plot_surface and add 2 Circle > object with add_patch and mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. > > The problem is that the circles are always in front. I upload a picture > here http://yfrog.com/nd3dproblemp . The gui is rotatable, so I can't just > remove the second Circle (like I did for the screenshot). > > How to get right order to the object? > > greetz > > Frank > > Frank, Could you please include a script that reproduces this? There have been some issues like this reported before, but it would only occur at certain viewing angles. Is this problem occurring regardless of what viewing angle you are looking at the plot? It would be useful to have an example that *always* looks bad for fixing purposes. Ben Root |
From: Eric F. <ef...@ha...> - 2010-07-27 19:30:08
|
On 07/27/2010 08:55 AM, Mathew Yeates wrote: > I still get the error > ValueError: arrays must have same number of dimensions > at line 587 in collections.py I think you are not actually doing what you think you are doing, and what was explained by Tony. Try the attached script. Eric > > This is on Windows. > > > On Tue, Jul 27, 2010 at 11:42 AM, Eric Firing<ef...@ha...> wrote: >> On 07/27/2010 08:14 AM, Mathew Yeates wrote: >>> I installed matplotlib 1.0 and now I get a different error >>> s=[0,0,8,8] >>> ys=[0,8,8,0] >>> verts=zip(xs,ys) >>> poly = PolyCollection(verts) >>> >>> fails at line 587 in collections because >>> xy = array([0, 0]) # xy.shape = (2,) >>> and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) >>> >>> What do I do? >> >> With 1.0: >> >> In [8]: verts >> Out[8]: [(0, 0), (0, 8), (8, 8), (8, 0)] >> >> In [9]: p = PolyCollection([verts]) >> >> Eric >> >>> >>> -Mathew >>> >>> >>> On Tue, Jul 27, 2010 at 9:51 AM, Mathew Yeates<mat...@gm...> wrote: >>>> why doesn't this work? >>>> xs=[0,0,8,8] >>>> ys=[0,8,8,0] >>>> verts=zip(xs,ys) >>>> poly = PolyCollection(verts) >>>> >>>> >>>> I tried >>>> poly = PolyCollection([verts]) but that doesn't work either >>>> >>>> -Mathew |
From: <cop...@gm...> - 2010-07-27 19:25:40
|
Hallo, I got a depth problem with Axes3D. I made a plot_surface and add 2 Circle object with add_patch and mpl_toolkits.mplot3d.art3d.patch_2d_to_3d. The problem is that the circles are always in front. I upload a picture here http://yfrog.com/nd3dproblemp . The gui is rotatable, so I can't just remove the second Circle (like I did for the screenshot). How to get right order to the object? greetz Frank |
From: Mathew Y. <mat...@gm...> - 2010-07-27 18:55:20
|
I still get the error ValueError: arrays must have same number of dimensions at line 587 in collections.py This is on Windows. On Tue, Jul 27, 2010 at 11:42 AM, Eric Firing <ef...@ha...> wrote: > On 07/27/2010 08:14 AM, Mathew Yeates wrote: >> I installed matplotlib 1.0 and now I get a different error >> s=[0,0,8,8] >> ys=[0,8,8,0] >> verts=zip(xs,ys) >> poly = PolyCollection(verts) >> >> fails at line 587 in collections because >> xy = array([0, 0]) # xy.shape = (2,) >> and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) >> >> What do I do? > > With 1.0: > > In [8]: verts > Out[8]: [(0, 0), (0, 8), (8, 8), (8, 0)] > > In [9]: p = PolyCollection([verts]) > > Eric > >> >> -Mathew >> >> >> On Tue, Jul 27, 2010 at 9:51 AM, Mathew Yeates<mat...@gm...> wrote: >>> why doesn't this work? >>> xs=[0,0,8,8] >>> ys=[0,8,8,0] >>> verts=zip(xs,ys) >>> poly = PolyCollection(verts) >>> >>> >>> I tried >>> poly = PolyCollection([verts]) but that doesn't work either >>> >>> -Mathew >>> >> >> ------------------------------------------------------------------------------ >> The Palm PDK Hot Apps Program offers developers who use the >> Plug-In Development Kit to bring their C/C++ apps to Palm for a share >> of $1 Million in cash or HP Products. Visit us here for more details: >> http://ad.doubleclick.net/clk;226879339;13503038;l? >> http://clk.atdmt.com/CRS/go/247765532/direct/01/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Tony S Yu <ts...@gm...> - 2010-07-27 18:53:45
|
On Jul 27, 2010, at 1:31 PM, ms wrote: > On 27/07/10 15:05, Benjamin Root wrote: >> On Tue, Jul 27, 2010 at 6:01 AM, German Ocampo<ger...@gm...> wrote: >> >>> Good morning >>> >>> Do you know where I could get examples of case stories about >>> commercial or open source software that has been developed using the >>> Matplotlib library? >>> >>> Many Thanks >>> >>> German >>> >>> >> German, >> >> Interesting idea. Might be something nice to add to the project page, >> maybe? > > I have no ready "case story" about it, but I developed and published a > MPL-based open source software here: > > http://code.google.com/p/hooke > > which has been presented in a peer-reviewed academic publication on > "Bioinformatics" ( > http://bioinformatics.oxfordjournals.org/cgi/content/abstract/btp180?ijkey=B9QGeobopuepKnZ&keytype=ref > ) > > If you need information to build a "case story", ask me -perhaps I can > help you if it's not too much work. > > cheers, > M. German, You might be interested in CellProfiler Analyst (http://www.cellprofiler.org/). Also, matplotlib is an optional dependency for FiPy (http://www.ctcms.nist.gov/fipy/). Best, -Tony |
From: Tony S Yu <ts...@gm...> - 2010-07-27 18:45:19
|
On Jul 27, 2010, at 2:14 PM, Mathew Yeates wrote: > I installed matplotlib 1.0 and now I get a different error > s=[0,0,8,8] > ys=[0,8,8,0] > verts=zip(xs,ys) > poly = PolyCollection(verts) > > fails at line 587 in collections because > xy = array([0, 0]) # xy.shape = (2,) > and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) > > What do I do? > > -Mathew > I don't really use PolyCollection, but the docstring suggests you need to put your "verts" inside of a list: > *verts* is a sequence of ( *verts0*, *verts1*, ...) where > *verts_i* is a sequence of *xy* tuples of vertices, or an > equivalent :mod:`numpy` array of shape (*nv*, 2). It's a bit confusing, but the first argument, "verts", is actually a sequence, of a sequence, of vertices (the repetition is intentional). For example: square = [(0, 0), (0, 4), (4, 4), (4, 0)] triangle = [(0, 4), (0, 7), (4, 4)] verts = [square, triangle] In other words, the "verts" you created in your description describes a single polygon, where as verts should be a list of polygons. -Tony |
From: Eric F. <ef...@ha...> - 2010-07-27 18:42:27
|
On 07/27/2010 08:14 AM, Mathew Yeates wrote: > I installed matplotlib 1.0 and now I get a different error > s=[0,0,8,8] > ys=[0,8,8,0] > verts=zip(xs,ys) > poly = PolyCollection(verts) > > fails at line 587 in collections because > xy = array([0, 0]) # xy.shape = (2,) > and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) > > What do I do? With 1.0: In [8]: verts Out[8]: [(0, 0), (0, 8), (8, 8), (8, 0)] In [9]: p = PolyCollection([verts]) Eric > > -Mathew > > > On Tue, Jul 27, 2010 at 9:51 AM, Mathew Yeates<mat...@gm...> wrote: >> why doesn't this work? >> xs=[0,0,8,8] >> ys=[0,8,8,0] >> verts=zip(xs,ys) >> poly = PolyCollection(verts) >> >> >> I tried >> poly = PolyCollection([verts]) but that doesn't work either >> >> -Mathew >> > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Friedrich R. <fri...@gm...> - 2010-07-27 18:37:38
|
2010/7/26 Mathew Yeates <mat...@gm...>: > Is there a simple function call for this? And finding the distance of > a point to the plane? Hmm, when you are interested in the z distance alone, it should be a matrix equation: Z = X * m_x + Y * m_y + 1 * n Meaning you can invert it with Moore-Penrose pseudoinversion, i.e., numpy.lstsq()? When you have weights on Z, normalise first. Friedrich |
From: Friedrich R. <fri...@gm...> - 2010-07-27 18:31:54
|
2010/7/26 Benjamin Root <ben...@ou...>: > After some reading of sphinx documentation, it appears to be a bug with > sphinx (or actually, "smartypants") because it should not be doing this sort > of interpretation within a docstring. Anyway, supposedly the workaround is > to put double backticks around the part that needs to be treated literally: > ``'--'``. I tried this out and built the docs locally and it works... sort > of. The text that is surrounded by double backticks are getting a different > background color. This doesn't look great to me. Maybe someone else has a > thought? How looks a backticked empty string like? If it is just nothing, it could be used in between of the two hyphens, to separate them by "nothing". Still very hackish ... But it's just like LaTeX -{}-. Friedrich |
From: Mathew Y. <mat...@gm...> - 2010-07-27 18:14:47
|
I installed matplotlib 1.0 and now I get a different error s=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection(verts) fails at line 587 in collections because xy = array([0, 0]) # xy.shape = (2,) and line 587 says xy = np.concatenate([xy, np.zeros((1,2))]) What do I do? -Mathew On Tue, Jul 27, 2010 at 9:51 AM, Mathew Yeates <mat...@gm...> wrote: > why doesn't this work? > xs=[0,0,8,8] > ys=[0,8,8,0] > verts=zip(xs,ys) > poly = PolyCollection(verts) > > > I tried > poly = PolyCollection([verts]) but that doesn't work either > > -Mathew > |
From: ms <dev...@gm...> - 2010-07-27 17:31:29
|
On 27/07/10 15:05, Benjamin Root wrote: > On Tue, Jul 27, 2010 at 6:01 AM, German Ocampo<ger...@gm...> wrote: > >> Good morning >> >> Do you know where I could get examples of case stories about >> commercial or open source software that has been developed using the >> Matplotlib library? >> >> Many Thanks >> >> German >> >> > German, > > Interesting idea. Might be something nice to add to the project page, > maybe? I have no ready "case story" about it, but I developed and published a MPL-based open source software here: http://code.google.com/p/hooke which has been presented in a peer-reviewed academic publication on "Bioinformatics" ( http://bioinformatics.oxfordjournals.org/cgi/content/abstract/btp180?ijkey=B9QGeobopuepKnZ&keytype=ref ) If you need information to build a "case story", ask me -perhaps I can help you if it's not too much work. cheers, M. |
From: Mathew Y. <mat...@gm...> - 2010-07-27 16:51:32
|
why doesn't this work? xs=[0,0,8,8] ys=[0,8,8,0] verts=zip(xs,ys) poly = PolyCollection(verts) I tried poly = PolyCollection([verts]) but that doesn't work either -Mathew |
From: Jae-Joon L. <lee...@gm...> - 2010-07-27 16:06:35
|
Thanks for reporting. This is now fixed in r8581(maint branch) and r8582(trunk). Meanwhile, you may define your own subplot2grid function and use it instead. from matplotlib.gridspec import GridSpec from matplotlib.pyplot import gcf, draw_if_interactive, delaxes def mysubplot2grid(shape, loc, rowspan=1, colspan=1, **kwargs): fig = gcf() s1, s2 = shape subplotspec = GridSpec(s1, s2).new_subplotspec(loc, rowspan=rowspan, colspan=colspan) a = fig.add_subplot(subplotspec, **kwargs) bbox = a.bbox byebye = [] for other in fig.axes: if other==a: continue if bbox.fully_overlaps(other.bbox): byebye.append(other) for ax in byebye: delaxes(ax) draw_if_interactive() return a You can use this function as ax = mysubplot2grid((3,3), (0,0), colspan=2, rowspan=2, projection="polar") Regards, -JJ On Tue, Jul 27, 2010 at 2:06 AM, bbarton <bas...@gm...> wrote: > > Hi Everyone, > > I am working on a weather conditions plot containing wind speed and > direction. For that I use a custom polar projection. Now updated from > Matplotlib 0.99 to 1.0 to use the subplot2grid feature. > > Now, after trying and searching for hours, I seem to be too dumb to combine > my custom projection and subplot2grid. Before it did this way: > > ax1=plt.figure().add_subplot(111, projection='northpolar') > > But now I need sth like: > > ax2 = plt.subplot2grid((5,5), (2,3), colspan=2, rowspan=3) > > subplot2grid doesn't like a projection keyword. > How can I implement my projection? > > Thanks! > BB > > > > > > -- > View this message in context: http://old.nabble.com/matplotlib-subplot2grid-and-projection-tp29268717p29268717.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |