[Matplotlib-users] mailing list archive broken ?
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 signature.asc Description: OpenPGP digital signature -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 signature.asc Description: OpenPGP digital signature -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Control the position of a figure window
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 jianbao@gmail.com 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
On Thu, Oct 4, 2012 at 10:44 AM, Damon McDougall damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig pierre.haes...@crans.org 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:44 AM, Damon McDougall damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig pierre.haes...@crans.org 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Saving animations
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.comforum_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 -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:44 AM, Damon McDougall damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig pierre.haes...@crans.org 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 signature.asc Description: OpenPGP digital signature -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:44 AM, Damon McDougall damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:02 AM, Pierre Haessig pierre.haes...@crans.org 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
On Thu, Oct 4, 2012 at 10:11 AM, Michael Droettboom md...@stsci.edu 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 -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 signature.asc Description: OpenPGP digital signature -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 signature.asc Description: OpenPGP digital signature -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
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 -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
On Thu, Oct 4, 2012 at 10:39 AM, Pierre Haessig pierre.haes...@crans.orgwrote: 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 -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Saving animations
On Thu, Oct 4, 2012 at 10:02 AM, Andreas Mueller amuel...@ais.uni-bonn.dewrote: Hi everybody. I have been trying to save some animations I made and I encountered the problem mentioned herehttp://sourceforge.net/mailarchive/forum.php?thread_name=CAKH0P%2BVLXthNCAZ1K2pKHYqqPiFHP5iXSFwJvEerVmvtmgGv0g%40mail.gmail.comforum_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 -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
On Thu, Oct 4, 2012 at 3:35 PM, Pierre Haessig pierre.haes...@crans.org wrote: 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 Adding Gaussian noise to each point on a function doesn't look nice. That's why I produced a random function in Fourier space first. That way, random functions still have some sense of smoothness. -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
On 10/04/2012 10:29 AM, Benjamin Root wrote: On Thu, Oct 4, 2012 at 10:11 AM, Michael Droettboom md...@stsci.edu mailto:md...@stsci.edu 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? We have a complete set of path filters in C++ in path_converters.h that are used by most of the backends. It's not really user-defined because it can't be extended from Python, but it should be sufficient to put it in there and have it work everywhere. Mike -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
Le 04/10/2012 16:54, Damon McDougall a écrit : Adding Gaussian noise to each point on a function doesn't look nice. That's why I produced a random function in Fourier space first. That way, random functions still have some sense of smoothness. Mathematica code seems to use a Gaussian *smoothing* of a uniform noise. I understand this as the spatial-domain-way (using convolution) to get some smoothness while you've taken the frequency-domain path. It's a matter of taste and I guess that both ways should be ok ! Best, Pierre signature.asc Description: OpenPGP digital signature -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
Here is my take on it as an IPython notebook, based on Damon's code: http://nbviewer.ipython.org/3835181/ I took the engineering approach and filtered the random function instead of doing some fft/ifft magic. Also, X and Y of the functions are affected now, giving them a more natural look in the slopes. Juergen Am 04.10.2012 18:09, schrieb Pierre Haessig: Le 04/10/2012 16:35, Pierre Haessig a écrit : 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...) I've implemented this processing in a tiny image_shake script. https://gist.github.com/3834536 A nice occasion to learn how to use some scipy image processing functions... I've attached the before/after images because I didn't manage to put them in the Gist (it's not a plot image but gives the idea of line shaking). Now, I think it's unfortunately outside the frame of Fernando's challenge, because this script uses zero matplotlib methods!! 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
On Thu, Oct 4, 2012 at 10:09 PM, Juergen Hasch pyt...@elbonia.de wrote: Here is my take on it as an IPython notebook, based on Damon's code: http://nbviewer.ipython.org/3835181/ I took the engineering approach and filtered the random function instead of doing some fft/ifft magic. Also, X and Y of the functions are affected now, giving them a more natural look in the slopes. Juergen I think I actually prefer your output over mine :) Nice job. -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
Sweet! That should *defiintely* go into the mpl gallery, and honestly I'd love for it to be cleaned up enough to be usable to style generically any plot, much like the mathematica code I linked to earlier does. It would be a beautiful demonstration of matplotlib's capabilities, and furthermore, I can imagine it being useful in practice. If I want to make a purely 'qualitative' diagram, something in this style actually looks great and I prefer it to something that looks more like a 'real data' plot. Thanks everyone for the enthusiasm with which you took this and ran with it! Cheers, f On Thu, Oct 4, 2012 at 2:39 PM, Damon McDougall damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:09 PM, Juergen Hasch pyt...@elbonia.de wrote: Here is my take on it as an IPython notebook, based on Damon's code: http://nbviewer.ipython.org/3835181/ I took the engineering approach and filtered the random function instead of doing some fft/ifft magic. Also, X and Y of the functions are affected now, giving them a more natural look in the slopes. Juergen I think I actually prefer your output over mine :) Nice job. -- 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] XKCD style graphs?
I've put up a PR adding this sketchy line drawing as a path filter. This makes it work with almost anything that matplotlib draws. https://github.com/matplotlib/matplotlib/pull/1329 Mike On 10/04/2012 06:06 PM, Fernando Perez wrote: Sweet! That should *defiintely* go into the mpl gallery, and honestly I'd love for it to be cleaned up enough to be usable to style generically any plot, much like the mathematica code I linked to earlier does. It would be a beautiful demonstration of matplotlib's capabilities, and furthermore, I can imagine it being useful in practice. If I want to make a purely 'qualitative' diagram, something in this style actually looks great and I prefer it to something that looks more like a 'real data' plot. Thanks everyone for the enthusiasm with which you took this and ran with it! Cheers, f On Thu, Oct 4, 2012 at 2:39 PM, Damon McDougall damon.mcdoug...@gmail.com wrote: On Thu, Oct 4, 2012 at 10:09 PM, Juergen Hasch pyt...@elbonia.de wrote: Here is my take on it as an IPython notebook, based on Damon's code: http://nbviewer.ipython.org/3835181/ I took the engineering approach and filtered the random function instead of doing some fft/ifft magic. Also, X and Y of the functions are affected now, giving them a more natural look in the slopes. Juergen I think I actually prefer your output over mine :) Nice job. -- 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] imlim in ax.imshow
On 2012-10-02 20:09:34 +, Eric Firing said: On 2012/10/02 9:21 AM, Michael Aye wrote: How nice of you to ask! ;) Indeed: I had the case that image arrays inside an ImageGrid where shown with some white overhead area around, e.g. for an image of 100 pixels on the x-axis, the imshow resulted in an x-axis that went from -10 to 110. I was looking for a simple way to suppress that behavior and let imshow instead use the exact image extent. I believe that the plot command has such a flag, hasn't it? (I.e. to use the exact xdata range and not try to beautify the plot? Michael Is the 'extent' keyword what you're looking for? No, because it needs detail. I was looking for a boolean switch that basically says: Respect the data, not beauty. I don't understand what you mean by 'beauty'. If your image is 100 pixels wide and 50 pixels tall, what is it about extent=[0,100,0,50] that doesn't do what you want? As I wrote, that's not what is happening. I get extent=[-10,110,0,50]. Which version of matplotlib are you using? Also, are you on a 32-bit machine or a 64-bit machine. This might be related to a bug we have seen recently. I am using mpl 1.1.0 from EPD 7.3-2 on a 64-bit Mac OSX. Thanks for the effort Damon. I should have been starting with an example script from the beginning. I believe the problem appears only for subplots in the case of sharex =sharey = True: Aha! This is a real bug. It may take a bit of work to track it down. Would you enter it, with this test script, as a github issue, please? Done. https://github.com/matplotlib/matplotlib/issues/1325 Cheers, Michael Thank you. Eric from matplotlib.pyplot import show, subplots from numpy import arange, array arr = arange(1).reshape(100,100) l = [arr,arr,arr,arr] narr = array(l) fig, axes = subplots(2,2,sharex=True,sharey=True) for ax,im in zip(axes.flatten(),narr): ax.imshow(im) show() One can see that all the 4 axes show the array with an extent of [-10,110, 0, 100] here. Michael 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net 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 -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] imlim in ax.imshow
On 2012-10-02 20:15:51 +, Damon McDougall said: On Tue, Oct 2, 2012 at 9:09 PM, Eric Firing efir...@hawaii.edu wrote: On 2012/10/02 9:21 AM, Michael Aye wrote: How nice of you to ask! ;) Indeed: I had the case that image arrays inside an ImageGrid where shown with some white overhead area around, e.g. for an image of 100 pixels on the x-axis, the imshow resulted in an x-axis that went from -10 to 110. I was looking for a simple way to suppress that behavior and let imshow instead use the exact image extent. I believe that the plot command has such a flag, hasn't it? (I.e. to use the exact xdata range and not try to beautify the plot? Michael Is the 'extent' keyword what you're looking for? No, because it needs detail. I was looking for a boolean switch that basically says: Respect the data, not beauty. I don't understand what you mean by 'beauty'. If your image is 100 pixels wide and 50 pixels tall, what is it about extent=[0,100,0,50] that doesn't do what you want? As I wrote, that's not what is happening. I get extent=[-10,110,0,50]. Which version of matplotlib are you using? Also, are you on a 32-bit machine or a 64-bit machine. This might be related to a bug we have seen recently. I am using mpl 1.1.0 from EPD 7.3-2 on a 64-bit Mac OSX. Thanks for the effort Damon. I should have been starting with an example script from the beginning. I believe the problem appears only for subplots in the case of sharex =sharey = True: Aha! This is a real bug. It may take a bit of work to track it down. Would you enter it, with this test script, as a github issue, please? Thank you. Eric from matplotlib.pyplot import show, subplots from numpy import arange, array arr = arange(1).reshape(100,100) l = [arr,arr,arr,arr] narr = array(l) fig, axes = subplots(2,2,sharex=True,sharey=True) for ax,im in zip(axes.flatten(),narr): ax.imshow(im) show() One can see that all the 4 axes show the array with an extent of [-10,110, 0, 100] here. Michael 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users The extent keyword is something I put in as second nature. You'll need it if your x-range or y-range is something other than the the number of pixels in each dimension. In this case, it can safely be removed, yes. Thanks for pointing that out. If you want to share axes, that is still possible: import matplotlib.pyplot as plt from numpy import arange, array arr = arange(1).reshape(100,100) l = [arr,arr,arr,arr] narr = array(l) axes = [] fig = plt.figure() for i in range(4): if i == 0: axes.append(fig.add_subplot(2, 2, i)) if i 0: axes.append(fig.add_subplot(2, 2, i, sharex=axes[0], sharey=axes[0])) for ax, im in zip(axes, narr): ax.imshow(im, extent=[0,100,0,100]) plt.show() This code fails to share the axes and the last extent setting as well, so like in my example the images are shown, at least on my system, with an extent of [-10,110,0,100]. -- 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
Re: [Matplotlib-users] Saving animations
On Thu, Oct 4, 2012 at 12:38 PM, Andreas Mueller amuel...@ais.uni-bonn.de wrote: On 10/04/2012 03:51 PM, Benjamin Root wrote: On Thu, Oct 4, 2012 at 10:02 AM, Andreas Mueller amuel...@ais.uni-bonn.de wrote: Hi everybody. I have been trying to save some animations I made and I encountered the problem mentioned here. 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. Thanks for the quick answer. I am not on the box but I used master from yesterday, so 89482b21c8582d49a2ddc2865e472eb404fd07e2, I guess. The platform is Ubuntu Precise (with loads of random Python packages, but that seems somewhat unrelated). I'm on Ubuntu Precise (12.04) here as well. No problems with/without, but I'm noticing the extra_args aren't being used (which I think is a known bug I need to fix.) Can you run with --verbose-debug and post the relevant output? (Or just compress and attach.) Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Matplotlib produced plots in academic journal articles
Hello, Is there any collection of articles that shows academic articles using matplotlib produced plots? I have come across a few recent articles in my field with plots produced by matplotlib. Though, the mpl page shows some nice examples of publication quality plots, it would be nice to have a discipline specific collection of academic paper citations/links (hopefully mostly open-access titles) to raise awareness of mpl usage in academia by attracting other language users. What do you think? -- Gökhan -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users