SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(3)
2
3
(1)
4
(2)
5
(6)
6
(3)
7
(2)
8
(1)
9
10
(1)
11
12
13
14
15
16
17
(1)
18
(3)
19
(2)
20
21
22
23
24
25
26
27
(1)
28
29
30
(2)
31
(4)




Showing results of 32

1 2 > >> (Page 1 of 2)
From: Chao Y. <cha...@gm...> - 2013年12月31日 10:28:47
Hi Sterling and Alex,
thanks to both of you. I followed what proposed by you Alex and it's
working perfectly.
my version of matplotlib is 1.2.0 and I don't want to upgrade before I
submit the MS and
so I pick up the code of "get_segments" method from the github and put it
in my 1.2.0
matplotlib and it works.
I wish everybody a good new year.
Chao
On Tue, Dec 31, 2013 at 3:09 AM, Alex Goodman <ale...@co...>wrote:
> Hi Chao,
>
> Actually it is possible to remove the borders for Antarctica with basemap.
> The default method for drawing the continents in basemap, drawcontinents(),
> returns an instance of matplotlib.collections.LineCollection. What you will
> want to do is manually remove the line segments within the collection that
> correspond to Antarctica. For example,
>
> # m is a Basemap instance
> lcol = m.drawcoastlines()
> segs = lcol.get_segments()
>
> for i, seg in enumerate(segs):
> # The segments are lists of ordered pairs in spherical (lon, lat),
> coordinates.
> # We can filter out which ones correspond to Antarctica based on
> latitude using numpy.any()
> if np.any(seg[:, 1] < -60):
> segs.pop(i)
>
> lcol.set_segments(segs)
>
> This should do the trick unless I made a silly typo somewhere.
>
> Thanks,
> Alex
>
>
> On Mon, Dec 30, 2013 at 5:05 PM, Sterling Smith <sm...@fu...>wrote:
>
>> Chao,
>>
>> I know nothing of the Basemap toolkit so I can't comment on the removal
>> of continents, but presumably the text command you are using takes some
>> keywords to set the properties of the bounding box. Try setting the
>> background of the bounding box to white so that your words show up cleanly.
>> Feel free to let me know that I'm barking up the wrong tree.
>>
>> -Sterling
>>
>> On Dec 30, 2013, at 3:46PM, Chao YUE wrote:
>>
>> > Dear all,
>> >
>> > Happy new year!
>> >
>> > I am using Basemap toolkit to make some maps, I would like to
>> > write something at the bottom of the map, whose position is now
>> > taken by the contourf of Antarctica. Is there a way I can keep contours
>> > of other continents but suppressing the one for antarctica? I attached
>> > showing why I would like to have this.
>> >
>> > thanks for any help,
>> >
>> > 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
>> >
>> ************************************************************************************
>> >
>> <figure_4_new.jpg>------------------------------------------------------------------------------
>> > Rapidly troubleshoot problems before they affect your business. Most IT
>> > organizations don't have a clear picture of how application performance
>> > affects their revenue. With AppDynamics, you get 100% visibility into
>> your
>> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
>> AppDynamics Pro!
>> >
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
>> > Matplotlib-users mailing list
>> > Mat...@li...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> --
> Alex Goodman
> Graduate Research Assistant
> Department of Atmospheric Science
> Colorado State University
>
-- 
***********************************************************************************
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: Alex G. <ale...@co...> - 2013年12月31日 02:57:46
Attachments: no_antarctica.png
Hi Chao,
Actually it is possible to remove the borders for Antarctica with basemap.
The default method for drawing the continents in basemap, drawcontinents(),
returns an instance of matplotlib.collections.LineCollection. What you will
want to do is manually remove the line segments within the collection that
correspond to Antarctica. For example,
# m is a Basemap instance
lcol = m.drawcoastlines()
segs = lcol.get_segments()
for i, seg in enumerate(segs):
 # The segments are lists of ordered pairs in spherical (lon, lat),
coordinates.
 # We can filter out which ones correspond to Antarctica based on
latitude using numpy.any()
 if np.any(seg[:, 1] < -60):
 segs.pop(i)
