[Matplotlib-users] pcolor - color values argument
Quote: matplotlib.pyplot.pcolor(*args, **kwargs) Create a pseudocolor plot of a 2-D array. C is the array of color values. I tried to see how can I map custom color values to example array, but seems hard to understand. I created 2x2 mesh, and appropriate C array for it. Changing values in this C array changes colors on plotted mesh in what it seems irregular way. Does C array map colors from default colormap? If yes, in which way they are plotted according values in this C array? Or how can I tell matplotlib to use this RGB value for this cell in a mesh, then another RGB value for other cell and so on Thanks -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] unable to install matplotlib on MacOSX 10.6 using Fink
On Nov 14, 2011, at 5:34 PM, Volker Blum wrote: Thanks for the (two!) fast answers on the list. So there is hope :) I'll take a look at the fink internals, I guess. best wishes Volker having said that ... after trying the one piece of software that I need on another platform, here's what I get: File [...], line 84, in module length = norm(dot(rlatvec,end) - dot(rlatvec,start)) File /usr/lib64/python2.6/site-packages/matplotlib/mlab.py, line 1998, in norm raise NotImplementedError('Deprecated - see numpy.linalg.norm') NotImplementedError: Deprecated - see numpy.linalg.norm The script that I was trying to get to work worked fine on Ubuntu this summer. Where has norm gone? How can it have been deprecated? It looks like a matplotlib problem, hence I am asking here. [I am also asking out of some curiosity - I am sure the problem can be fixed relatively easily, but what I am wondering is, am I looking at a problem that came with a new version of matplotlib, am I using too old a version of matplotlib?] best wishes Volker On Nov 14, 2011, at 5:15 PM, Jeff Blackburne wrote: On Nov 14, 2011, at 10:20 AM, Volker Blum wrote: ... just wanted to report this problem. At the heart of the issue is the decision to have too many dependencies in matplotlib (which is why I am posting here). That, although viewed as good style, leads to an installation process that is, ultimately, practically impossible - except by buying a prepackaged solution. (which is possible but probably not the original intention) What ultimately thwarts my installation attempts is the dependency on TeX. While a good thing in principle, most packaging tools do not realize that there is already a working TeX distribution there from another source, and will only accept their own - which, in the case of debian/fink, can no longer be postinstalled. It appears that I would have to uninstall and reinstall my entire pre-existing setup just to get matplotlib to work. Has anyone seen this problem before? Is there a workaround? best wishes Volker Blum Hi Volker, I have installed matplotlib with Fink. I had a similar issue, because I didn't need to GTKAgg backend and didn't want to install all of the GTK+ packages that were required. I ended up making my own fink package called matplotlib-py27-nogtk by editing the matplotlib-py.info and matplotlib-py.patch files in my /sw/fink/10.6/unstable/main/finkinfo/sci directory, to remove the dependencies and turn off the GTK+ check in setup.py, respectively. I put the resulting files in /sw/fink/10.6/local/main/finkinfo. You could try something like that, although it's kind of messy. There may also be a virtual fink package for TeX that doesn't install anything, but counts as a proxy for a previous installation. If this is true, it's a much better solution that what I did. I hope this helps. If you need more info, I suspect that your question is actually better suited for the fink-users list. Good luck, Jeff -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Build on VS2008 - warnings
I'd love to see the compiler logs and try to fix what I can. I don't have a Windows install to test, but maybe I can resolve the more obvious ones. Mike On 11/08/2011 05:49 AM, Mads Ipsen wrote: Hi, Thanks to the help from Christoph, I have been able to build matplotlib-1.1.0 on both Win XP-32 and 64. I have noticed though, that quite a few warnings are produced when the source is compiled. Is this something that the core developers would like to fix, or is it a 'don't care' thing? If the info is useful, I'd be happy to post it somewhere. Best regards, Mads -- +-+ | Mads Ipsen | +--+--+ | Gåsebæksvej 7, 4. tv | | | DK-2500 Valby| phone: +45-29716388 | | Denmark | email:mads.ip...@gmail.com | +--+--+ -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] I get a warning when running code with ipython, but not with python
On Mon, Nov 14, 2011 at 7:11 AM, Michael Droettboom md...@stsci.edu wrote: This looks like a bug for the IPython folks. If you make a file containing only import gtk and %run that file, one gets the same error. It is a bug of IPython 0.11. The problem is solved in 0.12. See http://mail.scipy.org/pipermail/ipython-user/2011-November/008734.html for the details. Alejandro. -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] unable to install matplotlib on MacOSX 10.6 using Fink
On Tue, Nov 15, 2011 at 2:53 AM, Volker Blum b...@fhi-berlin.mpg.de wrote: On Nov 14, 2011, at 5:34 PM, Volker Blum wrote: Thanks for the (two!) fast answers on the list. So there is hope :) I'll take a look at the fink internals, I guess. best wishes Volker having said that ... after trying the one piece of software that I need on another platform, here's what I get: File [...], line 84, in module length = norm(dot(rlatvec,end) - dot(rlatvec,start)) File /usr/lib64/python2.6/site-packages/matplotlib/mlab.py, line 1998, in norm raise NotImplementedError('Deprecated - see numpy.linalg.norm') NotImplementedError: Deprecated - see numpy.linalg.norm The script that I was trying to get to work worked fine on Ubuntu this summer. Where has norm gone? How can it have been deprecated? It looks like a matplotlib problem, hence I am asking here. [I am also asking out of some curiosity - I am sure the problem can be fixed relatively easily, but what I am wondering is, am I looking at a problem that came with a new version of matplotlib, am I using too old a version of matplotlib?] best wishes Volker Others are probably more suited for explaining the hows and whys of mlab.py, but I will give it a crack. mlab.py was originally made to help assist users transitioning from Matlab over to matplotlib. Some functions that were probably considered to be top-tier in Matlab had to be accessed in sub-modules in NumPy, or were only available in the scipy packages. mlab.py attempted to address that. There is also the issue where we were attempting to bridge compatibility with the old Numerix package which did not have many of these things at all. Support for Numerix has long been deprecated and so the need for many of the functions in mlab.py has gone away. This is why we now refer to the equivalent numpy function in the deprecation messages. In v1.1.0, the norm() function is completely removed and you will not even get a deprecation message at all. The easiest solution is to adapt your scripts to use the numpy equivalents as suggested in the messages. Cheers! Ben Root -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] unable to install matplotlib on MacOSX 10.6 using Fink
Hi Ben, thanks for the answer, ... umm, but did the person making the change realize that such error messages are exposed to users who do not have any idea what python is. I would plead(*) with anyone that functionality that is not harmful please not be deprecated like this. Scripts based on matplotlib, as software, will have a much longer life than that 1 year it took to deprecate this harmless function. best wishes Volker (*) I know it's free software, and I have neither right nor desire to demand anything like this. Hence the plead. ... problem is, all we can do is evaluate whether matplotlib is safe to base our own work on here for the long term. The simple fallout from such a deprecation can be fixed in our own internal repository, sure ... but this quite central script will remain broken from the point of view of our users for a long time. On Nov 15, 2011, at 4:50 PM, Benjamin Root wrote: Others are probably more suited for explaining the hows and whys of mlab.py, but I will give it a crack. mlab.py was originally made to help assist users transitioning from Matlab over to matplotlib. Some functions that were probably considered to be top-tier in Matlab had to be accessed in sub-modules in NumPy, or were only available in the scipy packages. mlab.py attempted to address that. There is also the issue where we were attempting to bridge compatibility with the old Numerix package which did not have many of these things at all. Support for Numerix has long been deprecated and so the need for many of the functions in mlab.py has gone away. This is why we now refer to the equivalent numpy function in the deprecation messages. In v1.1.0, the norm() function is completely removed and you will not even get a deprecation message at all. The easiest solution is to adapt your scripts to use the numpy equivalents as suggested in the messages. Cheers! Ben Root -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] I have a problem with installation of python(x, y).
Dear All, I have a problem with installation of python(x,y). When I try, it says python 2.6.2 msi was not found If anyone knows how to resolve this issue, please help me. My OS is windows 7 64bit. If this mailing lists does not help pyhton(x,y) issue, please lead me to a right place. Thank you very much, Jun -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] unable to install matplotlib on MacOSX 10.6 using Fink
On 11/15/2011 06:23 AM, Volker Blum wrote: Hi Ben, thanks for the answer, ... umm, but did the person making the change realize that such error messages are exposed to users who do not have any idea what python is. I would plead(*) with anyone that functionality that is not harmful please not be deprecated like this. Scripts based on matplotlib, as software, will have a much longer life than that 1 year it took to deprecate this harmless function. best wishes Volker (*) I know it's free software, and I have neither right nor desire to demand anything like this. Hence the plead. ... problem is, all we can do is evaluate whether matplotlib is safe to base our own work on here for the long term. The simple fallout from such a deprecation can be fixed in our own internal repository, sure ... but this quite central script will remain broken from the point of view of our users for a long time. Volker, The simple answer to your question about safety is no, if safety in the long term requires that the code you write now must work with any future version of mpl. This is true throughout the software ecosystem of interdependent libraries--even in non-free software. It is particularly applicable to organically evolving libraries like mpl. We want the evolution of mpl to be as comfortable for users as possible, balanced with the need to improve. This includes the need to remove functionality that is marginal, obsolete, or inappropriate. All code has a maintenance cost. In addition, marginal or redundant functionality has a cost to users: increased learning time and likely confusion for anyone working with the library. Eric On Nov 15, 2011, at 4:50 PM, Benjamin Root wrote: Others are probably more suited for explaining the hows and whys of mlab.py, but I will give it a crack. mlab.py was originally made to help assist users transitioning from Matlab over to matplotlib. Some functions that were probably considered to be top-tier in Matlab had to be accessed in sub-modules in NumPy, or were only available in the scipy packages. mlab.py attempted to address that. There is also the issue where we were attempting to bridge compatibility with the old Numerix package which did not have many of these things at all. Support for Numerix has long been deprecated and so the need for many of the functions in mlab.py has gone away. This is why we now refer to the equivalent numpy function in the deprecation messages. In v1.1.0, the norm() function is completely removed and you will not even get a deprecation message at all. The easiest solution is to adapt your scripts to use the numpy equivalents as suggested in the messages. Cheers! Ben Root -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib.tests sub-modules missing
Hi Micheal, I didn't see your response, apologies for the frustrated post. I am building a completely fresh VE and when the testing fails I blow it away and start from scratch. I will try your suggestion on my next iteration and see if that fixes the problem. Ideally, I'd like to pip install the module into my VE, but the same problem persists with that approach. My pip command is: pip install -f http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0/matplotlib-1.0.0.tar.gz matplotlib per the suggestion from http://seanbehan.com/mac-os-x/installing-matplotlib-on-os-x-for-python-version-2-6-1/ If my setup.cfg file isn't configured correctly, could it cause an issue like this? I would think that the test sub-directories would be required, no matter the setup. I've attached the installation output below in case that sheds any light on the problem. Downloading/unpacking matplotlib Running setup.py egg_info for package matplotlib basedirlist is: [] BUILDING MATPLOTLIB matplotlib: 1.0.1 python: 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.6.1 freetype2: found, but unknown version (no pkg-config) * WARNING: Could not find 'freetype2' headers in any * of '.', './freetype2'. OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) * Could not find 'libpng' headers in any of '.' Tkinter: no * TKAgg requires Tkinter wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to import gtk in your build/install environment Mac OS X native: yes Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide adding pytz OPTIONAL USETEX DEPENDENCIES dvipng: 1.13 ghostscript: 8.71 latex: 3.1415926 [Edit setup.cfg to suppress the above messages] pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo'] warning: no files found matching 'MANIFEST' warning: no files found matching 'examples/data/*' warning: no files found matching 'lib/mpl_toolkits' Installing collected packages: matplotlib Running setup.py install for matplotlib basedirlist is: [] BUILDING MATPLOTLIB matplotlib: 1.0.1 python: 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.6.1 freetype2: found, but unknown version (no pkg-config) * WARNING: Could not find 'freetype2' headers in any * of '.', './freetype2'. OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) * Could not find 'libpng' headers in any of '.' Tkinter: no * TKAgg requires Tkinter wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to import gtk in your build/install environment Mac OS X native: yes Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide
Re: [Matplotlib-users] Triangulations and Polar Plots
On 15 November 2011 00:18, Daniel Welling dantwell...@gmail.com wrote: Greetings. I recently found myself in the position of needing to plot polar, irregularly spaced data. I've done similar using regularly spaced values with no problem. However, I've found that when the points become greatly scattered, the triangulation does not translate from rectangular to polar very well. Below, find a code example that shows this; though it is much better than my real-world case that uses simulation results. Essentially, in the translation from regular to polar axes, many of the triangles overlap others, many features of the plot are lost, and the plot looks mangled in certain regions, esp. across the theta=0 boundary. While subtle here (but MUCH worse in the results I'm trying to visualize), some of the triangles lie outside of the triangulated region. It isn't merely that the polar plot is suffering from poor data coverage; the triangulation is not working properly in polar coordinates and the results are quantitatively different than the rectangular plot. The obvious work-around for this problem illustrates the issue more clearly. If we convert rad, theta back to x, y and do a rectangular plot, the triangulation is much better (not only is there no issue around theta=0, but there are no overlapping triangles), all of the details of the non-polar version are maintained, and the plot looks great. This is not the best solution, as polar plots in Matplotlib are quite elegant. Any help here would be appreciated. It could be that triangulations are just not suited for polar plots; it could be that the theta=0 issue throws things off, etc; I'm just not sure. It would be perfect if I could use the polar axes in the end. Thanks. -dw Daniel, I can't give you much help but I can provide some explanation. If you don't specify a triangulation of your own, the matplotlib tri* functions use lib/matplotlib/delaunay/triangulate as a black box. You are right in saying that it is not suited to polar plots; it assumes cartesian axes. The lib/matplotlib/tri/* functions use triangulations that comprise a number of triangles with vertices ordered in an anticlockwise manner. The delaunay triangulation returns such triangles on a cartesian grid. But if you transform a cartesian triangulation to a polar grid, you invariably end up with some triangles which are ordered clockwise and hence also overlap each other. Tricontour doesn't like this and gives the best results it can given that is has been passed an incorrect triangulation, which from your point of view means the wrong results. In addition, as you have noticed there are other problems around theta=0. In a polar plot points near theta=0 are visible both from the low and high theta ends of the plot, whereas in a cartesian plot they are only visible from one side unless you take steps to repeat such points so the wraparound works. The answer, unfortunately, is to specify your own triangulation using the 'triangles' keyword in your calls to the tri* functions. I suspect that most people who regularly use the tri* functions obtain their triangulations from elsewhere rather than using the matplotlib delaunay code. It should be possible to pass your polar coordinates to delaunay to obtain the triangulation in polar space, then use this triangulation in your tri* polar plots. However, I've tried it (albeit briefly) and it appears to hang the delaunay code. An alternative may be to take a look at griddata (there is an example in matplotlib's pylab_examples directory). It is difficult for me to recommend such an approach, however, as I wrote the tri* functions so that I wouldn't have to use griddata! Ian -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to switch to v1.1.0 after upgrade
Hi, all I have installed v1.1.0 from source code at : /usr/local/lib/python2.6/dist-packages/matplotlib But whenever I am using python test.py, it still refers to the old v0.99. could you please tell me how to update to the new version ? thanks a lot. Regards! Yu -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to switch to v1.1.0 after upgrade
On Tue, Nov 15, 2011 at 2:45 PM, Y.Wu ywu...@gmail.com wrote: Hi, all I have installed v1.1.0 from source code at : /usr/local/lib/python2.6/dist-packages/matplotlib But whenever I am using python test.py, it still refers to the old v0.99. could you please tell me how to update to the new version ? Here are some instructions to uninstall a previous version: http://matplotlib.sourceforge.net/faq/installing_faq.html#how-to-completely-remove-matplotlib Alejandro. -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Separate formatting for tick labels
Is there a way to format tick labels separately? For example: LabelsList = ['Prospero', 'Miranda', 'Caliban', 'Ariel'] xlabels = ax.set_xticklabels( LabelsList, rotation=35, horizontalalignment='right', fontstyle='italic', fontsize='10') will give me italicized x tick labels; however, what if I want to italicize all, but Prospero? Is there a way to format each label separately? -- View this message in context: http://old.nabble.com/Separate-formatting-for-tick-labels-tp32852024p32852024.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] newline characters in tick labels
Can a tick label be on two separate lines? For example: LabelsList = ['Howard', 'Vince', 'Bob', 'Naboo the Enigma'] xlabels = ax.set_xticklabels( LabelsList, rotation=35, horizontalalignment='right', fontstyle='italic', fontsize='10') How can I put Naboo the Enigma on two lines? I've tried to enter newlines and carriage returns in the list element (e.g. 'Naboo\n the Enigma') without any luck. -- View this message in context: http://old.nabble.com/newline-characters-in-tick-labels-tp32852034p32852034.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] AttributeError: 'AxesSubplot' object has no attribute 'set_ylable'
Hi, All I am trying to add ylable to: ax1 = plt.subplot2grid((1,3), (0,0), colspan=2) But got the following error: no 'set_ylable'; Here is my code: import matplotlib.pyplot as plt import numpy as np ax1 = plt.subplot2grid((1,3), (0,0), colspan=2) ax2 = plt.subplot2grid((1,3), (0,2), colspan=1) N = 2 Spot = (6.29, 3.47) Avg = (20.11,18.47) Ody = (6.39,3.98) Medium = (6.7,6.12) ind = np.arange(N)+0.10 # the x locations for the groups width = 0.15 # the width of the bars ax1.bar(ind, Spot, width, color='0.35',hatch=\\) ax1.bar(ind+width, Avg, width, color='0.55',hatch=//) ax1.bar(ind+2*width, Ody, width, color='0.75',hatch=+) ax1.bar(ind+3*width, Medium, width, color='0.15',hatch=.) ax1.set_xticks(ind+2*width) ax1.set_xticklabels(('Static', 'Dynamic')) #ax1.set_ylable(Incorrect Decision Ratio (%)) Regards! Yu -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] newline characters in tick labels
On Tuesday, November 15, 2011, magurling magurl...@gmail.com wrote: Can a tick label be on two separate lines? For example: LabelsList = ['Howard', 'Vince', 'Bob', 'Naboo the Enigma'] xlabels = ax.set_xticklabels( LabelsList, rotation=35, horizontalalignment='right', fontstyle='italic', fontsize='10') How can I put Naboo the Enigma on two lines? I've tried to enter newlines and carriage returns in the list element (e.g. 'Naboo\n the Enigma') without any luck. Actually, that's how I do it, if I remember correctly. What is your platform and mpl version? Ben Root -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] AttributeError: 'AxesSubplot' object has no attribute 'set_ylable'
On Tuesday, November 15, 2011, Y.Wu ywu...@gmail.com wrote: Hi, All I am trying to add ylable to: ax1 = plt.subplot2grid((1,3), (0,0), colspan=2) But got the following error: no 'set_ylable'; Here is my code: import matplotlib.pyplot as plt import numpy as np ax1 = plt.subplot2grid((1,3), (0,0), colspan=2) ax2 = plt.subplot2grid((1,3), (0,2), colspan=1) N = 2 Spot = (6.29, 3.47) Avg = (20.11,18.47) Ody = (6.39,3.98) Medium = (6.7,6.12) ind = np.arange(N)+0.10 # the x locations for the groups width = 0.15 # the width of the bars ax1.bar(ind, Spot, width, color='0.35',hatch=\\) ax1.bar(ind+width, Avg, width, color='0.55',hatch=//) ax1.bar(ind+2*width, Ody, width, color='0.75',hatch=+) ax1.bar(ind+3*width, Medium, width, color='0.15',hatch=.) ax1.set_xticks(ind+2*width) ax1.set_xticklabels(('Static', 'Dynamic')) #ax1.set_ylable(Incorrect Decision Ratio (%)) Regards! Yu lable -- label Fix that, and it will work. Ben Root -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Visualizing data for scientists and engineers
I just came across this paper in my twitter feed. Thought it might be relevant to this community. https://www.research.ibm.com/people/l/lloydt/color/color.HTM Cheers! Ben Root -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] AttributeError: 'AxesSubplot' object has no attribute 'set_ylable'
Much appreciated! It works! Regards! Yu On Tue, Nov 15, 2011 at 10:13 PM, Benjamin Root ben.r...@ou.edu wrote: On Tuesday, November 15, 2011, Y.Wu ywu...@gmail.com wrote: Hi, All I am trying to add ylable to: ax1 = plt.subplot2grid((1,3), (0,0), colspan=2) But got the following error: no 'set_ylable'; Here is my code: import matplotlib.pyplot as plt import numpy as np ax1 = plt.subplot2grid((1,3), (0,0), colspan=2) ax2 = plt.subplot2grid((1,3), (0,2), colspan=1) N = 2 Spot = (6.29, 3.47) Avg = (20.11,18.47) Ody = (6.39,3.98) Medium = (6.7,6.12) ind = np.arange(N)+0.10 # the x locations for the groups width = 0.15 # the width of the bars ax1.bar(ind, Spot, width, color='0.35',hatch=\\) ax1.bar(ind+width, Avg, width, color='0.55',hatch=//) ax1.bar(ind+2*width, Ody, width, color='0.75',hatch=+) ax1.bar(ind+3*width, Medium, width, color='0.15',hatch=.) ax1.set_xticks(ind+2*width) ax1.set_xticklabels(('Static', 'Dynamic')) #ax1.set_ylable(Incorrect Decision Ratio (%)) Regards! Yu lable -- label Fix that, and it will work. Ben Root -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Visualizing data for scientists and engineers
It's same problem for which I asked assistance here: http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg22520.html There, Johann provided nifty script with slider, with which help user can shift colormap and get more meaningful image Also speaking about great Basemap package, only shifting colormap can be of no use for different regions, as one region could have elevation from 200m to 3000m for example, while other -2000m to 4000m, making two region images incomparable. This is where set_clim function can help - if we make, let's nice hypsometric colormap from -13000 to 9000m we can use this function to plot region images with same visual information. Some new hypsometric colormaps in Basemap package could find usage On Wed, Nov 16, 2011 at 4:32 AM, Ben Root ben.v.r...@gmail.com wrote: I just came across this paper in my twitter feed. Thought it might be relevant to this community. https://www.research.ibm.com/people/l/lloydt/color/color.HTM Cheers! Ben Root -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] newline characters in tick labels
Benjamin Root-2 wrote: Actually, that's how I do it, if I remember correctly. What is your platform and mpl version? I have Ubuntu 11.04, Python 2.7.1+, mpl 1.1.0. I've seen examples in the mpl gallery of two-liner labels, but none that are rotated. Perhaps I didn't look closely enough. -- View this message in context: http://old.nabble.com/newline-characters-in-tick-labels-tp32852034p32852641.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users