Re: [Matplotlib-users] contour bug?
[EMAIL PROTECTED] wrote: > Le lundi 16 octobre 2006 15:55, Eric Firing a écrit : >> [EMAIL PROTECTED] wrote: >>> I thing there are a small problem with contour. >>> >>> import pyfits >>> import pylab >>> data = pyfits.getdata('test.fits') >>> pylab.imshow(data,cmap=cm.gray) >>> pylab.contour(data) >>> #to have the result wanted: >>> pylab.contour(data,origin='upper') >>> pylab.show() >>> >>> not sure that it's something did in purpose. >> It is intentional, not a bug. See examples/contour_image.py >> >> Eric > > So that means that contour does have origin set a lower by default when > imshow > is set at upper? If it's intentional I'll note it but I'm must admit that I > have a problem with the logic. It is more a matter of convention than logic. To the extent that there is logic, it might run like this: An image is a string of bytes representing pixels arranged like letters in text, starting from the upper left. When no explicit X and Y vectors are given, contour and pcolor are implicitly using the array indices as X and Y. Eric - 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=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] contour bug?
Le lundi 16 octobre 2006 15:55, Eric Firing a écrit : > [EMAIL PROTECTED] wrote: > > I thing there are a small problem with contour. > > > > import pyfits > > import pylab > > data = pyfits.getdata('test.fits') > > pylab.imshow(data,cmap=cm.gray) > > pylab.contour(data) > > #to have the result wanted: > > pylab.contour(data,origin='upper') > > pylab.show() > > > > not sure that it's something did in purpose. > > It is intentional, not a bug. See examples/contour_image.py > > Eric So that means that contour does have origin set a lower by default when imshow is set at upper? If it's intentional I'll note it but I'm must admit that I have a problem with the logic. N. - 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=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] bug or feature?
What you see is a design limitation rather than a bug or feature. One easy workaround is to use the shrink kwarg. See examples/contour_demo.py. Another approach is to create the axes object you want for the colorbar manually, as in examples/multi_image.py and examples/subplots_adjust.py. Eric [EMAIL PROTECTED] wrote: > Hi, > > I have some problem with this kind of script: > > #!/usr/bin/env python > import numpy > import numpy.random > import pylab > > a = numpy.random.rand(10,10) > pylab.matshow(a) > pylab.colorbar() > > pylab.figure(figsize=(4.8,8),dpi=100) > pylab.imshow(a,aspect='equal',interpolation='nearest') > pylab.colorbar() > > pylab.show() > > The second figure is not good (at least for my point of view). I was > expecting > that the colorbar will have the same size than the image, even if aspect is > set on equal or a number. Perhaps there are a simple solution for this that I > didn't find. - 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=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] contour bug?
[EMAIL PROTECTED] wrote: > I thing there are a small problem with contour. > > import pyfits > import pylab > data = pyfits.getdata('test.fits') > pylab.imshow(data,cmap=cm.gray) > pylab.contour(data) > #to have the result wanted: > pylab.contour(data,origin='upper') > pylab.show() > > not sure that it's something did in purpose. It is intentional, not a bug. See examples/contour_image.py Eric - 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=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Alloc error
Hi, I figured out that I could get matplotlib 0.87.6 for python 2.4 and have downloaded this and installed it. It seems to work, except when I try to do thisActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based onPython 2.4.3 (#1, Apr 3 2006, 18:07:18) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> import numpy >>> import pylabRuntimeError: module compiled against version 102 of C-API but this version of numpy is 100The import of the numpy version of the nxutils module,_nsnxutils, failed. This is is either because numpy wasunavailable when matplotlib was compiled, because a dependency of_nsnxutils could not be satisfied, or because the build flag forthis module was turned off in setup.py. If it appears that_nsnxutils was not built, make sure you have a working copy ofnumpy and then re-install matplotlib. Otherwise, the followingtraceback gives more details:Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pylab.py", line 1, in ? from matplotlib.pylab import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py", line 199, in ? import mlab #so I can override hist, psd, etc... File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mlab.py", line 64, in ? import nxutils File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/nxutils.py", line 17, in ? from matplotlib._ns_nxutils import *ImportError: numpy.core.multiarray failed to import>>> import numpy.core>>> import numpy.core.multiarray>>> import matplotlib>>> My problem is that I have a code: from math import * import numpy from matplotlib import * filename = options.infname + '_ch1' im24 = pyImage.Image() im24.Open(filename) print filename,im24.avg, im24.max figim = figure.figure(figsize=(5,5)) figim._resize = False axsrc24 = figim.add_subplot(111, xlim=(0,200), ylim=(0,200), autoscale_on=False) axsrc24.set_title('Click to zoom') im24.Display(axsrc24)If I use from pylab import * the figim = figure line works, but since import pylab fails thescript fails. If I use from matplotlib import * I get this error:[EMAIL PROTECTED] Spitzer/Objects -> redspit -i Albiorix1v2 -a 8 -z 16pixel size = -2.45 2.45Albiorix1v2_ch1 47.6313694642 50.5503692627Traceback (most recent call last): File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/redspit.py", line 95, in ? main() File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/redspit.py", line 50, in main figim = figure.figure(figsize=(5,5))NameError: global name 'figure' is not definedSo I am a little confused as to what is going on CheersTommy[EMAIL PROTECTED]http://homepage.mac.com/tgrav/"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction" -- Albert Einstein - 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=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Alloc error
Hi, I am currently running ActivePython 2.4.3 b11, with numpy 1.12881 and matplotlib 0.87.4. Running a code developed before I upgraded using theScipy Superpack for Mac (PowerPc) available at http://www.scipy.org/DownloadI get this error:[EMAIL PROTECTED] Spitzer/Objects -> redspit -i Albiorix1v2 -a 8 -z 16pixel size = -2.45 2.45Albiorix1v2_ch1 47.6313694642 50.5503692627alloc: invalid block: 0xa08bcd8: a 68 0Abort[EMAIL PROTECTED] Spitzer/Objects -> Anyone know what the deal is? I tried to upgrade to 0.87.6 for matplotlib, butthat of course failed as I am not running Python 2.5 :( CheersTommy[EMAIL PROTECTED]http://homepage.mac.com/tgrav/"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction" -- Albert Einstein - 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=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] in _tkagg undefined symbol - XFreepixmap
HelloAfter compiling and installing matplotlib-0.87.6, when I entered,from pylab import *it returned the following errors.Traceback (most recent call last): File "", line 1, in ? File "/home/morovia/bin/lib/python2.4/site-packages/pylab.py", line 1, in ? from matplotlib.pylab import * File"/home/morovia/bin/lib/python2.4/site-packages/matplotlib/pylab.py", line220, in ? new_figure_manager, draw_if_interactive, show = pylab_setup() File "/home/morovia/bin/lib/python2.4/site-packages/matplotlib/backends/__init__.py", line 23, in pylab_setup globals(),locals(),[backend_name]) File "/home/morovia/bin/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py", line 8, in ? import tkagg # Paint image to Tk photo blitter extension File "/home/morovia/bin/lib/python2.4/site-packages/matplotlib/backends/tkagg.py", line 1, in ? import _tkaggImportError: matplotlib/backends/_tkagg.so: undefined symbol: XFreePixmap looks like I need to include X11 libraries, Kindly inform me where I need to modify.ThanksBest regardsMorovia. - 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=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plotting contour line in matplotlib
i need a tutorial on plotting countour linesgave me a url Find out what India is talking about on - Yahoo! Answers India Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW- 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=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib powered website. Would love to get your feedback!
> Any change you could share back with the community the approach > you followed - web framework used? integration strategy? deploy- > ment and setup issues? graph creation methodology? web framework used: cherrypy deploymnet os: ubuntu setup issues: none > I am looking to tackle a project with multi-chart reporting > component features and would really love to use Matplotlib > with it but am not quite sure where to start. matplotlib comes with a lot of examples and that's probably the best place to start. There is an example for how to save charts to a file (which is what I do) and another one for streaming the charts back to the user. The only issue I have faced is that matplotlib is slow for my chart types (takes about 0.8 seconds to do a chart). I'm hoping that future version of matplotlib will be faster. Vineet - 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=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] numpy & compilation
HiIf you are on ubuntu you may check out Andrew Straw's repository:http://debs.astraw.comArnar On 10/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I am trying to compile matplotlib in order to use numpy as the numerixoption. I can apt-get a version of it which works, but it does not seem tosupport numpy.I also compiled numpy-1.0rc1 (released 2 weeks ago), and it works fine in python. However, when I import matplotlib (0.87.6), I get the errormessage below. A quick internet search suggests to me that it is some kindof mismatch in libraries, possibly caused by compiler differences in g++ 4 (numpy at least seems to use g++.. so I tried a different g++ version,but it made no difference).Does someone have an idea what the problem is, or what I could try?Thanks,Allan The import of the numpy version of the _transforms module,_ns_transforms, failed. This is is either because numpy wasunavailable when matplotlib was compiled, because a dependency of_ns_transforms could not be satisfied, or because the build flag for this module was turned off in setup.py. If it appears that_ns_transforms was not built, make sure you have a working copy ofnumpy and then re-install matplotlib. Otherwise, the followingtraceback gives more details: Traceback (most recent call last): File "/usr/bin/ipython", line 28, in ?IPython.Shell.start().mainloop() File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 883, in startreturn shell() File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 810, in__init__IPShellGTK.__init__(self,argv,user_ns,debug,shell_class=MatplotlibMTShell) File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 618, in __init__> File "/usr/lib/python2.4/site-packages/IPython/ipmaker.py", line 85, inmake_IPythonIP = shell_class('__IP',user_ns=user_ns,**kw) File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 500, in __init__user_ns,b2 = self._matplotlib_config(name) File "/usr/lib/python2.4/site-packages/IPython/Shell.py", line 373, in_matplotlib_configfrom matplotlib import backends File "/usr/lib/python2.4/site-packages/matplotlib/backends/__init__.py", line 55, in ?new_figure_manager, draw_if_interactive, show = pylab_setup() File "/usr/lib/python2.4/site-packages/matplotlib/backends/__init__.py",line 23, in pylab_setupglobals(),locals(),[backend_name]) File"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py",line 8, in ?from matplotlib.figure import Figure File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line 5, in ? from artist import Artist File "/usr/lib/python2.4/site-packages/matplotlib/artist.py", line 4, in ?from transforms import identity_transform File "/usr/lib/python2.4/site-packages/matplotlib/transforms.py", line 223, in ?from _transforms import Value, Point, Interval, Bbox, Affine File "/usr/lib/python2.4/site-packages/matplotlib/_transforms.py", line17, in ?from matplotlib._ns_transforms import * ImportError:/usr/lib/python2.4/site-packages/matplotlib/_ns_transforms.so: undefinedsymbol: _ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj- Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users - 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=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] bug or feature?
Hi, I have some problem with this kind of script: #!/usr/bin/env python import numpy import numpy.random import pylab a = numpy.random.rand(10,10) pylab.matshow(a) pylab.colorbar() pylab.figure(figsize=(4.8,8),dpi=100) pylab.imshow(a,aspect='equal',interpolation='nearest') pylab.colorbar() pylab.show() The second figure is not good (at least for my point of view). I was expecting that the colorbar will have the same size than the image, even if aspect is set on equal or a number. Perhaps there are a simple solution for this that I didn't find. Thanks N. - 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=lnk&kid=120709&bid=263057&dat=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
> "Xavier" == Xavier Gnata <[EMAIL PROTECTED]> writes: Xavier> Hum it looks like a real bug in ./CXX/Objects.hxx Line Xavier> 1938 should be ~mapref() and not ~mapref() It used to Xavier> compile bug it is not true any more using gcc version Xavier> 4.1.2 20061007 (prerelease) (Debian 4.1.1-16) According to Xavier> C++ iso standard, ~mapref() seems to be wrong code so Xavier> could you please apply this path? Thanks for tracking this down -- committed to svn. JDH - 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=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with axes size
> "Stefan" == Stefan van der Walt <[EMAIL PROTECTED]> writes: Stefan> The size of the image being plotted is (72, 2048), so that Stefan> behaviour sounds correct. The plot I see is shown here: Stefan> http://mentat.za.net/results/morlet.png As Stefan notes, this is a feature not a bug, but it is relatively new behavior since Mark Bakker and Eric Firing finally provided us with good aspect handling. The new default is to maintain aspect ratio of images, but if you want the old behavior, you can pass in aspect='auto' into your image or set the image.aspect parameter in your rc file. JDH - 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=lnk&kid=120709&bid=263057&dat=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 ~mapref() 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, ~mapref() 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::PythonExtension::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=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users