[Matplotlib-users] An interactive plot challenge
The following link should link you to a very interesting graphical display, http://www.ecb.int/stats/exchange/eurofxref/html/eurofxref-graph-nok.en.html This type of graphical output (or at least something quite similar) can be found in other web pages that display financial data. Has anyone been able to produce a similar interactive graphical display using Matplotlib? A challenge for 2012 :-) --V -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] contourf with rgba colours
Eric Firing wrote: On Wed, Dec 28, 2011 at 1:11 AM, Jeff Whitaker jsw...@fastmail.fm wrote: On 12/27/11 12:07 PM, Logi Ragnarsson wrote: Is it supposed to be possible to do a filled contour plot with alpha levels in the colour map? I'm plotting weather data on top of maps and would very much like to plot low levels of wind and precipitation as mostly transparent, with higher levels more opaque. Logi: It looks like alpha transparency is controlled with the alpha keyword, so you can't specify different alphas for each contour level. You may have to call contourf multiple times, changing the alpha as needed for each set of contour levels. -Jeff It looks like this is something I can fix by modifying ListedColormap. It is discarding the alpha values, and I don't think there is any reason it needs to do so. Eric I feel that this would be a worth-while improvement to the library. In the mean-time, I have realized that the source is all there for me to read, and I can probably create my own patched version of ListedColormap. Actually, I've been interpolating colours to feed to contourf, but it would be much more sensible to use a LinearSegmentedColormap for this. Unfortunately it also discards alpha levels. Regards, Logi PS I was getting digests of the list, so I couldn't properly respond to Eric's mail, in case the headers look funny. -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] An interactive plot challenge
very similar: http://www.google.com/finance?hl=enq=CURRENCY:AUDUSD On 01/02/2012 05:01 AM, Virgil Stokes wrote: The following link should link you to a very interesting graphical display, http://www.ecb.int/stats/exchange/eurofxref/html/eurofxref-graph-nok.en.html This type of graphical output (or at least something quite similar) can be found in other web pages that display financial data. Has anyone been able to produce a similar interactive graphical display using Matplotlib? A challenge for 2012 :-) --V -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plt.hist() doesn't recognize the masked array?
Dear all matplotlib users, Happy New Year. I try to check the distribution of a 2D array and I find that the histogram plot function doesn't respect the numpy masked array? In [188]: a=range(1,6); b=np.array(a+a[::-1]) In [189]: b=np.ma.masked_equal(b,2); b=np.ma.masked_equal(b,5) In [190]: b Out[190]: masked_array(data = [1 -- 3 4 -- -- 4 3 -- 1], mask = [False True False False True True False False True False], fill_value = 5) In [191]: n,bins,patches=plt.hist(b) In [192]: n Out[192]: array([2, 0, 2, 0, 0, 2, 0, 2, 0, 2]) In [193]: n.sum() Out[193]: 10 it seems that all the elements (masked or not) are counted in the history plotting? and the original value is used but not the fill_value? I attach a figure below. In [194]: plt.show() -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 attachment: eg_hist.png-- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plt.hist() doesn't recognize the masked array?
On Mon, Jan 2, 2012 at 11:10 AM, Chao YUE chaoyue...@gmail.com wrote: Dear all matplotlib users, Happy New Year. I try to check the distribution of a 2D array and I find that the histogram plot function doesn't respect the numpy masked array? In [188]: a=range(1,6); b=np.array(a+a[::-1]) In [189]: b=np.ma.masked_equal(b,2); b=np.ma.masked_equal(b,5) In [190]: b Out[190]: masked_array(data = [1 -- 3 4 -- -- 4 3 -- 1], mask = [False True False False True True False False True False], fill_value = 5) In [191]: n,bins,patches=plt.hist(b) In [192]: n Out[192]: array([2, 0, 2, 0, 0, 2, 0, 2, 0, 2]) In [193]: n.sum() Out[193]: 10 it seems that all the elements (masked or not) are counted in the history plotting? and the original value is used but not the fill_value? I attach a figure below. In [194]: plt.show() Yes, this is a known issue (at least, from the comments within the function). Looks like hist() uses np.asarray() instead of np.asanyarray(), which would result in the array being stripped of its mask. However, I don't think the fix is as straight-forward as changing that to np.asanyarray(). I will take a peek and see what can be done. Ben Root -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [BUG] autofmt_xdate = graph cropped wrongly
On Mon, Jan 2, 2012 at 11:25 AM, Álvaro Justen [Turicas] alvarojus...@gmail.com wrote: Hello, When I use Figure.autofmt_xdate (it uses rotation by default) the graph is not moved/scaled so it is cropped in the image. I noticed this problem when I was trying to crop white border in images using bbox_inches='tight' and pad_inches=0 in Figure.savefig. There are attached: * Simple code to reproduce the bug * Output images of two cases (with and without bbox_inches + pad_inches) My system's info: - uname -a: Linux E04679 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux - matplotlib version: 0.99.3, installed using pip - Nothing in matplotlibrc - Nothing special in verbose options Thanks, -- Álvaro Justen Turicas Turicas, Confirmed with the v1.1.x branch. Could you file a bug report on github? Thanks! Ben Root -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plt.hist() doesn't recognize the masked array?
Thanks Ben. cheers, Chao 2012/1/2 Benjamin Root ben.r...@ou.edu On Mon, Jan 2, 2012 at 11:10 AM, Chao YUE chaoyue...@gmail.com wrote: Dear all matplotlib users, Happy New Year. I try to check the distribution of a 2D array and I find that the histogram plot function doesn't respect the numpy masked array? In [188]: a=range(1,6); b=np.array(a+a[::-1]) In [189]: b=np.ma.masked_equal(b,2); b=np.ma.masked_equal(b,5) In [190]: b Out[190]: masked_array(data = [1 -- 3 4 -- -- 4 3 -- 1], mask = [False True False False True True False False True False], fill_value = 5) In [191]: n,bins,patches=plt.hist(b) In [192]: n Out[192]: array([2, 0, 2, 0, 0, 2, 0, 2, 0, 2]) In [193]: n.sum() Out[193]: 10 it seems that all the elements (masked or not) are counted in the history plotting? and the original value is used but not the fill_value? I attach a figure below. In [194]: plt.show() Yes, this is a known issue (at least, from the comments within the function). Looks like hist() uses np.asarray() instead of np.asanyarray(), which would result in the array being stripped of its mask. However, I don't think the fix is as straight-forward as changing that to np.asanyarray(). I will take a peek and see what can be done. Ben Root -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] draw contourf on top of continents with basemap?
Dear all, I want to draw a contourf with the data covering N45 (high latitude) using a 'npstere' projection. The problem is if I draw continents with a gray color, (m.fillcontinents(color='0.5')) the contourf lay which comes later will be below the continents and completely invisible. Does anyone else have this and any suggestions? thanks, Chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [BUG] autofmt_xdate = graph cropped wrongly
Done! https://github.com/matplotlib/matplotlib/issues/654 Thanks for the support. On Mon, Jan 2, 2012 at 16:28, Benjamin Root ben.r...@ou.edu wrote: On Mon, Jan 2, 2012 at 11:25 AM, Álvaro Justen [Turicas] alvarojus...@gmail.com wrote: Hello, When I use Figure.autofmt_xdate (it uses rotation by default) the graph is not moved/scaled so it is cropped in the image. I noticed this problem when I was trying to crop white border in images using bbox_inches='tight' and pad_inches=0 in Figure.savefig. There are attached: * Simple code to reproduce the bug * Output images of two cases (with and without bbox_inches + pad_inches) My system's info: - uname -a: Linux E04679 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux - matplotlib version: 0.99.3, installed using pip - Nothing in matplotlibrc - Nothing special in verbose options Thanks, -- Álvaro Justen Turicas Turicas, Confirmed with the v1.1.x branch. Could you file a bug report on github? Thanks! Ben Root -- Álvaro Justen Turicas http://blog.justen.eng.br http://twitter.com/turicas http://CursoDeArduino.com.br http://github.com/turicas +55 21 9898-0141 -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] draw contourf on top of continents with basemap?
On 01/02/2012 08:36 AM, Chao YUE wrote: Dear all, I want to draw a contourf with the data covering N45 (high latitude) using a 'npstere' projection. The problem is if I draw continents with a gray color, (m.fillcontinents(color='0.5')) the contourf lay which comes later will be below the continents and completely invisible. Does anyone else have this and any suggestions? I think you will be able to solve this problem be setting the zorder of each patch collection in the object returned by the call to contourf, something like this: CS = contourf(Z) for col in CS.collections: col.set_zorder(2.5) The default zorder for solids is 2, so I expect that is what the filled continents are; boosting the patch collections to 2.5 should ensure they are above the continents. Eric thanks, Chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] patheffects for Line2D objects
I just opened a pull request that implements the requested feature. https://github.com/matplotlib/matplotlib/pull/655 If you're familiar with Git, please test it and see if it works for your need. I believe I will merge this PR to the master branch in a few days unless there is any objection. Regards, -JJ On Tue, Dec 20, 2011 at 6:21 AM, Jonathan Slavin jsla...@cfa.harvard.edu wrote: Hi, It seems that patheffects are not supported for Line2D objects currently - only for Text and Patch objects. Is there any fundamental reason they couldn't be extended to support Line2D objects? I'm interested in this because I draw grid lines for some hammer projection plots and those lines are Line2D objects. For certain images, it'd be nicer to have the grid lines use patheffects so that any color of the image would still allow the grid line to show clearly. Jon -- __ Jonathan D. Slavin Harvard-Smithsonian CfA jsla...@cfa.harvard.edu 60 Garden Street, MS 83 phone: (617) 496-7981 Cambridge, MA 02138-1516 cell: (781) 363-0035 USA __ -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users