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
(1) |
6
(6) |
7
(19) |
8
(4) |
9
|
10
|
11
|
12
|
13
(1) |
14
(3) |
15
(4) |
16
|
17
|
18
|
19
|
20
|
21
|
22
(4) |
23
(1) |
24
(1) |
25
(12) |
26
(7) |
27
(4) |
28
|
29
|
30
|
31
|
|
|
|
|
|
|
I'm trying to compile your examples, but it seems perhaps you forget to include a file -- pixel_formats.hpp? It's not in the agg24 source tree. Mike On 03/06/2013 12:06 PM, Phil Elson wrote: > Smart rendering of adjacent, anti-aliased patches is a question which > has come up a couple of times in various guises in the past. > It is my understanding that the lack of this functionality led us to > disable anti-aliasing for contouring and is the reason the following > image has a white stripe around the circle where there should be just > a nice blend of the two colors: > > > import matplotlib.pyplot as plt > import numpy as np > import matplotlib.patches as mpatches > import matplotlib.path as mpath > import matplotlib.collections as mcol > > > # create two paths. One a circle, the other > # a square with the same circle cut out. > x = np.linspace(0, np.pi * 2, 1000) > > circle_coords = np.array(zip(*[np.sin(x) * 0.8, np.cos(x) * 0.8])) > pth_circle = mpath.Path(circle_coords) > > sqr_codes = np.repeat(mpath.Path.MOVETO, len(circle_coords) + 5) > sqr_codes[1:5] = mpath.Path.LINETO > sqr_codes[6:] = mpath.Path.LINETO > sqr_coords = np.concatenate([[[-1, -1], [-1, 1], [1, 1], [1, -1], [-1, > -1]], > circle_coords[::-1]], axis=0) > sqr_path = mpath.Path(sqr_coords, sqr_codes) > > > ax = plt.axes() > patches = [mpatches.PathPatch(pth_circle), mpatches.PathPatch(sqr_path)] > col = mcol.PatchCollection(patches, > antialiaseds=True, > edgecolors='none', > facecolors=[(0, 0.0, 0.0, 0.9), (0.1, 0.1, 0.02, 0.9)]) > ax.add_collection(col) > ax.set_xlim([-1, 1]) > ax.set_ylim([-1, 1]) > plt.show() > > > > I know of lots of the workarounds for this (turn off AA, turn on > lines, extend the path slightly, set a dark background color) all of > which have down-sides, so I'm keen to find a final solution to the > problem. > > When the two patches marry up perfectly with full anti-aliasing, the > antigrain (AGG) community call this "flash" or compound rendering, and > this capability was added to Agg 2.4 (which we already ship with mpl). > > In order to make full use of the compound rendering technique I > believe the drawing pipeline in "_backend_agg.cpp" would need to > change, which could be problematic. A less wide-impacting alternative > would be to draw all "patches" of a single Collection in the same > rasterization step (i.e. just change _draw_path_collection_generic), > though this does mean that, as it stands, the result of plt.contourf > would not be able to make use of this new functionality - a MEP which > changes the return type of plt.contourf to a single Collection might > be able to fix that. > > I've put together a simple example similar to this in C++ using agg > (no mpl changes yet), showing the differences in the code needed > between the old technique vs the "new" compound renderer (attached). > > > Ok, so the question to those that have knowledge of the > _backend_agg.cpp code (Mike, Eric, JJ + others?): > > * Have you already looked at doing this and determined that this is > a non-starter? > * Do you support adding the ability for the agg backend to draw > compound artists (i.e. Collections) in this way rather than > treating them as individual primitives in the canvas? > * Since many of the other backends can't do flash rendering, would > we even want to make this change? > o SVG in Firefox 10.0.2 has the same problem, it is discussed > slightly more in > http://www.svgopen.org/2002/papers/sorotokin__svg_secrets/ > o Acroread has the same problem with PDFs, only to a much lesser > extent than in the PNG attached > > > Thoughts? > > > > > > > > > > > > > ------------------------------------------------------------------------------ > Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester > Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the > endpoint security space. For insight on selecting the right partner to > tackle endpoint security challenges, access the full report. > http://p.sf.net/sfu/symantec-dev2dev > > > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Thanks Ian. These examples occured when I processed large propriatary datasets. So far, scipy's triangulation worked whenever matplotlib failed. When we have a new implementation, it should be quite simple to check if it works where it had previously failed. Certainly easier than slicing the data to small chunks and trying to distill a failing example of reasonable size as I did in this case. So, "working"/"not working" test (possibly including some time measurements) I can do on a fairly short notice. Producing some more examples that fail with the current code might require several hours of work, so would probably get delayed for a few weeks. Amit On Wed, Mar 6, 2013 at 10:53 AM, Ian Thomas <ian...@gm...> wrote: > Hi Amit, > > I am with you 100% of the way. We should use an existing open source > Delaunay triangulator, and my preference is for QHull as well. > > "Improved Delaunay triangulator" is on my matplotlib todo list, albeit it > quite a long way from the top. I don't tend to use the existing code as I > usually specify my own triangulations, so I have never seen anything quite > as embarrassing as issue #1809. Perhaps I need to bump it up my priority > list. > > If I come up with a possible solution as a PR, would you be prepared to > help test it? You seem to have quite a few examples that don't work under > the existing code and would be very useful for demonstrating if the > improved code is indeed an improvement. > > Ian > > > On 5 March 2013 23:08, Amit Aronovitch <aro...@gm...> wrote: > >> Dear MPL-devs, >> >> Currently, matplotlib does Delaunay triangulation using a special >> purpose module written in C++ (if I'm not mistaken, it was originally >> forked off from some SciKit and wrapped into a Python module). >> Some people (here and on github issues) had suggested it might need some >> rewrites/modification. >> In particular I was wondering if we should continue maintaining it here >> or maybe switch to using some external library. >> >> Since triangulation is not a plotting-specific problem, and some free >> libraries are available for solving it, we might actually benefit in >> terms of efficiency and robustness. >> >> Specifically, I had suggested QHull, which is used by scipy (note that >> now there is also a stand-alone python interface: >> https://pypi.python.org/pypi/pyhull - I did not check that out yet). >> @dmcdougall had suggested Jonathan Shewchuk's triangle library (we >> should check the license though - I think it is "for non-commercial >> use", unlike mpl). There are also other alternatives. >> >> On the other hand, there's the issue of minimizing external >> dependencies. I think @ianthomas23 had once mentioned that he is happy >> with having Delaunay code reside in mpl (and, of course, "maintainable" >> is whatever is most convenient for the maintainers). >> >> I apologize for suggesting more tasks without contributing time to work >> on them. Just thought that since I finally sat down to report issue >> #1809 (which seems to be a particularly slippery bug in the code >> mentioned above), it might be a good time to discuss this topic again. >> >> thanks, >> >> Amit Aronovitch >> >
On 2013年03月06日 7:06 AM, Phil Elson wrote: > Smart rendering of adjacent, anti-aliased patches is a question which > has come up a couple of times in various guises in the past. > It is my understanding that the lack of this functionality led us to > disable anti-aliasing for contouring and is the reason the following > image has a white stripe around the circle where there should be just a > nice blend of the two colors: > > > import matplotlib.pyplot as plt > import numpy as np > import matplotlib.patches as mpatches > import matplotlib.path as mpath > import matplotlib.collections as mcol > > > # create two paths. One a circle, the other > # a square with the same circle cut out. > x = np.linspace(0, np.pi * 2, 1000) > > circle_coords = np.array(zip(*[np.sin(x) * 0.8, np.cos(x) * 0.8])) > pth_circle = mpath.Path(circle_coords) > > sqr_codes = np.repeat(mpath.Path.MOVETO, len(circle_coords) + 5) > sqr_codes[1:5] = mpath.Path.LINETO > sqr_codes[6:] = mpath.Path.LINETO > sqr_coords = np.concatenate([[[-1, -1], [-1, 1], [1, 1], [1, -1], [-1, > -1]], > circle_coords[::-1]], axis=0) > sqr_path = mpath.Path(sqr_coords, sqr_codes) > > > ax = plt.axes() > patches = [mpatches.PathPatch(pth_circle), mpatches.PathPatch(sqr_path)] > col = mcol.PatchCollection(patches, > antialiaseds=True, > edgecolors='none', > facecolors=[(0, 0.0, 0.0, 0.9), (0.1, 0.1, > 0.02, 0.9)]) > ax.add_collection(col) > ax.set_xlim([-1, 1]) > ax.set_ylim([-1, 1]) > plt.show() > > > > I know of lots of the workarounds for this (turn off AA, turn on lines, > extend the path slightly, set a dark background color) all of which have > down-sides, so I'm keen to find a final solution to the problem. > > When the two patches marry up perfectly with full anti-aliasing, the > antigrain (AGG) community call this "flash" or compound rendering, and > this capability was added to Agg 2.4 (which we already ship with mpl). > > In order to make full use of the compound rendering technique I believe > the drawing pipeline in "_backend_agg.cpp" would need to change, which > could be problematic. A less wide-impacting alternative would be to draw > all "patches" of a single Collection in the same rasterization step > (i.e. just change _draw_path_collection_generic), though this does mean > that, as it stands, the result of plt.contourf would not be able to make > use of this new functionality - a MEP which changes the return type of > plt.contourf to a single Collection might be able to fix that. > > I've put together a simple example similar to this in C++ using agg (no > mpl changes yet), showing the differences in the code needed between the > old technique vs the "new" compound renderer (attached). > > > Ok, so the question to those that have knowledge of the _backend_agg.cpp > code (Mike, Eric, JJ + others?): > > * Have you already looked at doing this and determined that this is a > non-starter? > * Do you support adding the ability for the agg backend to draw > compound artists (i.e. Collections) in this way rather than treating > them as individual primitives in the canvas? > * Since many of the other backends can't do flash rendering, would we > even want to make this change? > o SVG in Firefox 10.0.2 has the same problem, it is discussed > slightly more in > http://www.svgopen.org/2002/papers/sorotokin__svg_secrets/ > o Acroread has the same problem with PDFs, only to a much lesser > extent than in the PNG attached > > > Thoughts? Phil, Would this greatly slow down the rendering? Does it work with alpha < 1? I'm initially not enthusiastic about having contourf return a single Collection, but maybe in practice it would not make much difference. The drawback, apart from code brakeage, is that it would remove the ability to pick out a level for additional customization. Could this be handled at a subsequent level, by having the renderer able to treat an arbitrary collection of artists as a group? It seems that contourf is where this "flash" capability would be most important; if it can't be made to work there, I think it might not be worth the trouble to add. Eric
Smart rendering of adjacent, anti-aliased patches is a question which has come up a couple of times in various guises in the past. It is my understanding that the lack of this functionality led us to disable anti-aliasing for contouring and is the reason the following image has a white stripe around the circle where there should be just a nice blend of the two colors: import matplotlib.pyplot as plt import numpy as np import matplotlib.patches as mpatches import matplotlib.path as mpath import matplotlib.collections as mcol # create two paths. One a circle, the other # a square with the same circle cut out. x = np.linspace(0, np.pi * 2, 1000) circle_coords = np.array(zip(*[np.sin(x) * 0.8, np.cos(x) * 0.8])) pth_circle = mpath.Path(circle_coords) sqr_codes = np.repeat(mpath.Path.MOVETO, len(circle_coords) + 5) sqr_codes[1:5] = mpath.Path.LINETO sqr_codes[6:] = mpath.Path.LINETO sqr_coords = np.concatenate([[[-1, -1], [-1, 1], [1, 1], [1, -1], [-1, -1]], circle_coords[::-1]], axis=0) sqr_path = mpath.Path(sqr_coords, sqr_codes) ax = plt.axes() patches = [mpatches.PathPatch(pth_circle), mpatches.PathPatch(sqr_path)] col = mcol.PatchCollection(patches, antialiaseds=True, edgecolors='none', facecolors=[(0, 0.0, 0.0, 0.9), (0.1, 0.1, 0.02, 0.9)]) ax.add_collection(col) ax.set_xlim([-1, 1]) ax.set_ylim([-1, 1]) plt.show() I know of lots of the workarounds for this (turn off AA, turn on lines, extend the path slightly, set a dark background color) all of which have down-sides, so I'm keen to find a final solution to the problem. When the two patches marry up perfectly with full anti-aliasing, the antigrain (AGG) community call this "flash" or compound rendering, and this capability was added to Agg 2.4 (which we already ship with mpl). In order to make full use of the compound rendering technique I believe the drawing pipeline in "_backend_agg.cpp" would need to change, which could be problematic. A less wide-impacting alternative would be to draw all "patches" of a single Collection in the same rasterization step (i.e. just change _draw_path_collection_generic), though this does mean that, as it stands, the result of plt.contourf would not be able to make use of this new functionality - a MEP which changes the return type of plt.contourf to a single Collection might be able to fix that. I've put together a simple example similar to this in C++ using agg (no mpl changes yet), showing the differences in the code needed between the old technique vs the "new" compound renderer (attached). Ok, so the question to those that have knowledge of the _backend_agg.cpp code (Mike, Eric, JJ + others?): - Have you already looked at doing this and determined that this is a non-starter? - Do you support adding the ability for the agg backend to draw compound artists (i.e. Collections) in this way rather than treating them as individual primitives in the canvas? - Since many of the other backends can't do flash rendering, would we even want to make this change? - SVG in Firefox 10.0.2 has the same problem, it is discussed slightly more in http://www.svgopen.org/2002/papers/sorotokin__svg_secrets/ - Acroread has the same problem with PDFs, only to a much lesser extent than in the PNG attached Thoughts?
Hi Amit, I am with you 100% of the way. We should use an existing open source Delaunay triangulator, and my preference is for QHull as well. "Improved Delaunay triangulator" is on my matplotlib todo list, albeit it quite a long way from the top. I don't tend to use the existing code as I usually specify my own triangulations, so I have never seen anything quite as embarrassing as issue #1809. Perhaps I need to bump it up my priority list. If I come up with a possible solution as a PR, would you be prepared to help test it? You seem to have quite a few examples that don't work under the existing code and would be very useful for demonstrating if the improved code is indeed an improvement. Ian On 5 March 2013 23:08, Amit Aronovitch <aro...@gm...> wrote: > Dear MPL-devs, > > Currently, matplotlib does Delaunay triangulation using a special > purpose module written in C++ (if I'm not mistaken, it was originally > forked off from some SciKit and wrapped into a Python module). > Some people (here and on github issues) had suggested it might need some > rewrites/modification. > In particular I was wondering if we should continue maintaining it here > or maybe switch to using some external library. > > Since triangulation is not a plotting-specific problem, and some free > libraries are available for solving it, we might actually benefit in > terms of efficiency and robustness. > > Specifically, I had suggested QHull, which is used by scipy (note that > now there is also a stand-alone python interface: > https://pypi.python.org/pypi/pyhull - I did not check that out yet). > @dmcdougall had suggested Jonathan Shewchuk's triangle library (we > should check the license though - I think it is "for non-commercial > use", unlike mpl). There are also other alternatives. > > On the other hand, there's the issue of minimizing external > dependencies. I think @ianthomas23 had once mentioned that he is happy > with having Delaunay code reside in mpl (and, of course, "maintainable" > is whatever is most convenient for the maintainers). > > I apologize for suggesting more tasks without contributing time to work > on them. Just thought that since I finally sat down to report issue > #1809 (which seems to be a particularly slippery bug in the code > mentioned above), it might be a good time to discuss this topic again. > > thanks, > > Amit Aronovitch >