SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

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






Showing 9 results of 9

From: Fernando P. <fpe...@gm...> - 2010年01月28日 19:52:19
On Wed, Jan 27, 2010 at 6:06 PM, Andrew Straw <str...@as...> wrote:
> I'm +1 on this. We can have then have the buildbot doc builder enable
> this when building the docs. (Which are output at
> http://matplotlib.sourceforge.net/trunk-docs/ and
> http://matplotlib.sourceforge.net/trunk-docs/Matplotlib.pdf , for
> reference .)
Thanks, with your and John's (off-list) approvals, it's committed.
The patch that went in had more docs than what I posted here, but the
code is identical.
Cheers,
f
From: Ryan M. <rm...@gm...> - 2010年01月28日 19:15:14
On Thu, Jan 28, 2010 at 1:03 PM, Eric Firing <ef...@ha...> wrote:
> Ryan May wrote:
>> Unless I completely misunderstand zorder, the contour should be *on
>> top* of the rectangle. Also note that printing the zorder for the
>> contour's collection (a LineCollection object) gives a value of 2,
>> even though the call to contour() specified 5 for the zorder. Looking
>> over the code for contour, the zorder is never mentioned. The reason
>> the LineCollection ends up with a value of 2 is that this is the
>> default for a LineCollection. My question is: is there any reason
>> *not* to use the passed in zorder for contours/filled contours? If
>> this is the proper fix, I'll check it in myself, I just wanted to make
>> sure I'm not missing some special case here.
>
> Ryan,
>
> Certainly it makes sense to support zorder in some fashion, and the simple
> way is as you suggest, with one value per call to contour. It may be best
> to stop there--but I can imagine the next complaint being, "why doesn't
> zorder support a sequence?", and then things get quite a bit more
> complicated.
>
> Anyway, go ahead and put in the simple zorder support; I don't see any
> downside to it.
Will do shortly.
>> As an aside, this is yet another example where it would be nice to
>> know that a keyword argument was not being used. If there's no
>> objections, I'd be willing to change ContourSet to pop arguments off
>> of **kwargs so that it can see if some aren't used and throw an
>> exception if not all are used. On the other hand, this could break
>> existing code that are passing extra/useless kwargs, so maybe a
>> warning would be better?
>
> Careful. Keeping track of which kwargs are used, and making sure they are
> always popped, and don't need to remain in the kwargs dictionary, could get
> tricky. I just added support for the units-related kwargs. I think what
> you suggest will work, and I agree that some error-trapping for kwarg
> accidents (misspelling kwargs, or otherwise trying to use a kwarg that has
> no effect) is a good idea.
>
> This sounds like an area where some general mpl coding guidelines, and quite
> a bit of work to implement them, would be good.
Agreed. After I wrote this, I thought about it some more, and it's
not something you can really do piecemeal due to passing off to base
classes and what not. It's a big usability wart however, like when
accidentally using 'linewidth' instead of 'linewidths' for calling
contour. I'll just leave this as a future improvement.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
From: Eric F. <ef...@ha...> - 2010年01月28日 19:03:31
Ryan May wrote:
> Hi,
> 
> I was shown a bug today by a colleague, demonstrated by the following example:
> 
> import numpy as np
> import matplotlib.pyplot as plt
> 
> a = np.zeros([10, 10])
> a[2:6,3:8] = 1
> ls = plt.contour(a, 1, colors='r', linewidths=3, zorder=5)
> print ls.collections[0]l.get_zorder()
> rect = plt.Rectangle([2, 3], 5, 4, zorder=3)
> plt.gca().add_artist(rect)
> plt.show()
> 
> Unless I completely misunderstand zorder, the contour should be *on
> top* of the rectangle. Also note that printing the zorder for the
> contour's collection (a LineCollection object) gives a value of 2,
> even though the call to contour() specified 5 for the zorder. Looking
> over the code for contour, the zorder is never mentioned. The reason
> the LineCollection ends up with a value of 2 is that this is the
> default for a LineCollection. My question is: is there any reason
> *not* to use the passed in zorder for contours/filled contours? If
> this is the proper fix, I'll check it in myself, I just wanted to make
> sure I'm not missing some special case here.
Ryan,
Certainly it makes sense to support zorder in some fashion, and the 
simple way is as you suggest, with one value per call to contour. It 
may be best to stop there--but I can imagine the next complaint being, 
"why doesn't zorder support a sequence?", and then things get quite a 
bit more complicated.
Anyway, go ahead and put in the simple zorder support; I don't see any 
downside to it.
> 
> As an aside, this is yet another example where it would be nice to
> know that a keyword argument was not being used. If there's no
> objections, I'd be willing to change ContourSet to pop arguments off
> of **kwargs so that it can see if some aren't used and throw an
> exception if not all are used. On the other hand, this could break
> existing code that are passing extra/useless kwargs, so maybe a
> warning would be better?
Careful. Keeping track of which kwargs are used, and making sure they 
are always popped, and don't need to remain in the kwargs dictionary, 
could get tricky. I just added support for the units-related kwargs. I 
think what you suggest will work, and I agree that some error-trapping 
for kwarg accidents (misspelling kwargs, or otherwise trying to use a 
kwarg that has no effect) is a good idea.
This sounds like an area where some general mpl coding guidelines, and 
quite a bit of work to implement them, would be good.
Eric
> 
> Ryan
> 
From: Ryan M. <rm...@gm...> - 2010年01月28日 18:21:11
Hi,
I was shown a bug today by a colleague, demonstrated by the following example:
import numpy as np
import matplotlib.pyplot as plt
a = np.zeros([10, 10])
a[2:6,3:8] = 1
ls = plt.contour(a, 1, colors='r', linewidths=3, zorder=5)
print ls.collections[0]l.get_zorder()
rect = plt.Rectangle([2, 3], 5, 4, zorder=3)
plt.gca().add_artist(rect)
plt.show()
Unless I completely misunderstand zorder, the contour should be *on
top* of the rectangle. Also note that printing the zorder for the
contour's collection (a LineCollection object) gives a value of 2,
even though the call to contour() specified 5 for the zorder. Looking
over the code for contour, the zorder is never mentioned. The reason
the LineCollection ends up with a value of 2 is that this is the
default for a LineCollection. My question is: is there any reason
*not* to use the passed in zorder for contours/filled contours? If
this is the proper fix, I'll check it in myself, I just wanted to make
sure I'm not missing some special case here.
As an aside, this is yet another example where it would be nice to
know that a keyword argument was not being used. If there's no
objections, I'd be willing to change ContourSet to pop arguments off
of **kwargs so that it can see if some aren't used and throw an
exception if not all are used. On the other hand, this could break
existing code that are passing extra/useless kwargs, so maybe a
warning would be better?
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Hoyt K. <ho...@gm...> - 2010年01月28日 17:36:38
On Thu, Jan 28, 2010 at 2:00 AM, Robert Bradshaw
<rob...@ma...> wrote:
[snip]
> I'm guessing that's the issue, but just to be sure, try using the bare
I still get the error with the super-bare extension module, so
cython's off the hook :-).
> Have you verified that the same C++ compiler and version of libstdc++ is
> being used for everything?
I've tried it two ways; first with everything -- numpy, scipy,
matplotlib -- installed and compiled from svn, and one with them
installed from the latest ubuntu repositories. I also tried it on
both machines I have access to; a 64bit server with gcc 4.3.3 and
python 2.6.2, and a 32bit one with gcc 4.4.1 and python 2.6.4. The
error is the same on both of those. The python version and the gcc
compiler are the two things in common.
> If you did upgrade NumPy, rebuild *everything* of compiled code
> which depends on it.
Yes I did do that, and recompiled everything, but still good to check.
gcc is smelling fishier and fishier (or maybe python 2.6?).
-- Hoyt
++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ ho...@gm...
++++++++++++++++++++++++++++++++++++++++++
From: Michael D. <md...@st...> - 2010年01月28日 14:26:48
Hoyt Koepke wrote:
> I'm really not sure which mailing list to report this on -- it has got
> to rank up there with one of the most obscure errors of all times. I
> suspect it's an error in gcc's new openmp implementation, gomp, but
> not sure; I can report it there if people think I should.
>
> In gcc 4.4.1, when I compile a completely empty .pyx module in (1) c++
> mode and (2) pass -lgomp to the linker, simply (3) importing that
> empty module causes any subsequent use of matplotlib to segfault the
> program. Changing either (1), (2) or (3) makes the error go away.
>
> I'm using the latest 32bit ubuntu (9.10), python 2.6.4, with the
> latest cython-devel (2820:105c661599c9) and the latest matplotlib from
> svn (8097). In matplotlib, I'm using the qt4agg backend. Everything
> else appears to be working save for this error.
>
> If my main file is simply:
>
> import tests.emptymodule
> import tests.plottest
>
> where emptymodules is a completely empty cython module and plottest is
>
> from matplotlib.pylab import *
>
> figure()
> plot([0,1], [0,1], '-b')
> show()
>
> The program segfaults on the plot() call, with backtrace
>
> (gdb) bt 8
> #0 0x00e03bc7 in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6
> #1 0x0093f282 in py_to_agg_transformation_matrix (obj=0x8223f58,
> errors=false) at src/agg_py_transforms.cpp:20
> #2 0x00946ff3 in _path_module::update_path_extents (this=0x8856098,
> args=...) at src/path.cpp:346
> #3 0x0094e2fd in
> Py::ExtensionModule<_path_module>::invoke_method_varargs (this=<value
> optimized out>, method_def=0x8476e00, args=...)
> at ./CXX/Python2/ExtensionModule.hxx:184
> #4 0x0093ae26 in method_varargs_call_handler
> (_self_and_name_tuple=0x888448c, _args=0x8f052fc) at
> CXX/Python2/cxx_extensions.cxx:1714
> #5 0x080dc0d0 in PyEval_EvalFrameEx ()
> #6 0x080dddf2 in PyEval_EvalCodeEx ()
> #7 0x080dc1b4 in PyEval_EvalFrameEx ()
>
> 
It works for me here, but of course, I have a slightly different system.
gcc-4.3, python 2.5.2, Cython 0.12, and matplotlib SVN 8097.
Have you verified that the same C++ compiler and version of libstdc++ is 
being used for everything?
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Hoyt K. <ho...@gm...> - 2010年01月28日 05:51:54
I'm really not sure which mailing list to report this on -- it has got
to rank up there with one of the most obscure errors of all times. I
suspect it's an error in gcc's new openmp implementation, gomp, but
not sure; I can report it there if people think I should.
In gcc 4.4.1, when I compile a completely empty .pyx module in (1) c++
mode and (2) pass -lgomp to the linker, simply (3) importing that
empty module causes any subsequent use of matplotlib to segfault the
program. Changing either (1), (2) or (3) makes the error go away.
I'm using the latest 32bit ubuntu (9.10), python 2.6.4, with the
latest cython-devel (2820:105c661599c9) and the latest matplotlib from
svn (8097). In matplotlib, I'm using the qt4agg backend. Everything
else appears to be working save for this error.
If my main file is simply:
import tests.emptymodule
import tests.plottest
where emptymodules is a completely empty cython module and plottest is
from matplotlib.pylab import *
figure()
plot([0,1], [0,1], '-b')
show()
The program segfaults on the plot() call, with backtrace
(gdb) bt 8
#0 0x00e03bc7 in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6
#1 0x0093f282 in py_to_agg_transformation_matrix (obj=0x8223f58,
errors=false) at src/agg_py_transforms.cpp:20
#2 0x00946ff3 in _path_module::update_path_extents (this=0x8856098,
args=...) at src/path.cpp:346
#3 0x0094e2fd in
Py::ExtensionModule<_path_module>::invoke_method_varargs (this=<value
optimized out>, method_def=0x8476e00, args=...)
 at ./CXX/Python2/ExtensionModule.hxx:184
