[Matplotlib-users] Apply a blur on patches
Hi fm.py Description: Binary data -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] color gradient color_cycle ?
hi, I want to overplot N curves calling the plot(X) function N times. I also would like to have a way to which curve has been drawn first and so on. If N would en small and constant, I could simply call color_cycle with a short list as parameter...but it is not quite an option with up to 50 curves... How could I setup a color_cycle which look like a color gradient (let's say the first curve in red, the last one in green and the other in between). I think the main question is : How do you produce a arbitrary long list of colors to use it as a color gradient (as input to set_color_cycle )? xavier -- BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos much more. Register early save! http://p.sf.net/sfu/rim-blackberry-1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] compile failure with git tree
Hi, I'm use to compile the mpl git tree but I get an error with the current one: running build_ext building 'matplotlib.backends._tkagg' extension C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC compile options: '-DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/include/tcl8.5 -I/usr/include/tcl8.5 -I/usr/local/include -I/usr/include -I. -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.7 -c' gcc: CXX/cxxextensions.c gcc: no input files sh: -I/usr/include/tcl8.5: not found gcc: no input files sh: -I/usr/include/tcl8.5: not found error: Command gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/include/tcl8.5 -I/usr/include/tcl8.5 -I/usr/local/include -I/usr/include -I. -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.7 -c CXX/cxxextensions.c -o build/temp.linux-x86_64-2.7/CXX/cxxextensions.o failed with exit status 127 Is it a known issue? Xavier -- 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-d2d-c2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plan to merge the matplotlib-py3 branch?
Hi, It looks like the matplotlib-py3 branch is worknig well both with python2.X and python3.X. Is there a plan to merge the changes from matplotlib-py3 into the default trunk anytime soon? Xavier -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plan to merge the matplotlib-py3 branch?
On 06/13/2011 07:38 PM, Darren Dale wrote: On Mon, Jun 13, 2011 at 12:25 PM, Michael Droettboommd...@stsci.edu wrote: This was recently discussed in the thread v1.0.x branch seems confused. I (believe) the consensus was to get out another v1.0.x maintenance release out in the near future (which would not support py3k, but would still support Python 2.4), and then merge the py3 branch into master so it starts to get some more testing before making the next major release. I'm just today merging master into py3 so that when we are ready to do the merge the other way most of the hard work will have already been done. Are there features already in master that should be supported by python-2.6? If so, I think we should consider releasing 1.1.0 and making a 1.1.x maintenance branch before merging the py3 stuff back into master. Then mpl-1.2 could be the first to support py3. Should we move this discussion to the mpl-dev mailing list? Darren Ho I wasn't aware of an mpl-dev mailing list. Sorry. py3 is already ok with python3 *and* python2 isn't it? Maybe the website should advertise a bit on the needs to test the py3 branch. Users used to compile mpl from git should be able to produce valuable technical feedback, shoudn't they? Xavier -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Change a few pixels color
On 04/23/2011 03:19 AM, Paul Ivanov wrote: Hi Xavier, Xavier Gnata, on 2011-04-23 02:33, wrote: Imagine you have this code: import numpy as np import matplotlib.cm as cm import matplotlib.mlab as mlab import matplotlib.pyplot as plt delta = 0.25 x = y = np.arange(-3.0, 3.0, delta) X, Y = np.meshgrid(x, y) Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1) Z = Z2-Z1 # difference of Gaussians plt.imshow(Z, interpolation='nearest', cmap=cm.gray, origin='lower', extent=[-3,3,-3,3]) Then you want to change the color of a few pixels to red. You have a list of coordinates (i,j) and each pixel in this list should now be red. I could play with masked arrays like in: http://matplotlib.sourceforge.net/examples/pylab_examples/image_masked.html but I would prefer a simple display this pixel (i,j) in red whatever his value is function. Since you're using a gray color map for that image, you won't be able to set a particular pixel to red. You'll have to either overlay a new image that would be masked out everywhere except for the pixels you want to change, as you mentioned, or create new image patches at the corresponding positions like this: idx2im = lambda i,j: (x[i],x[j+1],y[i],y[j+1] ) plt.imshow([[.9]], extent=idx2im(12,12), cmap =cm.jet, origin='lower',vmin=0,vmax=1) or something like this: plt.Rectangle((x[10],y[10]),width=delta,height=delta,color='red') ax = plt.gca() ax.add_artist(r) plt.draw() best, Thanks. The code using Rectangle works very well. Using masks is more efficient but overshoot if I want to change only a few pixels. Xavier -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Change a few pixels color
Hi, Imagine you have this code: import numpy as np import matplotlib.cm as cm import matplotlib.mlab as mlab import matplotlib.pyplot as plt delta = 0.25 x = y = np.arange(-3.0, 3.0, delta) X, Y = np.meshgrid(x, y) Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1) Z = Z2-Z1 # difference of Gaussians plt.imshow(Z, interpolation='nearest', cmap=cm.gray, origin='lower', extent=[-3,3,-3,3]) Then you want to change the color of a few pixels to red. You have a list of coordinates (i,j) and each pixel in this list should now be red. I could play with masked arrays like in: http://matplotlib.sourceforge.net/examples/pylab_examples/image_masked.html but I would prefer a simple display this pixel (i,j) in red whatever his value is function. Xavier -- Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] python3 svn branch dead?
Hi, It looks like the http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ in dead. The last commit was 8months ago. Numpy is ok with python3.1, scipy is ok, nose is ok, ipython is usable. Ubuntu already provides python-tk for python3.x It would be nice to port matplotlib to python3. Is there a plan? another svn/git branch? Xavier -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] python3 svn branch dead?
On 03/20/2011 07:19 PM, Darren Dale wrote: On Sun, Mar 20, 2011 at 2:08 PM, Xavier Gnataxavier.gn...@gmail.com wrote: Hi, It looks like the http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ in dead. The last commit was 8months ago. Numpy is ok with python3.1, scipy is ok, nose is ok, ipython is usable. Ubuntu already provides python-tk for python3.x It would be nice to port matplotlib to python3. Is there a plan? another svn/git branch? https://github.com/matplotlib/matplotlib-py3 Thanks! AFAICS it works already well with the tk backend :) Are you interested in more testing with another backend? Xavier -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Python 3
On 01/03/2011 05:29 PM, Ryan May wrote: On Mon, Jan 3, 2011 at 9:28 AM, Darren Daledsdal...@gmail.com wrote: On Mon, Jan 3, 2011 at 9:45 AM, Ryan Mayrma...@gmail.com wrote: On Sun, Jan 2, 2011 at 12:24 PM, Xavier Gnataxavier.gn...@gmail.com wrote: /usr/local/lib/python3.1/dist-packages/matplotlib/backends/qt4_editor/formlayout.py, line 59, inmodule from PyQt4.QtCore import (Qt, SIGNAL, SLOT, QSize, QString, ImportError: cannot import name QString Looks like this backend hasn't been ported yet. I remember seeing this on Gentoo and, unfortunately, never tracked it down. However, it seems to me this is a problem with your PyQt4 install and Python 3, as QString should be found. It's not a problem with the PyQt4 installation. PyQt on python-3 uses PyQt's new API, which uses python strings and does not provide QString, QChar, and friends. http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#selecting-incompatible-apis I stand corrected. I don't know what's worse, being so blatently wrong, or having wasted a bunch of time in the past trying to fix a broken install. Time to don ye olde paper bag... Ryan ok. It means that the qt4 backend need to be ported to python3. Should I try the tk backend ? What's the plan? First port matplotlib core? Focus on one backend? What do you want us to test? How should we report python3 related bugs? Xavier -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Python 3
which backend should we use? It does not work with pyqt4 Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python3.1/dist-packages/pylab.py, line 1, in module from matplotlib.pylab import * File /usr/local/lib/python3.1/dist-packages/matplotlib/pylab.py, line 259, in module from matplotlib.pyplot import * File /usr/local/lib/python3.1/dist-packages/matplotlib/pyplot.py, line 95, in module new_figure_manager, draw_if_interactive, show = pylab_setup() File /usr/local/lib/python3.1/dist-packages/matplotlib/backends/__init__.py, line 25, in pylab_setup globals(),locals(),[backend_name]) File /usr/local/lib/python3.1/dist-packages/matplotlib/backends/backend_qt4agg.py, line 12, in module from .backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\ File /usr/local/lib/python3.1/dist-packages/matplotlib/backends/backend_qt4.py, line 16, in module import matplotlib.backends.qt4_editor.figureoptions as figureoptions File /usr/local/lib/python3.1/dist-packages/matplotlib/backends/qt4_editor/figureoptions.py, line 11, in module import matplotlib.backends.qt4_editor.formlayout as formlayout File /usr/local/lib/python3.1/dist-packages/matplotlib/backends/qt4_editor/formlayout.py, line 59, in module from PyQt4.QtCore import (Qt, SIGNAL, SLOT, QSize, QString, ImportError: cannot import name QString Looks like this backend hasn't been ported yet. Xavier Thank you for your fast reply and suggestion. I downloaded the GNU tar ball and looked at it. Unfortunately due to my own limitations, I need a win32 installer. I'll have to bide my time I guess. RDY -Original Message- From: Christoph Gohlke [mailto:cgoh...@uci.edu] Sent: Thursday, December 23, 2010 2:47 PM To: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] Python 3 On 12/23/2010 1:01 PM, Robert Young wrote: Hi, I have used Matplotlib extensively now for 2 years with python 2.x. I recently needed to move to python 3.1 which was greatly facilitated by numpy and scipy being ported to python 3. I was lucky in that all I have to change is many print statements. All on a Windows OS. But my progress is severely limited by having no port of Matplotlib to python 3. I am definitely a user so have contributed twice to Matplotlib development. Plea: If the stars align properly, I would be so grateful for a port of matplotlib to python 3. Thanks for hearing me. Did you try the py3k branch at http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ ? It does work for simple plots. -- Christoph -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Python 3
On 09/21/2010 04:13 PM, Ryan May wrote: On Tue, Sep 21, 2010 at 8:22 AM, A. S. Budden abud...@gmail.com wrote: All, Now that NumPy is available for python 3.1 and SciPy is well on its way (apparently), are there any plans for matplotlib to be ported? There are definitely plans; in fact, there's a SVN branch for it. There are no major impediments--the branch can already run a simple example. Unfortunately, development time seems to be quite a lacking resource of late (I *know* it has for me). Patches, however, are always accepted. :) Ryan Which svn branch? More users --- more tests and even patches :) Xavier -- 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
Re: [Matplotlib-users] Python 3
On 09/25/2010 12:02 AM, Fernando Perez wrote: On Fri, Sep 24, 2010 at 2:54 PM, Ryan May rma...@gmail.com wrote: The one called Py3k :) http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ In case you want to have ipython while testing, there's already an experimental py3k branch of ipython as well: http://github.com/takowl/ipython/tree/ipy3-newkernel We'll be working with Thomas over the next few months to merge upstream as much of his work as possible, so that we start having decent py3k support in ipython. If you end up helping IPython as well, even better :) Cheers, f I'm not a svn expert but I get an error when I try to checkout the py3k branch: svn: Repository moved temporarily to '/viewvc/matplotlib/branches/'; please relocate Any clues? xavier -- 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] _path.so: undefined symbol: PyArray_API
Hi, I'm trying to compile numpy/scipy and matplotlib (I did it N times without any problem). Numpy and scipy are ok (.test() is fine). However, from pylab import * fails with way: /usr/local/lib/python2.6/dist-packages/pylab.py in module() 1 2 3 from matplotlib.pylab import * 4 import matplotlib.pylab 5 __doc__ = matplotlib.pylab.__doc__ /usr/local/lib/python2.6/dist-packages/matplotlib/pylab.py in module() 204 silent_list, iterable, dedent 205 -- 206 from matplotlib import mpl # pulls in most modules 207 208 from matplotlib.dates import date2num, num2date,\ /usr/local/lib/python2.6/dist-packages/matplotlib/mpl.py in module() 1 2 3 from matplotlib import artist 4 from matplotlib import axis 5 from matplotlib import axes 6 from matplotlib import cbook 7 from matplotlib import collections /usr/local/lib/python2.6/dist-packages/matplotlib/artist.py in module() 4 import matplotlib.cbook as cbook 5 from matplotlib import docstring 6 from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath 7 from path import Path 8 /usr/local/lib/python2.6/dist-packages/matplotlib/transforms.py in module() 32 import numpy as np 33 from numpy import ma --- 34 from matplotlib._path import affine_transform 35 from numpy.linalg import inv 36 ImportError: /usr/local/lib/python2.6/dist-packages/matplotlib/_path.so: undefined symbol: PyArray_API I may have a problem with the svn update but I'm not quite sure. Maybe it is just a temporary compatibility problem in between matplotlib and numpy. Can someone comment on that? I'm using: numpy At revision 7773. scipy At revision 6120. matplotlib At revision 7985. Xavier -- 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
Re: [Matplotlib-users] _path.so: undefined symbol: PyArray_API
Yes that was the bug. Please commit the fix. Xavier Revision 7985 contains a typo (see bug tracker). Try replace the string PY_ARRAYAUNIQUE_SYMBOL with PY_ARRAY_UNIQUE_SYMBOL in setupext.py. Christoph -- 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 -- 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
Re: [Matplotlib-users] quiver without any scaling
Hi, Well when you plot, imshow or whatever is matplotlib related, the axes do scale *automatically*. Why should it be different with quiver? I do reproduce your error with axis('tight') Xavier Hi Xavier (cc list), It may be a bug, however I do not know what the default behaviour 'should' be. You could do: lims = [-4, 4, -4, 4] axis(lims) after calling quiver to see the whole arrow. I did notice that calling axis('tight') threw the following error /Users/Damon/python/lib/matplotlib/axes.py:2038: UserWarning: Attempting to set identical xmin==xmax results in singular transformations; automatically expanding. xmin=1.0, xmax=1.0 warnings.warn('Attempting to set identical xmin==xmax results in singular transformations; automatically expanding. xmin=%s, xmax=%s'%(xmin, xmax)) /Users/Damon/python/lib/matplotlib/axes.py:2212: UserWarning: Attempting to set identical ymin==ymax results in singular transformations; automatically expanding. ymin=1.0, ymax=1.0 warnings.warn('Attempting to set identical ymin==ymax results in singular transformations; automatically expanding. ymin=%s, ymax=%s'%(ymin, ymax)) is this correct, or is it a bug? I'm using ipython -pylab with the MacOSX backend. I was expecting axis('tight') would scale the axes so I could see the whole arrow. Regards, -- Damon -- Damon McDougall Mathematics Institute University of Warwick Coventry CV4 7AL d.mcdoug...@warwick.ac.uk On 22 Nov 2009, at 21:34, Xavier Gnata wrote: Hi, RTFM...indeed it works. However, the axis do not scale accordingly: quiver([1],[1],[2],[2], angles='xy', scale_units='xy', scale=1) on a TkAgg backend produce a plot with: In [11]: axis() Out[11]: (0.94006, 1.0601, 0.94006, 1.0601) The display area scales the same way as it does using quiver([1],[1],[2],[2]) (without any other args). It looks like a bug. Xavier Hi Xavier, You can pass some handy keyword arguments to fix that. Use the following: quiver([1],[1],[1.2],[1.2], angles='xy', scale_units='xy', scale=1) Hope that helps :) Regards, -- Damon -- Damon McDougall Mathematics Institute University of Warwick Coventry CV4 7AL d.mcdoug...@warwick.ac.uk On 22 Nov 2009, at 16:37, Xavier Gnata wrote: Hi, I woud like to draw a vector field using pylab. quivert looks nice but it sould not scale the arrows to fit my use-case. quiver([1],[1],[1.2],[1.2]) does plot a nice arrow but the head of the arrow is not at (1.2,1.2). Is there a way to plot a list of arrows *without* any scaling? Xavier -- 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 -- 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
Re: [Matplotlib-users] quiver without any scaling
Hi, RTFM...indeed it works. However, the axis do not scale accordingly: quiver([1],[1],[2],[2], angles='xy', scale_units='xy', scale=1) on a TkAgg backend produce a plot with: In [11]: axis() Out[11]: (0.94006, 1.0601, 0.94006, 1.0601) The display area scales the same way as it does using quiver([1],[1],[2],[2]) (without any other args). It looks like a bug. Xavier Hi Xavier, You can pass some handy keyword arguments to fix that. Use the following: quiver([1],[1],[1.2],[1.2], angles='xy', scale_units='xy', scale=1) Hope that helps :) Regards, -- Damon -- Damon McDougall Mathematics Institute University of Warwick Coventry CV4 7AL d.mcdoug...@warwick.ac.uk On 22 Nov 2009, at 16:37, Xavier Gnata wrote: Hi, I woud like to draw a vector field using pylab. quivert looks nice but it sould not scale the arrows to fit my use-case. quiver([1],[1],[1.2],[1.2]) does plot a nice arrow but the head of the arrow is not at (1.2,1.2). Is there a way to plot a list of arrows *without* any scaling? Xavier -- 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 -- 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
Re: [Matplotlib-users] plot color as a function of values?
ax.plot(t[s=0],s[s=0],g) ax.plot(t[s0],s[s0],r) Whaou! That's what I call a nice pythonic syntax. XAvier Maybe a little shorter is the where() keyword, and even that can be omitted: ax.plot(t[where(s=0)],s[where(s=0)],g) ax.plot(t[where(s0)],s[where(s0)],r) or, shorter: ax.plot(t[s=0],s[s=0],g) ax.plot(t[s0],s[s0],r) cheers Thomas Xavier Gnata-2 wrote: Hi, Imagine you have something like: from pylab import * t = arange(0.0, 2.0, 0.01) s = sin(2*pi*t) ax = subplot(111) ax.plot(t, s) That's fine but now I would like to plot the negative parts of the curve in red and the positive one in green. Is there a nice pylab oriented way to do that? Some kind of conditional formating? Xavier -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plot color as a function of values?
Hi, Imagine you have something like: from pylab import * t = arange(0.0, 2.0, 0.01) s = sin(2*pi*t) ax = subplot(111) ax.plot(t, s) That's fine but now I would like to plot the negative parts of the curve in red and the positive one in green. Is there a nice pylab oriented way to do that? Some kind of conditional formating? Xavier -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] display pixels values on the backends
Hi, I have already asked about that but I'm back once again :) The way I use matplotlib may be a corner case: I'm often looking at large (4k x 4k) images and I do want to see the pixels values moving the mouse over the display. imshow does a great job but all the backend only display x= y=. I would love to see x= y= Z= (or value=...call it the way you want ;)) What is the best way to do that? imshow is great because there is nothing to connect to see x and y values on the backend. I need to code something as simple as imshow to get also the pixel values. The easiest way I can think of is to override Axes.format_coord method. A pseudo code might look like below def report_pixel(x, y): # get the pixel value v = get_pixel_value_of_your_image(x,y) return x=%f y=%f value=%f % (x, y, v) ax = gca() ax.format_coord = report_pixel The code will become more complicated if you want to support multiple images. This solution is far from elegant, but maybe the easiest one. -JJ Is there really on way to get that as a new option in imshow? at least in one of the backend (as a starting point) Best Regards, Xavier Thanks it does work but I still wonder why it is not an option in imshow Xavier -- 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] display pixels values on the backends
Hi, I have already asked about that but I'm back once again :) The way I use matplotlib may be a corner case: I'm often looking at large (4k x 4k) images and I do want to see the pixels values moving the mouse over the display. imshow does a great job but all the backend only display x= y=. I would love to see x= y= Z= (or value=...call it the way you want ;)) What is the best way to do that? imshow is great because there is nothing to connect to see x and y values on the backend. I need to code something as simple as imshow to get also the pixel values. Is there really on way to get that as a new option in imshow? at least in one of the backend (as a starting point) Best Regards, Xavier -- 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] How to play with colormas/Normalize
Hi, I'm trying to modify the imshow colormapping on the flight: http://matplotlib.sourceforge.net/api/colors_api.html?highlight=linearsegmentedcolormap#matplotlib.colors.Normalize Colormapping typically involves two steps: a data array is first mapped onto the range 0-1 using an instance of Normalize http://matplotlib.sourceforge.net/api/colors_api.html?highlight=linearsegmentedcolormap#matplotlib.colors.Normalize or of a subclass; then this number in the 0-1 range is mapped to a color using an instance of a subclass of Colormap http://matplotlib.sourceforge.net/api/colors_api.html?highlight=linearsegmentedcolormap#matplotlib.colors.Colormap How should I modify the way data array is first mapped onto the range 0-1? I would like to map all the values T1 to 0, all the valuesT1 to 1 and use an affine function to map all the others values into ]0,1[. In a more generic way, how should I modify the way the normalization step is http://matplotlib.sourceforge.net/api/colors_api.html?highlight=linearsegmentedcolormap#matplotlib.colors.Normalize performed? I could modify the values to be displayed but it is ugly. It is easy to modify the values of the second step of Colormapping: from pylab import * from numpy import * def G(i,j): return exp(-((i-100)**2+(j-100)**2)/50.) def cmap_xmap(function,cmapInput): cdict = cmapInput._segmentdata.copy() function_to_map = lambda x : (function(x[0]), x[1], x[2]) for key in ('red','green','blue'): cdict[key] = map(function_to_map, cdict[key]) cdict[key].sort() return matplotlib.colors.LinearSegmentedColormap('MyMap',cdict,1024) A=fromfunction(G,(200,200)) imshow(A,cmap=cmap_xmap(lambda x:x**60,get_cmap(hot))) but it does no help. Xavier -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x= / y= labels default format is wrong
ok. My bad! Sorry. I have changed the default to %1.4g so that is matches my usecases *but* I agree that correct way to improve it in not that trivial... You can control the point at which mpl falls over to scientific notation. From the matplotlibrc file (see http://matplotlib.sourceforge.net/users/customizing.html) axes.formatter.limits : -7, 7 # use scientific notation if log10 # of the axis range is smaller than the # first or larger than the second I'm actually surprised you are seeing problems with images of 1000x1000 -- it makes me suspect you have an older matplotlib version or an older matplotlibrc laying around because at -7,7, which is the current default, you should not see exponential formatting until you get to much larger sizes. JDH I have uncommented the axes.formatter.limits : -7, 7 line in my matplotlibrc. If have have understood the conclusion of this thread correctly, it should be taken info account quite soon, isn't it? Xavier -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x= / y= labels default format is wrong
Eric Firing wrote: Xavier Gnata wrote: ok. My bad! Sorry. I have changed the default to %1.4g so that is matches my usecases *but* I agree that correct way to improve it in not that trivial... You can control the point at which mpl falls over to scientific notation. From the matplotlibrc file (see http://matplotlib.sourceforge.net/users/customizing.html) axes.formatter.limits : -7, 7 # use scientific notation if log10 # of the axis range is smaller than the # first or larger than the second I'm actually surprised you are seeing problems with images of 1000x1000 -- it makes me suspect you have an older matplotlib version or an older matplotlibrc laying around because at -7,7, which is the current default, you should not see exponential formatting until you get to much larger sizes. JDH I have uncommented the axes.formatter.limits : -7, 7 line in my matplotlibrc. If have have understood the conclusion of this thread correctly, it should be taken info account quite soon, isn't it? It already *is* taken into account--just not where you want it to be. And I don't think it *should* be taken into account there. It is used for the *tick labels*. I don't think that locking the formatting of these to the *cursor readout* is the right thing to do. The solution to your problem involves improving the latter with *no change* to the former. I have just now committed a small change set that I think you will find sufficient improvement for the present, and that I hope no one else will find objectionable; but we will have to see how that turns out. It is possible that it will not play well on some backends/dpi/whatever, or under some other circumstances. As noted in the commit message, doing this right requires some changes in all the interactive backends. Eric Ok. Sorry for the conclusion. Your small change is sufficient for my usecase :). Thanks. I fully agree with you on the right way to really fix that problem; I think pylab is great also because I always get feedback on this mailing list. Xavier -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x= / y= labels default format is wrong
John Hunter wrote: On Sat, May 30, 2009 at 6:46 PM, Eric Firing efir...@hawaii.edu wrote: Possible, but I think there is a much better solution along the lines I suggested earlier. I have it partly implemented. To really do it right will require a little bit of work on all the interactive backends; it might be very little and very easy. It prompted my question starting another thread as to whether we can drop support for GTK 2.4 so as to simplify that backend. Sorry I forgot to answer -- I answered you in my mind wink. While I am never in favor of dropping support for l packages just because they are old, if they are impeding adding good functionality because it is too difficult to code/test against too many interfaces, then by all means yes, we can drop 2.4. I thnk we could safely drop 2.6. JDH Please do so. Xavier -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x= / y= labels default format is wrong
Eric Firing wrote: Xavier Gnata wrote: Right now, the default is very simple: def format_data_short(self,value): 'return a short formatted string representation of a number' return '%1.3g'%value It looks like changing it to something like %-12g would facilitate considerable improvement in reducing the jumping around of the numbers, as well as in providing much more precision. I think that 12 is the max number of characters in g conversion. Or maybe it is 13; I might not have tested negative numbers. The problem is that then it crowds out the other part of the message, the pan/zoom status notification etc. Breaking the message into two lines almost works (so far only checking with gtkagg), but the plot gets resized depending on whether there is a status or not. I think that with some more fiddling around with that part of the toolbar--probably including breaking the message up into separate messages for status and readout, and maybe making the readout use two lines and always be present--we could make the readout and status display much nicer. I have never liked the way it jumps around. I also agree. However, I would like to be sure I understand one point correctly: As long as x1000, the default format *is* an integer (at least when imshow(M) is used). No. Try imshow(rand(4,4)) There is nothing special about imshow that makes the cursor readout an integer, nor should there be. Again, the present default is %1.3g. I think we can and will do better, but it is not necessarily trivial. Eric ok. My bad! Sorry. I have changed the default to %1.4g so that is matches my usecases *but* I agree that correct way to improve it in not that trivial... Xavier -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x= / y= labels default format is wrong
John Hunter wrote: On Sat, May 30, 2009 at 11:52 AM, Eric Firing efir...@hawaii.edu wrote: No, that applies to the axis ticks but not to the readout, and I think it is the latter that Xavier is concerned with--at least that is what I have been talking about, and want to improve. Just to clarify -- by readout do you mean the toolbar strings? At first I was assuming that since the toolbar formatting picks up the tick Formatter to format the strings, and ScalarFormatter uses rcParams['axes.formatter.limits'] to determine when to fall over to scientific notation, that this setting would be picked up by the toolbar. The reason it does not is because ScalarFormatter overrides Formatter.format_data_short, which is what the toolbar uses via Axes.format_xdata/format_ydata, and ScalarFormatter.format_data_short does not use the formatter.limits setting. Are we at least on the same page now? If so, is it advisable/possible to make format_data_short respect the formatter.limits setting so Xavier can customize it to his heart's content. JDH ...and this way my brain and my heart would be fully satisfied :) Please perform this change ;) Xavier -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x= / y= labels default format is wrong
Indeed, but it should really be fixed in the svn. Xavier Hi Xavier, I had the same problem and fixed it by changing just two lines of code in the axes.py (line 1812 and 1814). Just change the formatter in 'self.xaxis.major.formatter.set_scientific(sb)' to whatever you want (the same for y). But it would really be great to see your proposal as a standard. Greetings, David Original-Nachricht Datum: Sun, 24 May 2009 19:15:18 +0200 Von: Xavier Gnata xavier.gn...@gmail.com An: matplotlib-users@lists.sourceforge.net Betreff: [Matplotlib-users] x= / y= labels default format is wrong Hello all, I routinely work with images sizes [1000,1000]. There is a slight annoying problem whatever the backend I use: Pixels coordinates default format is wrong. It does not make sense to display x=1.42e+03,y=1.92e+03. Pixels coordinates should be formated *by default* as integers. Would it be possible to fix that? Steps to reproduce: import numpy import pylab a=numpy.random.random((2000,2000)) pylab.imshow(a,interpolation='Nearest') Xavier -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://www.creativitycat.com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x= / y= labels default format is wrong
John Hunter wrote: On Fri, May 29, 2009 at 10:50 AM, Xavier Gnata xavier.gn...@gmail.com wrote: I had the same problem and fixed it by changing just two lines of code in the axes.py (line 1812 and 1814). Just change the formatter in 'self.xaxis.major.formatter.set_scientific(sb)' to whatever you want (the same for y). You don't need to modify the internals of axes.py -- just set the formatter on the axes instance itself. http://matplotlib.sourceforge.net/search.html?q=codex+set_major_formatter Indeed, but it should really be fixed in the svn. We could perhaps be a little smarter about this, but consider that one can easily plot lines over images In [30]: imshow(np.random.rand(512,512)) Out[30]: matplotlib.image.AxesImage object at 0x151c4f4c In [31]: plot(np.arange(512), np.arange(512)) Since the plot can be a mix of images, polygons, lines, etc, it is not obvious that the formatter should be int. We could trap the case where you have only an image, no other data, and haven't set the extent, but it would be complicated because you may add data to the plot later and we would have to track that we had attempted to be clever but we should now undo our cleverness. Our general philosophy is to make is easy for you to customize when the default behavior doesn't suit you, so try import matplotlib.ticker as ticker ax.xaxis.set_major_formatter(ticker.FormatStrFormatter('%d')) .. and ditto for yaxis .. in addition to the ticks, you can customize how the coords appear in the toolbar by setting ax.fmt_xdata = ticker.FormatStrFormatter('%d') ... and ditto for fmt_ydata There are a variety of formatters available http://matplotlib.sourceforge.net/api/ticker_api.html JDH Hi John, Ok, well; the way I use pylab may be a corner case ;) However, everyone would be happy if the default format would be consistent : As it is, *by default*, when 1000 it displays an int and after 1000 it displays 1.42e3. Why? What do you think this scientific format is a good for? I understand some users would like to see floats by default. Some other users would like to see integers by default. I'm fine with integers or floats by default (I don't cadre) but I don't get the logic of the scientific format. I only would like to see all the digits of the integer parts. I would be fine if I would get 1.422e3 instead of 1.42e3 (we could for instance assume that images larger than (100 000, 100 000) are really a corner case ;)). Why should be the *default* logic so strange? Ok, it is easy to change but the default should at least make sense. As it is, I don't think it does...but there could be a good rational I'm missing. pylab is so easy and fun to use because the default settings are always the best one. IMHO, there is one exception :( Xavier -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x= / y= labels default format is wrong
However, everyone would be happy if the default format would be consistent : As it is, *by default*, when 1000 it displays an int and after 1000 it displays 1.42e3. Why? What do you think this scientific format is a good for? I understand some users would like to see floats by default. Some other users would like to see integers by default. It is not just a matter of integer versus float; the formatting algorithm must accomodate both. I agree. I'm fine with integers or floats by default (I don't cadre) but I don't get the logic of the scientific format. I only would like to see all the digits of the integer parts. I would be fine if I would get 1.422e3 instead of 1.42e3 (we could for instance assume that images larger than (100 000, 100 000) are really a corner case ;)). Why should be the *default* logic so strange? Ok, it is easy to change but the default should at least make sense. As it is, I don't think it does...but there could be a good rational I'm missing. Right now, the default is very simple: def format_data_short(self,value): 'return a short formatted string representation of a number' return '%1.3g'%value It looks like changing it to something like %-12g would facilitate considerable improvement in reducing the jumping around of the numbers, as well as in providing much more precision. I think that 12 is the max number of characters in g conversion. Or maybe it is 13; I might not have tested negative numbers. The problem is that then it crowds out the other part of the message, the pan/zoom status notification etc. Breaking the message into two lines almost works (so far only checking with gtkagg), but the plot gets resized depending on whether there is a status or not. I think that with some more fiddling around with that part of the toolbar--probably including breaking the message up into separate messages for status and readout, and maybe making the readout use two lines and always be present--we could make the readout and status display much nicer. I have never liked the way it jumps around. I also agree. However, I would like to be sure I understand one point correctly: As long as x1000, the default format *is* an integer (at least when imshow(M) is used). Fine for me. Why do we need to move to another *default* format for numbers larger than 1000? Anyhow, I think that we should at least always display all the digits of the integer part of the coordinates. BTW, ax.xaxis.set_major_formatter(ticker.FormatStrFormatter('%d')) is fine but it prevents you to do a simple imshow(M) to look at your data. You have to create ax. Easy...yes...but not as simple/nice as the one-liner imhow(M) Xavier Eric pylab is so easy and fun to use because the default settings are always the best one. IMHO, there is one exception :( Xavier -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] x= / y= labels default format is wrong
Hello all, I routinely work with images sizes [1000,1000]. There is a slight annoying problem whatever the backend I use: Pixels coordinates default format is wrong. It does not make sense to display x=1.42e+03,y=1.92e+03. Pixels coordinates should be formated *by default* as integers. Would it be possible to fix that? Steps to reproduce: import numpy import pylab a=numpy.random.random((2000,2000)) pylab.imshow(a,interpolation='Nearest') Xavier -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://www.creativitycat.com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] revision 7064 compile bug :
Hi, I'm trying to compile revision 7064 on a fresh kubuntu 9.04 I get this error: g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functionsbuild/temp.linux-x86_64-2.6/src/agg_py_transforms.o build/temp.linux-x86_64-2.6/src/_gtkagg.obuild/temp.linux-x86_64-2.6/src/mplutils.o build/temp.linux-x86_64-2.6/CXX/IndirectPythonInterface.o build/temp.linux-x86_64-2.6/CXX/cxx_extensions.o build/temp.linux-x86_64-2.6/CXX/cxxsupport.o build/temp.linux-x86_64-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -lstdc++ -lm -lfreetype -lz-lstdc++ -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -o build/lib.linux-x86_64-2.6/matplotlib/backends/_gtkagg.so /usr/bin/ld: cannot find -lz-lstdc++ collect2: ld returned 1 exit status -lz-lstdc++ ?? Should it be -lz -lstdc++ (with one space...) Looks like something is broken...but I'm not sure it is a matplotlib or a kubuntu bug If someone have a clue...please tell me :) Xavier -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;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] PyQt integration problem with the Navigation Toolbar
Hello, I have a demo application integrating a dynamic mpl plot into a PyQt GUI. The plot is dynamic in the sense that the user can manipulate it through the use of the GUI's (PyQt) widgets and controls. The code is in: http://eli.thegreenplace.net/files/prog_code/qt_mpl_bars.py.txt Now, I have a slight problem. When the plot is zoomed with the toolbar's standard zoom to rectangle tool, and then the window is switched in an out of focus, the zoom level disappears and the plot comes bac k to home mode. How can I make it persist? Can I somehow query the zoom state of the plot and restore it? Thanks Eli Ok so at least you can reproduce with bug ;) Maybe we should ask matplolib to render into a buffer widget...but I not sure. However, I'm pretty sure we should not call matplotlib on every draw event. Any ideas?? Xavier -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to get the coordinates (picker)
Christopher Brown wrote: Hi Xavier, XG I'm trying to write a pyqt4 application including pylab plotting XG capabilities. XG Up to now, it looks like this (see in attachment). XG XG The picker works fine (I get the msg) *but* I also would like to get XG the (x,y) coordinates and the the corresponding value A[x,y]. XG Could someone tell me what I should do in on_pick with this event XG to get these data?? XG XG Xavier This works for me: def on_pick(self, event): tt = event.artist.get_axes() mouseevent = event.mouseevent msg = X is: + str(mouseevent.xdata) + \nY is: + str(mouseevent.ydata) QMessageBox.information(self, Click!, msg) I got some good tips on how to do this from examples/event_handling/pick_event_demo.py Thanks!! It works just fine :). IDL is dead. Qt4 python and numpy/scipy/numpy are great tools. Xavier -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to get the coordinates (picker)
http://eli.thegreenplace.net/2009/01/20/matplotlib-with-pyqt-guis/ Once you have seen this example (+the picking), you are able do whatever you want ;) You have python, you have the best toolkit I konw (qt4 with qtdesigner) and you have a very nice way to plot 2D data. What else ;) Xavier I hope to see the project on the web. I'm very intersting by simple examples using mpl with PyQt. Christophe I got some good tips on how to do this from examples/event_handling/pick_event_demo.py Thanks!! It works just fine :). IDL is dead. Qt4 python and numpy/scipy/numpy are great tools. Thanks! You may also want to check out the event handling and picking tutorial at http://matplotlib.sourceforge.net/users/event_handling.html JDH -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to get the coordinates (picker)
Hi, I'm trying to write a pyqt4 application including pylab plotting capabilities. Up to now, it looks like this (see in attachment). The picker works fine (I get the msg) *but* I also would like to get the (x,y) coordinates and the the corresponding value A[x,y]. Could someone tell me what I should do in on_pick with this event to get these data?? Xavier #!/usr/bin/python Derived from a code from Eli Bendersky (eli...@gmail.com) License: this code is in the public domain import sys, os, random from PyQt4.QtCore import * from PyQt4.QtGui import * import matplotlib from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar from matplotlib.figure import Figure from scipy import * class AppForm(QMainWindow): def __init__(self, parent=None): QMainWindow.__init__(self, parent) self.setWindowTitle('Demo: PyQt with matplotlib') self.create_main_frame() self.A=rand(100,100) self.on_draw() def on_pick(self, event): tt = event.artist.get_axes() msg = You've clicked QMessageBox.information(self, Click!, msg) def on_draw(self): Redraws the figure str = unicode(self.textbox.text()) self.data = map(int, str.split()) self.axes.clear() self.axes.imshow(self.A,interpolation='nearest',picker=5) self.canvas.draw() def create_main_frame(self): self.main_frame = QWidget() self.dpi = 100 self.fig = Figure((5.0, 4.0), dpi=self.dpi) self.canvas = FigureCanvas(self.fig) self.canvas.setParent(self.main_frame) self.axes = self.fig.add_subplot(111) self.canvas.mpl_connect('pick_event', self.on_pick) self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame) self.textbox = QLineEdit() self.textbox.setMinimumWidth(200) self.connect(self.textbox, SIGNAL('editingFinished ()'), self.on_draw) self.draw_button = QPushButton(Draw) self.connect(self.draw_button, SIGNAL('clicked()'), self.on_draw) hbox = QHBoxLayout() for w in [self.textbox,self.draw_button]: hbox.addWidget(w) hbox.setAlignment(w, Qt.AlignVCenter) vbox = QVBoxLayout() vbox.addWidget(self.canvas) vbox.addWidget(self.mpl_toolbar) vbox.addLayout(hbox) self.main_frame.setLayout(vbox) self.setCentralWidget(self.main_frame) def main(): app = QApplication(sys.argv) form = AppForm() form.show() app.exec_() if __name__ == __main__: main() -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] pylab or not... crashes or not
John Hunter wrote: On Mon, Dec 1, 2008 at 1:08 PM, Eric Emsellem [EMAIL PROTECTED] wrote: Hi this may be a known problem (didn't find anything on this issue) but here it is: - when I start a session with ipython -pylab I often get crashes with my session. When I mean often, it means really often like once everything 1/2h or so. A crash means that the command I just sent gets stuck and the only way for me to get it back is to kill the PID of the ipython process... The problem is that it is almost impossible to reproduce a systematic behaviour there so I cannot really send you a list of commands which results in a crash. It just happens (often). However, after someone suggested it, I now enter Ipython by a simple ipython and do immediately from pylab import *. And then I have NO crashes whatsoever. any suggestion there? Is that normal? It is definitely not normal -- it almost never happens to me. Does it help if you run TkAgg instead of GTKAgg. Are you importing/using anything else when this is happening? What version of numpy are you running? Well I never use ipython -pylab and always use tkagg. It could be a race in the way ipython manage to do that: http://ipython.scipy.org/moin/Cookbook/InterruptingThreads What version of ipython are you using? Xavier - 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] ANN: matplotlib website 1.0
ok. It is way better now but still: http://validator.w3.org/check?uri=http%3A%2F%2Fmatplotlib.sourceforge.net%2Fcharset=(detect+automatically)doctype=Inlinegroup=0 hum I should spend some time on this because: http://validator.w3.org/check?uri=http%3A%2F%2Fmatplotlib.sourceforge.net%2Fgallery.htmlcharset=(detect+automatically)doctype=Inlinegroup=0user-agent=W3C_Validator%2F1.591 but this gallery is so nice... Xavier This has now been fixed in SVN. index.html is the only page that includes hand-written HTML. If you see any errors of this nature on other pages, please file bugs with Sphinx and/or docutils. Cheers, Mike Xavier Gnata wrote: Looks great but there are too many errors: http://validator.w3.org/check?uri=http%3A%2F%2Fmatplotlib.sourceforge.net%2Fcharset=(detect+automatically)doctype=Inlinegroup=0 I'm not a geek and I do not care about w3c small warnings but it would be so nice to have a xhtml compliant website (as close as possible) From an artistic point of view, I would put more emphasis on the screenshot (pylab purpose is to produce *very* nice images...) xavier We've been working behind the scenes on a new documentation system for matplotlib, which integrates the web site, API documentation and PDF guide into a single source of sphinx/rest documents which are easier to maintain and extend, hopefully leading to better and more up-to-date docs. We went live with the new site yesterday: http://matplotlib.sf.net so check it out and let us know if something is broken or missing. We don't have everything that was on the old site (some stuff from the FAQ, what's new and user's guide has not been ported over) but we do have should be current, searchable, indexed and cross-linked. Thanks to Darren Dale who spear-headed the effort to use the sphinx documentation, and to the developers who have contributed, especially Michael Droettboom, who has developed several nice sphinx extensions to do inheritance diagrams, syntax highlighting of ipython sessions, and inline plotting. As an example we can include plots in our API documentation, see http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.acorr We embed these plots with a plot directive that generates the figures from external code at documentation build time, which guarantees that the example code you see in the docs generate the figures you see in the docs. For example, in the acorr docstring, all we have to do is:: **Example:** .. plot:: ../mpl_examples/pylab_examples/xcorr_demo.py and the figure and source code links automagically appear in the docs. Because some of these extensions are generally useful, Michael, Fernando and I have been working on a sphinx_template which contains the template of a sphinx documentation project with these extensions in place, so people who want to get started using sphinx (the official documentation system for python, numpy, ipython and matplotlib) can do so more easily. Right now it is available in svn svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/py4science/examples/sphinx_template2 and see the README in the checkout directory. Michael also did a talk on matplotlib's use of sphinx and the sphinx template at the last scipy conference. We're still waiting for the videos of the talks to be posted (can someone poke someone?) but you can see the talk PDF from the proceedings here: http://conference.scipy.org/proceedings/SciPy2008/paper_6/ JDH - 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 - 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 - 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
Re: [Matplotlib-users] ANN: matplotlib website 1.0
Looks great but there are too many errors: http://validator.w3.org/check?uri=http%3A%2F%2Fmatplotlib.sourceforge.net%2Fcharset=(detect+automatically)doctype=Inlinegroup=0 I'm not a geek and I do not care about w3c small warnings but it would be so nice to have a xhtml compliant website (as close as possible) From an artistic point of view, I would put more emphasis on the screenshot (pylab purpose is to produce *very* nice images...) xavier We've been working behind the scenes on a new documentation system for matplotlib, which integrates the web site, API documentation and PDF guide into a single source of sphinx/rest documents which are easier to maintain and extend, hopefully leading to better and more up-to-date docs. We went live with the new site yesterday: http://matplotlib.sf.net so check it out and let us know if something is broken or missing. We don't have everything that was on the old site (some stuff from the FAQ, what's new and user's guide has not been ported over) but we do have should be current, searchable, indexed and cross-linked. Thanks to Darren Dale who spear-headed the effort to use the sphinx documentation, and to the developers who have contributed, especially Michael Droettboom, who has developed several nice sphinx extensions to do inheritance diagrams, syntax highlighting of ipython sessions, and inline plotting. As an example we can include plots in our API documentation, see http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.acorr We embed these plots with a plot directive that generates the figures from external code at documentation build time, which guarantees that the example code you see in the docs generate the figures you see in the docs. For example, in the acorr docstring, all we have to do is:: **Example:** .. plot:: ../mpl_examples/pylab_examples/xcorr_demo.py and the figure and source code links automagically appear in the docs. Because some of these extensions are generally useful, Michael, Fernando and I have been working on a sphinx_template which contains the template of a sphinx documentation project with these extensions in place, so people who want to get started using sphinx (the official documentation system for python, numpy, ipython and matplotlib) can do so more easily. Right now it is available in svn svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/py4science/examples/sphinx_template2 and see the README in the checkout directory. Michael also did a talk on matplotlib's use of sphinx and the sphinx template at the last scipy conference. We're still waiting for the videos of the talks to be posted (can someone poke someone?) but you can see the talk PDF from the proceedings here: http://conference.scipy.org/proceedings/SciPy2008/paper_6/ JDH - 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 - 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] imshow + pixels values
Hi, I can do everything I want with pylab (and even more :) ). I'm only missing one thing: I really would like to have one more option in imshow to get the pixel value of the pixel pointed by the cursor. The backends are showing X qnd Y coordinates. It is fine but I need also to look at the pixels values (before dooing computations thanks to scipy). I know how to get the pixels values but I do not know how to print them at the bottom right of the backend (on the same line as the X,Y pixel number). Is there a way to do that using the tk backend for instance? If there is a way, would you consider a new boolean option in imshow to trigger this new behavior (of course, the default must be 'false' to prevent us to brake things..) Any comment would be very much appreciated :) Xavier - 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] pickup pixels values
Hi, What is the best way to get the pixels values in addition to the pixel numbers when moving the mouse on on imhow display? It could be either on the fly (would be great) or on click. best way here means that the code can be quite complex but that it should be as simple as imshow from the end user point of view. I'm using TkAgg. Xavier - 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] ttconv/truetype.h compile error using gcc-4.3
Hi, Using gcc-4.3 I get this error : tconv/truetype.h:50: error: ISO C++ forbids declaration of ‘FILE’ with no type #include stdio.h is missing. Xavier - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib/__init__.py : gs version parsing problem
Darren Dale wrote: On Friday 16 November 2007 10:28:25 am Xavier Gnata wrote: Hi, Quoting matplotlib/__init__.py : def checkdep_ghostscript(): try: if sys.platform == 'win32': command = 'gswin32c -v' else: command = 'gs -v' stdin, stdout = os.popen4(command) line = stdout.readlines()[0] v = line.split()[2] vtest = '.'.join(v.split('.')[:2]) # deal with version numbers like '7.07.1' float(vtest) return vtest except (IndexError, ValueError): return None It fails on debian sid because 'gs -v' returns GPL Ghostscript SVN PRE-RELEASE 8.61 (2007-08-02)\n Anyway, the parser will be ugly because it has to deal with version numbers like '7.07.1'. Should I propose a trivial patch to get thinks working on debian sid ? Xavier ps :Why is there no standard way (like -v or --version) on *unix to get the version *number*?? Only the version number. Why :( This was fixed a while back in svn, but thanks for the report. It turns out that --version does return only the version number. Darren Unfortunately, I'm not able to get the svn version working : imshow always fails : /usr/lib/python2.4/site-packages/matplotlib/pyplot.py in imshow(*args, **kwargs) 1673 hold(h) 1674 try: - 1675 ret = gca().imshow(*args, **kwargs) 1676 draw_if_interactive() 1677 except: /usr/lib/python2.4/site-packages/matplotlib/axes.py in imshow(self, X, cmap, norm, aspect, interpolation, alpha, vmin, vmax, origin, extent, shape, filternorm, filterrad, imlim, **kwargs) 4435 im.autoscale_None() 4436 - 4437 xmin, xmax, ymin, ymax = im.get_extent() 4438 4439 corners = (xmin, ymin), (xmax, ymax) /usr/lib/python2.4/site-packages/matplotlib/image.py in get_extent(self) 286 sz = self.get_size() 287 #print 'sz', sz -- 288 numrows, numcols = sz 289 if self.origin == 'upper': 290 return (-0.5, numcols-0.5, numrows-0.5, -0.5) ValueError: need more than 1 value to unpack but it is another topic. Xavier. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] matplotlib/__init__.py : gs version parsing problem
Hi, Quoting matplotlib/__init__.py : def checkdep_ghostscript(): try: if sys.platform == 'win32': command = 'gswin32c -v' else: command = 'gs -v' stdin, stdout = os.popen4(command) line = stdout.readlines()[0] v = line.split()[2] vtest = '.'.join(v.split('.')[:2]) # deal with version numbers like '7.07.1' float(vtest) return vtest except (IndexError, ValueError): return None It fails on debian sid because 'gs -v' returns GPL Ghostscript SVN PRE-RELEASE 8.61 (2007-08-02)\n Anyway, the parser will be ugly because it has to deal with version numbers like '7.07.1'. Should I propose a trivial patch to get thinks working on debian sid ? Xavier ps :Why is there no standard way (like -v or --version) on *unix to get the version *number*?? Only the version number. Why :( -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to set the colorbar ticks fontsize.
Eric Firing wrote: Xavier Gnata wrote: Hi all, I looking for a way to modify the colorbar ticks font size. a=rand(100,100) imshow(a) colorbar() and then?? For instance, xticks(fontsize=20) works well to modify the ticks fontsize along the X-axis but colorbar(fontsize=20) does not exists. I must be missing something. cb = colorbar() # grab the Colorbar instance for t in cb.ax.get_yticklabels(): t.set_fontsize(20) The colorbar function makes a new axes object, the ax attribute of the Colorbar instance returned by the colorbar function. From that you get the list of text objects, which you then modify. The pylab xticks and yticks functions make the retrieval and modification of the text objects easier, but they operate only on the current axes, and the colorbar leaves the image axes as current. An alternative method is to change the current axes: imaxes = gca() axes(cb.ax) yticks(fontsize=20) axes(imaxes) Here I saved and restored the original axes in case you want to do something with the image axes after modifying the colorbar. Eric Hi, Your first method is not working on my box (no change) but the second one is just fine :) However, it is not as intuitive as other matplotlib ways of doing things. Is there a simple way to modify the colorbar code to get something like colorbar(fontsize=20) work ? Or maybe as a method like that : cb=colorbar() cb.set_fontsize(20) Any comments ? Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to set the colorbar ticks fontsize.
Hi all, I looking for a way to modify the colorbar ticks font size. a=rand(100,100) imshow(a) colorbar() and then?? For instance, xticks(fontsize=20) works well to modify the ticks fontsize along the X-axis but colorbar(fontsize=20) does not exists. I must be missing something. Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] imshow : text.py broken?
Hi, I do not know if we should post bug reports against matplotlib svn. Please tell us. Anyway, imshow is now fully broken this way : imshow(ones((100,100))) /usr/lib/python2.4/site-packages/matplotlib/pylab.py in imshow(*args, **kwargs) 1960 try: 1961 ret = gca().imshow(*args, **kwargs) - 1962 draw_if_interactive() 1963 except: 1964 hold(b) /usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py in draw_if_interactive() 56 figManager = Gcf.get_active() 57 if figManager is not None: --- 58 figManager.show() 59 60 /usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py in show(self) 350 if sys.platform=='win32' : self.window.update() 351 else: -- 352 self.canvas.draw() 353 self._shown = True 354 /usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py in draw(self) 189 190 def draw(self): -- 191 FigureCanvasAgg.draw(self) 192 tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2) 193 self._master.update_idletasks() /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py in draw(self) 381 382 self.renderer = self.get_renderer() -- 383 self.figure.draw(self.renderer) 384 385 def get_renderer(self): /usr/lib/python2.4/site-packages/matplotlib/figure.py in draw(self, renderer) 610 611 # render the axes -- 612 for a in self.axes: a.draw(renderer) 613 614 # render the figure text /usr/lib/python2.4/site-packages/matplotlib/axes.py in draw(self, renderer, inframe) 1336 1337 for zorder, i, a in dsu: - 1338 a.draw(renderer) 1339 1340 self.transData.thaw() # release the lazy objects /usr/lib/python2.4/site-packages/matplotlib/axis.py in draw(self, renderer, *args, **kwargs) 588 tick.set_label1(label) 589 tick.set_label2(label) -- 590 tick.draw(renderer) 591 if tick.label1On and tick.label1.get_visible(): 592 extent = tick.label1.get_window_extent(renderer) /usr/lib/python2.4/site-packages/matplotlib/axis.py in draw(self, renderer) 168 if self.tick2On: self.tick2line.draw(renderer) 169 -- 170 if self.label1On: self.label1.draw(renderer) 171 if self.label2On: self.label2.draw(renderer) 172 /usr/lib/python2.4/site-packages/matplotlib/text.py in draw(self, renderer) 773 def draw(self, renderer): 774 self.update_coords(renderer) -- 775 Text.draw(self, renderer) 776 if self.get_dashlength() 0.0: 777 self.dashline.draw(renderer) /usr/lib/python2.4/site-packages/matplotlib/text.py in draw(self, renderer) 315 angle = self.get_rotation() 316 -- 317 bbox, info = self._get_layout(renderer) 318 trans = self.get_transform() 319 if rcParams['text.usetex']: /usr/lib/python2.4/site-packages/matplotlib/text.py in _get_layout(self, renderer) 198 baseline = None 199 for line in lines: -- 200 w, h, d = renderer.get_text_width_height_descent( 201 line, self._fontproperties, ismath=self.is_math_text(line)) 202 if baseline is None: ValueError: need more than 2 values to unpack I have tried both Tk and GTKagg backends with the same result. Xavier. -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Broken qt backend.
Darren Dale wrote: On Sunday 12 August 2007 07:05:38 pm Xavier Gnata wrote: OK my matplotlibrc was out of date. Now it works but I have found another but playing with the sliders of the backend: As the log is quite long, here are only the most relevant parts : [...] It looks like that the ranges of the sliders are checked in a wrong way. It may be due to numerical rounding issues. Unfortunately I have my hands full at work, so I don't know when I will be able to look into this. I would need more information before I could start anyway: a simple script and a list of steps that reproduces the problem, and does it only occur with the qt4 backend. Darren Using Qt4Agg as backend : import pylab pylab.plot([1,2]) Then click on the subplot configuration tool Move the left slider to the right end on the slider. Python crashes because : ValueError: left cannot be = right Using the TkAgg backend, I'm not able to reporduce the bug because it is not possbile to move the sliders to get left=right (so there is no bug here :)) I had a quick look to the code and it looks like it is quite simple to fix that adding in backend_qt4.py a logic like: if left=right: left=right-right/1000. The main problem is that I'm not sure to add this fix at the best place in the code. Could someone else have a look? Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Broken qt backend.
Darren Dale wrote: On Tuesday 14 August 2007 09:14:54 am Xavier Gnata wrote: Darren Dale wrote: On Sunday 12 August 2007 07:05:38 pm Xavier Gnata wrote: OK my matplotlibrc was out of date. Now it works but I have found another but playing with the sliders of the backend: As the log is quite long, here are only the most relevant parts : [...] It looks like that the ranges of the sliders are checked in a wrong way. It may be due to numerical rounding issues. Unfortunately I have my hands full at work, so I don't know when I will be able to look into this. I would need more information before I could start anyway: a simple script and a list of steps that reproduces the problem, and does it only occur with the qt4 backend. Darren Using Qt4Agg as backend : import pylab pylab.plot([1,2]) Then click on the subplot configuration tool Move the left slider to the right end on the slider. Python crashes because : ValueError: left cannot be = right Using the TkAgg backend, I'm not able to reporduce the bug because it is not possbile to move the sliders to get left=right (so there is no bug here :)) I had a quick look to the code and it looks like it is quite simple to fix that adding in backend_qt4.py a logic like: if left=right: left=right-right/1000. The main problem is that I'm not sure to add this fix at the best place in the code. This should be fixed in svn 3709. Thank you for the report and the suggested fix. In the future, please try to provide a little more context for your patch, the file is 550 lines long. Darren It is fixed. Thanks. Xavier ps : I only provide developers with real unified diffs when I'm able to produce them ;) -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Broken qt backend.
Darren Dale wrote: On Saturday 11 August 2007 8:15:41 am Xavier Gnata wrote: Hi, Using pylab svn, the qt backend is broken. import pylab fails : /usr/lib/python2.4/site-packages/matplotlib/backends/backend_qtagg.py 11 12 from backend_agg import FigureCanvasAgg --- 13 from backend_qt import qt, FigureManagerQT, FigureCanvasQT,\ 14 show, draw_if_interactive, backend_version, \ 15 NavigationToolbar2QT /usr/lib/python2.4/site-packages/matplotlib/backends/backend_qt.py 15 from matplotlib.widgets import SubplotTool 16 --- 17 import qt 18 19 backend_version = 0.9.1 ImportError: No module named qt That means you dont have PyQt-3 installed on your machine. If I replace import qt by import PyQt4 dont! , I get another error : If you want to use PyQt4, you should set your backend to qt4agg instead of qtagg. OK my matplotlibrc was out of date. Now it works but I have found another but playing with the sliders of the backend: As the log is quite long, here are only the most relevant parts : imshow(a) Out[7]: matplotlib.image.AxesImage instance at 0xb262a8cc (play with the sliders of the qt4agg backend) In [8]: --- exceptions.ValueErrorPython 2.4.4: /usr/bin/python Mon Aug 13 00:58:56 2007 A problem occured executing Python code. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call last. /usr/lib/python2.4/site-packages/matplotlib/backends/backend_qt4.py in funcleft(self=matplotlib.backends.backend_qt4.SubplotToolQt object, val=900) /usr/lib/python2.4/site-packages/matplotlib/figure.py in update(self=matplotlib.figure.SubplotParams instance, left=0.90002, bottom=None, right=None, top=None, wspace=None, hspace=None) 71 self._update_this('top', top) 72 self._update_this('wspace', wspace) 73 self._update_this('hspace', hspace) 74 75 def reset(): 76 self.left = thisleft 77 self.right = thisright 78 self.top = thistop 79 self.bottom = thisbottom 80 self.wspace = thiswspace 81 self.hspace = thishspace 82 83 if self.validate: 84 if self.left=self.right: 85 reset() --- 86 raise ValueError('left cannot be = right') global ValueError = undefined 87 88 if self.bottom=self.top: 89 reset() 90 raise ValueError('bottom cannot be = top') 91 92 93 94 def _update_this(self, s, val): 95 if val is None: 96 val = getattr(self, s, None) 97 if val is None: 98 key = 'figure.subplot.' + s 99 val = rcParams[key] 100 101 setattr(self, s, val) ValueError: left cannot be = right ** Oops, IPython crashed. We do our best to make it stable, but... It looks like that the ranges of the sliders are checked in a wrong way. It may be due to numerical rounding issues. Xavier - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Broken qt backend.
Hi, Using pylab svn, the qt backend is broken. import pylab fails : /usr/lib/python2.4/site-packages/matplotlib/backends/backend_qtagg.py 11 12 from backend_agg import FigureCanvasAgg --- 13 from backend_qt import qt, FigureManagerQT, FigureCanvasQT,\ 14 show, draw_if_interactive, backend_version, \ 15 NavigationToolbar2QT /usr/lib/python2.4/site-packages/matplotlib/backends/backend_qt.py 15 from matplotlib.widgets import SubplotTool 16 --- 17 import qt 18 19 backend_version = 0.9.1 ImportError: No module named qt If I replace import qt by import PyQt4, I get another error : /usr/lib/python2.4/site-packages/matplotlib/backends/backend_qt.py 22 DEBUG = False 23 --- 24 cursord = { 25 cursors.MOVE : qt.Qt.PointingHandCursor, 26 cursors.HAND : qt.Qt.WaitCursor, It is a well known problem ? What could I do to help to debug that? Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] tk, pylab and unicode
ok look like a missing font on my box. Will see... Xavier I installed the necessary stuff in my LaTeX installation from here: http://www.unruh.de/DniQ/latex/unicode/ and it's now working even when usetex is on. It would be great to figure out why it's broken for you. Do you get any error output from LaTeX? Cheers, Mike Michael Droettboom wrote: I should clarify, I have this working with the TkAgg backend and text.usetex : False. If text.usetex : True, I can't confirm or deny whether that works since I don't have a proper LaTeX ucs.sty setup here to test with. As an aside, if you're looking to Gtk as a way around this, the Gtk backend uses the same rendering pipeline for text when text.usetex is True, so it likely will produce the same result. Cheers, Mie Michael Droettboom wrote: Xavier Gnata wrote: With a = ué I get no error but also nothing as a title. No strange characters. Nothing. This is working for me with the latest svn version, as well as 0.90.1, on Linux with Python 2.5 and Tcl/Tk 8.4. There are other things that could be going wrong. The encoding of your terminal may not match your default encoding in your Python interpreter. If you're using Linux, can you please send the output of: locale python -c import locale; print locale.getpreferredencoding() If all is working correctly, you should get the following in your python interpreter: a = ué ord(a) 233 If you're using an editor (i.e. not using pylab interactively), you'll need to make sure that it is outputting in the correct encoding, and respecting the # -*- coding: utf-8 -*- line. Recent versions of emacs do this, but I can't really speak for others. I have attached a test script that works for me. It even includes some Greek characters as Unicode which work if you select a Unicode font with those characters. Cheers, Mike - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] tk, pylab and unicode
Hello, I'm a french user and I'm trying to put an 'é' into a pylab title. My locales and fully utf-8 and the code is the following under ipthon: import pylab a=é pylab.plot([1]) pylab.title(a) raises the error : UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) Is it a bug or a I doing something wrong? I'm using up to date pylab svn with the tk backend. The prolem is that only the tk backend is fully functionnal on my box. HTe gtk one never shows the buttons (debian up to date sid). Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] tk, pylab and unicode
Ok it is a bug because matplotlib.rc('text',usetex=False) and then it works. But is always fails using matplotlib.rc('text',usetex=True)...side effect... Xavier Hello, I'm a french user and I'm trying to put an 'é' into a pylab title. My locales and fully utf-8 and the code is the following under ipthon: import pylab a=é pylab.plot([1]) pylab.title(a) raises the error : UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) Is it a bug or a I doing something wrong? I'm using up to date pylab svn with the tk backend. The prolem is that only the tk backend is fully functionnal on my box. HTe gtk one never shows the buttons (debian up to date sid). Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] tk, pylab and unicode
Jouni K. Seppänen wrote: Xavier Gnata [EMAIL PROTECTED] writes: I'm a french user and I'm trying to put an 'é' into a pylab title. Ok it is a bug because matplotlib.rc('text',usetex=False) and then it works. But is always fails using matplotlib.rc('text',usetex=True) As a workaround, does \'e (as in rf\'evrier) work with usetex=True? yes it does! Latex just works but using usetex=True there is a side effect preventing utf8 to work in a correct way. Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] tk, pylab and unicode
Hello, I'm a french user and I'm trying to put an 'é' into a pylab title. My locales and fully utf-8 and the code is the following under ipthon: import pylab a=é pylab.plot([1]) pylab.title(a) raises the error : UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) Have you tried using a Unicode string as input? e.g. a = ué That works for me, though it stops at the LaTeX step because I'm missing some LaTeX packages. Is it a bug or a I doing something wrong? I'm using up to date pylab svn with the tk backend. The prolem is that only the tk backend is fully functionnal on my box. HTe gtk one never shows the buttons (debian up to date sid). The Tk backend is treating your input string as Latin-1, not UCS, which is the same for codepoints 255, so you got lucky. There are probably a few of these encoding bugs in various backends that should probably be worked through. Cheers, Mike With a = ué I get no error but also nothing as a title. No strange characters. Nothing. Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] GTKbackend : nothing but gray.
Hi, I'm a TkAgg user because it is the only backend which is usable on my box. This only pb if that this backend is not UTF8 compatible :( GtkAgg looks even better but when I tried plot([1,2]) I'm only get a gray window with nothing on it. No plot. No buttons. I have no time for now to try to fix that but if someone wants me to test something to help to fix this problem... Xavier ps : I'm using interactive True and ipython on an up to date debian sid. -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] -Wstrict-prototypes option should not be added
Hi, It would be great to be able to compile matplotlib without a warning :) Unfortunately, I was not able to fix this warning performing a simple grep into the sources: cc1plus: warning: command line option -Wstrict-prototypes is valid for Ada/C/ObjC but not for C++ It looks like this option is automagically added by the build script in a way I fail to understand reading quickly the sources. Anyway, there should be a simple solution to avoid this warning (gcc version 4.1.3)... Any comments? Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] -Wstrict-prototypes option should not be added
Hi, Well the point is that matplotlib in writtenin C++ and python is written in C. The valid gcc options are not the same in C and in C++ so it looks strange (and it is a pity) if distutils do not provide the user with a way to modify these flag in this case. XAvier Hi, Matplotlib uses the distutils facilities to build the extension code. Unfortunately, it is not possible to add or remove compiler flags, distutils uses the same flags as Python when it was built. So this should probably be sent to the Python users ML. Matthieu 2007/7/23, Xavier Gnata [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi, It would be great to be able to compile matplotlib without a warning :) Unfortunately, I was not able to fix this warning performing a simple grep into the sources: cc1plus: warning: command line option -Wstrict-prototypes is valid for Ada/C/ObjC but not for C++ It looks like this option is automagically added by the build script in a way I fail to understand reading quickly the sources. Anyway, there should be a simple solution to avoid this warning (gcc version 4.1.3)... Any comments? Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk nowhttp://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] -Wstrict-prototypes option should not be added
http://deluge-torrent.org/svn/tags/deluge-0.5.0/setup.py seems to provide us with a clean?? way to do that. Hi, Well the point is that matplotlib in writtenin C++ and python is written in C. The valid gcc options are not the same in C and in C++ so it looks strange (and it is a pity) if distutils do not provide the user with a way to modify these flag in this case. XAvier Hi, Matplotlib uses the distutils facilities to build the extension code. Unfortunately, it is not possible to add or remove compiler flags, distutils uses the same flags as Python when it was built. So this should probably be sent to the Python users ML. Matthieu 2007/7/23, Xavier Gnata [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi, It would be great to be able to compile matplotlib without a warning :) Unfortunately, I was not able to fix this warning performing a simple grep into the sources: cc1plus: warning: command line option -Wstrict-prototypes is valid for Ada/C/ObjC but not for C++ It looks like this option is automagically added by the build script in a way I fail to understand reading quickly the sources. Anyway, there should be a simple solution to avoid this warning (gcc version 4.1.3)... Any comments? Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk nowhttp://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] -Wstrict-prototypes option should not be added
If numpy provide us with a distutils version that *works* IMHO matplotlib should just be shipped with. If it is overkill, it could be possible to detect the compiler version and to remove this option if and only if g++ is used. It looks not so clean but cleaner than compiling this an extra option and waiting for the next g++ version which may move from a warning to an error... Maybe we should also ask on the python ML. From http://docs.python.org/ext/building.html distutils users should trust that distutils gets the invocations right. : ha ha ha! Xavier This is a long standing Python (distutils) bug, IMHO. Numpy, for instance, ships with a heavily patched version of distutils that has a workaround for this. Maybe now that mpl requires Numpy, there may be some advantage to using its distutils rather than the stock one. (I say having not looked into it very deeply). I've always got the impression that Python with C++ is sort of an afterthought -- I don't think C++ extensions are part of the regular testing procedure for distutils. Cheers, Mike Matthieu Brucher wrote: Hi, Matplotlib uses the distutils facilities to build the extension code. Unfortunately, it is not possible to add or remove compiler flags, distutils uses the same flags as Python when it was built. So this should probably be sent to the Python users ML. Matthieu 2007/7/23, Xavier Gnata [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi, It would be great to be able to compile matplotlib without a warning :) Unfortunately, I was not able to fix this warning performing a simple grep into the sources: cc1plus: warning: command line option -Wstrict-prototypes is valid for Ada/C/ObjC but not for C++ It looks like this option is automagically added by the build script in a way I fail to understand reading quickly the sources. Anyway, there should be a simple solution to avoid this warning (gcc version 4.1.3)... Any comments? Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk nowhttp://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Warnings in Extensions.hxx
Hi, I can see lots of warnings like : ./CXX/Extensions.hxx:477: warning: right-hand operand of comma has no effect All of them are in Extensions.hxx. They look fully harmless but it could be could a good thing to get them fixed. If needed I could propose a patch. BTW : gcc version 4.1.3 20070514 (prerelease) (Debian 4.1.2-7) Any comments? Xavier -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - 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] Calling matplotlib from C++ ?
Hi, Each time I'm working on C++ codes using vector or valarray, I would like to be able to plot them. The problem is that there is no straitforward way to do that in C++. My goal is not to code a QT or GTK application but only to be able to plot 1D and 2D things from one given large C++ code without having to add lots of lines of codes in my code (let say it is intend to be used in debug phase). Questions : Is there a way to call pylab plot and imshow from a C++ code ? In this case, I do not care if we have to copy the array and it can be slow. It would be a so nice feature to debug C++ image processing codes. Any example of code is welcome even they are not calling matplotlib but anthing else in python. Xavier. ps : In my codes, 2D images are stored as in a class derived from valarray (1D array) adding the size of the image along the 2 directions as private members. -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - 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] New matplotlibrc format?
Hi, I'm using matplotlib svn. It looks like matplotlibrc from http://matplotlib.sourceforge.net/matplotlibrc is not up-to-date : Bad key lines.markeredgecolor on line 48 in /home/gnata/.matplotlib/matplotlibrc. You probably need to get an updated matplotlibrc file from http://matplotlib.sf.net/matplotlibrc or from the matplotlib source distribution Bad key lines.markerfacecolor on line 47 in /home/gnata/.matplotlib/matplotlibrc. You probably need to get an updated matplotlibrc file from http://matplotlib.sf.net/matplotlibrc or from the matplotlib source distribution Where can we get the new one? Thanks for your work on matplotlib, Xavier. -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - 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] svn revision 2814 does not compile
Hum it looks like a real bug in ./CXX/Objects.hxx Line 1938 should be ~mapref() and not ~maprefT() It used to compile bug it is not true any more using gcc version 4.1.2 20061007 (prerelease) (Debian 4.1.1-16) According to C++ iso standard, ~maprefT() seems to be wrong code so could you please apply this path? Xavier. Xavier == Xavier Gnata [EMAIL PROTECTED] writes: Xavier Hi, Matplotlib svn tree does not compile anymore since a Xavier few days : Have you upgraded your compiler recently? It compiles fine for me with an older version gcc --version gcc (GCC) 3.3.5 (Debian 1:3.3.5-8ubuntu2.1) Xavier C++ ./CXX/Objects.hxx:1938: error: parse error in template Xavier argument list ./CXX/Extensions.hxx: In constructor Xavier øPy::PythonExtensionT::PythonExtension() [with T = Xavier Py::ExtensionModuleBasePtr]ù: CXX/cxx_extensions.cxx:90: Xavier instantiated from here ./CXX/Extensions.hxx:477: warning: Nothing in this part of the code has changed for a while -- when was the last time you successfully compiled. Can you try compiling an older revision to figure out if something in the code base has changed or something in your compiler/platform svn log CXX/Objects.hxx r2778 | cmoad | 2006-09-20 20:03:00 -0500 (Wed, 20 Sep 2006) | 2 lines Applied python2.5 build patch submitted on SF r1697 | jdh2358 | 2005-08-31 14:13:44 -0500 (Wed, 31 Aug 2005) | 2 lines added strip chart example r1070 | jdh2358 | 2005-03-11 14:00:59 -0600 (Fri, 11 Mar 2005) | 2 lines upgraded cxx The most likely candidate that is screwing you up is the r2778 so you might try a revision before and after that. What python are you using -- this patch was applied to fix a python2.4 bug. JDH -- Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: [EMAIL PROTECTED] - 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