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
(10) |
2
(6) |
3
(1) |
|
4
(4) |
5
(11) |
6
(19) |
7
(18) |
8
(7) |
9
(9) |
10
(4) |
|
11
(3) |
12
(5) |
13
(19) |
14
(13) |
15
(21) |
16
(4) |
17
|
|
18
(5) |
19
(9) |
20
(13) |
21
(7) |
22
|
23
(1) |
24
(3) |
|
25
|
26
(3) |
27
(1) |
28
(2) |
29
(6) |
30
(5) |
31
|
|
From: Benjamin R. <ben...@ou...> - 2011-12-15 21:32:57
|
On Thu, Dec 15, 2011 at 3:18 PM, Alex Naysmith <yeo...@gm...>wrote: > > > On Tue, Dec 13, 2011 at 7:12 PM, Alex Naysmith <yeo...@gm...>wrote: > >> >> >> On Mon, Dec 12, 2011 at 7:03 PM, Benjamin Root <ben...@ou...> wrote: >> >>> On Sat, Dec 10, 2011 at 10:36 AM, Alex Naysmith <yeo...@gm... >>> > wrote: >>> >>>> Hello, >>>> >>>> I'm trying to plot the stresses in colour of a strained isoparametric >>>> element. >>>> >>>> I have a six noded triangle with vertice coordinates >>>> [(xa1,ya1),(xa2,ya2),(xa3,ya3)] = pos_a >>>> >>>> This triangle deforms and the new coordinate positions are >>>> [(xb1,yb1),(xa2,yb2),(xb3,yb3)] = pos_b >>>> >>>> The remaining nodes are mid nodes also with rest and deformed >>>> coordinate positions. >>>> >>>> To plot the edges of the triangle I use a Jacobian transformation >>>> function so that the coordinates of the triangle are in Jacobian >>>> coordinates xi1 and xi2 (with xi3 = 1 - xi1 - xi2). This is required as the >>>> elements are quadratic with mid-nodes. >>>> >>>> Each interval is hard coded so that: >>>> xi1 = [1.0,0.9,0.8,0.7,0.6,0.5, etc..] >>>> xi2 = [0.0,0.1,0.2,0.3,0.4,0.5, etc..] >>>> >>>> I would like to plot the strains in colour so that the interior of the >>>> triangle is filled but I don't want to hard code the Jacobian intervals as >>>> this seems an awkward way of doing it. >>>> >>>> With strain as a function of xi1 and xi2, How can matplotlib provide a >>>> continuous interior strain plot of the triangle for all the xi1 and xi2 >>>> values from 0 to 1? >>>> >>>> Regards >>>> >>>> Alex Naysmith >>>> >>>> >>> Alex, >>> >>> Perhaps if you can provide an example figure, we might be able to better >>> help you. Right now, I am having trouble envisioning what you describe. >>> >>> Ben Root >>> >>> Ben, >> >> I have created a script that uses one isoparametric triangle as an >> example. The triangle nodes undergo a displacement, resulting in strains >> inside the triangle. The new script calculates the strains inside the >> triangle for a range of xi1 and xi2 barycentric coordinates and returns the >> global coordinates with the corresponding strain. >> >> I would like matplotlib to give me a nice interpolated colour plot of the >> strains inside the triangle, but as the output global coordinates are not >> aligned in neat rows and columns, I cannot do a straightforward meshgrid >> plot with imshow. >> >> http://bazaar.launchpad.net/~eckeroo/misc/mpl_scripts/files >> >> There are further comments in the script that may explain things better. >> >> I want a figure like this: >> >> http://matplotlib.sourceforge.net/examples/pylab_examples/animation_demo.html >> But for a 6 noded quadratic triangle instead of square. The intention is >> to have all the triangles in the mesh display their strains with >> interpolated colours. >> >> Regards >> >> Alex >> > > Hello, > > I tried using contour and now I have a figure! > > > http://bazaar.launchpad.net/~eckeroo/misc/mpl_scripts/view/head:/figure.png > > I can now show clearly what I'm aiming for with this figure. I want the > contour fill to remain inside the triangle. There will be a whole mesh of > triangles to fill. > > The updated sample script is here: > > > http://bazaar.launchpad.net/~eckeroo/misc/mpl_scripts/view/head:/triangle_fill_v2.py > > I arranged my data points into square X and Y arrays along with the > strains in the Z array and then simply P.contourf(X, Y, Z) > > As the figure shows, it's not there yet as a couple of the corners aren't > filled in and there's a big fill outside the triangle. I think this is due > to difficulties in translating points from the natural triangle coordinates > (barycentric) to the x,y coordinates. But the contour looks correct as it's > interpolated between the strain points. > > Regards > > Alex > > Alex, Just curious, have you checked to see if tricontourf() meets your needs? http://matplotlib.sourceforge.net/api/axes_api.html?highlight=tricontourf#matplotlib.axes.Axes.tricontourf Ben Root |
|
From: Alex N. <yeo...@gm...> - 2011-12-15 21:18:57
|
On Tue, Dec 13, 2011 at 7:12 PM, Alex Naysmith <yeo...@gm...>wrote: > > > On Mon, Dec 12, 2011 at 7:03 PM, Benjamin Root <ben...@ou...> wrote: > >> On Sat, Dec 10, 2011 at 10:36 AM, Alex Naysmith <yeo...@gm...>wrote: >> >>> Hello, >>> >>> I'm trying to plot the stresses in colour of a strained isoparametric >>> element. >>> >>> I have a six noded triangle with vertice coordinates >>> [(xa1,ya1),(xa2,ya2),(xa3,ya3)] = pos_a >>> >>> This triangle deforms and the new coordinate positions are >>> [(xb1,yb1),(xa2,yb2),(xb3,yb3)] = pos_b >>> >>> The remaining nodes are mid nodes also with rest and deformed coordinate >>> positions. >>> >>> To plot the edges of the triangle I use a Jacobian transformation >>> function so that the coordinates of the triangle are in Jacobian >>> coordinates xi1 and xi2 (with xi3 = 1 - xi1 - xi2). This is required as the >>> elements are quadratic with mid-nodes. >>> >>> Each interval is hard coded so that: >>> xi1 = [1.0,0.9,0.8,0.7,0.6,0.5, etc..] >>> xi2 = [0.0,0.1,0.2,0.3,0.4,0.5, etc..] >>> >>> I would like to plot the strains in colour so that the interior of the >>> triangle is filled but I don't want to hard code the Jacobian intervals as >>> this seems an awkward way of doing it. >>> >>> With strain as a function of xi1 and xi2, How can matplotlib provide a >>> continuous interior strain plot of the triangle for all the xi1 and xi2 >>> values from 0 to 1? >>> >>> Regards >>> >>> Alex Naysmith >>> >>> >> Alex, >> >> Perhaps if you can provide an example figure, we might be able to better >> help you. Right now, I am having trouble envisioning what you describe. >> >> Ben Root >> >> Ben, > > I have created a script that uses one isoparametric triangle as an > example. The triangle nodes undergo a displacement, resulting in strains > inside the triangle. The new script calculates the strains inside the > triangle for a range of xi1 and xi2 barycentric coordinates and returns the > global coordinates with the corresponding strain. > > I would like matplotlib to give me a nice interpolated colour plot of the > strains inside the triangle, but as the output global coordinates are not > aligned in neat rows and columns, I cannot do a straightforward meshgrid > plot with imshow. > > http://bazaar.launchpad.net/~eckeroo/misc/mpl_scripts/files > > There are further comments in the script that may explain things better. > > I want a figure like this: > > http://matplotlib.sourceforge.net/examples/pylab_examples/animation_demo.html > But for a 6 noded quadratic triangle instead of square. The intention is > to have all the triangles in the mesh display their strains with > interpolated colours. > > Regards > > Alex > Hello, I tried using contour and now I have a figure! http://bazaar.launchpad.net/~eckeroo/misc/mpl_scripts/view/head:/figure.png I can now show clearly what I'm aiming for with this figure. I want the contour fill to remain inside the triangle. There will be a whole mesh of triangles to fill. The updated sample script is here: http://bazaar.launchpad.net/~eckeroo/misc/mpl_scripts/view/head:/triangle_fill_v2.py I arranged my data points into square X and Y arrays along with the strains in the Z array and then simply P.contourf(X, Y, Z) As the figure shows, it's not there yet as a couple of the corners aren't filled in and there's a big fill outside the triangle. I think this is due to difficulties in translating points from the natural triangle coordinates (barycentric) to the x,y coordinates. But the contour looks correct as it's interpolated between the strain points. Regards Alex |
|
From: David G. <da...@we...> - 2011-12-15 20:49:09
|
I'm not having any success in getting the matplotlib table commands to work. Here's an example of what I'd like to do: Can anyone help with the table construction code? Thanks import pylab as plt plt.figure() ax=plt.gca() y=[1,2,3,4,5,4,3,2,1,1,1,1,1,1,1,1] plt.plot([10,10,14,14,10],[2,4,4,2,2],'r') col_labels=['col1','col2','col3'] row_labels=['row1','row2','row3'] table_vals=[11,12,13,21,22,23,31,32,33] # the rectangle is where I want to place the table plt.text(11,4.1,'Table Title',size=8) plt.plot(y) plt.show() |
|
From: Goyo <goy...@gm...> - 2011-12-15 18:51:25
|
2011/12/15 John Thorstensen <joh...@da...>: > So my question: Is there a simple way of getting matplotlib to display a > plot in a window and then surrender control to the main program, without > destroying the plot? Something like a method to kill mainloop would be > ideal. Just make sure you use interactive mode and get rid of the show calls: import matplotlib.pyplot as plt plt.ion() # set interactive mode plt.plot(foo) # plot something bar() # do stuff while the plot is visible plt.close() # if you want to close the plot window from the script This works in mpl 1.1.0 al least with tkagg, gtkagg and qt4agg backends. Goyo |
|
From: Keld L. <kel...@gm...> - 2011-12-15 18:45:03
|
Thank you Benjamin. Yes, I understand the problem. Thank you for the help. I am able to use Annotate for my specific problem: I want to have a line starting from the end of the text to make the tick labels with a left alignment. However, a feature to get the boundary box would be useful for this, to ensure that the plot is tight. Best regards Keld Benjamin Root-2 wrote: > > On Wednesday, December 14, 2011, Keld Lundgaard <kel...@gm...> > wrote: >> >> Hi >> >> How do I get the information about the endpoint of a text element? >> >> Example: >> >> import matplotlib.pylab as plt >> text = plt.text(0.5,0.5,'hi') >> plt.show() >> >> In the dataTrans coordinates, where does the text string ends? >> >> >> I have spent some time now trying to solve this, seemingly simple >> problem, >> so I appreciate any help a lot! >> >> >> Thanks in advance! >> >> / Keld > > It is actually a very difficult thing to do, and is why mpl does not > provide a mechanism to find out until after rendering. The problem is > that > -- in the general case -- it is not possible to know ahead of time how > much > space some text will take up for an arbitrary font, style and size. > > You can have the figure get rendered, and then you can query the text's > bounding box, if I understand correctly. Maybe the code for > tight_layout() > might show how it does this. > > Ben Root > > ------------------------------------------------------------------------------ > 10 Tips for Better Server Consolidation > Server virtualization is being driven by many needs. > But none more important than the need to reduce IT complexity > while improving strategic productivity. Learn More! > http://www.accelacomm.com/jaw/sdnl/114/51507609/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/Endpoint-of-a-text-string-in-a-plot--tp32977548p32983153.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Alejandro W. <ale...@gm...> - 2011-12-15 18:27:19
|
On Wed, Dec 14, 2011 at 10:20 AM, Peter Liebetraut <pet...@im...> wrote: > Hi > > Latex rendering looks OK here. > >> In [9]: matplotlib.__version__ >> Out[9]: '1.0.0' Just updated to the last version from github, and now works OK. |
|
From: Justin M. <jn...@gm...> - 2011-12-15 18:00:39
|
On Thu, Dec 15, 2011 at 12:33 PM, Chao YUE <cha...@gm...> wrote:
> Dear matplotlib users,
>
> How can I surpress the figure pop out when I make plot within the ipython
> interactive shell?
> suppose I make a figure first and I want to save it:
>
> fig=plt.figure()
> ax=fig.add_subplot(111)
> ax.plot(np.arange(10))
> fig.savefig('fig1.png')
> ###actually above is only an example and usually I use loop to make many
> figures.
>
Try adding 'plt.close(fig)' after you save the figure, or just plt.close()
if you want to close everything.
|
|
From: Chao Y. <cha...@gm...> - 2011-12-15 17:34:09
|
Dear matplotlib users,
How can I surpress the figure pop out when I make plot within the ipython
interactive shell?
suppose I make a figure first and I want to save it:
fig=plt.figure()
ax=fig.add_subplot(111)
ax.plot(np.arange(10))
fig.savefig('fig1.png')
###actually above is only an example and usually I use loop to make many
figures.
then I want to check another plot:
plt.plot(np.arange(10))
plt.show()
The problem is, when I use plt.show() to check the recently made plot, all
the figures I saved for the last session will pop out and I have to click
on the close icon to close them one by one,
which can be really annoying....
any idea would be greatly appreciated!
cheers,
Chao
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
|
|
From: David H. <dh...@gm...> - 2011-12-15 17:19:41
|
Eric,
Good news I think I got it to work. So using the same code I sent you
originally, I applied the following changes:
1. Install matplotlib from git (this did fix things that I wasn't noticing)
2. Add c.draw() before "c.copy_from_bbox"
3. Copy "f.bbox" instead of "a.bbox" (I think this makes sense since I
want it to hold on to the title,ticks, and labels, a.bbox is only the
content inside the axis rectangle)
4. Restore f_bbox, blit f.bbox.
...and it seems to work. The git version of mpl did fix this, although
restoring just the a.bbox was only keeping the axis rectangle so it made
it look like even worse of a bug. Using the new version I noticed this
and then started using f.bbox which seems to work the way I want it.
Now, my final question is: Is this actually doing what I want
performance-wise. When I blit just f.bbox, is it really only repainting
the updated line or is it redrawing most of the figure? If you need a
copy of the new version of my test code let me know. Thanks for any
more clarity/help you can give.
-Dave
P.S. Is there a book or tutorial or website where I can learn more about
how the rendering/painting of stuff like this works. For example, if I
could better understand why your bug fix was needed.
On 12/15/11 10:04 AM, David Hoese wrote:
> Oops forgot to change subject.
>
> On 12/15/11 10:02 AM, David Hoese wrote:
>> Eric,
>>
>> I installed mpl from git ("git clone
>> git://github.com/matplotlib/matplotlib.git", unless I was suppose to
>> use one of the branches) and same problem. I looked at my code again
>> and thought there should be a canvas.draw() before calling
>> "c.copy_from_bbox(a.bbox)", but still the same problem. However, I
>> did have it work the first time I added "c.draw()" and used the git
>> mpl, and by work I mean that everything stayed visible on the figure.
>>
>> When people start coming in to my work I'll ask them to run my sample
>> code and see what happens. It almost seems like mpl is handling the
>> window activation event funny, is there an easy way to print out the
>> callbacks being used by a mpl figure? For now, I will subclass
>> QApplication, and implement "notify()" to print out events as they
>> come in, but still...this is just weird. Thanks.
>>
>> -Dave
>>
>> On 12/14/11 10:30 PM, Eric Firing wrote:
>>> David,
>>>
>>> It works for me on linux with mpl from git. I haven't tried to figure
>>> it out, but it is conceivable that the problem you are seeing was fixed
>>> with this:
>>>
>>> commit b624546ae60dc5878e75a32f41a160d383548b8f
>>> Author: Eric Firing<ef...@ha...>
>>> Date: Tue Oct 18 08:06:21 2011 -1000
>>>
>>> backend_qt4agg: draw() immediately calls FigureCanvasAgg.draw()
>>>
>>> This is the latest in a series of modifications to the Qt4Agg
>>> drawing strategy going back several years. It simplifies the
>>> code and should solve the problem introduced in 6938b0025; that
>>> is, delaying the Agg draw operation until the paintEvent breaks
>>> code expecting that draw operation to have occurred immediately.
>>> The problem was reported here:
>>> http://sourceforge.net/mailarchive/message.php?msg_id=28245744
>>>
>>> Eric
>>
>
|
|
From: Benjamin R. <ben...@ou...> - 2011-12-15 16:16:08
|
On Wed, Dec 14, 2011 at 11:34 PM, Benjamin Root <ben...@ou...> wrote: > > > On Wednesday, December 14, 2011, Jason Grout <jas...@cr...> > wrote: > > On 12/14/11 6:33 PM, Justin wrote: > > > >> Any suggestions or places to find a gorgeous pie chart, let me know... > > > > I'd probably use Excel or OpenOffice if I were you. > > > > Jason > > > > There are some neat effects that can be done with the AGG filter. There > should be a page about AGG filters on the website. > > As for text placement, if it is just a one-off figure, you could > explicitly code the placement yourself. It is always hard to judge when to > get the general solution, and when to hack out the one-offs. > > Ben Root > The page I was referring to: http://matplotlib.sourceforge.net/examples/pylab_examples/demo_agg_filter.html I could have sworn there was another page that talks about agg filters in further details, but I can't seem to find it. Ben Root |
|
From: David H. <dh...@gm...> - 2011-12-15 16:03:44
|
Oops forgot to change subject.
On 12/15/11 10:02 AM, David Hoese wrote:
> Eric,
>
> I installed mpl from git ("git clone
> git://github.com/matplotlib/matplotlib.git", unless I was suppose to
> use one of the branches) and same problem. I looked at my code again
> and thought there should be a canvas.draw() before calling
> "c.copy_from_bbox(a.bbox)", but still the same problem. However, I
> did have it work the first time I added "c.draw()" and used the git
> mpl, and by work I mean that everything stayed visible on the figure.
>
> When people start coming in to my work I'll ask them to run my sample
> code and see what happens. It almost seems like mpl is handling the
> window activation event funny, is there an easy way to print out the
> callbacks being used by a mpl figure? For now, I will subclass
> QApplication, and implement "notify()" to print out events as they
> come in, but still...this is just weird. Thanks.
>
> -Dave
>
> On 12/14/11 10:30 PM, Eric Firing wrote:
>> David,
>>
>> It works for me on linux with mpl from git. I haven't tried to figure
>> it out, but it is conceivable that the problem you are seeing was fixed
>> with this:
>>
>> commit b624546ae60dc5878e75a32f41a160d383548b8f
>> Author: Eric Firing<ef...@ha...>
>> Date: Tue Oct 18 08:06:21 2011 -1000
>>
>> backend_qt4agg: draw() immediately calls FigureCanvasAgg.draw()
>>
>> This is the latest in a series of modifications to the Qt4Agg
>> drawing strategy going back several years. It simplifies the
>> code and should solve the problem introduced in 6938b0025; that
>> is, delaying the Agg draw operation until the paintEvent breaks
>> code expecting that draw operation to have occurred immediately.
>> The problem was reported here:
>> http://sourceforge.net/mailarchive/message.php?msg_id=28245744
>>
>> Eric
>
|
|
From: David H. <dh...@gm...> - 2011-12-15 16:01:54
|
Eric,
I installed mpl from git ("git clone
git://github.com/matplotlib/matplotlib.git", unless I was suppose to use
one of the branches) and same problem. I looked at my code again and
thought there should be a canvas.draw() before calling
"c.copy_from_bbox(a.bbox)", but still the same problem. However, I did
have it work the first time I added "c.draw()" and used the git mpl, and
by work I mean that everything stayed visible on the figure.
When people start coming in to my work I'll ask them to run my sample
code and see what happens. It almost seems like mpl is handling the
window activation event funny, is there an easy way to print out the
callbacks being used by a mpl figure? For now, I will subclass
QApplication, and implement "notify()" to print out events as they come
in, but still...this is just weird. Thanks.
-Dave
On 12/14/11 10:30 PM, Eric Firing wrote:
> David,
>
> It works for me on linux with mpl from git. I haven't tried to figure
> it out, but it is conceivable that the problem you are seeing was fixed
> with this:
>
> commit b624546ae60dc5878e75a32f41a160d383548b8f
> Author: Eric Firing<ef...@ha...>
> Date: Tue Oct 18 08:06:21 2011 -1000
>
> backend_qt4agg: draw() immediately calls FigureCanvasAgg.draw()
>
> This is the latest in a series of modifications to the Qt4Agg
> drawing strategy going back several years. It simplifies the
> code and should solve the problem introduced in 6938b0025; that
> is, delaying the Agg draw operation until the paintEvent breaks
> code expecting that draw operation to have occurred immediately.
> The problem was reported here:
> http://sourceforge.net/mailarchive/message.php?msg_id=28245744
>
> Eric
|
|
From: Benjamin R. <ben...@ou...> - 2011-12-15 15:58:46
|
On Tue, Dec 13, 2011 at 1:12 PM, Martella, C. <c.m...@vu...> wrote: > Hello, > > I have 2D array where each (x, y) cell represents the height of that point > on the Z axis (you can think of it as the map of some mountain chain). > I'd like to get the plot_surface() of this data. What I don't understand > in particular is the content of the X, Y ,Z array parameter in my > particular example. > > Can anybody elaborate on this please? > > Claudio, X and Y represent the coordinates of the height data (which is Z). X and Y must be the same shape as the Z data. For example: # Create 1-D coordinate arrays x = np.arange(-10, 10, 0.5) # length 40 y = np.arange(-25, 25, 2.5) # length 20 # Create 2-D arrays from the coordinate arrays # The shape of X and Y will be (20, 40) # i.e., 20 rows and 40 columns. X, Y = np.meshgrid(x, y) # This will also have shape of (20, 40) Z = np.sqrt(X**2 + Y**2) ax.plot_surface(X, Y, Z) Now, a more complicated example shows that the X and Y coordinates do not have to be monotonic, but the coordinates must be neighboring in both euclidean space and in the data array, or else the surface will look "torn". This example on the website shows how to plot a sphere by using a parametric representation of the surface: http://matplotlib.sourceforge.net/examples/mplot3d/surface3d_demo2.html I hope this helps! Ben Root |
|
From: Fabien L. <laf...@gm...> - 2011-12-15 15:26:37
|
This software can be intersting for you: http://www.sofastatistics.com/home.php 2011/12/15 Benjamin Root <ben...@ou...>: > > > On Wednesday, December 14, 2011, Jason Grout <jas...@cr...> > wrote: >> On 12/14/11 6:33 PM, Justin wrote: >> >>> Any suggestions or places to find a gorgeous pie chart, let me know... >> >> I'd probably use Excel or OpenOffice if I were you. >> >> Jason >> > > There are some neat effects that can be done with the AGG filter. There > should be a page about AGG filters on the website. > > As for text placement, if it is just a one-off figure, you could explicitly > code the placement yourself. It is always hard to judge when to get the > general solution, and when to hack out the one-offs. > > Ben Root > > ------------------------------------------------------------------------------ > 10 Tips for Better Server Consolidation > Server virtualization is being driven by many needs. > But none more important than the need to reduce IT complexity > while improving strategic productivity. Learn More! > http://www.accelacomm.com/jaw/sdnl/114/51507609/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: John T. <joh...@da...> - 2011-12-15 14:30:37
|
I have a sizeable number of python data-inspection scripts that work as follows: - read some data, or do something with it - plot the data - query the user on the command line and get a response - do what the user commands. These use the venerable PGPLOT package for the graphics, but this has been static for years and is getting increasingly vulnerable to obsolescence of the supporting packages (e.g., numarray). I'm having a hard time converting these scripts to matplotlib because when you do a show(), the mainloop takes over. It's possible to work around by doing a show() for every plot, and then killing the plot manually, but after a couple of hundred manual kills this gets tiresome. It would also be possible to restructure the code so that the various options get controlled by key press events in the plot, I suppose, but the effort involved in converting all the scripts would be pretty large. So my question: Is there a simple way of getting matplotlib to display a plot in a window and then surrender control to the main program, without destroying the plot? Something like a method to kill mainloop would be ideal. Thanks. [Apologies if this is general knowledge -- I couldn't find an answer.] -- View this message in context: http://old.nabble.com/Non-interactive-plotting-to-window--tp32981792p32981792.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Benjamin R. <ben...@ou...> - 2011-12-15 05:34:10
|
On Wednesday, December 14, 2011, Jason Grout <jas...@cr...> wrote: > On 12/14/11 6:33 PM, Justin wrote: > >> Any suggestions or places to find a gorgeous pie chart, let me know... > > I'd probably use Excel or OpenOffice if I were you. > > Jason > There are some neat effects that can be done with the AGG filter. There should be a page about AGG filters on the website. As for text placement, if it is just a one-off figure, you could explicitly code the placement yourself. It is always hard to judge when to get the general solution, and when to hack out the one-offs. Ben Root |
|
From: Jason G. <jas...@cr...> - 2011-12-15 04:30:00
|
On 12/14/11 6:33 PM, Justin wrote: > Any suggestions or places to find a gorgeous pie chart, let me know... I'd probably use Excel or OpenOffice if I were you. Jason |
|
From: Benjamin R. <ben...@ou...> - 2011-12-15 04:20:12
|
On Wednesday, December 14, 2011, Keld Lundgaard <kel...@gm...> wrote: > > Hi > > How do I get the information about the endpoint of a text element? > > Example: > > import matplotlib.pylab as plt > text = plt.text(0.5,0.5,'hi') > plt.show() > > In the dataTrans coordinates, where does the text string ends? > > > I have spent some time now trying to solve this, seemingly simple problem, > so I appreciate any help a lot! > > > Thanks in advance! > > / Keld It is actually a very difficult thing to do, and is why mpl does not provide a mechanism to find out until after rendering. The problem is that -- in the general case -- it is not possible to know ahead of time how much space some text will take up for an arbitrary font, style and size. You can have the figure get rendered, and then you can query the text's bounding box, if I understand correctly. Maybe the code for tight_layout() might show how it does this. Ben Root |
|
From: Keld L. <kel...@gm...> - 2011-12-15 03:58:41
|
Hi How do I get the information about the endpoint of a text element? Example: import matplotlib.pylab as plt text = plt.text(0.5,0.5,'hi') plt.show() In the dataTrans coordinates, where does the text string ends? I have spent some time now trying to solve this, seemingly simple problem, so I appreciate any help a lot! Thanks in advance! / Keld -- View this message in context: http://old.nabble.com/Endpoint-of-a-text-string-in-a-plot--tp32977548p32977548.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Justin <jt...@gm...> - 2011-12-15 00:40:18
|
I sadly, have to include pie charts in a presentation/document I am putting together. I have 6 categories, but 4 of them are a very small fraction of the total... so the base pie chart even with exploded sections looks terrible. Also, I need to display the % values and category labels. Using autopct and labels arguments makes for lots of overlapping mess. maybe they can render outside of the plot area if the slice is too small? Its terribly taboo I know, but can it look cool and 3D too... my boss would love me if it did! Any suggestions or places to find a gorgeous pie chart, let me know... Thanks for your help! Justin |
|
From: Benjamin R. <ben...@ou...> - 2011-12-15 00:21:40
|
On Wed, Dec 14, 2011 at 6:35 AM, Michael Droettboom <md...@st...> wrote: > You'll want to set the rcParam "pdf.fonttype" to 42 to embed the entire > TTF file in the PDF file, allowing for editing text as text. > > Mike > > > Just to be clear, are we talking about how we now save pdf/eps files with individual characters rather than entire strings? Is setting pdf.fonttype to 42 going to change that behavior? Ben Root |