lcol.set_segments(segs)
This should do the trick unless I made a silly typo somewhere.
Thanks,
Alex
On Mon, Dec 30, 2013 at 5:05 PM, Sterling Smith <sm...@fu...>wrote:
> Chao,
>
> I know nothing of the Basemap toolkit so I can't comment on the removal of
> continents, but presumably the text command you are using takes some
> keywords to set the properties of the bounding box. Try setting the
> background of the bounding box to white so that your words show up cleanly.
> Feel free to let me know that I'm barking up the wrong tree.
>
> -Sterling
>
> On Dec 30, 2013, at 3:46PM, Chao YUE wrote:
>
> > Dear all,
> >
> > Happy new year!
> >
> > I am using Basemap toolkit to make some maps, I would like to
> > write something at the bottom of the map, whose position is now
> > taken by the contourf of Antarctica. Is there a way I can keep contours
> > of other continents but suppressing the one for antarctica? I attached
> > showing why I would like to have this.
> >
> > thanks for any help,
> >
> > 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
> >
> ************************************************************************************
> >
> <figure_4_new.jpg>------------------------------------------------------------------------------
> > Rapidly troubleshoot problems before they affect your business. Most IT
> > organizations don't have a clear picture of how application performance
> > affects their revenue. With AppDynamics, you get 100% visibility into
> your
> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
> AppDynamics Pro!
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Alex Goodman
Graduate Research Assistant
Department of Atmospheric Science
Colorado State University
From: Alex G. <ale...@co...> - 2013年12月31日 02:44:04
A quick apology for a typo in my previous message, the method in question
is drawcoastlines(), not drawcontinents(). The code snippet should still be
correct though!
On Mon, Dec 30, 2013 at 7:09 PM, Alex Goodman <ale...@co...>wrote:
> Hi Chao,
>
> Actually it is possible to remove the borders for Antarctica with basemap.
> The default method for drawing the continents in basemap, drawcontinents(),
> returns an instance of matplotlib.collections.LineCollection. What you will
> want to do is manually remove the line segments within the collection that
> correspond to Antarctica. For example,
>
> # m is a Basemap instance
> lcol = m.drawcoastlines()
> segs = lcol.get_segments()
>
> for i, seg in enumerate(segs):
> # The segments are lists of ordered pairs in spherical (lon, lat),
> coordinates.
> # We can filter out which ones correspond to Antarctica based on
> latitude using numpy.any()
> if np.any(seg[:, 1] < -60):
> segs.pop(i)
>
> lcol.set_segments(segs)
>
> This should do the trick unless I made a silly typo somewhere.
>
> Thanks,
> Alex
>
>
> On Mon, Dec 30, 2013 at 5:05 PM, Sterling Smith <sm...@fu...>wrote:
>
>> Chao,
>>
>> I know nothing of the Basemap toolkit so I can't comment on the removal
>> of continents, but presumably the text command you are using takes some
>> keywords to set the properties of the bounding box. Try setting the
>> background of the bounding box to white so that your words show up cleanly.
>> Feel free to let me know that I'm barking up the wrong tree.
>>
>> -Sterling
>>
>> On Dec 30, 2013, at 3:46PM, Chao YUE wrote:
>>
>> > Dear all,
>> >
>> > Happy new year!
>> >
>> > I am using Basemap toolkit to make some maps, I would like to
>> > write something at the bottom of the map, whose position is now
>> > taken by the contourf of Antarctica. Is there a way I can keep contours
>> > of other continents but suppressing the one for antarctica? I attached
>> > showing why I would like to have this.
>> >
>> > thanks for any help,
>> >
>> > 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
>> >
>> ************************************************************************************
>> >
>> <figure_4_new.jpg>------------------------------------------------------------------------------
>> > Rapidly troubleshoot problems before they affect your business. Most IT
>> > organizations don't have a clear picture of how application performance
>> > affects their revenue. With AppDynamics, you get 100% visibility into
>> your
>> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
>> AppDynamics Pro!
>> >
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
>> > Matplotlib-users mailing list
>> > Mat...@li...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> --
> Alex Goodman
> Graduate Research Assistant
> Department of Atmospheric Science
> Colorado State University
>
-- 
Alex Goodman
Graduate Research Assistant
Department of Atmospheric Science
Colorado State University
From: Sterling S. <sm...@fu...> - 2013年12月31日 00:05:31
Chao,
I know nothing of the Basemap toolkit so I can't comment on the removal of continents, but presumably the text command you are using takes some keywords to set the properties of the bounding box. Try setting the background of the bounding box to white so that your words show up cleanly. Feel free to let me know that I'm barking up the wrong tree.
-Sterling
On Dec 30, 2013, at 3:46PM, Chao YUE wrote:
> Dear all,
> 
> Happy new year!
> 
> I am using Basemap toolkit to make some maps, I would like to 
> write something at the bottom of the map, whose position is now
> taken by the contourf of Antarctica. Is there a way I can keep contours
> of other continents but suppressing the one for antarctica? I attached 
> showing why I would like to have this. 
> 
> thanks for any help,
> 
> 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
> ************************************************************************************
> <figure_4_new.jpg>------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Chao Y. <cha...@gm...> - 2013年12月30日 23:46:33
Attachments: figure_4_new.jpg
Dear all,
Happy new year!
I am using Basemap toolkit to make some maps, I would like to
write something at the bottom of the map, whose position is now
taken by the contourf of Antarctica. Is there a way I can keep contours
of other continents but suppressing the one for antarctica? I attached
showing why I would like to have this.
thanks for any help,
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: Michael D. <md...@st...> - 2013年12月30日 13:01:37
Not sure. Can you provide a small, standalone example that reproduces 
the problem?
Mike
On 12/27/2013 12:05 PM, Neal Becker wrote:
> Any idea what could cause hexbin to issue runtime warnings and then draw
> a blank figure?
>
> /home/nbecker/.local/lib/python3.3/site-packages/matplotlib/axes.py:6524:
> RuntimeWarning: invalid value encountered in true_divide
> x = (x - xmin) / sx
> /home/nbecker/.local/lib/python3.3/site-packages/matplotlib/axes.py:6539:
> RuntimeWarning: invalid value encountered in less
> bdist = (d1 < d2)
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
 _
