[Matplotlib-users] contour3D in matplotlib
Hi all, I found http://stackoverflow.com/questions/9419451/3d-contour-plot-from-data-using-mayavi-python Is there something similar in matplotlib ? Nils -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] contour3D in matplotlib
I am aware of the gallery but I didn't find a similar picture I am looking for. If something is *comprehensive*, it is *complete* and includes everything that is important. Shall I create a feature request for isosurface plots in matplotlib ? http://en.wikipedia.org/wiki/Isosurface On Tue, Jan 20, 2015 at 4:27 PM, Paul Hobson pmhob...@gmail.com wrote: The gallery had a comprehensive set of available three dimensional plots, I think. http://matplotlib.org/gallery.html#mplot3d On Tue, Jan 20, 2015 at 01:19 Nils Wagner nils...@googlemail.com wrote: Hi all, I found http://stackoverflow.com/questions/9419451/3d-contour-plot-from-data-using-mayavi-python Is there something similar in matplotlib ? Nils -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet__ _ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Isobar plots of spatial pressure data
Hi all, Assume that we have knowledge of pressure values at certain irregular grid points in 3D, i.e. p_i(x_i, y_i, z_i) i = 1,(1),N where N denotes the number of grid points. Usually N = 7e5. Is it possible to create an isobar plot using matplotlib ? How can I achieve it ? Nils -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] line segments in a scatter plot
Hi all, how can I create line segments between consecutive selected points of a scatter plot in an interactive manner ? It should be possible to create several unclosed polygonal lines. Each polygonal line might have a different color. A small example is appreciated. Thanks in advance. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/line-segments-in-a-scatter-plot-tp44602.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] line segments in a scatter plot
Hi Ben, I have attached a sample scatter plot. The task is to add lines to the scatter plot. Nils On Thu, Dec 11, 2014 at 3:47 PM, Benjamin Root ben.r...@ou.edu wrote: Nils, Perhaps the rectangle selector might be of use? It defaults to a draw mode of 'box', but you can set it to line so that it looks like a ruler widget. http://matplotlib.org/api/widgets_api.html#matplotlib.widgets.RectangleSelector I can imagine that you could set up a selector callback that could then query the data on the graph to snap the final line to the nearest points on the graph, creating a Line2D object on the fly. Is that what you are looking for? Cheers! Ben Root On Thu, Dec 11, 2014 at 8:47 AM, Nils Wagner nils...@googlemail.com wrote: Hi all, how can I create line segments between consecutive selected points of a scatter plot in an interactive manner ? It should be possible to create several unclosed polygonal lines. Each polygonal line might have a different color. A small example is appreciated. Thanks in advance. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/line-segments-in-a-scatter-plot-tp44602.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] pngconf.h:371:12: error: ‘__pngconf’ does not name a type
Hi all, here is a new build problem /usr/include/libpng12/pngconf.h:371:12: error: ‘__pngconf’ does not name a type /usr/include/libpng12/pngconf.h:372:12: error: ‘__dont__’ does not name a type error: command '/usr/bin/gcc' failed with exit status 1 Now I am using commit 5b398e95454ba9cc6dfad866ff7bc22b41ad7a68 Merge: e1702c7 ec2aff4 Author: Thomas A Caswell tcasw...@gmail.com Nils -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] _backend_gdk.c:43:10: error: ‘PyArrayObject’ has no member named ‘strides’
Hi all, I cannot build matplotlib from git src/_backend_gdk.c: In function ‘pixbuf_get_pixels_array’: src/_backend_gdk.c:43:10: error: ‘PyArrayObject’ has no member named ‘strides’ src/_backend_gdk.c:46:10: error: ‘PyArrayObject’ has no member named ‘base’ error: command '/usr/bin/gcc' failed with exit status 1 -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Interactively adding lines to a scatter plot
Hi all, How can I add lines between points of a scatter plot in an interactive manner ? A small example would be appreciated. Thanks in advance Nils -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] EPS import problems
Hi all, how can I resolve the problem described at http://community.coreldraw.com/forums/p/31103/146512.aspx Nils -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] pick event for images
Hi Joe, Just now I installed your package mpldatacursor and run the example image_example.py. Awesome ! Is there a chance to integrate it into matplotlib ? Nils On Wed, Oct 30, 2013 at 5:58 PM, Joe Kington joferking...@gmail.com wrote: On Oct 30, 2013 9:43 AM, Nils Wagner nils...@googlemail.com wrote: Hi all, How can I retrieve the corresponding color value in percent, when I click on the image ? You have to jump through a couple of hoops. Have a look at the _coords2index function in pick_info.py for mpldatacursor. https://github.com/joferkington/mpldatacursor/blob/master/mpldatacursor/pick_info.py Also, mpldatacursor might be useful for what you're doing. Not to plug my own project too much, but it does exactly this, among other things. Hope that helps! -Joe fig = plt.figure() ax = fig.add_subplot(111) cax = ax.imshow(col[:,::2], interpolation='nearest',extent=[0.5,20.5,0.5,2 0.5],alpha=1,picker=5) fig.canvas.mpl_connect('pick_event', onpick) def onpick(event): ... Nils -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Reset original view button and mplot3d
Hi all, The Reset original view button is effectless in case of 3D plots. Nils -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] pick event for images
Hi all, How can I retrieve the corresponding color value in percent, when I click on the image ? fig = plt.figure() ax = fig.add_subplot(111) cax = ax.imshow(col[:,::2], interpolation='nearest',extent=[0.5,20.5,0.5,2 0.5],alpha=1,picker=5) fig.canvas.mpl_connect('pick_event', onpick) def onpick(event): ... Nils attachment: image.png-- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Pick event after using Zoom to rectangle
Hi all, How can I use a pick event when I have used Zoom to rectangle before ? Nils -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Pick event after using Zoom to rectangle
Thank you very much ! On Tue, Oct 29, 2013 at 3:16 PM, Joe Kington joferking...@gmail.com wrote: If you're asking how to do it interactively, just click on the zoom button again, and you should be able to fire pick events by clicking again. Hope that helps! -Joe On Oct 29, 2013 4:58 AM, Nils Wagner nils...@googlemail.com wrote: Hi all, How can I use a pick event when I have used Zoom to rectangle before ? Nils -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Build failure
The problem persists in master. On Fri, Aug 30, 2013 at 7:39 PM, Nils Wagner nils...@googlemail.com wrote: You are right. The first one fails, the second works for me. Nils On Fri, Aug 30, 2013 at 7:20 PM, Michael Droettboom md...@stsci.eduwrote: I wonder if it's commit 6b827cbf. Can you do: git checkout 6b827cbf python setup.py build # confirm it fails git checkout 6b827cbf^ python setup.py build # Does this work? Mike On 08/30/2013 01:06 PM, Nils Wagner wrote: Hi Michael, Thank you for your note. If I remember correctly I was able to build matplotlib a week ago. I am using opensuse12.3 Nils rpm -qi python-cxx Name: python-cxx Version : 6.2.3 Release : 2.2 Architecture: noarch Install Date: Sa 27 Jul 2013 15:48:45 CEST Group : Development/Languages/Python Size: 9783 License : GPL Signature : RSA/SHA1, Mo 22 Jul 2013 20:26:22 CEST, Key ID 45a1d0671abd1afb Source RPM : python-cxx-6.2.3-2.2.src.rpm Build Date : Mo 22 Jul 2013 15:27:08 CEST Build Host : swkj07 Relocations : (not relocatable) Packager: pack...@links2linux.de Vendor : http://packman.links2linux.de URL : http://CXX.sourceforge.net/ Summary : Write Python extensions in C++ Description : PyCXX is a set of classes to help create extensions of Python in the C language. The first part encapsulates the Python C API taking care of exceptions and ref counting. The second part supports the building of Python extension modules in C++. Distribution: Extra / openSUSE_12.3 On Fri, Aug 30, 2013 at 6:46 PM, Michael Droettboom md...@stsci.eduwrote: It looks like a version mismatch with PyCXX. Was it recently updated or changed? What version of PyCXX do you have? What was the last version of matplotlib that worked for you? You can force matplotlib to use its local copy of PyCXX by uninstalling PyCXX, or adding the following lines to the top of PyCXX::check in setupext.py: self.__class__.found_external = False return Couldn't import. Using local copy. (But really, we should update setupext so users can specify the local override in setup.cfg). Mike On 08/30/2013 12:35 PM, Nils Wagner wrote: Hi all, I cannot build the latest matplotlib from git. The build log is attached. Nils -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save!http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Matplotlib-users mailing listMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users log.txt.gz Description: GNU Zip compressed data -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] AttributeError: 'BarContainer' object has no attribute 'autoscale_None'
Hi all, I tried to add a colorbar to a bar plot coolwarm = cm = plt.get_cmap('coolwarm') values = range(100) cNorm = colors.Normalize(vmin=0, vmax=values[-1]) scalarMap = cmx.ScalarMappable(norm=cNorm, cmap=coolwarm) colours = [] for value in values: colorVal = scalarMap.to_rgba(value) colours.append(colorVal) fig = plt.figure() ax = fig.add_subplot(111,projection='3d') hist,bin_edges = np.histogram(efratio,bins=100,range=(0.,1.),density=False) width = 0.7*(bin_edges[1]-bin_edges[0]) center = (bin_edges[:-1]+bin_edges[1:])/2 heatmap = ax.bar(center, hist, zs=z, zdir='y', align = 'center', width = width,color=colours) plt.colorbar(heatmap) mappable.autoscale_None() # Ensure mappable.norm.vmin, vmax AttributeError: 'BarContainer' object has no attribute 'autoscale_None' How can I fix the problem ? Nils -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] AttributeError: 'BarContainer' object has no attribute 'autoscale_None'
plt.colorbar(scalarMap,ax=ax) results in cm.py, line 309, in autoscale_None raise TypeError('You must first set_array for mappable') TypeError: You must first set_array for mappable Nils On Fri, Oct 11, 2013 at 9:51 AM, Eric Firing efir...@hawaii.edu wrote: On 2013/10/10 8:52 PM, Nils Wagner wrote: Hi all, I tried to add a colorbar to a bar plot coolwarm = cm = plt.get_cmap('coolwarm') values = range(100) cNorm = colors.Normalize(vmin=0, vmax=values[-1]) scalarMap = cmx.ScalarMappable(norm=cNorm, cmap=coolwarm) colours = [] for value in values: colorVal = scalarMap.to_rgba(value) colours.append(colorVal) fig = plt.figure() ax = fig.add_subplot(111,projection='3d') hist,bin_edges = np.histogram(efratio,bins=100,range=(0.,1.),density=False) width = 0.7*(bin_edges[1]-bin_edges[0]) center = (bin_edges[:-1]+bin_edges[1:])/2 heatmap = ax.bar(center, hist, zs=z, zdir='y', align = 'center', width = width,color=colours) plt.colorbar(heatmap) mappable.autoscale_None() # Ensure mappable.norm.vmin, vmax AttributeError: 'BarContainer' object has no attribute 'autoscale_None' This is because it is not an instance of ScalarMappable, which is what colorbar() requires as its argument. How can I fix the problem ? Use scalarMap as the argument instead of heatmap. I think you will need to provide either the cax or the ax kwarg in addition. examples/api/colorbar_only.py might also be helpful. Eric Nils -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] mplot3d
Hi all, How can I modify the grid linewidth and grid line color of an Axes3D object ? is it possible to use white instead of gray for the background color ? The following snippet doesn't show the desired effect. from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt fig = plt.figure(figsize=(10,8)) ax = fig.gca(projection='3d') ax.grid(color='r',linestyle='-',linewdith=2) Nils -- LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mplot3d
Hi Ben, It works for me. Thank you very much ! Best wishes Nils On Tue, Sep 17, 2013 at 3:25 PM, Benjamin Root ben.r...@ou.edu wrote: On Tue, Sep 17, 2013 at 4:25 AM, Nils Wagner nils...@googlemail.comwrote: Hi all, How can I modify the grid linewidth and grid line color of an Axes3D object ? is it possible to use white instead of gray for the background color ? The following snippet doesn't show the desired effect. from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt fig = plt.figure(figsize=(10,8)) ax = fig.gca(projection='3d') ax.grid(color='r',linestyle='-',linewdith=2) A (somewhat) undocumented feature (and is not guaranteed to work in the future!) is the axis's _axinfo dictionary. # This is a temporary member variable. # Do not depend on this existing in future releases! self._axinfo = self._AXINFO[adir].copy() self._axinfo.update({'label' : {'space_factor': 1.6, 'va': 'center', 'ha': 'center'}, 'tick' : {'inward_factor': 0.2, 'outward_factor': 0.1}, 'ticklabel': {'space_factor': 0.7}, 'axisline': {'linewidth': 0.75, 'color': (0, 0, 0, 1)}, 'grid' : {'color': (0.9, 0.9, 0.9, 1), 'linewidth': 1.0}, }) where _AXINFO is a class-level attribute defined as: # Some properties for the axes _AXINFO = { 'x': {'i': 0, 'tickdir': 1, 'juggled': (1, 0, 2), 'color': (0.95, 0.95, 0.95, 0.5)}, 'y': {'i': 1, 'tickdir': 0, 'juggled': (0, 1, 2), 'color': (0.90, 0.90, 0.90, 0.5)}, 'z': {'i': 2, 'tickdir': 0, 'juggled': (0, 2, 1), 'color': (0.925, 0.925, 0.925, 0.5)}, } This information used to be hard-coded throughout the axis3d.py module. I consolidated it all into this dictionary for each Axis3D instance. So, you should be able to create your Axes3D object, and then do something like the following: ax = fig.gca(projection='3d') ax.xaxis._axinfo['grid'].update({'color': 'r', 'linewidth': 2}) ax.xaxis._axinfo['color'] = 'white' (Note: untested code!) I don't think the linestyle can be specified, though. At some point, I probably should get the Axes3D.grid() function defined to mess around with this _axinfo modify the _axinfo dictionary. I hope that helps! Ben Root -- LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Build failure
Hi all, I cannot build the latest matplotlib from git. The build log is attached. Nils build.log.gz Description: GNU Zip compressed data -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] legends in 3D plots
Hi all, I would like to add a legend to a 3D plot. However, the legend ist not visible in the example given below. Am I missing something ? Nils import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import random def fun(x, y): return x**2 + y def fun1(x, y): return 10+x**2 + y fig = plt.figure() ax = fig.add_subplot(111, projection='3d') x = y = np.arange(-3.0, 3.0, 0.05) X, Y = np.meshgrid(x, y) zs = np.array([fun(x,y) for x,y in zip(np.ravel(X), np.ravel(Y))]) Z = zs.reshape(X.shape) zs = np.array([fun1(x,y) for x,y in zip(np.ravel(X), np.ravel(Y))]) Z1 = zs.reshape(X.shape) ax.plot_surface(X, Y, Z, label=r'$f$') ax.plot_surface(X, Y, Z1,label=r'$f_1$') ax.set_xlabel('X Label') ax.set_ylabel('Y Label') ax.set_zlabel('Z Label') ax.legend() plt.show() -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib and opensuse 12.3
Hi Michael, Great. Now it works fine for me. Nils On 4/25/13, Michael Droettboom md...@stsci.edu wrote: I believe this PR fixes this bug: https://github.com/matplotlib/matplotlib/pull/1884 I had been waiting for the original poster to confirm before merging, but I think I'll go ahead and do this anyway at this point. Mike On 04/23/2013 02:57 PM, Nils Wagner wrote: Hi all, I cannot install matplotlib. Please find enclosed the logfile of python setup.py install --prefix=$HOME/local log.txt Any idea how to resolve the problem is appreciated. Thanks in advance. Nils -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] matplotlib and opensuse 12.3
Hi all, I cannot install matplotlib. Please find enclosed the logfile of python setup.py install --prefix=$HOME/local log.txt Any idea how to resolve the problem is appreciated. Thanks in advance. Nils log.txt.gz Description: GNU Zip compressed data -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Figure options window
Hi all, AFAIK it is currently not possible to modify the ticks of a plot within the Figure options window. Is it planned to add this feature to the Figure options window ? How can I modify the default path in the Navigation Toolbar if I launch the file save dialog by clicking the save button ? http://matplotlib.org/users/navigation_toolbar.html Nils -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] hide ticks and/or labels in the presence of sharex=ax
Hi all, how can I hide ticks and/or labels in the presence of sharex=ax. Only the last subplot 313 should have ticks and labels. import matplotlib.pyplot as plt fig=plt.figure(0,figsize=(16,24)) ax = fig.add_subplot(311) ax.set_xticks([]) ax.set_xticklabels('') ax1 = fig.add_subplot(312,sharex=ax) ax1.set_xticks([]) ax1.set_xticklabels('') ax2 = fig.add_subplot(313,sharex=ax) ax2.set_xticks(ind+width) ax2.set_xticklabels( contname,rotation='90',fontsize=8) Nils -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Store figures as matlab files
Hi all, is it possible to store figures generated with matplotlib as Matlab files ? Cheers, Nils -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] matplotlib 1.1.1rc2 available for testing
Hi all, Just curious. Is there a chance that the following ticket will be fixed before the forthcoming release. https://github.com/matplotlib/matplotlib/issues/917 Nils -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] position of xtick labels
Hi all, I would like to add different xtick labels on the top and bottom of a figure. The number and position of the xticks is the same. How can I do that ? An example would be appreciated. Nils -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Event handling in pyqt4
Hi all, I tried to combine an event with an annotation. However, the annotation is not visible, when I click on the curves. How can I resolve the problem ? The code is available at http://pastebin.com/QxKBZtaX Any pointer would be appreciated. Thanks in advance. Nils -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] CHANGELOG
Hi all, http://matplotlib.sourceforge.net/_static/CHANGELOG seems to be outdated. Am I mising something ? Nils -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Number of decimal places
Hi all, How can I increase the number of decimal places in yticks ? Nils from matplotlib.ticker import ScalarFormatter formatter = ScalarFormatter(useMathText=True,useOffset=False) formatter.set_scientific(True) formatter.set_powerlimits((-12,12)) print dir (formatter) import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.yaxis.set_major_formatter(formatter) import numpy as np A=np.array([[ 1 , 0.00E+00 , 5.234141E-06], [ 2 , 1.00E+00 , 5.233310E-06], [ 3 , 2.00E+00 , 5.232660E-06], [ 4 , 3.00E+00 , 5.231808E-06], [ 5 , 4.00E+00 , 5.231277E-06], [ 6 , 5.00E+00 , 5.230664E-06], [ 7 , 6.00E+00 , 5.230423E-06], [ 8 , 7.00E+00 , 5.230136E-06]]) ax.plot(A[:,1],A[:,2]) plt.show() attachment: image.png-- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Add a printer button to the navigation toolbar
On Mon, 16 Jan 2012 08:18:03 -0600 Benjamin Root ben.r...@ou.edu wrote: On Monday, January 16, 2012, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: Hi all, I have filed a ticket for adding a printer button to the navigation toolbar. https://github.com/matplotlib/matplotlib/issues/670 I am interested in a wider response. Any further comments ? Nils Adding a button is easy... Adding cross-platform printer capability is not. The only way I envision it could happen is if the GUI toolkits have some sort of printing API. We already can convert to postscript. Ben Root A customization of the navigation toolbar is possible. I have used the qt4 backend. However the quality of the print-out is poor using QPrinter. Moreover the frame including the navigation toolbar is printed. How can I omit that ? How can I improve the quality of the hardcopy. I have attached the program. Any hint would be appreciated. Thanks in advance. Nils attachment: Fileprint.png import sys import numpy as np from PyQt4.QtCore import * from PyQt4.QtGui import * #from xlwt import * from pylab import plot, show from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar2 class ViewWidget(QMainWindow): def __init__(self): QMainWindow.__init__(self) # create a simple main widget to keep the figure self.mainWidget = QWidget() self.setCentralWidget(self.mainWidget) layout = QVBoxLayout() self.mainWidget.setLayout(layout) # create a figure self.figure_canvas = FigureCanvas(Figure()) layout.addWidget(self.figure_canvas, 10) # and the axes for the figure self.axes = self.figure_canvas.figure.add_subplot(111) x = np.linspace(0.,2*np.pi,100) self.axes.plot(x,np.sin(x),label='sin(x) ') self.axes.plot(x,np.cos(x),label='cos(x) ') self.axes.figure.set_facecolor('white') self.axes.grid('on') self.axes.legend() # add a navigation toolbar self.navigation_toolbar = NavigationToolbar2(self.figure_canvas, self) layout.addWidget(self.navigation_toolbar, 0) self.print_button = QPushButton() self.print_button.setIcon(QIcon(Fileprint.png)) self.print_button.setToolTip(Print the figure) self.navigation_toolbar.addWidget(self.print_button) self.connect(self.print_button, SIGNAL('clicked()'), self.goPrinter) self.quit_button = QPushButton(Quit) self.navigation_toolbar.addWidget(self.quit_button) self.connect(self.quit_button, SIGNAL('clicked()'), self.close) def goPrinter(self): printer = QPrinter() anotherWidget= QPrintDialog(printer,self) if(anotherWidget.exec_() != QDialog.Accepted): return p = QPixmap.grabWidget(self) printLabel = QLabel() printLabel.setPixmap(p) painter = QPainter(printer) printLabel.render(painter) painter.end() show() if __name__==__main__: app=QApplication(sys.argv) mw=ViewWidget() mw.show() sys.exit(app.exec_()) -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Add a printer button to the navigation toolbar
Hi all, I have filed a ticket for adding a printer button to the navigation toolbar. https://github.com/matplotlib/matplotlib/issues/670 I am interested in a wider response. Any further comments ? Nils -- RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] animation.FuncAnimation
On Tue, 20 Dec 2011 10:48:42 -0600 Ryan May rma...@gmail.com wrote: On Tue, Dec 20, 2011 at 8:00 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: Hi all, How do I use animation.FuncAnimation to plot real-life data from parsing a text file ? Here's a version that does what I think you want: import matplotlib.pyplot as plt import matplotlib.animation as animation import sys import time import re x_data = [] # x y_data = [] # y fig = plt.figure() ax= fig.add_subplot(111) curve,= ax.plot([],[],lw=2) ax.set_xlim(0,5) ax.set_ylim(0,25) ax.grid() def tail_f(file): while True: where = file.tell() # current file position, an integer (may be a long integer). line = file.readline() if re.search('without errors',line): break # Always yield the line so that we return back to the event loop. If we # need to go back and read again, we'll get a free delay from the # animation system. yield line if not line: file.seek(where) # seek(offset[, whence]) -None. Move to new file position. def run(line, curve, x, y): if re.search('x=',line): liste = line.split('=') x.append(liste[1].strip()) if re.search('y=',line): liste = line.split('=') y.append(liste[1].strip()) curve.set_data(x,y) print x,y return curve # The passed in frames can be a func that returns a generator. This # generator keeps return frame data def data_source(fname=sys.argv[1]): return tail_f(open(fname)) # This init function initializes for drawing returns any initialized # artists. def init(): curve.set_data([],[]) return curve line_ani = animation.FuncAnimation(fig, run, data_source, init_func=init, fargs=(curve,x_data,y_data), interval=100) plt.show() Ben was also right in that you could subclass FuncAnimation and override/extend methods. This would have the benefit of giving more control over the handling of seek(). (Something else for my todo list...) Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Hi Ryan, is it possible to autoscale the axes whenever it is needed by a new chunk of data ? Nils -- 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
[Matplotlib-users] animation.FuncAnimation
Hi all, How do I use animation.FuncAnimation to plot real-life data from parsing a text file ? import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import sys import time import re x = [] # x y = [] # y fig = plt.figure() ax= fig.add_subplot(111) curve,= ax.plot([],[],lw=2) ax.set_xlim(0,5) ax.grid() def tail_f(file): interval = 1.0 while True: where = file.tell() # current file position, an integer (may be a long integer). line = file.readline() if re.search('without errors',line): break if not line: time.sleep(interval) file.seek(where) # seek(offset[, whence]) - None. Move to new file position. else: yield line def run(): for line in tail_f(open(sys.argv[1])): print line, if re.search('x=',line): liste = line.split('=') x.append(liste[1].strip()) if re.search('y=',line): liste = line.split('=') y.append(liste[1].strip()) curve.set_data(x,y) print x,y # # # run() plt.show() The text file looks like x=0.0 y=0.0 blabla x=1.0 y=1.0 blabla x=2.0 y=4.0 blabla ... Nils -- 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
Re: [Matplotlib-users] Adding Arrows to polar plots
On Wed, 19 Oct 2011 15:45:07 -0500 Benjamin Root ben.r...@ou.edu wrote: On Fri, Oct 14, 2011 at 3:42 AM, Nils Wagner nwag...@iam.uni-stuttgart.dewrote: Hi all, what is the native data coordinate system for Arrows in a polar plot ? How do I add arrows to a polar plot ? An example would be appreciated. fig = figure(figsize=(12,12)) ax = fig.add_subplot(111, polar=True) Nils I don't know if it is an existing feature or not. If it isn't, then I think a feature request should be filed. If it is, then a request should be filed anyway for an example to be added to the gallery. Ben Root Done. See https://github.com/matplotlib/matplotlib/issues/542 Nils -- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Ciosco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Adding Arrows to polar plots
On Wed, 19 Oct 2011 15:45:07 -0500 Benjamin Root ben.r...@ou.edu wrote: On Fri, Oct 14, 2011 at 3:42 AM, Nils Wagner nwag...@iam.uni-stuttgart.dewrote: Hi all, what is the native data coordinate system for Arrows in a polar plot ? How do I add arrows to a polar plot ? An example would be appreciated. fig = figure(figsize=(12,12)) ax = fig.add_subplot(111, polar=True) Nils I don't know if it is an existing feature or not. If it isn't, then I think a feature request should be filed. If it is, then a request should be filed anyway for an example to be added to the gallery. Ben Root Hi Ben, it seems to work in general, but how can I increase the size of the arrowhead ? from pylab import figure, arrow, show import numpy as np fig = figure(figsize=(15,15)) ax = fig.add_subplot(111, polar=True) ax.arrow(0.0,0.0,np.pi/4,0.3,lw=2) ax.arrow(0.0,0.0,np.pi/2,0.4) show() Nils -- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Ciosco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Adding Arrows to polar plots
Hi all, what is the native data coordinate system for Arrows in a polar plot ? How do I add arrows to a polar plot ? An example would be appreciated. fig = figure(figsize=(12,12)) ax = fig.add_subplot(111, polar=True) Nils -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] TypeError: instancemethod expected at least 2 arguments, got 0
File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4.py, line 463, in edit_parameters figureoptions.figure_edit(axes, self) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/backends/qt4_editor/figureoptions.py, line 132, in figure_edit icon=get_icon('qt4_editor_options.svg'), apply=apply_callback) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/backends/qt4_editor/formlayout.py, line 511, in fedit dialog = FormDialog(data, title, comment, icon, parent, apply) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/backends/qt4_editor/formlayout.py, line 416, in __init__ parent=self) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/backends/qt4_editor/formlayout.py, line 390, in __init__ widget = FormComboWidget(data, comment=comment, parent=self) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/backends/qt4_editor/formlayout.py, line 368, in __init__ widget = FormWidget(data, comment=comment, parent=self) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/backends/qt4_editor/formlayout.py, line 233, in __init__ self.data = deepcopy(data) File /usr/lib64/python2.6/copy.py, line 162, in deepcopy y = copier(x, memo) File /usr/lib64/python2.6/copy.py, line 228, in _deepcopy_list y.append(deepcopy(a, memo)) File /usr/lib64/python2.6/copy.py, line 162, in deepcopy y = copier(x, memo) File /usr/lib64/python2.6/copy.py, line 235, in _deepcopy_tuple y.append(deepcopy(a, memo)) File /usr/lib64/python2.6/copy.py, line 162, in deepcopy y = copier(x, memo) File /usr/lib64/python2.6/copy.py, line 228, in _deepcopy_list y.append(deepcopy(a, memo)) File /usr/lib64/python2.6/copy.py, line 162, in deepcopy y = copier(x, memo) File /usr/lib64/python2.6/copy.py, line 292, in _deepcopy_inst state = deepcopy(state, memo) File /usr/lib64/python2.6/copy.py, line 162, in deepcopy y = copier(x, memo) File /usr/lib64/python2.6/copy.py, line 255, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File /usr/lib64/python2.6/copy.py, line 189, in deepcopy y = _reconstruct(x, rv, 1, memo) File /usr/lib64/python2.6/copy.py, line 323, in _reconstruct y = callable(*args) File /usr/lib64/python2.6/copy_reg.py, line 93, in __newobj__ return cls.__new__(cls, *args) TypeError: instancemethod expected at least 2 arguments, got 0 -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Navigation toolbar button - Edit curves line and axes parameters
Hi all, I have played around with the edit curves line and axes parameters button. I have modified the label but the legend is not refreshed in the figure. matplotlib.__version__ '1.0.1' Am I missing something ? Nils -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Customizing the Navigation toolbar
On Tue, 4 Oct 2011 10:09:57 +0200 Jens Nie j...@roseninspection.net wrote: Hi Nils. The Qt based Navigation toolbar is just a Qt Widget with a proper layout already set. So you should be able to add any Qt widget to the toolbar using its addWidget method. I was able to add a simple line edit (without any use) like so: import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar2 class ViewWidget(QMainWindow): def __init__(self): QMainWindow.__init__(self) # create a simple main widget to keep the figure self.mainWidget = QWidget() self.setCentralWidget(self.mainWidget) layout = QVBoxLayout() self.mainWidget.setLayout(layout) # create a figure self.figure_canvas = FigureCanvas(Figure()) layout.addWidget(self.figure_canvas, 10) # and the axes for the figure self.axes = self.figure_canvas.figure.add_subplot(111) # add a navigation toolbar self.navigation_toolbar = NavigationToolbar2(self.figure_canvas, self) layout.addWidget(self.navigation_toolbar, 0) # create a simple widget to extend the navigation toolbar anotherWidget=QLineEdit() # add the new widget to the existing navigation toolbar self.navigation_toolbar.addWidget(anotherWidget) if __name__==__main__: app=QApplication(sys.argv) mw=ViewWidget() mw.show() sys.exit(app.exec_()) Hope that helps ... Best regards Jens Hi Jens, Thank you very much for your response. Hence I have tried import sys import numpy as np from PyQt4.QtCore import * from PyQt4.QtGui import * from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar2 class ViewWidget(QMainWindow): def __init__(self): QMainWindow.__init__(self) # create a simple main widget to keep the figure self.mainWidget = QWidget() self.setCentralWidget(self.mainWidget) layout = QVBoxLayout() self.mainWidget.setLayout(layout) # create a figure self.figure_canvas = FigureCanvas(Figure()) layout.addWidget(self.figure_canvas, 10) # and the axes for the figure self.axes = self.figure_canvas.figure.add_subplot(111) x = np.linspace(0.,2*np.pi,100) self.axes.plot(x,np.sin(x)) # add a navigation toolbar self.navigation_toolbar = NavigationToolbar2(self.figure_canvas, self) layout.addWidget(self.navigation_toolbar, 0) # create a simple widget to extend the navigation toolbar # anotherWidget=QLineEdit() printer = QPrinter() anotherWidget= QPrintDialog(printer,self) # add the new widget to the existing navigation toolbar self.navigation_toolbar.addWidget(anotherWidget) if __name__==__main__: app=QApplication(sys.argv) mw=ViewWidget() mw.show() sys.exit(app.exec_()) How do I connect the plot with the printer ? How can I replace the printer dialog by a small icon ? I found the lines a = self.addAction(self._icon('filesave.svg'), 'Save', self.save_figure) in backend_qt4.py Nils -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Customizing the Navigation toolbar
On Thu, 29 Sep 2011 14:56:21 +0200 Nils Wagner nwag...@iam.uni-stuttgart.de wrote: Hi all, How can I add a printer button to the Navigation toolbar http://matplotlib.sourceforge.net/users/navigation_toolbar.html ? A small example for QT would be awesome. Thanks in advance. Nils How can I adapt the example http://matplotlib.sourceforge.net/examples/user_interfaces/printing_in_wx.html for QT ? Nils -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Customizing the Navigation toolbar
Hi all, How can I add a printer button to the Navigation toolbar http://matplotlib.sourceforge.net/users/navigation_toolbar.html ? A small example for QT would be awesome. Thanks in advance. Nils -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Colour generator for a stacked bar plot
Hi all, I am looking for a simple method to generate various colours (n 15, n denotes the number of colours) for a stacked bar plot. Any pointer would be appreciated. The example http://matplotlib.sourceforge.net/examples/pylab_examples/table_demo.html generates pastel colours. However the difference between the different colors decreases drastically. Nils -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] griddata
Hi all, what are the differences between the griddata implementations in matplotlib and scipy, i.e. from scipy.interpolate import griddata and from matplotlib.mlab import griddata Is the Shepard algorithm available in matplotlib/scipy ? Nils Reference: Robert J. Renka Algorithm 790: CSHEP2D: Cubic Shepard Method for Bivariate Interpolation of Scattered Data. ACM Transactions on Mathematical Software, Vol. 25 No. 1 (1999) pp. 70-73 -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] griddata
Hi all, Is it possible to apply griddata to polar coordinates or do I need cartesian coordinates ? http://matplotlib.sourceforge.net/api/mlab_api.html#matplotlib.mlab.griddata Nils -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] WebP support
Hi all, just curious - is the WebP format supported by matplotlib ? Nils http://code.google.com/intl/de-DE/speed/webp/ -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Adjusting subplot parameters
Hi all, How can I adjust subplot parameters (left, bottom, right, top, wspace and hspace) without using the slider interactive? Nils -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Adjusting Image size
Hi all, what is needed to save a figure when the size is given in pixels, i.e. 1024x772 ? The default is 800x600 pixels. from pylab import plot, savefig from numpy import sin,linspace,pi x = linspace(0,2*pi,200) plot(x,sin(x)) savefig('test') Nils -- Automate Storage Tiering Simply Optimize IT performance and efficiency through flexible, powerful, automated storage tiering capabilities. View this brief to learn how you can reduce costs and improve performance. http://p.sf.net/sfu/dell-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] polar plot
Hi all, Is it possible to create a polar plot, where the lower bound of the radius is larger than zero ? I would like to plot an annulus. Any pointer would be appreciated. Thanks in advance Nils -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] polar plot
On Wed, 18 Aug 2010 08:51:31 -0500 Benjamin Root ben.r...@ou.edu wrote: On Wed, Aug 18, 2010 at 8:03 AM, Nils Wagner nwag...@iam.uni-stuttgart.dewrote: Hi all, Is it possible to create a polar plot, where the lower bound of the radius is larger than zero ? I would like to plot an annulus. Any pointer would be appreciated. Thanks in advance Nils Nils, It appears that there is a .set_rmin() function, however, I don't think it does what we expect it to. I can't get an annulus, but it only plots the parts that are r = r_min (but r_min is at the origin, and the axis labels are in the wrong places...) Ben Root Ben, Thank you for your reply. Please can you send me your example. Nils -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] python make.py html failure in r8281
/home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py:300: PlotWarning: Exception running plot /home/nwagner/svn/matplotlib/doc/mpl_examples/pylab_examples/fig_subplot_demo.py Traceback (most recent call last): File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py, line 297, in render_figures run_code(plot_path, function_name, plot_code) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py, line 207, in run_code fd = open(fname) IOError: [Errno 2] No such file or directory: 'fig_subplot_demo.py' warnings.warn(s, PlotWarning) Exception occurred while building, starting debugger: Traceback (most recent call last): File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-1.0dev_20091204-py2.6.egg/sphinx/cmdline.py, line 172, in main app.build(all_files, filenames) File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-1.0dev_20091204-py2.6.egg/sphinx/application.py, line 130, in build self.builder.build_update() File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-1.0dev_20091204-py2.6.egg/sphinx/builders/__init__.py, line 265, in build_update 'out of date' % len(to_build)) File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-1.0dev_20091204-py2.6.egg/sphinx/builders/__init__.py, line 285, in build purple, length): File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-1.0dev_20091204-py2.6.egg/sphinx/builders/__init__.py, line 131, in status_iterator for item in iterable: File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-1.0dev_20091204-py2.6.egg/sphinx/environment.py, line 513, in update_generator self.read_doc(docname, app=app) File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-1.0dev_20091204-py2.6.egg/sphinx/environment.py, line 604, in read_doc pub.publish() File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/core.py, line 204, in publish self.settings) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/readers/__init__.py, line 69, in read self.parse() File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/readers/__init__.py, line 75, in parse self.parser.parse(self.input, document) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/__init__.py, line 157, in parse self.statemachine.run(inputlines, document, inliner=self.inliner) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 170, in run input_source=document['source']) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/statemachine.py, line 232, in run context, state, transitions) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/statemachine.py, line 420, in check_line return method(match, context, next_state) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 2658, in underline self.section(title, source, style, lineno - 1, messages) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 308, in section self.new_subsection(title, lineno, messages) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 376, in new_subsection node=section_node, match_titles=1) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 266, in nested_parse node=node, match_titles=match_titles) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/statemachine.py, line 232, in run context, state, transitions) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/statemachine.py, line 420, in check_line return method(match, context, next_state) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 2239, in explicit_markup nodelist, blank_finish = self.explicit_construct(match) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 2251, in explicit_construct return method(self, expmatch) File /home/nwagner/local/lib64/python2.6/site-packages/docutils-0.5-py2.6.egg/docutils/parsers/rst/states.py, line 1994, in directive
Re: [Matplotlib-users] permille sign in labels
On Wed, 24 Mar 2010 10:14:29 -0400 Michael Droettboom md...@stsci.edu wrote: You can use Unicode. ylabel(u'\u2030') http://www.unicode.org/charts/charindex.html Mike Degree Celsius u'\u2103' doesn't work. /usr/local/lib64/python2.4/site.packages/matplotlib/mathtext.py:722: MathTextWarning: Unrecognized symbol '\u2103'. Substituting with a dummy symbol. How can I resolve the problem ? Nils -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] permille sign in labels
Hi all, does anybody know how to draw a permille sign in ylabel ? Nils -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] format yticks
Hi all, how can I change the output format of yticks from 100 to 1.e6 ? Nils -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Pick event and annotate
Hi all, How can I combine onpick events with annotate ? Any pointer would be appreciated. import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.set_title('click on points') line, = ax.plot(np.random.rand(100), 'o', picker=5) # 5 points tolerance def onpick(event): thisline = event.artist xdata = thisline.get_xdata() ydata = thisline.get_ydata() ind = event.ind print 'onpick points:', zip(xdata[ind], ydata[ind]), ind ax.annotate('Test',xy=(ind, ydata[ind]),horizontalalignment='left',verticalalignment='top') # ax.redraw_in_frame() fig.canvas.mpl_connect('pick_event', onpick) plt.show() Thanks in advance. Nils -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] python make.py html failure
On Tue, 22 Dec 2009 17:38:41 -0500 Jae-Joon Lee lee.j.j...@gmail.com wrote: As far as I can see, this happens when there are obsolete rst files (related with the Gallery I guess), created during the doc. build with previous svn checkout. For example, I recently removed mpl_examples/axes_grid/demo_fixed_size_axes.py from the svn. But if you ever have built the documentation with previous svn checkout (before that file is removed), then you already have some associated rst files under the doc/examples directory. And the errors are raised when these obsolete files are processed with sphinx. I think removing doc/examples directory will solve the problem, or build the doc from the completely new checkout. We may delete the doc/examples directory within the make.py, but I'm not sure how much this will slow down the build time. Please let me know if there still is a problem. Regards, -JJ Removing doc/examples has resolved the problem. Thank you very much ! Regards, Nils -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] python make.py html failure
Hi all, I cannot build the documentation of matplotlib. I am using the latest svn of numpy and matplotlib. How can I fix the problem ? Nils python make.py html Running Sphinx v1.0 loading pickled environment... not found animation, api, axes_grid, event_handling, misc, mplot3d, pngsuite, pylab_examples, tests, units, user_interfaces, widgets, building [html]: targets for 494 source files that are out of date updating environment: 494 added, 0 changed, 0 removed /home/nwagner/local/lib64/python2.6/site-packages/numpy/core/numeric.py:692: DeprecationWarning: The current behavior of correlate is deprecated for 1.4.0, and will be removed for NumPy 1.5.0. The new behavior fits the conventional definition of correlation: inputs are never swapped, and the second argument is conjugated for complex arrays. DeprecationWarning) /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py:273: UserWarning: Exception running plot /home/nwagner/svn/matplotlib/doc/mpl_examples/axes_grid/demo_axes_divider.py Traceback (most recent call last): File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py, line 270, in render_figures run_code(plot_path, function_name, plot_code) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py, line 182, in run_code __plot__, fd, fname, ('py', 'r', imp.PY_SOURCE)) File demo_axes_divider.py, line 129, in module File demo_axes_divider.py, line 125, in demo File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/pyplot.py, line 350, in draw get_current_fig_manager().canvas.draw() File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/backends/backend_agg.py, line 388, in draw self.figure.draw(self.renderer) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/artist.py, line 55, in draw_wrapper draw(artist, renderer, *kl) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/figure.py, line 802, in draw func(*args) File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axes_divider.py, line 582, in draw self._axes_class.draw(self, renderer, inframe) File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axislines.py, line 710, in draw super(Axes, self).draw(renderer, inframe) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/artist.py, line 55, in draw_wrapper draw(artist, renderer, *kl) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/axes.py, line 1775, in draw a.draw(renderer) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/artist.py, line 55, in draw_wrapper draw(artist, renderer, *kl) File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axis_artist.py, line 1343, in draw self._draw_ticks(renderer) File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axis_artist.py, line 1209, in _draw_ticks self.major_ticks.draw(renderer) File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axis_artist.py, line 309, in draw gc.set_foreground(self.get_markeredgecolor()) File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axis_artist.py, line 236, in get_markeredgecolor return self.get_color() File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axis_artist.py, line 232, in get_color return self.get_attribute_from_ref_artist(color, k) File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axis_artist.py, line 187, in get_attribute_from_ref_artist ref_artist = self.get_ref_artist() File /home/nwagner/local/lib64/python2.6/site-packages/mpl_toolkits/axes_grid/axis_artist.py, line 229, in get_ref_artist return self._ref_artist.get_ticklines()[0] IndexError: list index out of range warnings.warn(s) /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py:273: UserWarning: Exception running plot /home/nwagner/svn/matplotlib/doc/mpl_examples/axes_grid/demo_axes_rgb.py Traceback (most recent call last): File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py, line 270, in render_figures run_code(plot_path, function_name, plot_code) File /home/nwagner/local/lib64/python2.6/site-packages/matplotlib/sphinxext/plot_directive.py, line 182, in run_code __plot__, fd, fname, ('py', 'r', imp.PY_SOURCE)) File demo_axes_rgb.py, line 4, in module File /home/nwagner/svn/matplotlib/doc/mpl_examples/axes_grid/demo_axes_divider.py, line 129, in module demo() File /home/nwagner/svn/matplotlib/doc/mpl_examples/axes_grid/demo_axes_divider.py, line 125, in demo plt.draw() File
[Matplotlib-users] DeprecationWarning
Hi all, Is it possible to suppress the output of DeprecationWarning messages on the screen ? Nils -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] python make.py html
Hi all, python make.py html failed with /home/nwagner/svn/matplotlib/doc/faq/environment_variables_faq.rst:: WARNING: document isn't included in any toctree /home/nwagner/svn/matplotlib/doc/mpl_toolkits/axes_grid/index.rst:: WARNING: document isn't included in any toctree /home/nwagner/svn/matplotlib/doc/mpl_toolkits/mplot3d/index.rst:: WARNING: document isn't included in any toctree /home/nwagner/svn/matplotlib/doc/users/arraydata.rst:: WARNING: document isn't included in any toctree /home/nwagner/svn/matplotlib/doc/users/plotting.rst:: WARNING: document isn't included in any toctree done preparing documents... done Exception occurred while building, starting debugger: Traceback (most recent call last): File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/cmdline.py, line 172, in main app.build(all_files, filenames) File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/application.py, line 129, in build self.builder.build_update() File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/builders/__init__.py, line 255, in build_update 'out of date' % len(to_build)) File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/builders/__init__.py, line 310,in build self.write(docnames, list(updated_docnames), method) File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/builders/__init__.py, line 349,in write self.write_doc(docname, doctree) File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/builders/html.py, line 349, in write_doc ctx = self.get_doc_context(docname, body, metatags) File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/builders/html.py, line 319, in get_doc_context toc = self.render_partial(self.env.get_toc_for(docname))['fragment'] File /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/environment.py, line 921, in get_toc_for toc = self.tocs[docname].deepcopy() KeyError: 'users/annotations' /home/nwagner/local/lib64/python2.6/site-packages/Sphinx-0.6.1-py2.6.egg/sphinx/environment.py(921)get_toc_for() - toc = self.tocs[docname].deepcopy() (Pdb) I am using matplotlib.__version__ '1.0.svn' Python 2.6 (r26:66714, Feb 3 2009, 20:49:49) [GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Wireframe models in matplotlib
Hi all, is it possible to build wire-frame models with matplotlib ? Any pointer would be appreciated. Thanks in advance Nils http://en.wikipedia.org/wiki/Wire-frame_model -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] call gimp's autocrop function from python
Could you please share your findings? I would also like to learn how to script Blender once I start get going on Gimp. Finally I made it. Please find enclosed a solution. Cheers, Nils import os import subprocess from subprocess import PIPE import glob # # Processing image files using Gimp's autocrop function # The file script-autocrop.scm should be placed in ~/.gimp-2.6/scripts/ # p = subprocess.Popen([gimp --version],shell=True,bufsize=0,stdin=PIPE, stdout=PIPE, close_fds=True) (child_stdin, child_stdout) = (p.stdin, p.stdout) gimp_version = child_stdout.read().split()[-1] png_files = glob.glob('*.png') png_files.sort() for file in png_files: if not 'crop' in file: print 'Processing', file file_crop = file[:-4]+'_crop.png' if gimp_version =='2.6.2': os.system(gimp --batch-interpreter plug-in-script-fu-eval -i -d -b '(script-autocrop + \+file +\ + \ + file_crop + \ + )' -b '(gimp-quit 0)') os.system(convert -loop 0 *crop.png test.gif) os.system(animate test.gif) (define (script-autocrop filename-in filename-out) (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename-in ))) (drawable (car (gimp-image-get-active-layer image))) ) (plug-in-autocrop RUN-NONINTERACTIVE image drawable) (gimp-file-save RUN-NONINTERACTIVE image drawable filename-out ) (gimp-image-delete image) ) ) -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] autocrop function
On Wed, 10 Jun 2009 16:32:08 -0400 Jae-Joon Lee lee.j.j...@gmail.com wrote: I guess I misunderstood your intention. As you posted the message in the mpl list, I assumed that you want to crop out the boundary of the mpl figure, which seems to be not the case. Sorry for the noise. -JJ Hi, I found a way to run gimp (gimp2.2) in batch mode. gimp --batch-interpreter plug_in_script_fu_eval -i -d -b '(script-autocrop /home/nwagner/test.png)' '(gimp-quit 0)' Now I would like to run gimp from python using subprocess, popen2 or os.system. How do I call gimp with the arguments from python ? Nils (define (script-autocrop filename) (let ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (drawable (car (gimp-image-active-drawable image))) ) (plug-in-autocrop RUN-NONINTERACTIVE image drawable) (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename) (gimp-image-delete image) ) ) -- Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] autocrop function
Hi all, I am looking for an autocrop function. It should remove borders from an image. Is it available in matplotlib ? Any pointer would be appreciated. Thanks in advance Nils -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] autocrop function
On Tue, 9 Jun 2009 11:31:19 -0700 (PDT) Anton Vasilescu vasilescu_an...@yahoo.com wrote: I wasn't able to find one in Matplotlib but you can use PIL library for all the imaging work. Really easy to use. Here is the webpage for it: http://www.pythonware.com/products/pil/index.htm Anton Hi Anton, Thank you for your prompt reply. I am aware of PIL. However I didn't find an autocrop function within PIL. Cheers, Nils from PIL import Image im = Image.open('test.png') # # Calculates the bounding box of the non-zero regions in the image. # The bounding box is returned as a 4-tuple defining # the left, upper, right, and lower pixel coordinate. # If the image is completely empty, this method returns None. # print im.getbbox() print im.size # # Returns a rectangular region from the current image. # The box is a 4-tuple defining the left, upper, right, and lower # box = (100, 100, 800, 800) region = im.crop(box) region.show() It would be nice to compute the box automatically. Any idea ? -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Backend problem
Hi all, How can I resolve the following backend problem ? What are the default library and include directories for tcl and tk ? Where should I define DISPLAY in that context ? python setup.py build --help OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.7 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 * Using default library and include directories for * Tcl and Tk because a Tk window failed to open. * You may need to define DISPLAY for Tk to work so * that setup can determine where your libraries are * located. Any pointer would be appreciated. Nils -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Event handling
Hi all, Is it possible to restrict the mouse movements to the points of a graph (curve tracking) ? So far I am able to obtain the location of the mouse in data coordinates if the mouse is over an axes. A code snippet is attached. Thanks in advance. Nils from pylab import plot, show, connect, xlabel, ylabel, legend, xlim, ylim from numpy import linspace, sin, pi, empty def find_minima(x): minima = empty((len(x),),dtype=bool) dx=x[1:]-x[:-1] minima[1:-1]=(dx[:-1]=0) (dx[1:]=0) #handle endpoint s # minima[0]=dx[0]=0 # minima[-1]=dx[-1]=0 return minima x = linspace(0,3*pi,200) y = sin(x) plot(x,y,'r.',label=r'$\sin(x)$') minima = find_minima(-y) plot(x[minima],y[minima],'ko',label='maxima') legend() def on_move(event): # # Connect to the mouse move event and print the location of the mouse # in data coordinates if the mouse is over an axes # x,y = event.x, event.y if event.inaxes: print 'data coords', event.xdata, event.ydata #connect('motion_notify_event', on_move) def click(event): x,y = event.x, event.y if event.inaxes: print 'you clicked', event.xdata, event.ydata connect('button_press_event',click) xlim(0,3*pi+0.1) ylim(-1.1,1.1) show() -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Fwd: Event handling
---BeginMessage--- Please respond on list and I, or someone else, will try and respond. On Tue, Jan 27, 2009 at 7:08 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: On Tue, 27 Jan 2009 06:37:09 -0600 John Hunter jdh2...@gmail.com wrote: On Tue, Jan 27, 2009 at 2:15 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: Hi all, Is it possible to restrict the mouse movements to the points of a graph (curve tracking) ? No, but you can obtain the vertices of the line that are within a tolerance of the clicked point using the picking functions. See the tutorial at http://matplotlib.sourceforge.net/users/event_handling.html and the pick* demos at http://matplotlib.sourceforge.net/examples/event_handling/index.html JDH Hi John, Thank you very much for your response. The horizontal distance between consecutive points is 5. in my application. Is the value of picker linked to the distance ? I mean How should I use picker to circumvent multiple results ? Cheers, Nils ---End Message--- -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Fwd: Event handling
On Tue, 27 Jan 2009 08:57:17 -0600 John Hunter jdh2...@gmail.com wrote: On Tue, Jan 27, 2009 at 8:18 AM, Nils Wagner nwag...@iam.uni-stuttgart.de wrote: Thank you very much for your response. The horizontal distance between consecutive points is 5. in my application. Is the value of picker linked to the distance ? I mean How should I use picker to circumvent multiple results ? The scalar value of the picker is a epsilon tolerance in points (1 point = 1/72 inches) so you will need to set this distance to be small enough to only overlap one point when you click. If you want to only return a single point, you can write a custom picker function to return only the point closest to the click point. Unfortunately, I am not sure how to implement a custom picker function. Any pointer would be appreciated. Thanks in advance. Nils -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [SciPy-user] reading and writing data in Excel files
On Wed, 10 Dec 2008 04:24:24 -0800 Joshua Lippai [EMAIL PROTECTED] wrote: With PyExcelerator installed, you can use the Excel tools in the matplotlib toolkits http://matplotlib.sourceforge.net/users/toolkits.html Using them, you can read in Excel files as recarrays and write recarrays to Excel files. It's fairly well-documented through docstrings. Josh Hi Josh, Thank you for your prompt response ! I found an example in matplotlib/examples/pylab_examples loadrec.py Is it possible to color cells depending on the entry ? Nils -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Fwd: [SciPy-user] reading and writing data inExcel files
--- the forwarded message follows --- ---BeginMessage--- From the looks of the mail archive, it seems PyExcelerator is no longer maintained http://sourceforge.net/mailarchive/forum.php?forum_name=pyexcelerator-devel You are advised to rather use xlwt to write Excel: http://pypi.python.org/pypi/xlwt and xlrd to read Excel: http://pypi.python.org/pypi/xlrd/ Both maintained by John Machin. On 2008/12/10 at 03:11, in message [EMAIL PROTECTED], Nils Wagner [EMAIL PROTECTED] wrote: On Wed, 10 Dec 2008 04:24:24 -0800 Joshua Lippai [EMAIL PROTECTED] wrote: With PyExcelerator installed, you can use the Excel tools in the matplotlib toolkits http://matplotlib.sourceforge.net/users/toolkits.html Using them, you can read in Excel files as recarrays and write recarrays to Excel files. It's fairly well-documented through docstrings. Josh Hi Josh, Thank you for your prompt response ! I found an example in matplotlib/examples/pylab_examples loadrec.py Is it possible to color cells depending on the entry ? Nils -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ---End Message--- -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] xticks in a polar plot
Hi all, How can I suppress xticks in a polar plot ? Nils - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] polar in a subplot
Hi all, If I run the attached example I obtain no polar plots, but a view like plot(t,r_1) - for what reason ? Nils python -i test_subplot_polar.py --verbose-helpful $HOME=/home/nwagner CONFIGDIR=/home/nwagner/.matplotlib /usr/lib/python2.4/site-packages/matplotlib/__init__.py:662: UserWarning: Bad val inputenc on line #144 text.latex.unicode : inputenc # use ucs and inputenc LaTeX packages for handling in file /home/nwagner/.matplotlib/matplotlibrc Could not convert inputenc to boolean warnings.warn('Bad val %s on line #%d\n\t%s\n\tin file \ matplotlib data path /usr/lib/python2.4/site-packages/matplotlib/mpl-data loaded rc file /home/nwagner/.matplotlib/matplotlibrc matplotlib version 0.98.3 verbose.level helpful interactive is False units is False platform is linux2 Using fontManager instance from /home/nwagner/.matplotlib/fontList.cache backend GTKAgg version 2.5.3 findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium to Bitstream Vera Sans (/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf) with score of 1.00 Found dvipng version 1.5 from pylab import subplot, polar, linspace, show from numpy import pi, sin, cos t = linspace(0,2*pi,20) r_1 = (1+sin(t)) r_2 = (1+cos(t)) subplot(211) polar(t,r_1) subplot(212) polar(t,r_2) show() - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] polar in a subplot
On Tue, 2 Dec 2008 11:14:48 -0600 Ryan May [EMAIL PROTECTED] wrote: On Tue, Dec 2, 2008 at 11:07 AM, Nils Wagner [EMAIL PROTECTED]wrote: Hi all, If I run the attached example I obtain no polar plots, but a view like plot(t,r_1) - for what reason ? You need to specify polar=True to the subplot commands. Try this: from pylab import subplot, polar, linspace, show from numpy import pi, sin, cos t = linspace(0,2*pi,20) r_1 = (1+sin(t)) r_2 = (1+cos(t)) subplot(211, polar=True) polar(t,r_1) #Or can use plot() subplot(212, polar=True) polar(t,r_2) show() Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Hi Ryan, Thank you very much ! It would be nice to have that information in the docstring subplot(*args, **kwargs) Create a subplot command, creating axes with:: subplot(numRows, numCols, plotNum) where *plotNum* = 1 is the first plot number and increasing *plotNums* fill rows first. max(*plotNum*) == *numRows* * *numCols* The next inquiry is related to xticks. I have added xticks(linspace(0,2*pi,24,endpoint=False)) The difference between consecutive xticks is varying between 14 and 16 degrees. For what reason ? Nils attachment: polar.png- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] polar
Hi all, If I run the attached example I get python -i test_polar.py --verbose-helpful $HOME=/home/nwagner matplotlib data path /usr/lib/python2.4/site-packages/matplotlib/mpl-data loaded rc file /home/nwagner/matplotlibrc matplotlib version 0.98.3 verbose.level helpful interactive is False units is False platform is linux2 CONFIGDIR=/home/nwagner/.matplotlib Using fontManager instance from /home/nwagner/.matplotlib/fontList.cache backend WXAgg version 2.5.3.1 findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium to Bitstream Vera Sans (/usr/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf) with score of 1.00 Found dvipng version 1.5 You are using unicode and latex, but have not enabled the matplotlib 'text.latex.unicode' rcParam. Traceback (most recent call last): File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py, line 1121, in _onPaint self.draw(drawDC=drawDC) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py, line 60, in draw FigureCanvasAgg.draw(self) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 283, in draw self.figure.draw(self.renderer) File /usr/lib/python2.4/site-packages/matplotlib/figure.py, line 767, in draw for a in self.axes: a.draw(renderer) File /usr/lib/python2.4/site-packages/matplotlib/axes.py, line 1591, in draw a.draw(renderer) File /usr/lib/python2.4/site-packages/matplotlib/axis.py, line 710, in draw tick.draw(renderer) File /usr/lib/python2.4/site-packages/matplotlib/axis.py, line 193, in draw self.label1.draw(renderer) File /usr/lib/python2.4/site-packages/matplotlib/text.py, line 448, in draw bbox, info = self._get_layout(renderer) File /usr/lib/python2.4/site-packages/matplotlib/text.py, line 251, in _get_layout w, h, d = renderer.get_text_width_height_descent( File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 150, in get_text_width_height_descent Z = texmanager.get_grey(s, size, self.dpi) File /usr/lib/python2.4/site-packages/matplotlib/texmanager.py, line 383, in get_grey pngfile = self.make_png(tex, fontsize, dpi) File /usr/lib/python2.4/site-packages/matplotlib/texmanager.py, line 312, in make_png dvifile = self.make_dvi(tex, fontsize) File /usr/lib/python2.4/site-packages/matplotlib/texmanager.py, line 275, in make_dvi texfile = self.make_tex(tex, fontsize) File /usr/lib/python2.4/site-packages/matplotlib/texmanager.py, line 254, in make_tex fh.write(s) UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 300: ordinal not in range(128) You are using unicode and latex, but have not enabled the matplotlib 'text.latex.unicode' rcParam. Traceback (most recent call last): File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py, line 1121, in _onPaint self.draw(drawDC=drawDC) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py, line 60, in draw FigureCanvasAgg.draw(self) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 283, in draw self.figure.draw(self.renderer) File /usr/lib/python2.4/site-packages/matplotlib/figure.py, line 767, in draw for a in self.axes: a.draw(renderer) File /usr/lib/python2.4/site-packages/matplotlib/axes.py, line 1591, in draw a.draw(renderer) File /usr/lib/python2.4/site-packages/matplotlib/axis.py, line 710, in draw tick.draw(renderer) File /usr/lib/python2.4/site-packages/matplotlib/axis.py, line 193, in draw self.label1.draw(renderer) File /usr/lib/python2.4/site-packages/matplotlib/text.py, line 448, in draw bbox, info = self._get_layout(renderer) File /usr/lib/python2.4/site-packages/matplotlib/text.py, line 251, in _get_layout w, h, d = renderer.get_text_width_height_descent( File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 150, in get_text_width_height_descent Z = texmanager.get_grey(s, size, self.dpi) File /usr/lib/python2.4/site-packages/matplotlib/texmanager.py, line 383, in get_grey pngfile = self.make_png(tex, fontsize, dpi) File /usr/lib/python2.4/site-packages/matplotlib/texmanager.py, line 312, in make_png dvifile = self.make_dvi(tex, fontsize) File /usr/lib/python2.4/site-packages/matplotlib/texmanager.py, line 275, in make_dvi texfile = self.make_tex(tex, fontsize) File /usr/lib/python2.4/site-packages/matplotlib/texmanager.py, line 254, in make_tex fh.write(s) UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 300: ordinal not in range(128) Any idea ? Nils from pylab import linspace, polar, xticks, yticks, show, savefig from numpy.random import rand from numpy import ones, exp, pi theta = linspace(0.,2*pi,25) r = 10.*ones(25) noise =
[Matplotlib-users] Ovality of a perturbed circular path
Hi all, I would like to visualize the ovality of a perturbed circular path by a polar plot. How can I improve the view wrt to scaling and ticks ? from pylab import linspace, polar, xticks, yticks, show, savefig, subplot, figure from numpy.random import rand from numpy import ones, exp, pi, r_ theta = linspace(0.,2*pi,25) r = 20.*ones(24) r = r_[r,r[0]] noise = 2.*rand(24)-ones(24) noise = r_[noise,noise[0]] figure(1) polar(theta,(r+noise)) figure(2) polar(theta,(r+noise)/r) show() Any pointer would be appreciated. Nils - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] IOError: decoder jpeg not available
Hi all, I tried to read a jpg file. How can fix the following problem ? File test.py, line 15, in module im = imshow(lena, origin='lower') File /data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/pyplot.py, line 1915, in imshow ret = gca().imshow(*args, **kwargs) File /data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/axes.py, line 5498, in imshow im.set_data(X) File /data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py, line 282, in set_data self._A = pil_to_array(A) File /data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py, line 751, in pil_to_array x = toarray(im) File /data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py, line 736, in toarray x_str = im.tostring('raw',im.mode,0,-1) File /data/home/nwagner/local/lib/python2.5/site-packages/PIL/Image.py, line 513, in tostring self.load() File /data/home/nwagner/local/lib/python2.5/site-packages/PIL/ImageFile.py, line 180, in load d = Image._getdecoder(self.mode, d, a, self.decoderconfig) File /data/home/nwagner/local/lib/python2.5/site-packages/PIL/Image.py, line 375, in _getdecoder raise IOError(decoder %s not available % decoder_name) IOError: decoder jpeg not available Is it possible to plot different jpg's in subplots ? Nils - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IOError: decoder jpeg not available
On Thu, 06 Nov 2008 13:28:21 +0100 Gregor Thalhammer [EMAIL PROTECTED] wrote: Nils Wagner schrieb: Hi all, I tried to read a jpg file. How can fix the following problem ? Which operating system are you using? The problem arise in the PIL (Python Imaging Library). It cannot find the libjpeg library (you have it installed on your system?). Try to install libjpeg and properly configure/install PIL. Gregor Centos4.6 (Linux) libjpeg.rpm is installed. rpm -ql libjpeg /usr/bin/cjpeg /usr/bin/djpeg /usr/bin/jpegtran /usr/bin/rdjpgcom /usr/bin/wrjpgcom /usr/lib/libjpeg.so.62 /usr/lib/libjpeg.so.62.0.0 /usr/share/doc/libjpeg-6b /usr/share/doc/libjpeg-6b/README /usr/share/doc/libjpeg-6b/usage.doc /usr/share/man/man1/cjpeg.1.gz /usr/share/man/man1/djpeg.1.gz /usr/share/man/man1/jpegtran.1.gz /usr/share/man/man1/rdjpgcom.1.gz /usr/share/man/man1/wrjpgcom.1.gz /usr/bin/cjpeg /usr/bin/djpeg /usr/bin/jpegtran /usr/bin/rdjpgcom /usr/bin/wrjpgcom /usr/lib64/libjpeg.so.62 /usr/lib64/libjpeg.so.62.0.0 /usr/share/doc/libjpeg-6b /usr/share/doc/libjpeg-6b/README /usr/share/doc/libjpeg-6b/usage.doc /usr/share/man/man1/cjpeg.1.gz /usr/share/man/man1/djpeg.1.gz /usr/share/man/man1/jpegtran.1.gz /usr/share/man/man1/rdjpgcom.1.gz /usr/share/man/man1/wrjpgcom.1.gz Any idea ? Nils - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Combine jpegs
Hi all, Is it possible to combine jpegs with matplotlib or PIL ? Any pointer would be appreciated. Nils - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] trouble with installation from svn
Hi all, I cannot install matplotlib from recent svn. Here is the output building 'matplotlib.backends._wxagg' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -I/usr/local/include -I/usr/include -I. -I/usr/local/lib64/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/local/lib64/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/lib64/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -I/usr/include/python2.5 -c src/_wxagg.cpp -o build/temp.linux-x86_64-2.5/src/_wxagg.o src/_wxagg.cpp: In function wxImage* convert_agg2image(RendererAgg*, Py::Object): src/_wxagg.cpp:181: error: no match for operator* in *aggRenderer-RendererAgg::renderingBuffer /usr/include/wx-2.6/wx/datetime.h:2065: note: candidates are: wxTimeSpan operator*(int, const wxTimeSpan) /usr/include/wx-2.6/wx/datetime.h:2071: note: wxDateSpan operator*(int, const wxDateSpan) /usr/include/wx-2.6/wx/geometry.h:243: note: wxPoint2DInt operator*(const wxPoint2DInt, const wxPoint2DInt) /usr/include/wx-2.6/wx/geometry.h:248: note: wxPoint2DInt operator*(wxInt32, const wxPoint2DInt) /usr/include/wx-2.6/wx/geometry.h:258: note: wxPoint2DInt operator*(const wxPoint2DInt, wxInt32) /usr/include/wx-2.6/wx/geometry.h:253: note: wxPoint2DInt operator*(wxDouble, const wxPoint2DInt) /usr/include/wx-2.6/wx/geometry.h:263: note: wxPoint2DInt operator*(const wxPoint2DInt, wxDouble) /usr/include/wx-2.6/wx/geometry.h:467: note: wxPoint2DDouble operator*(const wxPoint2DDouble, const wxPoint2DDouble) /usr/include/wx-2.6/wx/geometry.h:472: note: wxPoint2DDouble operator*(wxDouble, const wxPoint2DDouble) /usr/include/wx-2.6/wx/geometry.h:477: note: wxPoint2DDouble operator*(wxInt32, const wxPoint2DDouble) /usr/include/wx-2.6/wx/geometry.h:482: note: wxPoint2DDouble operator*(const wxPoint2DDouble, wxDouble) /usr/include/wx-2.6/wx/geometry.h:487: note: wxPoint2DDouble operator*(const wxPoint2DDouble, wxInt32) /usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h: At global scope: /usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: warning: int _import_array() defined but not used error: command 'gcc' failed with exit status 1 Nils - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Trouble with recent mpl
Hi all, I rerun a program which I have written one year ago. Now It doesn't work for me with the latest svn version. Here is the output python lshape.py --verbose-helpful $HOME=/home/nwagner CONFIGDIR=/home/nwagner/.matplotlib matplotlib data path /usr/lib64/python2.4/site-packages/matplotlib/mpl-data loaded rc file /home/nwagner/.matplotlib/matplotlibrc matplotlib version 0.90.1 verbose.level helpful interactive is False units is False platform is linux2 numerix numpy 1.0.4.dev3880 font search path ['/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf', '/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/afm'] loaded ttfcache file /home/nwagner/.matplotlib/ttffont.cache backend WXAgg version 2.6.1.0 Traceback (most recent call last): File lshape.py, line 136, in ? show() File /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_wx.py, line 1246, in show figwin.canvas.draw() File /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_wxagg.py, line 61, in draw FigureCanvasAgg.draw(self) File /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 392, in draw self.figure.draw(renderer) File /usr/lib64/python2.4/site-packages/matplotlib/figure.py, line 601, in draw for a in self.axes: a.draw(renderer) File /usr/lib64/python2.4/site-packages/matplotlib/axes.py, line 1356, in draw a.draw(renderer) File /usr/lib64/python2.4/site-packages/matplotlib/axis.py, line 635, in draw self.label.draw(renderer) File /usr/lib64/python2.4/site-packages/matplotlib/text.py, line 410, in draw bbox, info = self._get_layout(renderer) File /usr/lib64/python2.4/site-packages/matplotlib/text.py, line 254, in _get_layout w,h = renderer.get_text_width_height( File /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 245, in get_text_width_height width, height, fonts = math_parse_s_ft2font( File /usr/lib64/python2.4/site-packages/matplotlib/mathtext.py, line 1585, in __call__ expression.parseString( s ) File /usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py, line 622, in parseString loc, tokens = self.parse( instring.expandtabs(), 0 ) File /usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py, line 564, in parse loc,tokens = self.parseImpl( instring, loc, doActions ) File /usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py, line 1863, in parseImpl loc, tokens = self.expr.parse( instring, loc, doActions ) File /usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py, line 564, in parse loc,tokens = self.parseImpl( instring, loc, doActions ) File /usr/lib64/python2.4/site-packages/matplotlib/pyparsing.py, line 1548, in parseImpl raise maxException matplotlib.pyparsing.ParseException: Expected \ (at char 0), (line:1, col:1) Any pointer would be appreciated. Nils - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] NotImplementedError: contourf3D is broken
Hi all, I would like to plot the largest eigenvalue of an affine matrix over a grid. I followed the hints available at http://www.scipy.org/Cookbook/Matplotlib/mplot3D I missed the hint Note that not all examples on this page are up to date, so some of them might not be working. How can I fix the problem ? Nils python -i eigplot.py --verbose-helpful matplotlib data path /usr/lib64/python2.4/site-packages/matplotlib/mpl-data $HOME=/home/nwagner CONFIGDIR=/home/nwagner/.matplotlib loaded rc file /home/nwagner/.matplotlib/matplotlibrc matplotlib version 0.90.1 verbose.level helpful interactive is False units is True platform is linux2 numerix numpy 1.0.4.dev3875 font search path ['/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf', '/usr/lib64/python2.4/site-packages/matplotlib/mpl-data/fonts/afm'] loaded ttfcache file /home/nwagner/.matplotlib/ttffont.cache backend TkAgg version 8.4 Traceback (most recent call last): File eigplot.py, line 28, in ? ax.contourf3D(X,Y,Z) File /usr/lib64/python2.4/site-packages/matplotlib/axes3d.py, line 590, in contourf3D raise NotImplementedError(contourf3D is broken) NotImplementedError: contourf3D is broken from scipy import * from symeig import symeig import pylab as p import matplotlib.axes3d as p3 def A(x): Affine matrix tmp = A0+A1*x[0]+A2*x[1] w = symeig(tmp,eigenvectors=0) return w[-1] A0 = array([[1.,0.],[0.,1.]]) A1 = array([[1.,0.],[0.,-1.]]) A2 = array([[0.,1.],[1.,0.]]) delta = 0.025 x = arange(-3.0, 3.0, delta) y = arange(-3.0, 3.0, delta) X,Y = meshgrid(x, y) Z = zeros((len(x),len(y)),float) for i in arange(0,len(x)): for j in arange(0,len(y)): Z[i,j] = A(array([x[i],y[j]])) fig=p.figure() ax = p3.Axes3D(fig) ax.contourf3D(X,Y,Z) ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel(r'$\lambda_{\max}$') fig.add_axes(ax) p.show() - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mlab.rk4
On Fri, 27 Apr 2007 23:22:04 +0100 darkside [EMAIL PROTECTED] wrote: 2007/4/27, John Hunter [EMAIL PROTECTED]: On 4/27/07, darkside [EMAIL PROTECTED] wrote: hi everyone, I'm trying to solve a lineal differential equation system, and I,m proving with the mlab.rk4 function. The problem I've found is that if the solution if a complex number, I can't use this functin, because it doesn't accept complex number, and I can only get the real case. Have anyone treat with this problem? What do you use to solve differential equation systems? rk4 was something I wrote long ago to have a simple ODE integrator in case scipy wasn't installed on my system. You should be using the scipy.integrate tools Thank you very much!!! I used scipy.integrate tools, splitting complex and real part of the equations, and it worked so good!! I tried to use: In addition I have filed a ticket for a complex ODE solver. http://projects.scipy.org/scipy/scipy/ticket/334 But I haven't been able to compile it. It returns a lot of errors when I tried. I suposse that it's because of the fortran compiler, but I don't know. Please remove the lines in zvdemo beginning with line 121. Rename zvdemo mv zvdemo zvdemo.f 1. g77 -c zvdemo.f zvode.f 2. g77 -o test zvdemo.o zvode.o 3. ./test test.out HTH Nils - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Adding coordinates to a plot in text form
Hi all, Is there a way to add the coordinates in text form to each plus in the attached figure ? ERach plus in the plot is generated by plot([data[-1].real],[data[-1].imag],'k+') For example the rightmost plus (in the upper right half plane) should have a text (1.049+0.692j) Can I use text for this purpose ? Any pointer would be appreciated. Thanks in advance Nils - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] AttributeError: Subplot instance has no attribute 'xlabel'
Is this a bug ? ax1.xlabel(r'Frequency $f$ (Hz)') AttributeError: Subplot instance has no attribute 'xlabel' ax1 matplotlib.axes.Subplot instance at 0x2aaab468d3f8 Nils - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] zoom in polar plots
Hi, How can I use zoom for polar plots ? I mean a circular cutout would be better than a rectangular cutout. Nils from scipy import * from pylab import show, polar def M(omega): s = 1j*omega return linalg.solve(s*identity(n)-A_0,A_1)*exp(-h_0*s) A_0 = array(([0,1.],[-32,-2])) A_1 = array(([0.8,-0.4],[0.16,0.0])) n = A_0.shape[0] omega = linspace(-50,50,400) h_0 = 0.2 for o in omega: w = linalg.eigvals(M(o)) ind = argsort(abs(w)) w = take(w,ind) polar([angle(w[-1])],[abs(w[-1])],'b.') show() - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] amsmath matplotlibrc
Hi, How can I use amsmath in matplotlibrc ? I would like to add a legend((r'$\det{\boldsymbol P}$')). Nils - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] AttributeError: class Axes has no attribute 'pcolor_classic'
Hi all, I guess this bug is due to recent changes in svn from pylab import plot, show, xlabel, ylabel, figure, semilogy, savefig, scatter File /usr/lib64/python2.4/site-packages/pylab.py, line 1, in ? from matplotlib.pylab import * File /usr/lib64/python2.4/site-packages/matplotlib/pylab.py, line 1995, in ? if Axes.pcolor_classic.__doc__ is not None: AttributeError: class Axes has no attribute 'pcolor_classic' Nils - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] AttributeError: TextWithDash instance has no attribute '_mytext'
Hi all, I tried to reproduce the Contour3D plot http://www.scipy.org/Cookbook/Matplotlib/mplot3D. from numpy import * import pylab as p import mpl3d.mplot3d as p3 p.matplotlib.__version__ # in mplt3D change: # levels, colls = self.contour(X, Y, Z, 20) # to: # C = self.contour(X, Y, Z, *args, **kwargs) # levels, colls = (C.levels, C.collections) delta = 0.025 x = arange(-3.0, 3.0, delta) y = arange(-2.0, 2.0, delta) X, Y = p.meshgrid(x, y) Z1 = p.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) Z2 = p.bivariate_normal(X, Y, 1.5, 0.5, 1, 1) # difference of Gaussians Z = 10.0 * (Z2 - Z1) fig=p.figure() ax = p3.Axes3D(fig) ax.contour3D(X,Y,Z) ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') fig.add_axes(ax) p.show() python -i contour3.py --verbose-helpful matplotlib data path /usr/lib64/python2.4/site-packages/matplotlib/mpl-data $HOME=/home/nwagner loaded rc file /home/nwagner/matplotlibrc matplotlib version 0.87.3 verbose.level helpful interactive is False platform is linux2 numerix numpy 0.9.9.2726 font search path ['/usr/lib64/python2.4/site-packages/matplotlib/mpl-data'] CONFIGDIR=/home/nwagner/.matplotlib loaded ttfcache file /home/nwagner/.matplotlib/ttffont.cache backend GTKAgg version 2.8.0 Found dvipng version 1.5 Traceback (most recent call last): File /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtk.py, line 284, in expose_event self._render_figure(self._pixmap, w, h) File /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py, line 73, in _render_figure FigureCanvasAgg.draw(self) File /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 391, in draw self.figure.draw(renderer) File /usr/lib64/python2.4/site-packages/matplotlib/figure.py, line 532, in draw for a in self.axes: a.draw(renderer) File /usr/lib64/python2.4/site-packages/mpl3d/mplot3d.py, line 714, in draw self.w_xaxis.draw(renderer) File /usr/lib64/python2.4/site-packages/mpl3d/mplot3d.py, line 613, in draw tick.draw(renderer) File /usr/lib64/python2.4/site-packages/matplotlib/axis.py, line 161, in draw if self.label1On: self.label1.draw(renderer) File /usr/lib64/python2.4/site-packages/matplotlib/text.py, line 1166, in draw self.update_coords(renderer) File /usr/lib64/python2.4/site-packages/mpl3d/mplot3d.py, line 411, in update_coords return text_update_coords(self, renderer) File /usr/lib64/python2.4/site-packages/mpl3d/mplot3d.py, line 102, in text_update_coords we = self._mytext.get_window_extent(renderer=renderer) AttributeError: TextWithDash instance has no attribute '_mytext' Nils Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Vibrational modes of l-shaped membranes
Hi all, I am going to visualize mode shapes of L-shaped membranes using contour. So far, I have two lists xin, yin containing the coordinates of interior points (see bottom of mode.png) . A third list will contain the corresponding displacements u(xin,yin). xin [-0.9, -0.9, -0.9, -0.9, -0.9, -0.9, -0.9, -0.9, -0.9, -0.8, -0.8, -0.8, -0.8, -0.8, -0.8, -0.8, -0.8, -0.8, -0.7, -0.7, -0.7, -0.7, -0.7, -0.7, -0.7, -0.7, -0.7, -0.6, -0.6, -0.6, -0.6, -0.6, -0.6, -0.6, -0.6, -0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.33326, 0.33326, 0.33326, 0.33326, 0.33326, 0.55536, 0.55536, 0.55536, 0.55536, 0.55536, 0.77768, 0.77768, 0.77768, 0.77768, 0.77768, 1.0, 1.0, 1.0, 1.0, 1.0] yin [-0.9, -0.8, -0.7, -0.6, 0.6, 0.33326, 0.55536, 0.77768, 1.0, -0.9, -0.8, -0.7, -0.6, 0.6, 0.33326, 0.55536, 0.77768, 1.0, -0.9, -0.8, -0.7, -0.6, 0.6, 0.33326, 0.55536, 0.77768, 1.0, -0.9, -0.8, -0.7, -0.6, 0.6, 0.33326, 0.55536, 0.77768, 1.0, 0.6, 0.33326, 0.55536, 0.77768, 1.0, 0.6, 0.33326, 0.55536, 0.77768, 1.0, 0.6, 0.33326, 0.55536, 0.77768, 1.0, 0.6, 0.33326, 0.55536, 0.77768, 1.0, 0.6, 0.33326, 0.55536, 0.77768, 1.0] How can I realize this task with mpl ? help (contour) yields contour(X,Y,Z) - X,Y specify the (x,y) coordinates of the surface. X, Y, and Z must be arrays with the same dimensions. Z may be a masked array, but filled contouring may not handle internal masked regions correctly. How do I build X,Y from my lists xin, yin ? Any pointer would be appreciated. Nils Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] no BoundingBox
PGM wrote: Nils, That's far more a Latex question than a matplotlib one. Short answer: you can't fix the BBox from a JPEG, there's none ! From what I remmbr from my LaTeX years, you need to transform the jpeg to a format LaTeX can understand, viz '.ps' or '.eps' Check http://www2.eng.cam.ac.uk/~pmg26/hpage/teaching/graphics_LaTeX.html or the help/manual of the graphicx package, or google import jpeg latex Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users I am using pdflatex and I have used *.png files before without any trouble. So are there any changes in matplotlib's svn wrt to these graphic formats within the last two weeks ? Nils Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] no BoundingBox
Nils Wagner wrote: Hi all, I have generated some figures with matplotlib (savefig('test.png') savefig(test.jpg')). If I try to include them via \includegraphics[width=8cm]{test.jpg} I get LaTeX Error: Cannot determine size of graphic in test.jpg (no BoundingBox). I am using latest svn versions of numpy/scipy and matplotlib. Any idea how to fix this problem ? Nils Sorry for the noise. It was just a missing \usepackage{graphicx} in the header of my new tex file. Nils Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users