You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(2) |
2
(32) |
3
(26) |
4
(29) |
5
(41) |
6
(2) |
|
7
(1) |
8
(13) |
9
(15) |
10
(23) |
11
(23) |
12
(16) |
13
(6) |
|
14
(15) |
15
(4) |
16
(18) |
17
(28) |
18
(17) |
19
(11) |
20
(6) |
|
21
(2) |
22
(4) |
23
(1) |
24
|
25
|
26
(1) |
27
(2) |
|
28
(2) |
29
(3) |
30
(10) |
31
(2) |
|
|
|
|
From: Benjamin R. <ben...@ou...> - 2012-10-04 14:51:40
|
On Thu, Oct 4, 2012 at 10:02 AM, Andreas Mueller <amu...@ai...>wrote: > Hi everybody. > I have been trying to save some animations I made and I encountered the > problem mentioned here<http://sourceforge.net/mailarchive/forum.php?thread_name=CAKH0P%2BVLXthNCAZ1K2pKHYqqPiFHP5iXSFwJvEerVmvtmgGv0g%40mail.gmail.com&forum_name=matplotlib-devel> > . > I am using current master. > To be precise, when I use > anim.save("file.mp4", fps=10, extra_args=['-vcodec', 'libx264']) > I get "RuntimeError: Error writing to file" from the agg backend. > If I don't use the extra_args, it works, but I get very, very bad > quality that can not be redeemed using bitrate. > I have ffmpeg and libx264 installed. I also tried the mencoder by passing > MencoderWriter() to save, but that resulted in a video where all frames > are identical. > > Any help on this would be appreciated. Is there an easy way to just dump > the frames? I can do the mencoder bit myself. > > Thanks, > Andy > > Exactly which version of mpl are you using, and what is your platform? This will help us diagnose what is going on. Cheers! Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2012-10-04 14:47:48
|
On Thu, Oct 4, 2012 at 10:41 AM, Jason Grout <jas...@cr...>wrote: > On 10/4/12 9:11 AM, Michael Droettboom wrote: > > Yes -- this would be a great application for the path filtering > > infrastructure that matplotlib has. > > > Is that the same as the path effects features, like > http://matplotlib.org/examples/pylab_examples/patheffect_demo.html ? > > Thanks, > > Jason > > Slightly different. That is through the AGG layer, so vector-based backends wouldn't benefit, IIRC. That being said, this is probably the better place to implement this (maybe this is what Mike was thinking of?). Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2012-10-04 14:45:54
|
On Thu, Oct 4, 2012 at 10:39 AM, Pierre Haessig <pie...@cr...>wrote: > Le 04/10/2012 16:11, Michael Droettboom a écrit : > > Yes -- this would be a great application for the path filtering > > infrastructure that matplotlib has. > Sounds way cooler than post-processing a raster plot image ! > > I'm not aware of this path filtering infrastructure. I guess it's a > deeply buried facility which is not accessible in the "Python user space" ? > > Best, > Pierre > > That is correct. In path.so, there are some functions that are explicitly called to do any cleanup and simplification on the paths. We would have to do some work to allow for user-defined functions. I once considered doing this back in the beginning of summer to address some contouring "bugs" I encountered, but found other, more simple solutions. Cheers! Ben Root |
|
From: Jason G. <jas...@cr...> - 2012-10-04 14:42:01
|
On 10/4/12 9:11 AM, Michael Droettboom wrote: > Yes -- this would be a great application for the path filtering > infrastructure that matplotlib has. Is that the same as the path effects features, like http://matplotlib.org/examples/pylab_examples/patheffect_demo.html ? Thanks, Jason |
|
From: Pierre H. <pie...@cr...> - 2012-10-04 14:39:24
|
Le 04/10/2012 16:11, Michael Droettboom a écrit : > Yes -- this would be a great application for the path filtering > infrastructure that matplotlib has. Sounds way cooler than post-processing a raster plot image ! I'm not aware of this path filtering infrastructure. I guess it's a deeply buried facility which is not accessible in the "Python user space" ? Best, Pierre |
|
From: Pierre H. <pie...@cr...> - 2012-10-04 14:35:14
|
Le 04/10/2012 16:03, Jason Grout a écrit :
> f@r means f(r)
>
> a~ImageConvolve~b means ImageConvolve(a,b) (~ treats an operator as infix)
>
> Table[..., {2}] means [... for i in range(2)]
>
> #+1& is a lambda function lambda x: x+1
>
> So I think it goes something like:
>
> def xkcdDistort(p):
> r = ImagePad(Rasterize(p), 10, Padding='White')
> (ix, iy) = [ImageConvolve(RandomImage([-1,1], ImageDimensions(r)),
> GaussianMatrix(10))
> for i in range(2)]
> return ImagePad(ImageTransformation(r,
> lambda coord: (coord[0]+15*ImageValue(ix, coord),
> coord[1]+15*ImageValue(iy, coord)),
> DataRange='Full'),
> -5)
Thanks a lot!
It's the first time I encounter Mathematica syntax. Some of these
functional notations are not so easy to follow for my unexperienced eyes
but it makes this Mathematica code nicely compact.
So I think this code indeed resamples the rastered plot image on a
shaken coordinate grid. I kind of understand that the noise on
coordinates is spatially smoothed by a 10px Gaussian Point Spread
Function (if I understand correctly...)
Best,
Pierre
|
|
From: Benjamin R. <ben...@ou...> - 2012-10-04 14:30:09
|
On Thu, Oct 4, 2012 at 10:11 AM, Michael Droettboom <md...@st...> wrote: > Yes -- this would be a great application for the path filtering > infrastructure that matplotlib has. > > Mike > > I agree with this idea. However, I don't think the code is set up to allow for user-defined path filters. Maybe an AGG filter would be sufficient in the short-term? Ben Root |
|
From: Michael D. <md...@st...> - 2012-10-04 14:26:56
|
This is just too cool of an idea to pass up -- I'm going to see if I can put together a PR that does this using the C++ path filtering stuff so it would be available everywhere. Mike On 10/04/2012 10:11 AM, Michael Droettboom wrote: > Yes -- this would be a great application for the path filtering > infrastructure that matplotlib has. > > Mike > > On 10/04/2012 08:29 AM, Phil Elson wrote: >> Nice challenge Fernando! >> >> Damon, I love the solution! I do wonder whether we could do some >> quirky transform on the lines to achieve a similar result, rather than >> manipulating the data before plotting it. The benefit is that >> everything should then get randomly Xkcd-ed automatically - maybe I >> will save that one for a rainy day.... >> >> Thanks for posting! >> >> >> >> On 4 October 2012 11:31, Damon McDougall <dam...@gm...> wrote: >>> On Thu, Oct 4, 2012 at 10:44 AM, Damon McDougall >>> <dam...@gm...> wrote: >>>> On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig >>>> <pie...@cr...> wrote: >>>>> Hi Fernando, >>>>> >>>>> Le 04/10/2012 09:16, Fernando Perez a écrit : >>>>>> This would make for an awesome couple of examples for the gallery, the >>>>>> mathematica solutions look really pretty cool: >>>>>> >>>>>> http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs >>>>> I've never used Mathematica so that it's pretty difficult for me to >>>>> understand the following lines of code which I guess do the main job of >>>>> distorting the image >>>>> >>>>> xkcdDistort[p_] := Module[{r, ix, iy}, >>>>> r = ImagePad[Rasterize@p, 10, Padding -> White]; >>>>> {ix, iy} = >>>>> Table[RandomImage[{-1, 1}, ImageDimensions@r]~ImageConvolve~ >>>>> GaussianMatrix[10], {2}]; >>>>> ImagePad[ImageTransformation[r, >>>>> # + 15 {ImageValue[ix, #], ImageValue[iy, #]} &, DataRange -> >>>>> Full], -5]]; >>>>> >>>>> >>>>> Is there somebody there that can describe this algorithm with words >>>>> (English or Python ;-)) ? >>>>> >>>>> I feel like the key point is about adressing the rasterized plot image >>>>> "r" with some slightly randomized indices "ix" and "iy". However, I >>>>> really don't get the step that generates these indices. >>>>> >>>>> Best, >>>>> Pierre >>>> I believe this is in your interests: http://i.imgur.com/5XwRO.png >>>> >>>> Here's the code: https://gist.github.com/3832579 >>>> >>>> Disclaimer: The code is ugly; don't judge me. Also, I installed the >>>> Humor Sans font but I couldn't get mpl to find it. Oh well :) >>> I got the font working :) http://i.imgur.com/Dxemm.png >>> >>> -- >>> Damon McDougall >>> http://www.damon-is-a-geek.com >>> B2.39 >>> Mathematics Institute >>> University of Warwick >>> Coventry >>> West Midlands >>> CV4 7AL >>> United Kingdom >>> >>> ------------------------------------------------------------------------------ >>> Don't let slow site performance ruin your business. Deploy New Relic APM >>> Deploy New Relic app performance management and know exactly >>> what is happening inside your Ruby, Python, PHP, Java, and .NET app >>> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >>> http://p.sf.net/sfu/newrelic-dev2dev >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Pierre H. <pie...@cr...> - 2012-10-04 14:22:19
|
Le 04/10/2012 14:29, Phil Elson a écrit : > Damon, I love the solution! I do wonder whether we could do some > quirky transform on the lines to achieve a similar result, rather than > manipulating the data before plotting it. The benefit is that > everything should then get randomly Xkcd-ed automatically - maybe I > will save that one for a rainy day.... > > A different solution to get the shaken effect on every graphic items is the post-processing of a raster rendering of the plot. I think this is what was proposed with Mathematica though I'm really unfamiliar with its syntax One way I see to "shake" on image would be to use scipy.ndimage.interpolation.map_coordinates [1] to interpolate the rastered plot image with a "shaken grid". This shaken grid would be a regular 2D indexing grid + some 2D noise, carefully tuned to have a bit of spatial correlation. I'm not so familiar with image processing in Python though, so there may be better solutions I'm not aware of. Best, Pierre [1] http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.interpolation.map_coordinates.htm |
|
From: Jason G. <jas...@cr...> - 2012-10-04 14:21:36
|
On 10/4/12 4:02 AM, Pierre Haessig wrote: > Hi Fernando, > > Le 04/10/2012 09:16, Fernando Perez a écrit : >> This would make for an awesome couple of examples for the gallery, the >> mathematica solutions look really pretty cool: >> >> http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs > I've never used Mathematica so that it's pretty difficult for me to > understand the following lines of code which I guess do the main job of > distorting the image > > xkcdDistort[p_] := Module[{r, ix, iy}, > r = ImagePad[Rasterize@p, 10, Padding -> White]; > {ix, iy} = > Table[RandomImage[{-1, 1}, ImageDimensions@r]~ImageConvolve~ > GaussianMatrix[10], {2}]; > ImagePad[ImageTransformation[r, > # + 15 {ImageValue[ix, #], ImageValue[iy, #]} &, DataRange -> > Full], -5]]; > > > Is there somebody there that can describe this algorithm with words > (English or Python ;-)) ? f@r means f(r) a~ImageConvolve~b means ImageConvolve(a,b) (~ treats an operator as infix) Table[..., {2}] means [... for i in range(2)] #+1& is a lambda function lambda x: x+1 So I think it goes something like: def xkcdDistort(p): r = ImagePad(Rasterize(p), 10, Padding='White') (ix, iy) = [ImageConvolve(RandomImage([-1,1], ImageDimensions(r)), GaussianMatrix(10)) for i in range(2)] return ImagePad(ImageTransformation(r, lambda coord: (coord[0]+15*ImageValue(ix, coord), coord[1]+15*ImageValue(iy, coord)), DataRange='Full'), -5) Thanks, Jason |
|
From: Michael D. <md...@st...> - 2012-10-04 14:14:00
|
Yes -- this would be a great application for the path filtering infrastructure that matplotlib has. Mike On 10/04/2012 08:29 AM, Phil Elson wrote: > Nice challenge Fernando! > > Damon, I love the solution! I do wonder whether we could do some > quirky transform on the lines to achieve a similar result, rather than > manipulating the data before plotting it. The benefit is that > everything should then get randomly Xkcd-ed automatically - maybe I > will save that one for a rainy day.... > > Thanks for posting! > > > > On 4 October 2012 11:31, Damon McDougall <dam...@gm...> wrote: >> On Thu, Oct 4, 2012 at 10:44 AM, Damon McDougall >> <dam...@gm...> wrote: >>> On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig >>> <pie...@cr...> wrote: >>>> Hi Fernando, >>>> >>>> Le 04/10/2012 09:16, Fernando Perez a écrit : >>>>> This would make for an awesome couple of examples for the gallery, the >>>>> mathematica solutions look really pretty cool: >>>>> >>>>> http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs >>>> I've never used Mathematica so that it's pretty difficult for me to >>>> understand the following lines of code which I guess do the main job of >>>> distorting the image >>>> >>>> xkcdDistort[p_] := Module[{r, ix, iy}, >>>> r = ImagePad[Rasterize@p, 10, Padding -> White]; >>>> {ix, iy} = >>>> Table[RandomImage[{-1, 1}, ImageDimensions@r]~ImageConvolve~ >>>> GaussianMatrix[10], {2}]; >>>> ImagePad[ImageTransformation[r, >>>> # + 15 {ImageValue[ix, #], ImageValue[iy, #]} &, DataRange -> >>>> Full], -5]]; >>>> >>>> >>>> Is there somebody there that can describe this algorithm with words >>>> (English or Python ;-)) ? >>>> >>>> I feel like the key point is about adressing the rasterized plot image >>>> "r" with some slightly randomized indices "ix" and "iy". However, I >>>> really don't get the step that generates these indices. >>>> >>>> Best, >>>> Pierre >>> I believe this is in your interests: http://i.imgur.com/5XwRO.png >>> >>> Here's the code: https://gist.github.com/3832579 >>> >>> Disclaimer: The code is ugly; don't judge me. Also, I installed the >>> Humor Sans font but I couldn't get mpl to find it. Oh well :) >> I got the font working :) http://i.imgur.com/Dxemm.png >> >> -- >> Damon McDougall >> http://www.damon-is-a-geek.com >> B2.39 >> Mathematics Institute >> University of Warwick >> Coventry >> West Midlands >> CV4 7AL >> United Kingdom >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Andreas M. <amu...@ai...> - 2012-10-04 14:02:25
|
Hi everybody. I have been trying to save some animations I made and I encountered the problem mentioned here <http://sourceforge.net/mailarchive/forum.php?thread_name=CAKH0P%2BVLXthNCAZ1K2pKHYqqPiFHP5iXSFwJvEerVmvtmgGv0g%40mail.gmail.com&forum_name=matplotlib-devel>. I am using current master. To be precise, when I use anim.save("file.mp4", fps=10, extra_args=['-vcodec', 'libx264']) I get "RuntimeError: Error writing to file" from the agg backend. If I don't use the extra_args, it works, but I get very, very bad quality that can not be redeemed using bitrate. I have ffmpeg and libx264 installed. I also tried the mencoder by passing MencoderWriter() to save, but that resulted in a video where all frames are identical. Any help on this would be appreciated. Is there an easy way to just dump the frames? I can do the mencoder bit myself. Thanks, Andy |
|
From: Phil E. <pel...@gm...> - 2012-10-04 12:29:37
|
Nice challenge Fernando! Damon, I love the solution! I do wonder whether we could do some quirky transform on the lines to achieve a similar result, rather than manipulating the data before plotting it. The benefit is that everything should then get randomly Xkcd-ed automatically - maybe I will save that one for a rainy day.... Thanks for posting! On 4 October 2012 11:31, Damon McDougall <dam...@gm...> wrote: > On Thu, Oct 4, 2012 at 10:44 AM, Damon McDougall > <dam...@gm...> wrote: >> On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig >> <pie...@cr...> wrote: >>> Hi Fernando, >>> >>> Le 04/10/2012 09:16, Fernando Perez a écrit : >>>> This would make for an awesome couple of examples for the gallery, the >>>> mathematica solutions look really pretty cool: >>>> >>>> http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs >>> I've never used Mathematica so that it's pretty difficult for me to >>> understand the following lines of code which I guess do the main job of >>> distorting the image >>> >>> xkcdDistort[p_] := Module[{r, ix, iy}, >>> r = ImagePad[Rasterize@p, 10, Padding -> White]; >>> {ix, iy} = >>> Table[RandomImage[{-1, 1}, ImageDimensions@r]~ImageConvolve~ >>> GaussianMatrix[10], {2}]; >>> ImagePad[ImageTransformation[r, >>> # + 15 {ImageValue[ix, #], ImageValue[iy, #]} &, DataRange -> >>> Full], -5]]; >>> >>> >>> Is there somebody there that can describe this algorithm with words >>> (English or Python ;-)) ? >>> >>> I feel like the key point is about adressing the rasterized plot image >>> "r" with some slightly randomized indices "ix" and "iy". However, I >>> really don't get the step that generates these indices. >>> >>> Best, >>> Pierre >> >> I believe this is in your interests: http://i.imgur.com/5XwRO.png >> >> Here's the code: https://gist.github.com/3832579 >> >> Disclaimer: The code is ugly; don't judge me. Also, I installed the >> Humor Sans font but I couldn't get mpl to find it. Oh well :) > > I got the font working :) http://i.imgur.com/Dxemm.png > > -- > Damon McDougall > http://www.damon-is-a-geek.com > B2.39 > Mathematics Institute > University of Warwick > Coventry > West Midlands > CV4 7AL > United Kingdom > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Damon M. <dam...@gm...> - 2012-10-04 10:32:01
|
On Thu, Oct 4, 2012 at 10:44 AM, Damon McDougall <dam...@gm...> wrote: > On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig > <pie...@cr...> wrote: >> Hi Fernando, >> >> Le 04/10/2012 09:16, Fernando Perez a écrit : >>> This would make for an awesome couple of examples for the gallery, the >>> mathematica solutions look really pretty cool: >>> >>> http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs >> I've never used Mathematica so that it's pretty difficult for me to >> understand the following lines of code which I guess do the main job of >> distorting the image >> >> xkcdDistort[p_] := Module[{r, ix, iy}, >> r = ImagePad[Rasterize@p, 10, Padding -> White]; >> {ix, iy} = >> Table[RandomImage[{-1, 1}, ImageDimensions@r]~ImageConvolve~ >> GaussianMatrix[10], {2}]; >> ImagePad[ImageTransformation[r, >> # + 15 {ImageValue[ix, #], ImageValue[iy, #]} &, DataRange -> >> Full], -5]]; >> >> >> Is there somebody there that can describe this algorithm with words >> (English or Python ;-)) ? >> >> I feel like the key point is about adressing the rasterized plot image >> "r" with some slightly randomized indices "ix" and "iy". However, I >> really don't get the step that generates these indices. >> >> Best, >> Pierre > > I believe this is in your interests: http://i.imgur.com/5XwRO.png > > Here's the code: https://gist.github.com/3832579 > > Disclaimer: The code is ugly; don't judge me. Also, I installed the > Humor Sans font but I couldn't get mpl to find it. Oh well :) I got the font working :) http://i.imgur.com/Dxemm.png -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: Juergen H. <py...@el...> - 2012-10-04 09:47:16
|
If you like to use qt4 as backend, you can also do it like this: import sys from PySide import QtGui import numpy as np from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg \ import FigureCanvasQTAgg as FigureCanvas fig = Figure() axes = fig.add_subplot(111) x = np.arange(0.0, 3.0, 0.01) y = np.cos(2*np.pi*x) axes.plot(x, y) # show plot in Qt FigureCanvas qApp = QtGui.QApplication(sys.argv) fc=FigureCanvas(fig) fc.setGeometry(2000, 100, 500, 500) fc.show() # a second plot fc1=FigureCanvas(fig) fc1.setGeometry(500, 100, 500, 500) fc1.show() sys.exit(qApp.exec_()) This works for me on windows with two screens. Juergen Am 03.10.2012 20:26, schrieb Gökhan Sever: > I was after a similar issue once, and asked this question at SO: > > http://stackoverflow.com/questions/7802366/matplotlib-window-layout-questions > > Manual positioning is fine sometimes if I want to really place windows > side-by-side for comparison purposes. However it would be nicer if mpl were > to remember positions of figures so that it would place the new figures > exactly the same place where they were before closed. > > Actually, I have similar complaint for other windows opened in my Fedora 16 > (Gnome 3.2) system. Say for instance I start a gvim instance, then move its > window to my second monitor, but closing and re-opening it, the window's > position is restored to the first monitor. Same thing is for evince, > sometimes it opens pdf's on the first monitor, sometimes on the second, > randomly position at least for my observation. I don't know where to look > for a solution; in each specific program, or windows manager should handle > / remember positions of windows on screens. > > On Tue, Oct 2, 2012 at 9:38 PM, Jianbao Tao <jia...@gm...> wrote: > >> Hi, >> >> Is it possible to specify the position of a figure window when one is >> created? This will be a killing feature if one wants to put the figure >> window at the right place in the screen automatically. It is annoying if >> ones has to drag a new figure to a comfortable place in the screen every >> time a new figure is created. >> >> Jianbao >> >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Damon M. <dam...@gm...> - 2012-10-04 09:44:22
|
On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig <pie...@cr...> wrote: > Hi Fernando, > > Le 04/10/2012 09:16, Fernando Perez a écrit : >> This would make for an awesome couple of examples for the gallery, the >> mathematica solutions look really pretty cool: >> >> http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs > I've never used Mathematica so that it's pretty difficult for me to > understand the following lines of code which I guess do the main job of > distorting the image > > xkcdDistort[p_] := Module[{r, ix, iy}, > r = ImagePad[Rasterize@p, 10, Padding -> White]; > {ix, iy} = > Table[RandomImage[{-1, 1}, ImageDimensions@r]~ImageConvolve~ > GaussianMatrix[10], {2}]; > ImagePad[ImageTransformation[r, > # + 15 {ImageValue[ix, #], ImageValue[iy, #]} &, DataRange -> > Full], -5]]; > > > Is there somebody there that can describe this algorithm with words > (English or Python ;-)) ? > > I feel like the key point is about adressing the rasterized plot image > "r" with some slightly randomized indices "ix" and "iy". However, I > really don't get the step that generates these indices. > > Best, > Pierre > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > I believe this is in your interests: http://i.imgur.com/5XwRO.png Here's the code: https://gist.github.com/3832579 Disclaimer: The code is ugly; don't judge me. Also, I installed the Humor Sans font but I couldn't get mpl to find it. Oh well :) -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom |
|
From: Pierre H. <pie...@cr...> - 2012-10-04 09:02:58
|
Hi Fernando, Le 04/10/2012 09:16, Fernando Perez a écrit : > This would make for an awesome couple of examples for the gallery, the > mathematica solutions look really pretty cool: > > http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs I've never used Mathematica so that it's pretty difficult for me to understand the following lines of code which I guess do the main job of distorting the image xkcdDistort[p_] := Module[{r, ix, iy}, r = ImagePad[Rasterize@p, 10, Padding -> White]; {ix, iy} = Table[RandomImage[{-1, 1}, ImageDimensions@r]~ImageConvolve~ GaussianMatrix[10], {2}]; ImagePad[ImageTransformation[r, # + 15 {ImageValue[ix, #], ImageValue[iy, #]} &, DataRange -> Full], -5]]; Is there somebody there that can describe this algorithm with words (English or Python ;-)) ? I feel like the key point is about adressing the rasterized plot image "r" with some slightly randomized indices "ix" and "iy". However, I really don't get the step that generates these indices. Best, Pierre |
|
From: Pierre H. <pie...@cr...> - 2012-10-04 07:55:17
|
Hi, Is it just my web browser getting crazy or is there a real issue with the ML archive on sourceforge: http://sourceforge.net/mailarchive/forum.php?forum_name=matplotlib-users I only see email records until July 16th 2012 !! If there is another ML archive website in better shape, it would be worth updating the link on matplotlib.org front page ("Documentation/need help?" section) Best, Pierre |
|
From: Fernando P. <fpe...@gm...> - 2012-10-04 07:17:11
|
This would make for an awesome couple of examples for the gallery, the mathematica solutions look really pretty cool: http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs The matlab and R version not quite so much, still for reference: http://stackoverflow.com/questions/12701841/xkcd-style-graphs-in-matlab http://stackoverflow.com/questions/12675147/xkcd-style-graphs-in-r Any takers? f |
|
From: Jianbao T. <jia...@gm...> - 2012-10-04 00:48:54
|
Thank you so much, Anthony. After weighing the options, I decided to go for Tkinter. The major reason for this is portability. BTW, I checked out your website. Those screenshots are quite impressive. :-) Jianbao On Wed, Oct 3, 2012 at 3:27 PM, Anthony Floyd <ant...@gm...>wrote: > Hi Jianbao, > > > Do you have any references, such as screen shots, gallery, examples, or > > whatever? I am very curious to see what people can do with matplotlib. > > If you can find a Windows machine (or a Windows VM) and stomach a 60 > MB download, visit > http://www.convergent.ca/products/raven/downloads.html and grab the > "RAVEN Viewer" and "Demo RAVEN Workspace". When starting the program > for the first time, don't worry about selecting a license, select > "Viewer Only". Open the demo file. All plotting, annotating, legends, > etc are handled by matplotlib. wxPython provides the rest of the GUI > elements. The entirety of the program except for the engineering > backend (which isn't exposed in the viewer anyway) is written in > Python. > > If you can't get to a Windows box, then just visit > http://www.convergent.ca/raven to get a sense of the application. > > Cheers, > Anthony. > |
|
From: Anthony F. <ant...@gm...> - 2012-10-03 21:27:39
|
Hi Jianbao, > Do you have any references, such as screen shots, gallery, examples, or > whatever? I am very curious to see what people can do with matplotlib. If you can find a Windows machine (or a Windows VM) and stomach a 60 MB download, visit http://www.convergent.ca/products/raven/downloads.html and grab the "RAVEN Viewer" and "Demo RAVEN Workspace". When starting the program for the first time, don't worry about selecting a license, select "Viewer Only". Open the demo file. All plotting, annotating, legends, etc are handled by matplotlib. wxPython provides the rest of the GUI elements. The entirety of the program except for the engineering backend (which isn't exposed in the viewer anyway) is written in Python. If you can't get to a Windows box, then just visit http://www.convergent.ca/raven to get a sense of the application. Cheers, Anthony. |
|
From: Eric F. <ef...@ha...> - 2012-10-03 18:39:53
|
On 2012/10/03 8:11 AM, Charleux Ludovic wrote: > Thanks for your multiple answers. I'll try the same manipulation with > the 1.2 version as soon as possible. Concerning the debate between the > use of None and numpy.nan, I tryed both methods before posting and they > both lead to the same bug on my version. I'm using the None/numpy.nan > trick to plot finite element 2D meshes (Matplotlib allows very neat > vectorial plots) and I often adjust xlim/ylim to magnify interesting > zones and so this bug is everywhere. I'm not totally sure but I think > the bug was not present in the 1.0.x versions I tested before. Please--there is *no* None trick. This is not a debate. Please do *not* use None. Use np.nan or a masked array. Unless you go into the lower levels of the api, mpl will convert a floating-point array with nans into a masked array for operations such as auto-scaling. If you must use an object array (e.g., as Ben notes, if you are using datetime objects--it must be something for which there is a registered converter, because at the plotting level mpl works with floats), then make it a masked array if you need to put gaps in it. If that does not work, then it is a bug in the conversion process. Masked arrays should work for any input type supported by mpl. Eric > > Regards. > > Ludovic Charleux > > 2012/10/3 Benjamin Root <ben...@ou... <mailto:ben...@ou...>> > > > > On Wed, Oct 3, 2012 at 1:02 PM, Phil Elson <pel...@gm... > <mailto:pel...@gm...>> wrote: > > I don't get this on matplotlib/master (and therefore probably > not on 1.2rc2). > > I'm pretty sure masked array line plotting was fixed at some > point this release cycle (I cannot find the appropriate github > issue to link to), so I suggest this is a known bug with 1.1.1 > and fixed in 1.2. Just to be clear, I am using the TkAgg > backend, and there is a remote possiblity that this bug is > backend dependent. Is there any chance you could test this with > the latest release candidate? > > Many Thanks, > > > This issue may be dependent upon which version of Numpy one is > using. As Eric pointed out, one should be getting an object array > if you have a None in the list. On top of that, I wouldn't be > surprised if the different backends handled this object array > differently. > > As far as I am concerned, using None in the list is the bug and is > not only unsupported, but should be actively discouraged. Use NaNs > or masked arrays instead. > > (and to ward off the inevitable question, I would advise against > explicitly checking for object arrays because there are times when > it is correct to have such arrays, i.e., python decimal or datetime > objects). > > Cheers! > Ben Root > > > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Gökhan S. <gok...@gm...> - 2012-10-03 18:26:49
|
I was after a similar issue once, and asked this question at SO: http://stackoverflow.com/questions/7802366/matplotlib-window-layout-questions Manual positioning is fine sometimes if I want to really place windows side-by-side for comparison purposes. However it would be nicer if mpl were to remember positions of figures so that it would place the new figures exactly the same place where they were before closed. Actually, I have similar complaint for other windows opened in my Fedora 16 (Gnome 3.2) system. Say for instance I start a gvim instance, then move its window to my second monitor, but closing and re-opening it, the window's position is restored to the first monitor. Same thing is for evince, sometimes it opens pdf's on the first monitor, sometimes on the second, randomly position at least for my observation. I don't know where to look for a solution; in each specific program, or windows manager should handle / remember positions of windows on screens. On Tue, Oct 2, 2012 at 9:38 PM, Jianbao Tao <jia...@gm...> wrote: > Hi, > > Is it possible to specify the position of a figure window when one is > created? This will be a killing feature if one wants to put the figure > window at the right place in the screen automatically. It is annoying if > ones has to drag a new figure to a comfortable place in the screen every > time a new figure is created. > > Jianbao > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Gökhan |
|
From: Charleux L. <lud...@gm...> - 2012-10-03 18:11:11
|
Thanks for your multiple answers. I'll try the same manipulation with the 1.2 version as soon as possible. Concerning the debate between the use of None and numpy.nan, I tryed both methods before posting and they both lead to the same bug on my version. I'm using the None/numpy.nan trick to plot finite element 2D meshes (Matplotlib allows very neat vectorial plots) and I often adjust xlim/ylim to magnify interesting zones and so this bug is everywhere. I'm not totally sure but I think the bug was not present in the 1.0.x versions I tested before. Regards. Ludovic Charleux 2012/10/3 Benjamin Root <ben...@ou...> > > > On Wed, Oct 3, 2012 at 1:02 PM, Phil Elson <pel...@gm...> wrote: > >> I don't get this on matplotlib/master (and therefore probably not on >> 1.2rc2). >> >> I'm pretty sure masked array line plotting was fixed at some point this >> release cycle (I cannot find the appropriate github issue to link to), so I >> suggest this is a known bug with 1.1.1 and fixed in 1.2. Just to be clear, >> I am using the TkAgg backend, and there is a remote possiblity that this >> bug is backend dependent. Is there any chance you could test this with the >> latest release candidate? >> >> Many Thanks, >> >> > This issue may be dependent upon which version of Numpy one is using. As > Eric pointed out, one should be getting an object array if you have a None > in the list. On top of that, I wouldn't be surprised if the different > backends handled this object array differently. > > As far as I am concerned, using None in the list is the bug and is not > only unsupported, but should be actively discouraged. Use NaNs or masked > arrays instead. > > (and to ward off the inevitable question, I would advise against > explicitly checking for object arrays because there are times when it is > correct to have such arrays, i.e., python decimal or datetime objects). > > Cheers! > Ben Root > > |
|
From: Jianbao T. <jia...@gm...> - 2012-10-03 18:10:58
|
Dear Anthony, Thank you so much for your advice. I embedded my response below. Jianbao On Wed, Oct 3, 2012 at 10:49 AM, Anthony Floyd <ant...@gm...>wrote: > Hi Jianbao, > > First some context: at the company I work for, we've been using > matplotlib to do much of what you want to do for the past 4 years. We > have created our own application for plotting, interrogating, and > manipulating time-series data coming from both simulations and > measurements, although from a completely different domain (in our case > it's virtual manufacturing of composite materials). In the past two > years, we've also been using matplotlib to plot in more-or-less > realtime data from a cloud industrial sensors (temperature, pressure, > etc). > Do you have any references, such as screen shots, gallery, examples, or whatever? I am very curious to see what people can do with matplotlib. > > After reading the matplotlib documents and trying out several little > > examples for a few days, I now have a feeling that matplotlib at least > has > > most of the infrastructure ready for my purposes. One thing that bothers > me > > a little bit is that the plotting speed seems to be a little slow. But > IDL > > had the same problem in the first place too. As computers became faster > and > > faster, that problem just became less and less important. I expect the > same > > thing will happen to matplotlib too. > > This is true, matplotlib can be slow, particularly for large data sets > and many data sets. The trick is to downsample (and use tiling if > you're going to be panning around a lot) what you're actually plotting > before handing it off to the plot. I think more recent versions of > matplotlib handle some of this for you, but we've found that it's > faster to do the downsampling ourselves. > As a matter of fact, I considered writing intermediate routines to handle downsampling before feeding data in matplotlib. However, you will have to do anti-alias filtering for that. So, I wasn't sure downsampling would boost the speed anyway. But based on your experience, this is probably a good idea. :-) > > > Now let me turn to technical stuff. What I want is a time-series plotting > [...] > > sufficient. Third, the system should have minimal dependencies for the > sake > > of portability and installation easiness. As for now, I don't want any > > dependencies beyond numpy, scipy, and matplotlib. Ipython would be a > highly > > recommended tool, but the system should be just fine without it. > > You're going to need more than that. At the very least you're going to > need a widget framework like wxPython, pyQT, pyGTK, or some such. > These will provide you with all the window management, widget > controls, and so on. Our preference is wxPython but YMMV. > One of my concerns about third-party widget framework is that sometimes it is difficult to install them. In fact, I tried to install wxPython on my Mac (10.8 OS X) last night, but didn't succeed. Another concern of mine is that I don't know how efficient or how easy to interact with a thrid-party widget framework from a python interpreter. However, again, based on your reply, it doesn't seem to be a big issue after all. > > > After weighing all the options, I sense that I will probably be better > off > > to use the matplotlib library directly, rather than the convenient > utilities > > provided by pyplot. However, I am having a hard time to find good > > instructions for using the matplotlib infrastructure. So, I would like to > > hear some references on that. I also would like to hear general advice > about > > how to construct such a system so that its structure is consistent with > > matplotlib conventions. Other comments and advice are warmly welcome too. > > Absolutely, you'll want to use the API rather than the utility > functions. The best reference for that is the online documentation at > matplotlib.org. In the past we've found the source code documentation > (or, say, that generated by doxygen) more helpful than the Sphinx > documentation, but frankly our matplotlib bits are pretty stable now > and we haven't had to use the documentation for a while (perhaps it's > better now). > > Good luck! We've been very happy with our design choices, and get > nothing but positive feedback on how our plots look and feel. > matplotlib and the amazing active community around it have everything > to do with that. > I am very glad to hear that. :-) > > Anthony. > |