|\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
| ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |
http://www.droettboom.com
From: Neal B. <ndb...@gm...> - 2013年12月27日 17:05:45
Any idea what could cause hexbin to issue runtime warnings and then draw
a blank figure?
/home/nbecker/.local/lib/python3.3/site-packages/matplotlib/axes.py:6524: 
RuntimeWarning: invalid value encountered in true_divide
 x = (x - xmin) / sx
/home/nbecker/.local/lib/python3.3/site-packages/matplotlib/axes.py:6539: 
RuntimeWarning: invalid value encountered in less
 bdist = (d1 < d2)
From: Paul H. <pmh...@gm...> - 2013年12月19日 15:16:57
Here are a couple of examples of using custom formats:
http://matplotlib.org/examples/api/date_index_formatter.html
http://matplotlib.org/examples/pylab_examples/date_demo2.html
And here's a link with all of the possible formatting strings:
http://www.tutorialspoint.com/python/time_strftime.htm
On Thu, Dec 19, 2013 at 1:19 AM, Alexandru Popa <a.e...@gm...> wrote:
> I need to plot some large csv files that contain financial data with
> timestamps that have nanosecond precision.
>
> Is there a way to make matplotlib show these timestamps as dates with
> nanosecond precision?
>
> If not, is there a way to plot my data by sending the timestamps, and then
> set a formatter that will show the timestamp based on a custom format of my
> choosing?
>
> Note that I'm embedding matplotlib in a wxPython application, and I am not
> familiar with the ipython way of working with matplotlib.
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Alexandru P. <a.e...@gm...> - 2013年12月19日 09:19:10
I need to plot some large csv files that contain financial data with
timestamps that have nanosecond precision.
Is there a way to make matplotlib show these timestamps as dates with
nanosecond precision?
If not, is there a way to plot my data by sending the timestamps, and then
set a formatter that will show the timestamp based on a custom format of my
choosing?
Note that I'm embedding matplotlib in a wxPython application, and I am not
familiar with the ipython way of working with matplotlib.
From: Guillaume G. <gui...@mi...> - 2013年12月18日 11:36:45
Hi all,
The following code fails on my box (python3.3, linux Mint 15, latest 
matplotlib code from github):
```python
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
mpl.rcParams['legend.fontsize'] = 10
fig = plt.figure()
ax = fig.gca(projection='3d')
theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
z = np.linspace(-2, 2, 100)
r = z**2 + 1
x = r * np.sin(theta)
y = r * np.cos(theta)
ax.plot(x, y, z, label='parametric curve')
ax.legend()
plt.show()
```python
Here is the tail of the traceback:
```python
/home/guillaume/python3/lib/python3.3/site-packages/matplotlib-1.4.x-py3.3-linux-x86_64.egg/matplotlib/axes/_base.py incla(self)
 895 self.containers= []
 896 
--> 897 self.grid(self._gridOn, which=rcParams['axes.grid.which'])
 898 props = font_manager.FontProperties(size=rcParams['axes.titlesize'],
 899 weight=rcParams['axes.titleweight'])
/home/guillaume/python3/lib/python3.3/site-packages/mpl_toolkits/mplot3d/axes3d.py ingrid(self, b, **kwargs)
 1254 if len(kwargs) :
 1255 b= True
-> 1256 self._draw_grid= maxes._string_to_bool(b)
 1257 
 1258 def ticklabel_format(self, **kwargs) :
AttributeError: 'module' object has no attribute '_string_to_bool'
```
Is there a work around? Shall I rise an issue on github?
Cheers,
Guillaume
From: Guillaume G. <gui...@mi...> - 2013年12月18日 11:34:12
It appears I haden't properly updated the package, sorry for the noise.
G.
Le 18/12/2013 12:16, Guillaume Gay a écrit :
> Hi all,
>
> The following code fails on my box (python3.3, linux Mint 15, latest 
> matplotlib code from github):
>
> ```python
> import matplotlib as mpl
> from mpl_toolkits.mplot3d import Axes3D
> import numpy as np
> import matplotlib.pyplot as plt
>
> mpl.rcParams['legend.fontsize'] = 10
>
> fig = plt.figure()
> ax = fig.gca(projection='3d')
> theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
> z = np.linspace(-2, 2, 100)
> r = z**2 + 1
> x = r * np.sin(theta)
> y = r * np.cos(theta)
> ax.plot(x, y, z, label='parametric curve')
> ax.legend()
>
> plt.show()
> ```python
>
>
> Here is the tail of the traceback:
>
> ```python
>
> /home/guillaume/python3/lib/python3.3/site-packages/matplotlib-1.4.x-py3.3-linux-x86_64.egg/matplotlib/axes/_base.py 
> incla(self)
> 895 self.containers= []
> 896 --> 897 self.grid(self._gridOn, 
> which=rcParams['axes.grid.which'])
> 898 props = 
> font_manager.FontProperties(size=rcParams['axes.titlesize'],
> 899 weight=rcParams['axes.titleweight'])
>
> /home/guillaume/python3/lib/python3.3/site-packages/mpl_toolkits/mplot3d/axes3d.py 
> ingrid(self, b, **kwargs)
> 1254 if len(kwargs) :
> 1255 b= True
> -> 1256 self._draw_grid= maxes._string_to_bool(b)
> 1257 1258 def ticklabel_format(self, **kwargs) :
>
> AttributeError: 'module' object has no attribute '_string_to_bool'
>
> ```
>
> Is there a work around? Shall I rise an issue on github?
>
> Cheers,
>
> Guillaume
From: rhodeshart <ha...@us...> - 2013年12月18日 06:10:39
Problem:
X window drawn by the gtk3agg backend (in interactive mode) remain partly
obscured if another X window is moved to partly obscure, then moved away.
Doesn't happen with X windows generated by other X applications or host's
(where xserver running) native windows (ie only matplotlib figures get left
obscured).
matplotlib 1.3.1
python 2.72
OpenSuse 12.1
Connected to remotely from Win7 PC with VcXsrv XServer
Thanks for any clues
 Rhodes
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Problem-with-X-windows-drawn-gtk3agg-backend-tp42622.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Skip M. <sk...@po...> - 2013年12月17日 17:01:16
I have a matplotlib application which can display a plot or write it
to a file based on command line flags. I have discovered that if it is
run without DISPLAY set (say, from a crontab file) that the default
backend (I have no matplotlibrc file) attempts to chat with X, causing
crashes. I've worked around this like so:
import os
import matplotlib
if not os.environ.get("DISPLAY"):
 # Allow non-interactive use (e.g. running with -p from cron)
 matplotlib.use("Agg")
