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





Showing 3 results of 3

From: Benjamin R. <ben...@ou...> - 2011年02月17日 19:36:34
On Tue, Feb 15, 2011 at 2:05 PM, Benjamin Root <ben...@ou...> wrote:
> On Tue, Feb 15, 2011 at 1:41 PM, Benjamin Root <ben...@ou...> wrote:
>
>>
>>
>> On Tue, Feb 15, 2011 at 1:17 PM, Eric Firing <ef...@ha...> wrote:
>>
>>> On 02/15/2011 08:50 AM, Benjamin Root wrote:
>>>
>>>> On Tue, Feb 15, 2011 at 12:19 PM, Benjamin Root <ben...@ou...
>>>> <mailto:ben...@ou...>> wrote:
>>>>
>>>> On Tue, Feb 15, 2011 at 11:54 AM, Eric Firing <ef...@ha...
>>>> <mailto:ef...@ha...>> wrote:
>>>>
>>>> On 02/15/2011 07:40 AM, Benjamin Root wrote:
>>>> > I have come across a little inconsistency that was unexpected
>>>> in the
>>>> > matplotlib API. The following is perfectly valid:
>>>> >
>>>> > import matplotlib.pyplot as plt
>>>> > plt.plot([], [])
>>>> > plt.show()
>>>> >
>>>> >
>>>> > However, this is not valid:
>>>> >
>>>> > import matplotlib.pyplot as plt
>>>> > plt.scatter([], [])
>>>> > plt.show()
>>>> >
>>>> >
>>>> > The immediate issue that comes up in scatter is that it
>>>> attempts to find
>>>> > min/max of the input data for the purpose of autoscaling
>>>> (this can
>>>> > probably be done better by just using set_xmargin(0.05) and
>>>> > set_ymargin(0.05)). This can easily be bypassed with an if
>>>> statement.
>>>> > However, then we discover that polygon collection do not like
>>>> having
>>>> > empty offsets, which leads to a failure in the affine
>>>> transformation.
>>>> >
>>>> > So, the question is, is this a bug or a feature? I
>>>> personally believe
>>>> > that empty data is a perfectly valid scenario and given that
>>>> other
>>>> > matplotlib functions handle it gracefully, we should make the
>>>> > collections object more friendly to empty data.
>>>>
>>>> I agree; a call with empty data should simply not plot anything.
>>>>
>>>> Eric
>>>>
>>>>
>>>> Digging further, it appears that the problem is in _path.cpp for
>>>> _path_module::affine_transform() which explicitly checks for an
>>>> empty vertices array and throws an exception if it is empty.
>>>>
>>>> So, do we want to make _path.cpp empty-friendly or should we just
>>>> make empty collections objects just avoid doing anything that
>>>> requires doing an affine transform?
>>>>
>>>> Ben Root
>>>>
>>>>
>>>>
>>>> Ok, some more digging deepens the mystery. While an empty-friendly
>>>> _path.cpp would be nice, it appears that the collections and axes
>>>> objects are already doing all it can to avoid doing transforms for empty
>>>> collections.
>>>>
>>>> However, it appears that the supposedly empty collection object from
>>>> scatter([], []) is not really empty. Its self._paths member contains a
>>>> list of unit_circle() from Path. This is also the case for
>>>> EllipseCollection. Meanwhile, LineCollection and PatchCollection
>>>> initializes their self._paths in accordance to their given data.
>>>>
>>>
>>> One way to solve the problem would be to start each draw() method with a
>>> short-circuit return in case there is nothing to draw. It would be needed
>>> only for classes for which empty self._paths is not a valid test. So for
>>> CircleCollection it would be:
>>>
>>> @allow_rasterization
>>> def draw(self, renderer):
>>> # sizes is the area of the circle circumscribing the polygon
>>> # in points^2
>>> if len(self._sizes) == 0:
>>> return
>>> self._transforms = [
>>> transforms.Affine2D().scale(
>>> (np.sqrt(x) * self.figure.dpi / 72.0) / np.sqrt(np.pi))
>>> for x in self._sizes]
>>> return Collection.draw(self, renderer)
>>>
>>> (Collection.draw returns nothing, so there is no inconsistency in the
>>> return value.)
>>>
>>> Alternatively, it looks like maybe an empty self._transforms could be
>>> used in a short-circuit test at the start of Collection.draw.
>>>
>>> Eric
>>>
>>>
>>>
>>>> Ben Root
>>>>
>>>>
>>>
>> That wouldn't completely solve the problem. Affine transforms are being
>> done for get_datalim() as well. The other issue (and I see that I mixed
>> this up myself) is the assumption elsewhere that a non-empty self._path
>> attribute means that there is something to plot. This is an assumption that
>> is made in axes.py on line 1413 and it is an invalid assumption.
>>
>> As for your proposed solution in draw(), I prefer short-circuiting in
>> Collections.draw(). This makes for less work for new Collection subclasses.
>>
>> Ben Root
>>
>
>
> Working from an assumption that we can't possibly find all bad/broken
> assumptions in mpl, I decided to go the route of Eric and make the
> Collections object as robust as possible. I have attached a patch that
> should enable empty scatter plots in matplotlib and enable empty Collections
> as well.
>
> This has not been fully tested yet. Please be brutal!
>
> Ben Root
>
>
>
Heh, looks like that patch breaks the plotting of errorbars (the line
connecting the center point to the error caps is missing).
I will see about fixing that.
Ben Root
From: Michael D. <md...@st...> - 2011年02月17日 15:51:39
On 02/14/2011 08:32 PM, Benjamin Root wrote:
> On Mon, Feb 14, 2011 at 6:56 PM, Gökhan Sever <gok...@gm... 
> <mailto:gok...@gm...>> wrote:
>
> python
> Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
> [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import matplotlib
> >>> matplotlib.test()
> Warning: divide by zero encountered in log
> Warning: divide by zero encountered in log
> Warning: divide by zero encountered in log
> /home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/axes.py:2389:
> UserWarning: Attempting to set identical left==right results
> in singular transformations; automatically expanding.
> left=730139.0, right=730139.0
> + 'left=%s, right=%s') % (left, right))
> ======================================================================
> ERROR: Failure: IOError ([Errno 2] No such file or directory:
> '/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/canonical.png')
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/usr/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/loader.py",
> line 231, in generate
> for test in g():
> File
> "/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/testing/decorators.py",
> line 91, in compare_images_generator
> shutil.copyfile(src,dst)
> File "/usr/lib64/python2.7/shutil.py", line 81, in copyfile
> with open(src, 'rb') as fsrc:
> IOError: [Errno 2] No such file or directory:
> '/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/canonical.png'
>
This test was added by John Hunter fairly recently. I'll go ahead and 
commit the test results from my machine -- I assume they are correct 
since there's nothing special about the test.
>
>
> ======================================================================
> ERROR: make the basic nearest, bilinear and bicubic interps
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/usr/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/case.py",
> line 187, in runTest
> self.test(*self.arg)
> File
> "/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/testing/decorators.py",
> line 32, in failer
> result = f(*args, **kwargs)
> File
> "/home/gsever/Desktop/python-repo/matplotlib/lib/matplotlib/testing/decorators.py",
> line 126, in decorated_compare_images
> '(RMS %(rms).3f)'%err)
> ImageComparisonFailure: images not close:
> /home/gsever/Desktop/result_images/test_image/image_interps_pdf.png vs.
> /home/gsever/Desktop/result_images/test_image/expected-image_interps_pdf.png
> (RMS 281.963)
>
Both the png and svg versions of this test have been updated more 
recently than the pdf, so I suspect it's ok to update it. I'll go ahead 
and do this.
Mike
>
>
> ----------------------------------------------------------------------
> Ran 152 tests in 71.340s
>
> FAILED (KNOWNFAIL=46, errors=2)
> False
>
>
> -- 
> Gökhan
>
>
> I have reported that first error a few months ago, and nobody has 
> commented on it. I hope somebody knows what image that is supposed to 
> be for.
>
> The second error has popped up several times before, and we don't seem 
> to address it properly. The difference between the expected and the 
> resulting images has a definite structure to it, suggesting that 
> something changed. Either there is something wrong with the original 
> image, or there is something wrong with the current image. If we 
> figure that the current image is correct, and that there was something 
> wrong with the previous image, then we should update the image in the 
> test suite.
>
> Ben Root
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
From: Michael D. <md...@st...> - 2011年02月17日 00:58:31
On 02/16/2011 03:53 PM, John Hunter wrote:
> On Wed, Feb 16, 2011 at 2:47 PM, Michael Droettboom<md...@st...> wrote:
>> Not sure Sourceforge allows custom hooks in SVN.
> We have a couple in place already
>
>
> https://sourceforge.net/project/admin/svn.php?group_id=80706
Yes. But those aren't custom -- SF only provides a fixed set of scripts 
one can apply. Notably, I don't think there's one that prevents further 
commits.
Mike

Showing 3 results of 3

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