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

Showing 9 results of 9

From: Eric F. <ef...@ha...> - 2008年10月09日 18:15:27
Gregor Thalhammer wrote:
> Dear developers,
> 
> in matplotlib 0.98.3 I discoverd that in scatter individual alpha 
> settings (by giving a list of rgba values) are ignered. Here an example 
> that show this behaviour: All points show the same alpha value as given 
> by the alpha keyword argument. (Omitting it equals to the setting alpha=1).
> 
> 
> from pylab import *
> 
> x = [1,2,3]
> y = [1,2,3]
> 
> c = [[1,0,0, 0.0],
> [1,0,0, 0.5],
> [1,0,0, 1.0]]
> 
> gca()
> cla()
> scatter(x,y, c=c, s = 200, alpha = 0.5)
> draw()
> show()
> 
> 
> I had a look at the sources. In axes.py/scatter I simply removed the line
> 
> collection.set_alpha(alpha)
You are correct that there is a bug, in that the alpha in rgba arrays is 
 always overridden, but removing that line is not the solution. I will 
try to fix it in the next few days. I think the intention was that 
alpha=None would be used to mean "don't disturb existing alpha in an 
rgba array; but use alpha=1 if color comes in as other than rgba", but 
this has not been propagated uniformly. Small changes in quite a few 
places may be needed.
Eric
> 
> The recent svn version also contains this line.
> With this change it worked as expected, also e.g. for the case of a 
> single color for all points,
> 
> scatter(x,y, c = 'r', alpha = 0.5)
> 
> Gregor
From: Jae-Joon L. <lee...@gm...> - 2008年10月09日 17:11:52
Okay.
I may work on it sometime tomorrow or during the weekends.
Regards,
-JJ
On Thu, Oct 9, 2008 at 12:54 PM, John Hunter <jd...@gm...> wrote:
> On Wed, Oct 8, 2008 at 10:27 PM, Erik Tollerud <eri...@gm...> wrote:
>> Ah, that makes more sense Jae-Joon - thanks!
>
> Jae-Joon -- could you handle this patch submission?
>
> Thanks,
> JDH
>
From: John H. <jd...@gm...> - 2008年10月09日 16:54:38
On Wed, Oct 8, 2008 at 10:27 PM, Erik Tollerud <eri...@gm...> wrote:
> Ah, that makes more sense Jae-Joon - thanks!
Jae-Joon -- could you handle this patch submission?
Thanks,
JDH
From: John H. <jd...@gm...> - 2008年10月09日 12:31:27
On Thu, Oct 9, 2008 at 6:14 AM, Michael Droettboom <md...@st...> wrote:
>> If 2) in the choices above is the case you are concerned about, and
>> you want this warning feature in this case, we can add an rc param
>> which is autoset at build time, something like "show.warn =
>> True|False" since the build script is setting the default image
>> backend and can set "show.warn = True" when it sets an image backend
>> by default, otherwise False.
>>
>
> I intended the warning to warn against misconfiguration, so one shouldn't
> have to explicitly configure anything to get it... ;)
This is mostly academic, since I am happy with your latest changes
because I can run backend driver or do
 > python somefile.py -dAgg
and get no warning.
But .... I wasn't suggesting explicit configuration by the user. At
build time, mpl looks for a functioning backend in setup.py and if it
fails to find one, sets Agg and creates the default matplotlibrc from
matplotlibrc.template. In the case where a no GUI was detected, the
build script could also set a rc warn-on-show flag. The ubuntu
packager, who probably built mpl in an environment with no X11 and got
no functioning GUI, would get a rc file with backend Agg and the
warn-on-show flag set.
But I think we can leave things as they are.
From: Michael D. <md...@st...> - 2008年10月09日 12:18:25
Michael Droettboom wrote:
> John Hunter wrote:
> 
>> In unrelated news, I am not in favor of the recent change to warn on
>> non-GUI backends when "show" is called. I realize this may sometimes
>> cause head-scratching behavior for some users who call show and no
>> figure pops up, but I think this must be pretty rare. 99% of users
>> have a matplotlibrc which defines a GUI default. AFAIK, the only
>> exceptions to this are 1) when the user has changed the rc (power
>> user, needs no protection) or 2) no GUI was available at build time
>> and the image backend was the default backend chosen (warning more
>> appropriate at build time). If I am missing a use case, let me know.
>> 
>> 
> The motivation was when a popular Linux distribution misconfigured the 
> default to the Agg backend:
>
> https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/278764
>
> This warning was meant as future insurance against this happening -- and 
> hoping that if the packagers don't make a GUI backend the default (in an 
> attempt to reduce dependencies), that they at least would include the 
> warning patch so that users aren't left feeling that matplotlib is "broken".
>
> But we can't prevent all downstream packaging errors, so maybe this 
> patch doesn't belong in trunk. ;)
> 
>> I like the design where the same script can be used to either generate
>> a UI figure or hardcopy depending on an rc settng or a command flag
>> (eg backend driver) and would rather not do the warning. This has
>> been a very infrequent problem for users over the years (a few times
>> at most?) so I am not sure that the annoyance of the warning is
>> justified.
>> 
>> 
> Perhaps the warning could only be emitted when running inside an 
> interactive console (ipython or standard python) -- if that's possible. 
> Alternatively, "ipython -pylab" could warn on startup if the backend is 
> non-GUI (and that change would probably live in ipython).
I have modified the code to only do this when show() is called directly 
from the python or ipython console. Calling show() from a script will 
not emit this warning.
If that's still too noisy, I'm happy to revert the whole thing.
Mike
From: Michael D. <md...@st...> - 2008年10月09日 11:14:49
John Hunter wrote:
> On Wed, Oct 8, 2008 at 8:40 PM, Eric Firing <ef...@ha...> wrote:
> 
>> Thanks for doing this--it has already helped me in my testing of the
>> gappy-path simplification support, which I have now committed. As you
>> suggested earlier, I included in path.py a check for a compatible codes
>> array.
>>
>> The agg limit still can be a problem. It looks like chunking could be added
>> easily by making the backend_agg draw_path a python method calling the
>> renderer method; if the path length exceeds some threshold, then subpaths
>> would be generated and passed to the renderer method.
>> 
>
> In unrelated news, I am not in favor of the recent change to warn on
> non-GUI backends when "show" is called. I realize this may sometimes
> cause head-scratching behavior for some users who call show and no
> figure pops up, but I think this must be pretty rare. 99% of users
> have a matplotlibrc which defines a GUI default. AFAIK, the only
> exceptions to this are 1) when the user has changed the rc (power
> user, needs no protection) or 2) no GUI was available at build time
> and the image backend was the default backend chosen (warning more
> appropriate at build time). If I am missing a use case, let me know.
> 
The motivation was when a popular Linux distribution misconfigured the 
default to the Agg backend:
https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/278764
This warning was meant as future insurance against this happening -- and 
hoping that if the packagers don't make a GUI backend the default (in an 
attempt to reduce dependencies), that they at least would include the 
warning patch so that users aren't left feeling that matplotlib is "broken".
But we can't prevent all downstream packaging errors, so maybe this 
patch doesn't belong in trunk. ;)
> I like the design where the same script can be used to either generate
> a UI figure or hardcopy depending on an rc settng or a command flag
> (eg backend driver) and would rather not do the warning. This has
> been a very infrequent problem for users over the years (a few times
> at most?) so I am not sure that the annoyance of the warning is
> justified.
> 
Perhaps the warning could only be emitted when running inside an 
interactive console (ipython or standard python) -- if that's possible. 
Alternatively, "ipython -pylab" could warn on startup if the backend is 
non-GUI (and that change would probably live in ipython).
> If 2) in the choices above is the case you are concerned about, and
> you want this warning feature in this case, we can add an rc param
> which is autoset at build time, something like "show.warn =
> True|False" since the build script is setting the default image
> backend and can set "show.warn = True" when it sets an image backend
> by default, otherwise False.
> 
I intended the warning to warn against misconfiguration, so one 
shouldn't have to explicitly configure anything to get it... ;)
Mike
From: Erik T. <eri...@gm...> - 2008年10月09日 03:27:13
Attachments: scatleg.diff
Ah, that makes more sense Jae-Joon - thanks!
With this addition it all looks fine to me - I've attached a patch
against 6174 that does everything I'd like to see it do... note that
I've left in the TODO in collections.py simply because I still am not
certain that what I'm doing there is correct in all use-cases...
On Mon, Oct 6, 2008 at 11:22 PM, Jae-Joon Lee <lee...@gm...> wrote:
> Hi Eric,
>
> As far as I know, get_window_extent is meant to return the extent of
> the object in the display coordinate. And, as you may have noticed,
> often this is used to calculate the relative position of objects.
>
> I quickly went through your patch and my guess is your implementation
> of get_window_extent is correct in this regard, but I haven't
> considered this seriously so I may be wrong.
>
> On the other hand, I guess the original problem you had is not related
> with the get_window_extents() method.
> The legend class has a _update_positions() method which is called
> before the legends are drawn. And you have to update positions of your
> handles within this method.
>
> In the simple patch below. I tried to implement some basic update code
> for the polycollections ( I also slightly adjusted the y-offsets. This
> is just my personal preference). See if this patch works for you.
>
> Regards,
>
> -JJ
>
>
>
> Index: lib/matplotlib/legend.py
> ===================================================================
> --- lib/matplotlib/legend.py (revision 6163)
> +++ lib/matplotlib/legend.py (working copy)
> @@ -532,6 +540,12 @@
> elif isinstance(handle, Rectangle):
> handle.set_y(y+1/4*h)
> handle.set_height(h/2)
> + elif isinstance(handle, RegularPolyCollection):
> + offsets = handle.get_offsets()
> + xvals = [x for (x, _) in offsets]
> + yy = y + h
> + yvals=[yy-4./8*h,yy-3./8*h,yy-4./8*h]
> + handle.set_offsets(zip(xvals, yvals))
>
> # Set the data for the legend patch
> bbox = self._get_handle_text_bbox(renderer)
>
>
>
> On Tue, Oct 7, 2008 at 12:15 AM, Erik Tollerud <eri...@gm...> wrote:
>> Does anyone have anything new here? I'm perfectly willing to
>> experiment, but I'm really at a loss as to what
>> get_window_extent(self,render) is supposed to do (clearly get some
>> window extent, but exactly what window and what coordinates the extent
>> is in is what is confusing me).
>>
>> On Tue, Sep 23, 2008 at 11:41 AM, John Hunter <jd...@gm...> wrote:
>>> On Tue, Sep 23, 2008 at 12:20 AM, Erik Tollerud <eri...@gm...> wrote:
>>>> Attached is a diff against revision 6115 that contains a patch to
>>>> improve the behavior of the legend function when showing legends for
>>>
>>> Erik,
>>>
>>> I haven't had a chance to get to this yet. Could you please also post
>>> it on the sf patch tracker so it doesn't get dropped, and ping us with
>>> a reminder in a few days if nothing has happened....
>>>
>>> JDH
>>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>
>
-- 
Erik Tollerud
Graduate Student
Center For Cosmology
Department of Physics and Astronomy
2142 Frederick Reines Hall
University of California, Irvine
Office Phone: (949)824-2587
Cell: (651)307-9409
eto...@uc...
From: John H. <jd...@gm...> - 2008年10月09日 02:48:34
On Wed, Oct 8, 2008 at 8:40 PM, Eric Firing <ef...@ha...> wrote:
> Thanks for doing this--it has already helped me in my testing of the
> gappy-path simplification support, which I have now committed. As you
> suggested earlier, I included in path.py a check for a compatible codes
> array.
>
> The agg limit still can be a problem. It looks like chunking could be added
> easily by making the backend_agg draw_path a python method calling the
> renderer method; if the path length exceeds some threshold, then subpaths
> would be generated and passed to the renderer method.
In unrelated news, I am not in favor of the recent change to warn on
non-GUI backends when "show" is called. I realize this may sometimes
cause head-scratching behavior for some users who call show and no
figure pops up, but I think this must be pretty rare. 99% of users
have a matplotlibrc which defines a GUI default. AFAIK, the only
exceptions to this are 1) when the user has changed the rc (power
user, needs no protection) or 2) no GUI was available at build time
and the image backend was the default backend chosen (warning more
appropriate at build time). If I am missing a use case, let me know.
I like the design where the same script can be used to either generate
a UI figure or hardcopy depending on an rc settng or a command flag
(eg backend driver) and would rather not do the warning. This has
been a very infrequent problem for users over the years (a few times
at most?) so I am not sure that the annoyance of the warning is
justified.
If 2) in the choices above is the case you are concerned about, and
you want this warning feature in this case, we can add an rc param
which is autoset at build time, something like "show.warn =
True|False" since the build script is setting the default image
backend and can set "show.warn = True" when it sets an image backend
by default, otherwise False.
JDH
From: Eric F. <ef...@ha...> - 2008年10月09日 02:40:31
Michael Droettboom wrote:
> John Hunter wrote:
>> On Wed, Oct 8, 2008 at 11:37 AM, Michael Droettboom <md...@st...> wrote:
>>
>> 
>>> I figured this out. When this happens, a RuntimeError("Agg rendering
>>> complexity exceeded") is thrown.
>>> 
>> Do you think it is a good idea to put a little helper note in the
>> exception along the lines of
>>
>> throw "Agg rendering complexity exceeded; you may want to increase
>> the cell_block_size in agg_rasterizer_cells_aa.h"
>>
>> in case someone gets this exception two years from now and none of us
>> can remember this brilliant fix :-)
>> 
> We can suggest that, or suggest that the size of the data is too large 
> (which is easier for most users to fix, I would suspect). What about:
> 
> "Agg rendering complexity exceeded. Consider downsampling or decimating 
> your data."
> 
> along with a comment (not thrown), saying
> 
> /* If this is thrown too often, increase cell_block_limit. */
> 
> Mike
> 
Mike,
Thanks for doing this--it has already helped me in my testing of the 
gappy-path simplification support, which I have now committed. As you 
suggested earlier, I included in path.py a check for a compatible codes 
array.
The agg limit still can be a problem. It looks like chunking could be 
added easily by making the backend_agg draw_path a python method calling 
the renderer method; if the path length exceeds some threshold, then 
subpaths would be generated and passed to the renderer method.
Eric

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