It seems kind of kludgy to have to do this in all matplotlib
applications. Could this be done within matplotlib itself?
Thx,
Skip
From: Guillermo-Nicolas G. D. <gn....@gm...> - 2013年12月10日 19:38:36
Hello,
I'm having an issue building Matplotlib. In reality the build process
finishes without error, but afterwards I get this error when importing
pyplot:
[kpi@dev-outils lib.linux-x86_64-3.3]$ python3.3
Python 3.3.2 (default, Sep 17 2013, 10:40:41)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "./matplotlib/pyplot.py", line 24, in <module>
 import matplotlib.colorbar
 File "./matplotlib/colorbar.py", line 27, in <module>
 import matplotlib.artist as martist
 File "./matplotlib/artist.py", line 8, in <module>
 from .transforms import Bbox, IdentityTransform, TransformedBbox, \
 File "./matplotlib/transforms.py", line 35, in <module>
 from matplotlib._path import (affine_transform,
count_bboxes_overlapping_bbox,
*ImportError: ./matplotlib/_path.cpython-33m.so
<http://path.cpython-33m.so>: undefined symbol:
_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l*
I don't know a thing about building C extensions, but if I understood
correctly some pasts posts in this list and others, this problem might be
caused by a library that is compiled with an incompatible version of GCC.
My first suspect was freetype, so I downloaded and compiled v2.4.12 using
gcc44 (which is the same compiler I used to build python3.3 and matplotlib).
But the problem persists... My question is: *how can I know wich library is
causing the issue, so I could recompile it?*
Or, if I am completely missing the root cause, thank you for steering me in
the correct direction :-)
More detailed info follows. Thank you for your help !
Nicolas
Here is the information asked for in the troubleshooting FAQ:
[kpi@dev-outils matplotlib]$ uname -a
Linux dev-outils.admin.mt.lan 2.6.18-348.16.1.el5 #1 SMP Wed Aug 21
04:00:25 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
[kpi@dev-outils matplotlib]$ cat /etc/redhat-release
CentOS release 5.9 (Final)
But please, note that I am using a Python version built by myself (not the
version that comes with CenOS 5.9) using gcc 4.4.7 (and not gcc 4.1.2)
[kpi@dev-outils matplotlib]$ gcc44 -v
Using built-in specs.
Target: x86_64-redhat-linux6E
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--disable-gnu-unique-object --with-as=/usr/libexec/binutils220/as
--enable-languages=c,c++,fortran --disable-libgcj
--with-mpfr=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-x86_64-redhat-linux6E/mpfr-install/
--with-ppl=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-x86_64-redhat-linux6E/ppl-install
--with-cloog=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-x86_64-redhat-linux6E/cloog-install
--with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux6E
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-1) (GCC)
[kpi@dev-outils lib.linux-x86_64-3.3]$ python3.3
Python 3.3.2 (default, Sep 17 2013, 10:40:41)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
>>> matplotlib.__version__
'1.3.1'
Here is what I modified in setup.cfg last time (but I also tried with an
unmodified version with the same results):
[gui_support]
agg = True
cairo = False
gtk = False
gtk3agg = False
gtk3cairo = False
gtkagg = False
macosx = False
pyside = False
qt4agg = False
tkagg = False
windowing = False
wxagg = False
[rc_options]
backend = Agg
I didn't modify any other config file. Here is the output of the build
process:
[kpi@dev-outils matplotlib-1.3.1]$ python3.3 setup.py build
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
 matplotlib: yes [1.3.1]
 python: yes [3.3.2 (default, Sep 17 2013, 10:40:41) [GCC
 4.4.7 20120313 (Red Hat 4.4.7-1)]]
 platform: yes [linux]