#4 0x0093ae26 in method_varargs_call_handler
(_self_and_name_tuple=0x888448c, _args=0x8f052fc) at
CXX/Python2/cxx_extensions.cxx:1714
#5 0x080dc0d0 in PyEval_EvalFrameEx ()
#6 0x080dddf2 in PyEval_EvalCodeEx ()
#7 0x080dc1b4 in PyEval_EvalFrameEx ()
Other commands like imshow also cause a segfault.
Anyway, I can get by for now without openmp, but I'm curious if anyone
has ideas about this bug. I've attached a tarball with the code that
reproduces it for me; simply run build.sh and run.
Thanks!
-- hoyt
++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ ho...@gm...
++++++++++++++++++++++++++++++++++++++++++
From: Andrew S. <str...@as...> - 2010年01月28日 02:05:58
Fernando Perez wrote:
> Hi all,
>
> would anyone mind if I commit the attached patch?
>
> It's 100% backwards compatible and allows for turning plot directive
> errors into fatal exceptions easily, so one can make sure that docs
> either build correctly or not at all. This is useful for having
> examples be a kind of test suite, in addition to any unit tests a
> codebase may have.
>
> Thanks,
>
> f
> 
I'm +1 on this. We can have then have the buildbot doc builder enable
this when building the docs. (Which are output at
http://matplotlib.sourceforge.net/trunk-docs/ and
http://matplotlib.sourceforge.net/trunk-docs/Matplotlib.pdf , for
reference .)
-Andrew
From: Fernando P. <fpe...@gm...> - 2010年01月28日 01:56:36
Attachments: plot_directive.diff
Hi all,
would anyone mind if I commit the attached patch?
It's 100% backwards compatible and allows for turning plot directive
errors into fatal exceptions easily, so one can make sure that docs
either build correctly or not at all. This is useful for having
examples be a kind of test suite, in addition to any unit tests a
codebase may have.
Thanks,
f

Showing 9 results of 9

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 によって変換されたページ (->オリジナル) /