You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(33) |
Dec
(20) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(44) |
Mar
(51) |
Apr
(43) |
May
(43) |
Jun
(36) |
Jul
(61) |
Aug
(44) |
Sep
(25) |
Oct
(82) |
Nov
(97) |
Dec
(47) |
| 2005 |
Jan
(77) |
Feb
(143) |
Mar
(42) |
Apr
(31) |
May
(93) |
Jun
(93) |
Jul
(35) |
Aug
(78) |
Sep
(56) |
Oct
(44) |
Nov
(72) |
Dec
(75) |
| 2006 |
Jan
(116) |
Feb
(99) |
Mar
(181) |
Apr
(171) |
May
(112) |
Jun
(86) |
Jul
(91) |
Aug
(111) |
Sep
(77) |
Oct
(72) |
Nov
(57) |
Dec
(51) |
| 2007 |
Jan
(64) |
Feb
(116) |
Mar
(70) |
Apr
(74) |
May
(53) |
Jun
(40) |
Jul
(519) |
Aug
(151) |
Sep
(132) |
Oct
(74) |
Nov
(282) |
Dec
(190) |
| 2008 |
Jan
(141) |
Feb
(67) |
Mar
(69) |
Apr
(96) |
May
(227) |
Jun
(404) |
Jul
(399) |
Aug
(96) |
Sep
(120) |
Oct
(205) |
Nov
(126) |
Dec
(261) |
| 2009 |
Jan
(136) |
Feb
(136) |
Mar
(119) |
Apr
(124) |
May
(155) |
Jun
(98) |
Jul
(136) |
Aug
(292) |
Sep
(174) |
Oct
(126) |
Nov
(126) |
Dec
(79) |
| 2010 |
Jan
(109) |
Feb
(83) |
Mar
(139) |
Apr
(91) |
May
(79) |
Jun
(164) |
Jul
(184) |
Aug
(146) |
Sep
(163) |
Oct
(128) |
Nov
(70) |
Dec
(73) |
| 2011 |
Jan
(235) |
Feb
(165) |
Mar
(147) |
Apr
(86) |
May
(74) |
Jun
(118) |
Jul
(65) |
Aug
(75) |
Sep
(162) |
Oct
(94) |
Nov
(48) |
Dec
(44) |
| 2012 |
Jan
(49) |
Feb
(40) |
Mar
(88) |
Apr
(35) |
May
(52) |
Jun
(69) |
Jul
(90) |
Aug
(123) |
Sep
(112) |
Oct
(120) |
Nov
(105) |
Dec
(116) |
| 2013 |
Jan
(76) |
Feb
(26) |
Mar
(78) |
Apr
(43) |
May
(61) |
Jun
(53) |
Jul
(147) |
Aug
(85) |
Sep
(83) |
Oct
(122) |
Nov
(18) |
Dec
(27) |
| 2014 |
Jan
(58) |
Feb
(25) |
Mar
(49) |
Apr
(17) |
May
(29) |
Jun
(39) |
Jul
(53) |
Aug
(52) |
Sep
(35) |
Oct
(47) |
Nov
(110) |
Dec
(27) |
| 2015 |
Jan
(50) |
Feb
(93) |
Mar
(96) |
Apr
(30) |
May
(55) |
Jun
(83) |
Jul
(44) |
Aug
(8) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(4) |
2
(7) |
3
(2) |
4
(9) |
5
(8) |
6
|
|
7
|
8
(6) |
9
|
10
(2) |
11
(8) |
12
(1) |
13
(2) |
|
14
|
15
|
16
|
17
(4) |
18
(8) |
19
(4) |
20
(3) |
|
21
|
22
(9) |
23
(9) |
24
(8) |
25
(2) |
26
(1) |
27
|
|
28
|
29
|
30
|
|
|
|
|
|
From: Steve C. <ste...@ya...> - 2004-11-24 16:51:18
|
On Wed, 2004-11-24 at 09:34 -0600, John Hunter wrote: > For one thing, cxx strangely doesn't define an IOError. I don't know > if this is simply an oversight. Perhaps I'll file a bug on the sf > site.... The Python C API uses PyErr_SetFromErrnoWithFilename(PyObject *type, char *filename) to raise IOError exceptions, perhaps cxx has an equivalent function. Steve |
|
From: John H. <jdh...@ac...> - 2004-11-24 15:54:07
|
>>>>> "Norbert" == Norbert Nemec <Nor...@gm...> writes:
Norbert> Ouch, sorry, I do not even have 2.2 installed. Guess with
Norbert> that information, the whole patch becomes bogus.
Norbert> On the other hand: simpy reverting pop to get leaves you
Norbert> with the old problem: you have to drop the check for
Norbert> emptyness of kwargs since legal arguments are not removed
Norbert> after use. If, on the other hand, you remove this check,
Norbert> erraneous (p.e. misspelled) arguments are just silently
Norbert> ignored.
Norbert> Maybe, a wrapper would solve the problem? How would one
Norbert> code a replacement for pop that works on 2.2 as well?
Norbert> Probably easiest by using get and del within a
Norbert> try..except block? The wrapper could then have a clear
Norbert> note how to replace it once 2.3 becomes mandatory
Norbert> sometimes in the future.
I added a method popd to matplotlib.cbook. It should work just like
d.pop(key) but you call popd(d, key). Like pop, it accepts a default
value.
Before we reapply your patch to raise on bad kwargs, I think it's
worth getting some input if we want to raise on nonexistent keys. In
some cases, it might be desirable to be able to do, for example
legend(handles, labels, linewidth=2, fontsize=12)
From an implementation standpoint, it's easiest to implement something
like this using anonymous **kwargs, and iterate over all the handles
and text objects calling set_someprop(val) if set_someprop exists for
some object.
Ie, rather than making all the keyword args explicit and therefore
having to add explicitly add all the setters for line, text and patch
to the kwargs of Legend, which would become a maintenance problem
(duplication of properties throughout the code), one possible design
is to just put a blanket kwargs at the end and define an Artist update
method to look like (freestyle coding here...)
def update(self, **kwargs):
for key, val in kwargs.items():
func = getattr(self, 'set_'+key, None)
if func is None or not callable(func): continue
func(val)
Then we could do in the legend class
for o in lines+texts+patches: o.update(kwargs)
The downside of course is that this fails silently if the user
provides a bad kwarg. The upside is it is a very easy, clean
implementation that scales with the addition of new setters to the
underlying objects.
JDH
|
|
From: John H. <jdh...@ac...> - 2004-11-24 15:35:03
|
>>>>> "Steve" == Steve Chaplin <ste...@ya...> writes:
Steve> For an IOError the exception attribute 'filename' is set to
Steve> the filename. With your example above
Steve> self.renderer._renderer.write_png(str (filename)) is Agg
Steve> C++ extension code The line fp = fopen(file_name, "wb");
Steve> could be changed to something like if ((fp =
Steve> fopen(file_name, "wb")) == NULL) throw Py::IOError("could
Steve> not open file", filename);
Steve> Does this look right John?
Right in principle, but not in practice.
For one thing, cxx strangely doesn't define an IOError. I don't know
if this is simply an oversight. Perhaps I'll file a bug on the sf
site....
The larger problem is that the exception constructor doesn't accept
multiple args and concatenate them. It would be nice if it did.
I added a Printf class to mplutils to ease the burden of making printf
style strings in C++ to make better exceptions, and updated the
exceptions in the image, agg and ft2font extensions. The standard
usage is
if ((fp = fopen(file_name, "wb")) == NULL)
throw Py::RuntimeError( Printf("Could not open file %s", file_name).str() );
JDH
|
|
From: Steve C. <ste...@ya...> - 2004-11-24 13:23:22
|
On Wed, 2004-11-24 at 12:06 +0000, Jochen Voss wrote:
> Hello,
>
> On Fri, Nov 19, 2004 at 10:33:43AM -0600, John Hunter wrote:
> > >>>>> "Jochen" == Jochen Voss <vo...@se...> writes:
> > Jochen> Slight problem: it might now be a little bit more
> > Jochen> difficult to include the name of the file which could not
> > Jochen> be opened in the error message. The IOError exception
> > Jochen> will probably only have "permission denied" associated
> > Jochen> with it.
> >
> > Looks OK, at least on linux
> >
> >
> > >>> file('/sbin/ldconfig', 'w')
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > IOError: [Errno 13] Permission denied: '/sbin/ldconfig'
>
> But sometimes it doesn't give the file name:
>
> >>> from matplotlib.matlab import *
> >>> plot([1,2,3],[2,3,1])
> [<matplotlib.lines.Line2D instance at 0x41ef774c>]
> >>> savefig("/forbidden.png")
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File ".../matlab.py", line 1009, in savefig
> manager.canvas.print_figure(*args, **kwargs)
> File ".../backends/backend_gtkagg.py", line 69, in print_figure
> agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
> File ".../backends/backend_agg.py", line 379, in print_figure
> self.renderer._renderer.write_png(str(filename))
> RuntimeError: could not open file
>
> I did not investigate what happens here, but if there is an easy way to
> get the file name into the exception we should probably use it.
>
> All the best,
> Jochen
For an IOError the exception attribute 'filename' is set to the
filename. With your example above self.renderer._renderer.write_png(str
(filename)) is Agg C++ extension code
The line
fp = fopen(file_name, "wb");
could be changed to something like
if ((fp = fopen(file_name, "wb")) == NULL)
throw Py::IOError("could not open file", filename);
Does this look right John?
Steve
|
|
From: Steve C. <ste...@ya...> - 2004-11-24 12:50:50
|
On Tue, 2004-11-23 at 16:38 -0600, John Hunter wrote:
> >>>>> "Steve" == Steve Chaplin <ste...@ya...> writes:
>
> Steve> I've updated backend_gtk.py in cvs to use a default
> Steve> exception handler, and noticed a few things in the process:
> Steve> - sys.excepthook does not catch SystemExit, which is what
> Steve> we wanted anyway.
>
> For some reason with matplotlib CVS using backend GTK on linux, I no
> longer recover the linux shell when I close the figure by clicking on
> the 'x' in the figure window
>
> > python somefile.py
>
> I have to use CTRL-C.
>
This situation happens when the main window is destroyed but
gtk.main_quit() is not called - the gtk.main loop is still running.
I'm not seeing this problem at the moment.
In FigureManagerGTK the 'destroy' signal is connected to Gcf.destroy
(num), which should eventually call
class FigureManagerGTK
def destroy(self, *args):
self.window.destroy()
if Gcf.get_num_fig_managers()==0 and not
matplotlib.is_interactive():
gtk.main_quit()
I set DEBUG = True and ran a few examples and it showed
FigureManagerGTK.destroy() was being called as expected.
Perhaps Gcf.get_num_fig_managers() is sometimes not 0 when it should be
0 and gtk.main_quit() is not being called.
Steve
|
|
From: Jochen V. <vo...@se...> - 2004-11-24 12:07:05
|
Hello,
On Fri, Nov 19, 2004 at 10:33:43AM -0600, John Hunter wrote:
> >>>>> "Jochen" =3D=3D Jochen Voss <vo...@se...> writes:
> Jochen> Slight problem: it might now be a little bit more
> Jochen> difficult to include the name of the file which could not
> Jochen> be opened in the error message. The IOError exception
> Jochen> will probably only have "permission denied" associated
> Jochen> with it.
>=20
> Looks OK, at least on linux
>=20
>=20
> >>> file('/sbin/ldconfig', 'w')
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> IOError: [Errno 13] Permission denied: '/sbin/ldconfig'
But sometimes it doesn't give the file name:
>>> from matplotlib.matlab import *
>>> plot([1,2,3],[2,3,1])
[<matplotlib.lines.Line2D instance at 0x41ef774c>]
>>> savefig("/forbidden.png")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File ".../matlab.py", line 1009, in savefig
manager.canvas.print_figure(*args, **kwargs)
File ".../backends/backend_gtkagg.py", line 69, in print_figure
agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
File ".../backends/backend_agg.py", line 379, in print_figure
self.renderer._renderer.write_png(str(filename))
RuntimeError: could not open file
I did not investigate what happens here, but if there is an easy way to
get the file name into the exception we should probably use it.
All the best,
Jochen
--=20
http://seehuhn.de/
|
|
From: Norbert N. <Nor...@gm...> - 2004-11-24 08:22:58
|
Am Dienstag, 23. November 2004 22:07 schrieb John Hunter:
> >>>>> "Fernando" == Fernando Perez <Fer...@co...> writes:
>
> Fernando> Quick heads-up:
>
> Fernando> Python 2.2 dicts do NOT have a pop() method, this
> Fernando> appeared in python 2.3. It's fine if you decide to make
> Fernando> matplotlib fully 2.3-dependent, but I just wanted to
> Fernando> make you at least aware of this fact. 2.2 is still in
> Fernando> reasonably wide use in the field, so if you are going to
> Fernando> drop support for it, you might want to put a big fat
> Fernando> warning about this fact, just to save users the hassle
> Fernando> of weird bugs.
>
> Ahh, thanks for your vigilance. I do plan to continue to support 2.2
> as long as possible, except for the known issues: datetime and
> mathtext. I reverted all the pops to gets. I also made some
> enhancements to backend_driver to better work with python2.2 - it now
> takes the python to run as a parameter and skips tests where 2.2 is
> already known to fail.
>
> Hopefully, I'll remember to be vigilant to test 2.2 before each
> release.
Ouch, sorry, I do not even have 2.2 installed. Guess with that information,
the whole patch becomes bogus.
On the other hand: simpy reverting pop to get leaves you with the old problem:
you have to drop the check for emptyness of kwargs since legal arguments are
not removed after use. If, on the other hand, you remove this check,
erraneous (p.e. misspelled) arguments are just silently ignored.
Maybe, a wrapper would solve the problem? How would one code a replacement for
pop that works on 2.2 as well? Probably easiest by using get and del within a
try..except block? The wrapper could then have a clear note how to replace it
once 2.3 becomes mandatory sometimes in the future.
--
_________________________________________Norbert Nemec
Bernhardstr. 2 ... D-93053 Regensburg
Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199
eMail: <No...@Ne...>
|
|
From: Steve C. <ste...@ya...> - 2004-11-24 02:13:42
|
On Tue, 2004-11-23 at 15:28 -0600, John Hunter wrote: > Steve> - for some errors I needed to display a matplotlib message > Steve> rather than the default exception message, or to raise an > Steve> exception where error_msg () was used with no exception. I > Steve> added an 'MPLError' exception, its probably best to move it > Steve> into a central file if other people need to use it also. > > Perhaps in matplotlib.__init__ ? OK, I've added "MPLError' a subclass of Exception to matplotlib.__init__ Steve |