REQUIRED DEPENDENCIES AND EXTENSIONS
 numpy: yes [version 1.8.0]
 dateutil: yes [using dateutil version 2.2]
 tornado: yes [using tornado version 3.1.1]
 pyparsing: yes [using pyparsing version 2.0.1]
 pycxx: yes [Official versions of PyCXX are not compatible
 with Python 3.x. Using local copy]
 libagg: yes [pkg-config information for 'libagg' could not
 be found. Using local copy.]
 freetype: yes [version 16.1.10]
 png: yes [version 1.2.10]
OPTIONAL SUBPACKAGES
 sample_data: yes [installing]
 toolkits: yes [installing]
 tests: yes [using nose version 1.3.0]
OPTIONAL BACKEND EXTENSIONS
 macosx: no [skipping due to configuration]
 qt4agg: no [skipping due to configuration]
 gtk3agg: no [skipping due to configuration]
 gtk3cairo: no [skipping due to configuration]
 gtkagg: no [skipping due to configuration]
 tkagg: no [skipping due to configuration]
 wxagg: no [skipping due to configuration]
 gtk: no [skipping due to configuration]
 agg: yes [installing]
 cairo: no [skipping due to configuration]
 windowing: no [skipping due to configuration]
OPTIONAL LATEX DEPENDENCIES
 dvipng: no
 ghostscript: yes [version 8.70]
 latex: no
 pdftops: no
running build
running build_py
creating build
From: subramanya s. <po...@ou...> - 2013年12月08日 08:11:23
I get the following weird error when I switch x and y coordinates on a set of points 
 File "min_working_example.py", line 8, in <module>
 triang = tria.Triangulation(coords[:,1],coords[:,0])
 File "/usr/lib/pymodules/python2.7/matplotlib/tri/triangulation.py", line 72, in __init__
 dt = delaunay.Triangulation(self.x, self.y)
 File "/usr/lib/pymodules/python2.7/matplotlib/delaunay/triangulate.py", line 123, in __init__
 self.hull = self._compute_convex_hull()
 File "/usr/lib/pymodules/python2.7/matplotlib/delaunay/triangulate.py", line 158, in _compute_convex_hull
 hull.append(edges.pop(hull[-1]))
