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
(35) |
2
(15) |
3
(16) |
4
(3) |
5
(1) |
|
6
(1) |
7
(11) |
8
(10) |
9
(13) |
10
(24) |
11
(21) |
12
(10) |
|
13
(2) |
14
(24) |
15
(20) |
16
(36) |
17
(13) |
18
(6) |
19
(4) |
|
20
(2) |
21
(11) |
22
(13) |
23
(7) |
24
(10) |
25
(7) |
26
(12) |
|
27
(2) |
28
(6) |
29
(20) |
30
(9) |
31
(39) |
|
|
|
From: Barry W. <bar...@gm...> - 2008-07-03 19:14:04
|
On Thu, Jul 3, 2008 at 8:41 AM, John Hunter <jd...@gm...> wrote:
> On Wed, Jul 2, 2008 at 3:41 PM, Barry Wark <bar...@gm...> wrote:
>> I've written the start of a Cocoa-native backend for matplotlib and
>> would like to submit feedback on the code and on the possibility of
>> including it in the standard matplotlib distribution. The backend
>
> Hey Barry,
>
> This is great and it is something we are interested in. I haven't had
> a chance to test it and will be away next week but I can give you some
> initial thoughts. In general, we want to pare down the number of
> backends but OS X is an important platform and there are certainly
> some advantages to doing native rendering. For us to accept a new
> backend, we need to meet the following criteria:
>
> - someone volunteers to support it. This is a multi-year
> commitment. Presumably this would be you.
Yes.
>
> - feature complete - images, mathtext, rotated text, etc... It
> sounds like the only part you are unsure about is mathtext so perhaps
> Michael can advise. I don't think it will be too hard since Michael
> has designed this to work with unicode fonts if requested.
Using unicode fonts should make it easy.
>
> - gui backends: toolbar support
Currently not implemented, but not a problem.
>
> If you think these are doable, that would be great. If not, I think
> we can rework the backend infrastructure a bit to support external
> backend, eg an rc backend setting which points to a file that contains
> the backend implementation. This latter is worth doing in any case,
> so if you want to have a look at it....
This would be _very_ useful, whether or not you decide to include a
Cocoa native backend in the distribution. Perhaps also making it
possible to delegate to an other package instead of just a file so
that backends could be installed as separate eggs would be useuful
(e.g. delegate the backend to my.package.backend).
>
>> implementation is not complete (image rendering and mathtext rendering
>> are currently no implemented, nor are the print_* methods of the
>> FigureCanvas). Image rendering is trivial once I figure out how to get
>> the pixel data out of a matplotlib image (I just haven't investigated
>> the API yet). The print_* methods are also trivial (see point 1
>> below). I'm not sure how to handle mathtext yet. This backend has two
>> major feature differences from CocoaAgg:
>
>> 2. The reason I wrote the backend was so that matplotlib could be used
>> seemlesslly from within a Cocoa application. Thus this backend *will
>> not work* without an existing NSRunLoop. It won't work from the
>> terminal or an IPython session. It will work from the in-progress
>> Cocoa frontend for IPython or from any other Cocoa application. Again
>> there are tradeoffs. On the positive side, figure windows are treated
>> like any other application window, selectable from the Window menu
>> etc. and matplotlib becomes a seemless part of the application.
>> Existing backends designed to create their own runloop (e.g. CocoaAgg
>> or TkAgg) cause menubar and run loop problems when used from within an
>> existing application. It would be possible to merge the CocoaAgg and
>> Cocoa backends in this regard to use the existing run loop if present.
>
> I know nothing about cocoa apps, but from the way you describe this I
> think there may be some confusion in how the backends should work. I
> will speak in terms of gtk since this is the toolkit I know best. The
> FigureCanvas should be a widget which is embeddable in an app (in a
> container or window, etc) -- the gtk figure canvas is such a widget
> and can be used in a gtk app and mpl knows nothing about the
> application or mainloop -- that part is up to the application
> developer. The FigureManager is basically a pylab helper class and is
> not meant to be used by the application developer, though I think some
> backends may have been designed differently (eg wx). The
> FigureManager creates a canvas, a toolbar and a window, and puts all
> the pieces together. "show" is a pylab construct that raises the
> active windows and starts the mainloop.
No, in fact you've done a very good job of communicating the
architecture and it appears that it was my mistake in explaining my
work that's led to confusion. backend_cocoa.FigureCanvasView (a
FigureCanvas subclass) is an NSView subclass that can be embedded in a
Cocoa application to render matplotlib figures.
We have a special use case in mind for the
backend_cocoa.FigureManagerCocoa (the FigureManager subclass),
however. I'm not sure if you've been following discussions on the
ipython-dev regarding GUI frontends for IPython, so let me briefly
recap. The new Twisted-based architecture of IPython now allows easy
development of GUI frontends for the IPython engine because the engine
is decoupled from readline. Thus a Cocoa-based frontend for IPython
might behave like a terminal but be implemented as a native Cocoa
widget that can be embedded in other applications. We want the user of
this GUI IPython frontend to be able to use matplotlib as if in a
pylab session at the terminal. Because there's already an NSRunLoop
running, however, the existing backends that attempt to start their on
run loop cause problems. I imagine GUI frontends (on OS X) doing a
matplotlib.use('Cocoa') at startup but the user keeping their existing
backend for terminal usage. I haven't yet explored the
FigureManagerCocoa creating its own runloop if none exists. If you
want to try the new IPython frontend (still very much a work in
progress), have a look in the IPython/frontend/cocoa/examples
directory of IPython trunk (launchpad.net/ipython).
Thus there are really two different aspects to consider for backend_cocoa
1. Native rendering. this may or may not be valuable. If valuable, we
could merge this renderer into the existing CocoaAgg backend,
replacing the FiureCanvas that blits from the Agg renderer.
2. A FigureManager for use *within* a running cocoa application. I
will investigate using the FigureManagerCocoa from terminal as well,
but that's not the use case I wrote it for.
Although I personally think (2) (in conjunciton with a native forntend
for IPython) is the way of the future on OS X, it may still be too
small a use case for you to feel its inclusion in matplotlib is
valuable. In that case, being able to delegate the backend to an other
package as discussed above would meet our needs.
>
> So your backend *should* be designed so that it can be run from the
> shell, basically you need to create an application within the backend
> and start the mainloop with show -- this app will only be created in
> pylab mode on calls to new_figure_manager and show. I don't know if
> any of this makes sense for cocoa apps, but it is a nice feature for
> backends because then those of us who do not know how to build a cocoa
> app (and maybe don't want to learn) can still test the backend on
> pylab scripts and regular os x users can use your backend w/ pylab
> scripts.
backend_cocoaagg already does this. if there's a compelling reason to
move to the native renderer, we could merge that into
backend_cocoaagg. backend_cocoa provides a separate functionality --
simulating a pylab session from within a native GUI frontend for
IPython.
>
> JDH
>
|
|
From: Michael D. <md...@st...> - 2008-07-03 18:28:57
|
Friedrich Hagedorn wrote: > Hello, > > today I tried to install mpl in my local home directory at work. This > debian distribution is very old and I had to compile for my own. > > But I failed to compile pygtk (special cairo and pango) as a dependency > for mpl. So I have two questions: > > 1. Does you have an advice to compile mpl with minimal dependencies? > You can copy "setup.cfg.template" to "setup.cfg" and then edit the [gui] section to disable certain GUIs. You will need at least one GUI -- TkAgg is probably going to be the easiest to get working on an older system. You will need to have Tkinter and the Tcl/Tk development headers installed, however. > 2. Does anybody know a good python dirstibution including mpl? > Enthought has one, but I have no experience with it. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Friedrich H. <fri...@gm...> - 2008-07-03 18:22:35
|
Hello, today I tried to install mpl in my local home directory at work. This debian distribution is very old and I had to compile for my own. But I failed to compile pygtk (special cairo and pango) as a dependency for mpl. So I have two questions: 1. Does you have an advice to compile mpl with minimal dependencies? 2. Does anybody know a good python dirstibution including mpl? Thanks, Friedrich |
|
From: John H. <jd...@gm...> - 2008-07-03 15:42:01
|
On Wed, Jul 2, 2008 at 3:41 PM, Barry Wark <bar...@gm...> wrote: > I've written the start of a Cocoa-native backend for matplotlib and > would like to submit feedback on the code and on the possibility of > including it in the standard matplotlib distribution. The backend Hey Barry, This is great and it is something we are interested in. I haven't had a chance to test it and will be away next week but I can give you some initial thoughts. In general, we want to pare down the number of backends but OS X is an important platform and there are certainly some advantages to doing native rendering. For us to accept a new backend, we need to meet the following criteria: - someone volunteers to support it. This is a multi-year commitment. Presumably this would be you. - feature complete - images, mathtext, rotated text, etc... It sounds like the only part you are unsure about is mathtext so perhaps Michael can advise. I don't think it will be too hard since Michael has designed this to work with unicode fonts if requested. - gui backends: toolbar support If you think these are doable, that would be great. If not, I think we can rework the backend infrastructure a bit to support external backend, eg an rc backend setting which points to a file that contains the backend implementation. This latter is worth doing in any case, so if you want to have a look at it.... > implementation is not complete (image rendering and mathtext rendering > are currently no implemented, nor are the print_* methods of the > FigureCanvas). Image rendering is trivial once I figure out how to get > the pixel data out of a matplotlib image (I just haven't investigated > the API yet). The print_* methods are also trivial (see point 1 > below). I'm not sure how to handle mathtext yet. This backend has two > major feature differences from CocoaAgg: > 2. The reason I wrote the backend was so that matplotlib could be used > seemlesslly from within a Cocoa application. Thus this backend *will > not work* without an existing NSRunLoop. It won't work from the > terminal or an IPython session. It will work from the in-progress > Cocoa frontend for IPython or from any other Cocoa application. Again > there are tradeoffs. On the positive side, figure windows are treated > like any other application window, selectable from the Window menu > etc. and matplotlib becomes a seemless part of the application. > Existing backends designed to create their own runloop (e.g. CocoaAgg > or TkAgg) cause menubar and run loop problems when used from within an > existing application. It would be possible to merge the CocoaAgg and > Cocoa backends in this regard to use the existing run loop if present. I know nothing about cocoa apps, but from the way you describe this I think there may be some confusion in how the backends should work. I will speak in terms of gtk since this is the toolkit I know best. The FigureCanvas should be a widget which is embeddable in an app (in a container or window, etc) -- the gtk figure canvas is such a widget and can be used in a gtk app and mpl knows nothing about the application or mainloop -- that part is up to the application developer. The FigureManager is basically a pylab helper class and is not meant to be used by the application developer, though I think some backends may have been designed differently (eg wx). The FigureManager creates a canvas, a toolbar and a window, and puts all the pieces together. "show" is a pylab construct that raises the active windows and starts the mainloop. So your backend *should* be designed so that it can be run from the shell, basically you need to create an application within the backend and start the mainloop with show -- this app will only be created in pylab mode on calls to new_figure_manager and show. I don't know if any of this makes sense for cocoa apps, but it is a nice feature for backends because then those of us who do not know how to build a cocoa app (and maybe don't want to learn) can still test the backend on pylab scripts and regular os x users can use your backend w/ pylab scripts. JDH |
|
From: John K. <jki...@an...> - 2008-07-03 14:37:23
|
Cool! That is exactly what I wanted to do!
j
-----Original Message-----
From: John Hunter [mailto:jd...@gm...]
Sent: Thursday, July 03, 2008 10:31 AM
To: John Kitchin
Cc: mat...@li...; Mat...@gm...
Subject: Re: [Matplotlib-users] findobj in pylab
On Thu, Jul 3, 2008 at 8:42 AM, John Kitchin <jki...@an...>
wrote:
> Thanks Matthias. That is a helpful example.
>
> I have been trying to figure out how to recursively examine all the
objects
> in fig to see if there is a particular settable property. It seems like
the
> algorithm has to be recursive so that it goes deep into all the lists,
etc.
> I have not figured out how to know when you have reached the bottom/end of
a
> trail.
>
> Such a function would let me set any text property in the whole figure
> without needing to know if it was a text object, label, legend, etc...
maybe
> that is not as valuable as I think it would be though.
This is a good idea, and I just added an artist method "findobj" in
svn that recursively calls get_children and implements a match
criteria (class instance or callable filter). There is also a
pyplot/pylab wrapper that operates on current figure by default. Here
is an example:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.text as text
a = np.arange(0,3,.02)
b = np.arange(0,3,.02)
c = np.exp(a)
d = c[::-1]
fig = plt.figure()
ax = fig.add_subplot(111)
plt.plot(a,c,'k--',a,d,'k:',a,c+d,'k')
plt.legend(('Model length', 'Data length', 'Total message length'),
'upper center', shadow=True)
plt.ylim([-1,20])
plt.grid(False)
plt.xlabel('Model complexity --->')
plt.ylabel('Message length --->')
plt.title('Minimum Message Length')
# match on arbitrary function
def myfunc(x):
return hasattr(x, 'set_color')
for o in fig.findobj(myfunc):
o.set_color('blue')
# match on class instances
for o in fig.findobj(text.Text):
o.set_fontstyle('italic')
plt.show()
|
|
From: John H. <jd...@gm...> - 2008-07-03 14:33:18
|
I will be on vacation until July 21st. I will have sporadic email contact so I may pop up here and there, but if I have been involved in a thread and mysteriously disappear, now you know why. JDH |
|
From: John H. <jd...@gm...> - 2008-07-03 14:31:19
|
On Thu, Jul 3, 2008 at 8:42 AM, John Kitchin <jki...@an...> wrote:
> Thanks Matthias. That is a helpful example.
>
> I have been trying to figure out how to recursively examine all the objects
> in fig to see if there is a particular settable property. It seems like the
> algorithm has to be recursive so that it goes deep into all the lists, etc.
> I have not figured out how to know when you have reached the bottom/end of a
> trail.
>
> Such a function would let me set any text property in the whole figure
> without needing to know if it was a text object, label, legend, etc... maybe
> that is not as valuable as I think it would be though.
This is a good idea, and I just added an artist method "findobj" in
svn that recursively calls get_children and implements a match
criteria (class instance or callable filter). There is also a
pyplot/pylab wrapper that operates on current figure by default. Here
is an example:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.text as text
a = np.arange(0,3,.02)
b = np.arange(0,3,.02)
c = np.exp(a)
d = c[::-1]
fig = plt.figure()
ax = fig.add_subplot(111)
plt.plot(a,c,'k--',a,d,'k:',a,c+d,'k')
plt.legend(('Model length', 'Data length', 'Total message length'),
'upper center', shadow=True)
plt.ylim([-1,20])
plt.grid(False)
plt.xlabel('Model complexity --->')
plt.ylabel('Message length --->')
plt.title('Minimum Message Length')
# match on arbitrary function
def myfunc(x):
return hasattr(x, 'set_color')
for o in fig.findobj(myfunc):
o.set_color('blue')
# match on class instances
for o in fig.findobj(text.Text):
o.set_fontstyle('italic')
plt.show()
|
|
From: John H. <jd...@gm...> - 2008-07-03 13:50:05
|
On Wed, Jul 2, 2008 at 7:13 PM, Nihat <ng...@gm...> wrote:
> Here are my questions:
> 1. I have extended the Line2D class as I am using _nolegend_ in the label.
> I still wanted to differentiate between lines using something called id. Is
> there a better way of doing it with built-in attributes?
Nothing built into matplotlib, but python has an "id" function and the
line objects are hashable, so you probably don't need anything else.
> 2. I can remove the line but somehow the text added to the axes does not
> respond to pick events. Anybody has any thoughts?
It turns out text picking was broken in svn. When I looked at the
implementation, I saw
try:
l,b,w,h = self.get_window_extent().get_bounds()
except:
# TODO: why does this error occur
#print str(self),"error looking at get_window_extent"
return False,{}
so apparently some developer saw this was broken, hid it with a
blanket except that was silent, and forgot to get back to the TODO.
bbox.get_bounds did not survive the transform refactor, and is now
called bbox.bounds. This could of been me, thinking I would fix it
and then forgot about it, but I certainly hope not. Note to
developers: never catch all exceptions with a blanket except that
doesn't at least warn. This is fixed in svn so text picking is
working again.
> 3. The neat thing would be to add the text into the CustomLine class so
> line's label is contained in the class. Not sure how I can do it because
> text needs an axis and axis is nor associated with Line2D until you add the
> line to axis...
> 4. How can I add a constant offset like (2 pixels right, 2 pixels up) at the
> right end of the line for its text label.
This is possible, but is a little harder than it should be because to
do it elegantly you need to override a lot of methods. If we had a
proper containment API, it would be a lot easier and this is probably
something worth doing. I wrote up an example (added it to
examples/api/line_with_text.py in svn).
In general, I think it would be nice to add support for all artists
(lines, patches, whatever) to display their label. We would need to
think a little bit about the API for placing the label (eg if every
artist provides their extent, one could place the label at "upper
right" with a certain offset.
Here is the example:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.lines as lines
import matplotlib.transforms as mtransforms
import matplotlib.text as mtext
class MyLine(lines.Line2D):
def __init__(self, *args, **kwargs):
# we'll update the position when the line data is set
self.text = mtext.Text(0, 0, '')
lines.Line2D.__init__(self, *args, **kwargs)
# we can't access the label attr until *after* the line is
# inited
self.text.set_text(self.get_label())
def set_figure(self, figure):
self.text.set_figure(figure)
lines.Line2D.set_figure(self, figure)
def set_axes(self, axes):
self.text.set_axes(axes)
lines.Line2D.set_axes(self, axes)
def set_transform(self, transform):
# 2 pixel offset
texttrans = transform + mtransforms.Affine2D().translate(2, 2)
self.text.set_transform(texttrans)
lines.Line2D.set_transform(self, transform)
def set_data(self, x, y):
if len(x):
self.text.set_position((x[-1], y[-1]))
lines.Line2D.set_data(self, x, y)
def draw(self, renderer):
# draw my label at the end of the line with 2 pixel offset
lines.Line2D.draw(self, renderer)
self.text.draw(renderer)
fig = plt.figure()
ax = fig.add_subplot(111)
x, y = np.random.rand(2, 20)
line = MyLine(x, y, mfc='red', ms=12, label='line label')
#line.text.set_text('line label')
line.text.set_color('red')
line.text.set_fontsize(16)
ax.add_line(line)
plt.show()
|
|
From: John K. <jki...@an...> - 2008-07-03 13:42:46
|
Thanks Matthias. That is a helpful example.
I have been trying to figure out how to recursively examine all the objects
in fig to see if there is a particular settable property. It seems like the
algorithm has to be recursive so that it goes deep into all the lists, etc.
I have not figured out how to know when you have reached the bottom/end of a
trail.
Such a function would let me set any text property in the whole figure
without needing to know if it was a text object, label, legend, etc... maybe
that is not as valuable as I think it would be though.
j
Message: 2
Date: Wed, 2 Jul 2008 10:00:31 +0200
From: Matthias Michler <Mat...@gm...>
Subject: Re: [Matplotlib-users] findobj in pylab
To: mat...@li...
Message-ID: <200...@gm...>
Content-Type: text/plain; charset="iso-8859-1"
Hello John,
I'm not sure there is a better way, but the following works for me:
----------------------------------------------------------------------------
----------
from pylab import *
fig = figure()
# adding some subplots / axes instances
subplot(121)
x = linspace(-0.5, 1.5, 10)
plot(x, 0.5*x**2, 'ro', x, 0.33*x**3, 'bs') for i in [2, 4]:
subplot(2,2,i)
# get all axes of the figure 'fig' ...
allaxes = fig.get_axes()
# ... and reset their property x-limits setp(allaxes, 'xlim', (-.5, 1.5))
ax = allaxes[0]
# get all lines of the axes 'ax' ...
lines = ax.get_lines() # == ax.lines
# ... and reset their markerfacecolor
setp(lines, 'mfc', 'g')
show()
----------------------------------------------------------------------------
-----------
best regards
Matthias
On Thursday 26 June 2008 00:21:13 John Kitchin wrote:
> Is there a way to find all the "axes" objects or "line" object handles
> in pylab? In matlab I used to do something like A = findobj(gcf)
> Allaxes = findall(a,'Type','axes')
> Set(allaxes,'Fontname','Arial')
>
> Is there a way to do that in pylab/matplotlib?
>
> Thanks,
>
> j
>
>
>
> -----------------------------------
> John Kitchin
> Assistant Professor
> NETL-IAES Resident Institute Fellow
> Doherty Hall 3112
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu
>
>
-----------------------------------
John Kitchin
Assistant Professor
NETL-IAES Resident Institute Fellow
Doherty Hall 3112
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
|
|
From: John H. <jd...@gm...> - 2008-07-03 11:56:56
|
On Thu, Jul 3, 2008 at 5:23 AM, Florian Mueller <ice...@gm...> wrote: > I don't understand whats going on, but when I remove the Line > "close(1)" from your script and use "GTKAgg" instead of "PDF" the > memory leak of my previous post is gone! Apparently there is a leak in the creation and destruction of the gtk pixel buffer. If you clear it with clf, instead of closing it, perhaps you aboid this leak. Just speculating. But it is good to know that it doesn't leak with a clf. JDH |
|
From: Florian M. <ice...@gm...> - 2008-07-03 10:23:10
|
> John, if I run your script I found following behaviour of distinct > backends in terms of memory leaks: > > QtAgg - ok > Agg - ok > GTKAgg - oh, memory leak > PDF - ok, as you mentionend > Hi John, I don't understand whats going on, but when I remove the Line "close(1)" from your script and use "GTKAgg" instead of "PDF" the memory leak of my previous post is gone! Cheers, Florian -- -- Florian Mueller Remote Sensing, Snow & Ice, Meteorology, IT Innsbruck, Austria ICQ: Skype: icephase26 |
|
From: Florian M. <ice...@gm...> - 2008-07-03 10:05:26
|
Hi,
John, if I run your script I found following behaviour of distinct
backends in terms of memory leaks:
QtAgg - ok
Agg - ok
GTKAgg - oh, memory leak
PDF - ok, as you mentionend
Hope it helps, seems it is not a problem of matplotlib?!
Cheers,
Florian
P.S: I use matplotlib svn with following configuration:
============================================================================
BUILDING MATPLOTLIB
matplotlib: 0.98.2
python: 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC
4.1.3 20070929 (prerelease) (Ubuntu
4.1.2-16ubuntu2)]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.2.0.dev5283
freetype2: 9.16.3
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.15beta5
Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
wxPython: 2.8.4.0
* WxAgg extension not required for wxPython >= 2.8
Gtk+: gtk+: 2.12.0, glib: 2.14.1, pygtk: 2.12.0,
pygobject: 2.14.0
Qt: Qt: 3.3.7, PyQt: 3.17.3
Qt4: Qt: 4.3.2, PyQt4: 4.3
Cairo: 1.4.0
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: matplotlib will provide
pytz: 2007d
OPTIONAL USETEX DEPENDENCIES
dvipng: no
ghostscript: 8.61
latex: 3.141592
pdftops: 3.00
EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
configobj: 4.4.0
enthought.traits: 2.6b1-mpl
[Edit setup.cfg to suppress the above messages]
============================================================================
--
--
Florian Mueller
Remote Sensing, Snow & Ice, Meteorology, IT
Innsbruck, Austria
ICQ:
Skype: icephase26
|
|
From: David T. <dav...@gm...> - 2008-07-03 07:42:06
|
Hi, While upgrading from matplotlib 0.91.2 to 0.98.2 my software stop working properly. I had to adapt one of my function to autoscale visible lines. Basically, the modified function seems to work but when I use it on a shared axes context I run into problem. A small script in attachment illustrate the problem. Actually, the second axes which sharex with first one, prevent the first one to be scaled properly. The script works properly with matplotlib 0.91.2 but fail (autoscaling not working) using 0.98.2 Am I doing something wrong in my autoscale function while updating the axs.dataLim ? Or is it something more tricky? Thanks in advance for your help. David |
|
From: Nihat <ng...@gm...> - 2008-07-03 00:13:32
|
Hi,
In a part of my code I use
----
thisline = CL.CustomLine([x1, x2], [y1, y2], color='black', linestyle='--',
picker=2, zorder=20, id=lbl)
self.ax.add_line(thisline)
if (cfg.linedraw_label):
self.ax.text(x2, y2, lbl, fontname='Sans', fontsize=9, picker=2,
zorder=20)
----
In another part of the code I act on pick events
----
def OnPick(self, event):
self.picked = event.artist
if isinstance(self.picked, CL.CustomLine):
if (cfg.select_mode):
<SNIP>
if(cfg.delete_mode):
self.picked.remove()
self.canvas.draw()
if isinstance(self.picked, Text):
if(cfg.delete_mode):
self.picked.remove()
self.canvas.draw()
----
Here are my questions:
1. I have extended the Line2D class as I am using _nolegend_ in the label.
I still wanted to differentiate between lines using something called id. Is
there a better way of doing it with built-in attributes?
2. I can remove the line but somehow the text added to the axes does not
respond to pick events. Anybody has any thoughts?
3. The neat thing would be to add the text into the CustomLine class so
line's label is contained in the class. Not sure how I can do it because
text needs an axis and axis is nor associated with Line2D until you add the
line to axis...
4. How can I add a constant offset like (2 pixels right, 2 pixels up) at the
right end of the line for its text label.
Thanks in advance.
Nihat
|