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
(3) |
3
(7) |
4
(8) |
5
(10) |
6
(4) |
7
|
|
8
|
9
(13) |
10
(1) |
11
(10) |
12
(4) |
13
|
14
|
|
15
|
16
(1) |
17
|
18
(3) |
19
(7) |
20
|
21
(4) |
|
22
|
23
(14) |
24
(5) |
25
(3) |
26
(3) |
27
(8) |
28
(1) |
|
29
(3) |
30
(2) |
31
(3) |
|
|
|
|
|
From: Ryan M. <rm...@gm...> - 2009-03-24 22:03:33
|
Hi, Does anyone know if there is a reason that quadmesh objects don't have a method for setting the geometry of the grid (i.e. the _coordinates attribute)? If there's not a reason, I'll add one. Now, this gets to a larger scale matplotlib API question. Should I add this as a property (either coordinates or verts) which would be pythonic? Or do I proliferate the use of getter and setter functions which is consistent? Or do I meet in the middle and use set_* and get_* to implement the property? Personally, I prefer the first one from purity, but recognize the need for a consistent API. Looking over the code base right now, it seems pretty organic, with a variety of all 3 of the approaches I mentioned being taken. Thoughts? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Sent from: Norman Oklahoma United States. |
|
From: Eric B. <eri...@gm...> - 2009-03-24 20:58:20
|
>> I don't quite like my solution but it seems to work. >> It passes over the figure instance when initializing the >> MixedRenderer, and let the renderer change the dpi of the figure when >> changing the backend. >> I hope some other developer who better understands the dpi thing take >> a look and come up with a better solution. > > I'll try to take a look at this later this afternoon. I agree that > someone with more knowledge should take a look. The SVG backend seems > to just ignore the dpi setting and forces 72 dpi across the board, > which is why I was able to use it as a workaround. I applied your patch, and it does allow the PDF backend to produced mixed modes at various DPI. The SVG backend complains about the change in call signature to MixedModeRenderer.__init__(). SVG is the only other backend to use MixedModeRenderer, so that would be an easy fix. It seems surprising that dpi=72 is part of the renderer assumptions somewhere along the way. >From a design perspective, is it appropriate for the renderer to store a reference to a figure? Many (all?) of the renderers seem entirely decoupled from the figure. -Eric -Eric |
|
From: Eric F. <ef...@ha...> - 2009-03-24 19:09:59
|
Michael Droettboom wrote: > Jouni K. Seppänen wrote: >> Eric Firing <ef...@ha...> writes: >> >>> John Hunter wrote: >>> >>>> One possibility would be to have a facecolor/edgecolor property on >>>> the gc itself, which would be rgba tuples. Since the gc is almost >>>> entirely internal, we can revamp it w/o affecting userland code, >>>> though it would be nice to support legacy methods (eg gc.set_alpha >>>> could warn and then proceed to set the edge and face alpha channel). >>>> Then we would drop the rgbFace argument entirely. Obviously this >>>> would require hacking through a bunch of backend code to fix, but the >>>> changes would be fairly straightforward and of the busy-work variety. >>>> >> > One open question is whether set_alpha (even if deprecated) should set > or multiply the alpha of the fill and edge color. But I think I'm in > favor of creating "one way to do it", which would be to have alpha as > the fourth component of any color -- that option also scales well to > individual colors in a collection, in a way that any of the more global > options don't. I agree. To the extent that we retain alpha= kwargs and set_alpha, it seems to me they should have the obvious meaning: "set_x" means *set*, not multiply; if you want to multiply, use "scale_alpha", or "fade", or something like that. These sorts of operations could be done naturally as ColorSpec methods. > > It strikes me that if none of us find the time for this, this task would > be a good initial GSoC task... it's not enough work for an entire > summer by any means, but it's "busy work" that touches a lot of parts of > the code, and therefore a good introduction to the code base. The other > related task is to create a gc-like object for collections so that the > arguments to draw_collection don't have to change in every backend every > time a new feature is added. > >> This sounds like a good idea. In the pdf backend, GraphicsContextPdf >> already defines a _fillcolor attribute, and for example draw_path does >> >> def draw_path(self, gc, path, transform, rgbFace=None): >> self.check_gc(gc, rgbFace) >> # ... >> >> where check_gc just temporarily sets gc._fillcolor to the value of >> rgbFace and issues the pdf commands to change the graphics state to >> reflect gc. If rgbFace is absorbed into gc, at least the pdf backend >> should be easy to change accordingly, and should become less complex in >> the process. Currently the same alpha value (gc._alpha) is used for both >> strokes and painting operations, but this too should be easy to change >> if we decide to drop the _alpha attribute from GraphicsContext and use >> the fourth component of the stroke and fill colors for alpha. >> >> By the way, the PDF imaging model has much richer support for >> transparency than just specifying an alpha value for each operation; the >> Transparency chapter takes up 64 pages in the PDF spec¹. One thing that >> I imagine somebody just might want to have support for in matplotlib are >> transparency groups², i.e., blending some objects together and then >> blending the group with the background. But I wonder if that's possible >> in Agg - I guess we will want to stay pretty close to the greatest >> common denominator of Agg, SVG and PDF, and let people with special >> needs use other software such as Illustrator to postprocess the files. >> >> ¹ http://www.adobe.com/devnet/pdf/pdf_reference_archive.html >> ² http://itext.ugent.be/library/com/lowagie/examples/directcontent/colors/transparency.pdf >> >> >>> Maybe we need an MplColorSpec class. At present, functions and methods >>> typically accept colors and/or color arrays in a wide variety of forms. >>> This is good. My thought is that these should then be converted by >>> the accepting function or method to instances of the new class, and that >>> instances of the new class should be accepted as color inputs along with >>> all the old forms. >>> >> replacing the current hack, neat >> as it is, where a string representation of a decimal number means a >> grayscale color, a string beginning with # means a hexadecimal color, >> etc. The pyplot API should of course continue to work as it does now. >> >> > I really like Eric's suggestion here, as it fits in well with my desire > to verify arguments early and consistently. But I don't think we need > to throw out the convenient string forms of colors to achieve it. Those > are really handy, and fairly well known from HTML/CSS/SVG etc., and I > worry forcing the user to provide an instance of a particular class to > do something as common as setting a color would be annoying verbosity. > Of course, they should be free to do so if there's other maintenance > advantages as you suggested. The way I envision backwards compatibility, above some level in the API, a color-like kwarg would be handled something like this: def color_using_method(self, ..., carg=None,...) if carg is None: cspec = self.default_carg_cspec else: cspec = as_color_spec(carg) ... def as_color_spec(arg): "like asarray..." if isinstance(arg, ColorSpec): #No duck-typing here, please. return arg else: return ColorSpec(arg) The ColorSpec.__init__() would then have all our present magic for figuring out the various types of arguments, as well as explicit specifications based on kwargs as suggested by Jouni. An API level (e.g. backends) could be specified below which only a ColorSpec is accepted. Eric > > Mike > > |
|
From: Michael D. <md...@st...> - 2009-03-24 12:24:58
|
Jouni K. Seppänen wrote: > Eric Firing <ef...@ha...> writes: > >> John Hunter wrote: >> >>> One possibility would be to have a facecolor/edgecolor property on >>> the gc itself, which would be rgba tuples. Since the gc is almost >>> entirely internal, we can revamp it w/o affecting userland code, >>> though it would be nice to support legacy methods (eg gc.set_alpha >>> could warn and then proceed to set the edge and face alpha channel). >>> Then we would drop the rgbFace argument entirely. Obviously this >>> would require hacking through a bunch of backend code to fix, but the >>> changes would be fairly straightforward and of the busy-work variety. >>> > > One open question is whether set_alpha (even if deprecated) should set or multiply the alpha of the fill and edge color. But I think I'm in favor of creating "one way to do it", which would be to have alpha as the fourth component of any color -- that option also scales well to individual colors in a collection, in a way that any of the more global options don't. It strikes me that if none of us find the time for this, this task would be a good initial GSoC task... it's not enough work for an entire summer by any means, but it's "busy work" that touches a lot of parts of the code, and therefore a good introduction to the code base. The other related task is to create a gc-like object for collections so that the arguments to draw_collection don't have to change in every backend every time a new feature is added. > This sounds like a good idea. In the pdf backend, GraphicsContextPdf > already defines a _fillcolor attribute, and for example draw_path does > > def draw_path(self, gc, path, transform, rgbFace=None): > self.check_gc(gc, rgbFace) > # ... > > where check_gc just temporarily sets gc._fillcolor to the value of > rgbFace and issues the pdf commands to change the graphics state to > reflect gc. If rgbFace is absorbed into gc, at least the pdf backend > should be easy to change accordingly, and should become less complex in > the process. Currently the same alpha value (gc._alpha) is used for both > strokes and painting operations, but this too should be easy to change > if we decide to drop the _alpha attribute from GraphicsContext and use > the fourth component of the stroke and fill colors for alpha. > > By the way, the PDF imaging model has much richer support for > transparency than just specifying an alpha value for each operation; the > Transparency chapter takes up 64 pages in the PDF spec¹. One thing that > I imagine somebody just might want to have support for in matplotlib are > transparency groups², i.e., blending some objects together and then > blending the group with the background. But I wonder if that's possible > in Agg - I guess we will want to stay pretty close to the greatest > common denominator of Agg, SVG and PDF, and let people with special > needs use other software such as Illustrator to postprocess the files. > > ¹ http://www.adobe.com/devnet/pdf/pdf_reference_archive.html > ² http://itext.ugent.be/library/com/lowagie/examples/directcontent/colors/transparency.pdf > > >> Maybe we need an MplColorSpec class. At present, functions and methods >> typically accept colors and/or color arrays in a wide variety of forms. >> This is good. My thought is that these should then be converted by >> the accepting function or method to instances of the new class, and that >> instances of the new class should be accepted as color inputs along with >> all the old forms. >> > > replacing the current hack, neat > as it is, where a string representation of a decimal number means a > grayscale color, a string beginning with # means a hexadecimal color, > etc. The pyplot API should of course continue to work as it does now. > > I really like Eric's suggestion here, as it fits in well with my desire to verify arguments early and consistently. But I don't think we need to throw out the convenient string forms of colors to achieve it. Those are really handy, and fairly well known from HTML/CSS/SVG etc., and I worry forcing the user to provide an instance of a particular class to do something as common as setting a color would be annoying verbosity. Of course, they should be free to do so if there's other maintenance advantages as you suggested. Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Jouni K. S. <jk...@ik...> - 2009-03-24 08:24:42
|
Eric Firing <ef...@ha...> writes:
> John Hunter wrote:
>> One possibility would be to have a facecolor/edgecolor property on
>> the gc itself, which would be rgba tuples. Since the gc is almost
>> entirely internal, we can revamp it w/o affecting userland code,
>> though it would be nice to support legacy methods (eg gc.set_alpha
>> could warn and then proceed to set the edge and face alpha channel).
>> Then we would drop the rgbFace argument entirely. Obviously this
>> would require hacking through a bunch of backend code to fix, but the
>> changes would be fairly straightforward and of the busy-work variety.
This sounds like a good idea. In the pdf backend, GraphicsContextPdf
already defines a _fillcolor attribute, and for example draw_path does
def draw_path(self, gc, path, transform, rgbFace=None):
self.check_gc(gc, rgbFace)
# ...
where check_gc just temporarily sets gc._fillcolor to the value of
rgbFace and issues the pdf commands to change the graphics state to
reflect gc. If rgbFace is absorbed into gc, at least the pdf backend
should be easy to change accordingly, and should become less complex in
the process. Currently the same alpha value (gc._alpha) is used for both
strokes and painting operations, but this too should be easy to change
if we decide to drop the _alpha attribute from GraphicsContext and use
the fourth component of the stroke and fill colors for alpha.
By the way, the PDF imaging model has much richer support for
transparency than just specifying an alpha value for each operation; the
Transparency chapter takes up 64 pages in the PDF spec¹. One thing that
I imagine somebody just might want to have support for in matplotlib are
transparency groups², i.e., blending some objects together and then
blending the group with the background. But I wonder if that's possible
in Agg - I guess we will want to stay pretty close to the greatest
common denominator of Agg, SVG and PDF, and let people with special
needs use other software such as Illustrator to postprocess the files.
¹ http://www.adobe.com/devnet/pdf/pdf_reference_archive.html
² http://itext.ugent.be/library/com/lowagie/examples/directcontent/colors/transparency.pdf
> Maybe we need an MplColorSpec class. At present, functions and methods
> typically accept colors and/or color arrays in a wide variety of forms.
> This is good. My thought is that these should then be converted by
> the accepting function or method to instances of the new class, and that
> instances of the new class should be accepted as color inputs along with
> all the old forms.
I haven't thought about this carefully, but I think it could help
improve the cohesion of the code.
Perhaps a more "object-oriented" way to deal with color specifications
would be to let ColorSpec objects be constructed by the user, and
require these objects to be used in the OO api: instead of
ax.bar(x, y, color='0.5', edgecolor='r')
require
ax.bar(x, y, color=ColorSpec('0.5'), edgecolor=ColorSpec('r'))
or perhaps even something like
ax.bar(x, y,
color=ColorSpec(grayscale=0.5),
edgecolor=ColorSpec(named='r'))
to avoid parsing strings in the API - replacing the current hack, neat
as it is, where a string representation of a decimal number means a
grayscale color, a string beginning with # means a hexadecimal color,
etc. The pyplot API should of course continue to work as it does now.
IMHO this would be more Pythonic (in the vein of "Explicit is better
than implicit" and "In the face of ambiguity, refuse the temptation to
guess"), although a departure from how matplotlib currently works. It
would encourage the users of the OO API to select their colors once and
put them in variables, so the example above would really read
facecolor = ColorSpec(grayscale=0.5)
edgecolor = ColorSpec(named='red')
# ...
ax.bar(x, y, color=facecolor, edgecolor=edgecolor)
which - as a part of a longer program - would likely be easier to
maintain than the first version of the example.
> I suspect that this refactoring might, without loss
> of backwards compatibility, make it possible to considerably simplify,
> clarify, and generalize the handling of colors (again, both single
> values and arrays), and provide a less-confusing framework for setting
> and overriding defaults. I think that as things are now, color spec
> checking and/or conversion are often done repeatedly in a single
> pipeline. With the class, all this would happen only the first time a
> color spec is encountered.
>
> The class might include mapping, or the present color mapping might
> yield an instance of the class; I have not thought about this aspect.
>
> Eric
--
Jouni K. Seppänen
http://www.iki.fi/jks
|