KeyError: 0
I have attached the set of points here and a minimum working example which can generate this error. This is with matplotlib 1.3
Thanks, 
Subramanya
Code:
from pylab import * 
import matplotlib.tri as tria
coords = loadtxt("data.txt")
fig = figure()
ax = fig.add_subplot(111)
triang = tria.Triangulation(coords[:,0],coords[:,1])
ax.triplot(triang)
savefig('a.png')
triang2 = tria.Triangulation(coords[:,1],coords[:,0])
Data
-6.500000000000004663e-01 -8.660254037844383745e-01
-6.500000000000003553e-01 -6.062177826491067512e-01
-6.500000000000003553e-01 -3.464101615137751833e-01
-6.500000000000002442e-01 -8.660254037844355990e-02
-6.500000000000001332e-01 1.732050807568880635e-01
-6.500000000000000222e-01 4.330127018922196869e-01
-6.499999999999999112e-01 6.928203230275513658e-01
-6.499999999999998002e-01 9.526279441628826561e-01
-4.250000000000004885e-01 -9.959292143521041307e-01
-4.250000000000003220e-01 -7.361215932167725073e-01
-4.250000000000002665e-01 -4.763139720814408840e-01
-4.250000000000001554e-01 -2.165063509461093161e-01
-4.250000000000000444e-01 4.330127018922230731e-02
-4.249999999999999334e-01 3.031088913245539307e-01
-4.249999999999998224e-01 5.629165124598856096e-01
-4.249999999999997669e-01 8.227241335952174550e-01
-2.000000000000003442e-01 -8.660254037844382635e-01
-2.000000000000002331e-01 -6.062177826491067512e-01
-2.000000000000001499e-01 -3.464101615137751278e-01
-2.000000000000000389e-01 -8.660254037844355990e-02
-1.999999999999999556e-01 1.732050807568881190e-01
-1.999999999999998446e-01 4.330127018922196869e-01
-1.999999999999997613e-01 6.928203230275513658e-01
2.499999999999980016e-02 -7.361215932167725073e-01
2.499999999999985567e-02 -4.763139720814409950e-01
2.499999999999999445e-02 -2.165063509461093716e-01
2.500000000000007772e-02 4.330127018922225179e-02
2.500000000000017486e-02 3.031088913245538752e-01
2.500000000000029976e-02 5.629165124598854986e-01
2.499999999999998335e-01 -6.062177826491067512e-01
2.499999999999999722e-01 -3.464101615137752388e-01
2.500000000000001110e-01 -8.660254037844355990e-02
2.500000000000002220e-01 1.732050807568880080e-01
2.500000000000002776e-01 4.330127018922196314e-01
4.749999999999999778e-01 -4.763139720814410505e-01
4.750000000000000888e-01 -2.165063509461093993e-01
4.750000000000001998e-01 4.330127018922216853e-02
4.750000000000003109e-01 3.031088913245537642e-01
7.000000000000000666e-01 -3.464101615137752388e-01
7.000000000000001776e-01 -8.660254037844367092e-02
7.000000000000002887e-01 1.732050807568879525e-01
9.250000000000002665e-01 -2.165063509461093716e-01
9.250000000000004885e-01 4.330127018922221710e-02
1.150000000000000355e+00 -8.660254037844382358e-02 		 	 		 
From: Neal B. <ndb...@gm...> - 2013年12月07日 15:25:26
I'm using
import matplotlib as mpl
mpl.use ('pdf')
from matplotlib.backends.backend_pdf import PdfPages
...
 self.pdf = PdfPages(file_name)
...
 self.pdf.savefig (self.fig)
 plt.close()
...
pdf.close()
This works fine, but now I want to try pgf.
If I add:
from matplotlib.backends.backend_pgf import FigureCanvasPgf 
mpl.backend_bases.register_backend('pdf', FigureCanvasPgf) 
at the beginning, then it chokes on the savefig (self.fig):
Traceback (most recent call last):
 File "./plot_stuff2.py", line 362, in <module>
 the_plot.finish (args, opt, time, res)
 File "./plot_stuff2.py", line 157, in finish
 self.pdf.savefig (self.fig)
 File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backends/backend_pdf.py", line 2297, in savefig
 figure.savefig(self, format='pdf', **kwargs)
 File "/home/nbecker/.local/lib/python2.7/site-packages/matplotlib/figure.py", 
line 1421, in savefig
 self.canvas.print_figure(*args, **kwargs)
 File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backend_bases.py", line 2220, in print_figure
 **kwargs)
 File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backend_bases.py", line 2060, in _print_method
 return print_method(*args, **kwargs)
 File "/home/nbecker/.local/lib/python2.7/site-
packages/matplotlib/backends/backend_pgf.py", line 869, in print_pdf
 raise ValueError("filename must be a path or a file-like object")
ValueError: filename must be a path or a file-like object
I know I had this working some time in the past, what's the trick to making 
multi-page pdf with pgf?
From: Derek T. <der...@gm...> - 2013年12月07日 06:00:33
Thanks Ben. I had tried turning off the shading but that makes it
impossible to see the features of the surface. I ended up combining the
surface values and resampling with scipy.interpolate.griddata so that I
have a single surface.
Derek
On Fri, Dec 6, 2013 at 12:23 PM, Benjamin Root <ben...@ou...> wrote:
> Shading is a bit complicated in plot_surface(). In your particular case,
> it is simply shading based on the results of calculating the normal vector
> of each facet on the surface. It then normalizes the shading it has to do
> based on what it has to get the full dynamic. This is why your image looks
> the way it does (plus, there might be an issue where the normals for one of
> your pieces is pointed inward instead of outward, probably due to the order
> of the datapoints for the surface).
>
> You can turn off shading altogether by simply passing shade=False as a
> keyword argument to plot_surface().
>
> I hope that helps!
> Ben Root
>
>
>
> On Fri, Dec 6, 2013 at 12:43 PM, Derek Thomas <der...@gm...>wrote:
>
>> I have a surface that is defined in four distinct sections. The sections
>> are continuous and at least C^1 smooth at the interface. When I plot this
>> in 3D with matplotlib, each section is shaded differently. Is it possible
>> to make the shading uniform? I have attached a figure. The main goal is
>> to make this look like one continuous surface. Thanks,
>>
>> Derek
>>
>>
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
From: jilguero <jil...@gm...> - 2013年12月06日 19:34:52
Hi Scott,
Ok!. Thank you. I take note.
Best regards,
Jilguero.
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/images-for-web-sites-tp42581p42604.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Benjamin R. <ben...@ou...> - 2013年12月06日 19:23:53
Shading is a bit complicated in plot_surface(). In your particular case, it
is simply shading based on the results of calculating the normal vector of
each facet on the surface. It then normalizes the shading it has to do
based on what it has to get the full dynamic. This is why your image looks
the way it does (plus, there might be an issue where the normals for one of
your pieces is pointed inward instead of outward, probably due to the order
of the datapoints for the surface).
You can turn off shading altogether by simply passing shade=False as a
keyword argument to plot_surface().
I hope that helps!
Ben Root
On Fri, Dec 6, 2013 at 12:43 PM, Derek Thomas <der...@gm...>wrote:
> I have a surface that is defined in four distinct sections. The sections
> are continuous and at least C^1 smooth at the interface. When I plot this
> in 3D with matplotlib, each section is shaded differently. Is it possible
> to make the shading uniform? I have attached a figure. The main goal is
> to make this look like one continuous surface. Thanks,
>
> Derek
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Derek T. <der...@gm...> - 2013年12月06日 17:43:26
Attachments: figure_1.png
I have a surface that is defined in four distinct sections. The sections
are continuous and at least C^1 smooth at the interface. When I plot this
in 3D with matplotlib, each section is shaded differently. Is it possible
to make the shading uniform? I have attached a figure. The main goal is
to make this look like one continuous surface. Thanks,
Derek
From: Sterling S. <sm...@fu...> - 2013年12月05日 18:58:03
Matthew,
See the discussion at
http://matplotlib.1069221.n5.nabble.com/Legend-Marker-Color-Bug-td38695.html
-Sterling
On Dec 4, 2013, at 3:48PM, Matthew Niznik wrote:
> Hi all,
> 
> I have a plot in which I have 15 markers, each with a separate size (created by calls to plot()). Because of this, the legend also shows variable size by default but I'd like all markers in the legend to have the same size.
> 
> I'm looking for an alternative to manually calling plot again with a standardized marker size (say 10.0) but plotting offscreen or with NANs. Thoughts I had were to either change the marker sizes after the legend is drawn (but it seems very difficult to update a legend post-creation) or to copy the handles and change the size that way (but I've yet to figure out how to make a hard copy of the plot handles). Any solutions?
> 
> -- 
> Matthew Niznik
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Sterling S. <sm...@fu...> - 2013年12月05日 18:47:55
Kelson,
Reading the documentation of matshow 
help(matshow)
reveals that it passes most keywords to imshow. Documentation of imshow 
help(imshow)
says it has an extent keyword to indicate the x and y ranges (instead of the array index). So something like (untested)
matshow(<your matrix>,extent=(left,right,bottom,top)) #where left is probably min(x), right is max(x), etc.
should work.
-Sterling
On Dec 4, 2013, at 5:07PM, Kelson Zawack wrote:
> I am trying to create a figure that plots a data matrix with matshow and has x tick labels corresponding to the x dimension of the matrix. The x dimension is a series of floats, but they don't correspond to the data matrix cell index values (0,1,2...) that make up what matplotlib obviously thinks are the x values for the plot. Is there a way that I can set the x tick labels so that they will be laid out and formatted in the normal way for numbers on the x-axis? It would be great if they also scaled in the normal way when the plot is manipulated in the little gui window.
> 
> Thanks for the help.
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Benjamin R. <ben...@ou...> - 2013年12月05日 18:30:24
Hmmm, sounds like a bug of some sort. Perhaps a pixel size is not being
specified when creating the movie. Could you file an issue detailing
exactly which version of mpl you are using and which movie writer you are
using?
Cheers!
Ben Root
On Wed, Nov 27, 2013 at 11:57 AM, Andreas Hilboll <li...@hi...> wrote:
> Hi,
>
> when running basic_example_writer.py, I get *.mp4 files with a canvas
> size of 800x600 pixels (at least that's what mplayer tells me). However,
> I have trouble understanding where this canvas size comes from. The
> example does not explicitly set the dpi or the figure size, and I don't
> have a matplotlibrc which changes these settings. So figure.dpi is 80,
> and the fig.size_inches is (8, 6). So how come this translates to a
> 800x600 pixel movie?
>
> Thanks for you insight :)
>
> -- Andreas.
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Paul H. <pmh...@gm...> - 2013年12月05日 16:59:20
Matthew,
I think you're on the right track. You need proxy artists of some sort. You
can create Line2D objects directly, never add them to the figure, and then
use those to create the legend.
An alternatively/hacky approach I often use is to the plot all the real
data with '_nolegend' labels, get my current (or desired) axes limits, then
plot the negative value of my data with the symbology I want in the legend
and restore my original axes limits. This works for me b/c I'm always
dealing with rainfall or water quality data, so negative values aren't
really a thing for me to worry about. The concept is solid though:
1) plot the data (no labels)
2) record axes limit
3) plot fake data far away from real data with legend-appropriate symbology
4) restore axes limits
5) create legend.
On Wed, Dec 4, 2013 at 3:48 PM, Matthew Niznik <mat...@gm...>wrote:
> Hi all,
>
> I have a plot in which I have 15 markers, each with a separate size
> (created by calls to plot()). Because of this, the legend also shows
> variable size by default but I'd like all markers in the legend to have the
> same size.
>
> I'm looking for an alternative to manually calling plot again with a
> standardized marker size (say 10.0) but plotting offscreen or with NANs.
> Thoughts I had were to either change the marker sizes after the legend is
> drawn (but it seems very difficult to update a legend post-creation) or to
> copy the handles and change the size that way (but I've yet to figure out
> how to make a hard copy of the plot handles). Any solutions?
>
> --
> Matthew Niznik
>
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: APaiva <alo...@gm...> - 2013年12月05日 12:41:49
I have now change my code and I have done the following.
I have open a Tkinter toplevel, and worked on it:
def OnButtonBress(self,)
 self.fig= matplotlip.figure.figure()
 (... here I have build the code to build my axis using the
self.fig.add_subplot() function )
 root=Tk.Toplevel()
 canvas = FigureCanvasTkAgg(self.fig, master=root)
 canvas.show()
 canvas.get_tk_widget().pack(side='top', fill='both', expand=1)
 toolbar = NavigationToolbar2TkAgg( canvas, root )
 toolbar.update()
 canvas._tkcanvas.pack(side='top', fill='both', expand=1)
But when I close the window, the same message...
I tried to make some prints function to make debug in the backend_tkagg.py
file whoever an destroy command is called. I have tried to print the id's of
the self.__idle_callback to see if the randomNumber is the same, but when it
plots the Tk.Window and my graphs, nothing has been printed.
I want to ask, what is calling after the window has been destroyed? Because
I have make code do destroy this window whenever I want. And when I call the
function root.destroy() the above error message is printed to the shell.
Best regards,
A.Paiva
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/invalid-command-name-randomNumbercallit-tp42585p42588.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Showing results of 32

1 2 > >> (Page 1 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /