[Matplotlib-users] Scatter plot with a specific size per point
hi, I'd like to display a scatter plot where the size for each element is fixed. Currently, when I modify the size of the figure, the size of a marker is fixed, and I would like it to be proportional to the window. I want this because the size of the marker indicates an extent, and I would like it to confirm that the extents correctly cover the other points. Thanks for any pointer, Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Scatter plot with a specific size per point
Indeed, a little bit less simple, but the solution nonetheless. Thank you! 2012/3/26 Zachary Pincus zachary.pin...@yale.edu I'd like to display a scatter plot where the size for each element is fixed. Currently, when I modify the size of the figure, the size of a marker is fixed, and I would like it to be proportional to the window. I want this because the size of the marker indicates an extent, and I would like it to confirm that the extents correctly cover the other points. If it's truly an extent, you might be better off drawing polygons of the extent boundaries in the graph's coordinate system -- then things will scale as you desire. This will require digging down a bit into the object API -- make a new matplotlib.collections.PolyCollection (or RegularPolyCollection), and add it to your axes with Axes.add_collection(). Zach -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Worries with ~/.matplotlib and fonts
Hello, I ahve several installation of matplotlib on several computers with different OS but the same HOME directory. Matplotlib caches a lot of stuff in ~/.matplotlib, like fonts, but they are not located in the same folder in different computers I use. The issue is that the cache makes matplotlib raise an exception at import time. Would it be possible not to use the cache if the fonts mentioned int he cache are not available? Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Confusion Matrix
Hi, In scikits.learn, there is a confusion matrix and in the samples, there are several plots (scikit-learn.sf.net). Matthieu 2010/7/16 Simon Friedberger simon+matplot...@a-oben.org: Hello List. I'm trying to plot a confusion matrix and I got this far: http://paste.pocoo.org/show/238332/ Basically what I still want to do is get the ticklabels from the bottom to the top, have every ticklabel shown and start showing them from the first not from the second. I have experimented with this for a while now and don't have all the code states at hand anymore but basically at several points some of the above worked but the others didn't or something else (like the axis length) broke. Best Simon -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Hz to KHz
Hi, You may just divide them by 1000? Matthieu 2010/7/26 Waléria Antunes David waleriantu...@gmail.com: Hello all, I need to format the values of graphic to KHz.my values are in Hz see at idle python it displays the values as: 3000 3050 3100 3400 , but I need to go where it will be displayed KHz: 3.0 3.1 can someone help me? -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Issue with sample from website and rc()
Hi, I've tried to set the size of the main font by doing: import matplotlib.pyplot as pyplot font = {'size' : 'larger'} pyplot.rc('font', **font) as indicated in http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.rc It failed with: raise ValueError('Could not convert %s to float' % s) ValueError: Could not convert larger to float I'm using Matplotlib 0.99.1.2. Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Issue with sample from website and rc()
Indeed, with a fixed value, I could bypass this, but the main issue is that the documentation says that it should work (xx-small, x-small, small, medium, large, ... although I don't know if it should be larger, as indicated in rc() doc, or large as indicated in the font size doc IIRC). Matthieu 2010/2/24 Philipp Bender li...@rootiniert.de: The error is the 'size':'larger', not the passing as keyword arguments. Maybe you try to stick (as workaround) with a fixed number, like 'size':12 It's located in matplotlib/lib/matplotlib/rcsetup.py def validate_float(s): 'convert s to float or raise' try: return float(s) except ValueError: raise ValueError('Could not convert %s to float' % s) - conversion of 'larger' to float fails, I don't know, maybe this should go through validate_fontsize instead of validate_float? Or, if failed in validate_floats, to validate_fontsize? Like def validate_float(s): 'convert s to float or raise' try: return float(s) or validate_fontsize() except ValueError: raise ValueError('Could not convert %s to float' % s) Regards, Philipp -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Error with 0.99.2 when using Intel Compiler (Linux)
Hi again, I've fixed the issue on my box. The issue lies in the definition of the hash_map. For ICC for Linux, the GCC headers should be used. Matthieu 2010/1/29 Matthieu Brucher matthieu.bruc...@gmail.com: Hi, It seems that the compilation of base_format needs a C++ compiler, but distutils launches icc instead of icpc. This may work with gcc, but with Intel Compiler, I can't force icc to understand C++. I don't know what happened between 0.98.5 and 0.99.2, but I can't use Matplotlib anymore :| Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Error with 0.99.2 when using Intel Compiler (Linux)
Hi, It seems that the compilation of base_format needs a C++ compiler, but distutils launches icc instead of icpc. This may work with gcc, but with Intel Compiler, I can't force icc to understand C++. I don't know what happened between 0.98.5 and 0.99.2, but I can't use Matplotlib anymore :| Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] numpy and lapack on linux
Hi, Just compile numpy on a system that doesn't have lapack3 installed. Matthieu 2009/5/4 Nathaniel Echols nathaniel.ech...@gmail.com: I need to distribute matplotlib as part of a large and somewhat heterogeneous package of Python-based software. On Macs, lapack is installed by default, and I can rely on the linking working regardless of which OS version it was compiled on (we use 10.4.11, but it runs fine on 10.5). On Linux, it's variable - the kernel 2.6-based OSes we use appear to have it, but not the older 2.4-based systems. For the older systems this is not a problem - it results in this: n...@linux2.4 ldd lapack_lite.so linux-gate.so.1 = (0xe000) libc.so.6 = /lib/libc.so.6 (0xf7d97000) /lib/ld-linux.so.2 (0x56555000) The lack of links to the full lapack module doesn't appear to break anything that I do - I'm just plotting simple lines and I don't use any of the numpy routines in my code. This is what happens on the newer systems: n...@linux2.6 ldd lapack_lite.so linux-gate.so.1 = (0xe000) liblapack.so.3 = not found libblas.so.3 = not found libg2c.so.0 = /usr/lib/libg2c.so.0 (0xf7fb6000) libm.so.6 = /lib/libm.so.6 (0xf7f8f000) libgcc_s.so.1 = /lib/libgcc_s.so.1 (0xf7f82000) libc.so.6 = /lib/libc.so.6 (0xf7e45000) /lib/ld-linux.so.2 (0x56555000) This results in an import error on systems that *don't* have lapack3 installed. We would prefer to avoid having to tell our users to install more software in order to use what I've written. Is there any way to force numpy to *not* link to anything besides what it saw in the first example? I would prefer to avoid hacking into the numpy distutils scripts if possible. Sorry this isn't directly matplotlib-related, but I thought I'd see if someone here had encountered this problem before I subscribed to another list. thanks, Nat -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Information System Engineer, Ph.D. Website: http://matthieu-brucher.developpez.com/ Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn: http://www.linkedin.com/in/matthieubrucher -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Legend for a scatter plot based on symbols
Hi, Thanks for the tips, I'll try that :) Matthieu 2008/6/4 Matthias Michler [EMAIL PROTECTED]: Hi Matthieu, I'm not sure if somebody else already answered to your question and I don't know the best way to achieve what you need, but I suggest the following work-around: scatter(x, x**2.4, marker='s', color='r', s=25, label=_) # with no label plot([0], [0], ls='', marker='s', color='r', ms=5, mew=0, label=my label) # plot somewhere outside the shown axis with the preferred label legend() Best regards Matthias On Friday 30 May 2008 11:20:08 Matthieu Brucher wrote: Hi, I'd like to plot three scatter plots on the same figure, each with different symbols. Associated to these scatter plots, I'd like to put a legend. For the moment, the legend is based on one of the color of the associated scatter plot, but it is not relevant. Indeed, the colors are not identical inside one scatter plot, so the displayed color is discriminating. So I'd like to display the symbol (circle, square, cross, ...) instead of the color rectangle. Is it possible ? Thanks, Matthieu - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Legend for a scatter plot based on symbols
Hi, I'd like to plot three scatter plots on the same figure, each with different symbols. Associated to these scatter plots, I'd like to put a legend. For the moment, the legend is based on one of the color of the associated scatter plot, but it is not relevant. Indeed, the colors are not identical inside one scatter plot, so the displayed color is discriminating. So I'd like to display the symbol (circle, square, cross, ...) instead of the color rectangle. Is it possible ? Thanks, Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Changing ticks format
Hi, Sorry to raise this issue again, but some has a clue ? Matthieu 2008/2/4, Matthieu Brucher [EMAIL PROTECTED]: Hi, I'm trying to change the y labels on the attached picture (cout_it_459_zoom.eps). I modified the labels explicitly, but they still are outside the picture :( Is it possible to force a constant multiplication factor like in the second image (cout_it_459.eps) ? Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Changing ticks format
2008/2/29, Alan G Isaac [EMAIL PROTECTED]: On Fri, 29 Feb 2008, Matthieu Brucher apparently wrote: Sorry to raise this issue again, but some has a clue ? Didn't see this earlier and you did not attach the picture this time, Ooops... but I've seen cut-off labels in some settings when there are negative coordinates in the EPS bounding box. (Not always honored.) Are there? Only positive coordinates, but they are very long (100 for instance) Anyway, it is almost surely a bounding box problem. I think you can use eps2eps to get a new bounding box. Thanks, I'll try this :) Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Changing ticks format
Anyway, it is almost surely a bounding box problem. I think you can use eps2eps to get a new bounding box. Thanks, I'll try this :) It doesn't change a thing :| Besides, even if it worked, there should be a way of changing the global scale (see the attached image for a example). Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher cout_it_001_zoom_bis.eps Description: PostScript document - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Changing ticks format
You might try checking what the existing values are: rcParams['axes.formatter.limits'] [-7, 7] and try: rcParams['axes.formatter.limits']=[-4,4] Sorry, I didn't check the current values :| It works like a charm now, thanks for all the helpfull answers :) Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Changing ticks format
You can either set your axes.formatter.limits rc setting to something like 4, or you can make your axes smaller in the figure, like axes([0.25,0.125,0.7,0.85]) Thanks for this. I tried the first one (I can't make the figure smaller ;)), but I got this result : File images.py, line 14, in module pl.rcParams['axes.formatter.limits']=4 File /home/brucher/local/lib/python2.5/site-packages/matplotlib/__init__.py, line 552, in __setitem__ cval = self.validate[key](val) File /home/brucher/local/lib/python2.5/site-packages/matplotlib/rcsetup.py, line 119, in __call__ assert type(s) in (list,tuple) with : import pylab as pl pl.rcParams['axes.formatter.limits']=4 last stable Matplotlib Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Plotting in C++
I'm trying to explore new options, and learn new skills. My favorite programming languages are C/C++ and Python. I use Python for small scripts and applications, and C/C++ for everything else. I've started a smallish/medium size open source app in python+pygtk+matplotlib+numpy (laserfoam.sf.net) but I think a large application might be more maintainable in C++. Also, I think C++ is easier to sell to the powers that be. I was C++ everywhere before, now I'm C++ only where it matters. Write your application with Python, there is not scale issue with Python (ILM use it, Google, ...), profile it and port what is needed to C or C++ and you will write an efficient and big application in no time. Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Exporting accents in EPS
Hi, I'm trying to export a MAtplotlib figure which has some axes labels, such as 'coût'. The problème is that the generated eps is corrupted because of these accents. Is there a way to generate an acceptable eps file ? Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Exporting accents in EPS
Some additional information : it does not work with the pdf backend and with the svg one, the accents are corrupted (I tried to export utf8 encoded labels). I'm using pycrust, BTW. But I don't know how to change the default encoding (the display is correct but not the saved image). Matthieu 2008/2/1, Matthieu Brucher [EMAIL PROTECTED]: No problem with the png backend. I tried with Latex for the accent, but it didn't work : Traceback (most recent call last): File input, line 1, in module File /home/brucher/local//lib/python2.5/site-packages/matplotlib/pyplot.py, line 265, in draw get_current_fig_manager().canvas.draw() File /home/brucher/local//lib/python2.5/site-packages/matplotlib/backends/backend_wx.py, line 953, in draw self.figure.draw(self.renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/figure.py, line 612, in draw for a in self.axes: a.draw(renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/axes.py, line 1342, in draw a.draw(renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/axis.py, line 593, in draw tick.draw(renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/axis.py, line 170, in draw if self.label1On: self.label1.draw(renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/text.py, line 775, in draw Text.draw(self, renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/text.py, line 327, in draw self._fontproperties, angle) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/backend_bases.py, line 383, in draw_tex raise NotImplementedError I just did : import pylab as pl pl.plot([1, 2, 3], [1, 2, 3]) pl.xlabel('éè') pl.show() and the ps file is corrupted :( Matthieu 2008/2/1, Michael Droettboom [EMAIL PROTECTED]: Can you provide an example of your code? Often, it is a matter of configuring/using Python correctly to indicate accents. Is the problem only with EPS or other backends as well? Cheers, Mike Matthieu Brucher wrote: Hi, I'm trying to export a MAtplotlib figure which has some axes labels, such as 'coût'. The problème is that the generated eps is corrupted because of these accents. Is there a way to generate an acceptable eps file ? Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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 -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] Exporting accents in EPS
No problem with the png backend. I tried with Latex for the accent, but it didn't work : Traceback (most recent call last): File input, line 1, in module File /home/brucher/local//lib/python2.5/site-packages/matplotlib/pyplot.py, line 265, in draw get_current_fig_manager().canvas.draw() File /home/brucher/local//lib/python2.5/site-packages/matplotlib/backends/backend_wx.py, line 953, in draw self.figure.draw(self.renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/figure.py, line 612, in draw for a in self.axes: a.draw(renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/axes.py, line 1342, in draw a.draw(renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/axis.py, line 593, in draw tick.draw(renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/axis.py, line 170, in draw if self.label1On: self.label1.draw(renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/text.py, line 775, in draw Text.draw(self, renderer) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/text.py, line 327, in draw self._fontproperties, angle) File /home/brucher/local//lib/python2.5/site-packages/matplotlib/backend_bases.py, line 383, in draw_tex raise NotImplementedError I just did : import pylab as pl pl.plot([1, 2, 3], [1, 2, 3]) pl.xlabel('éè') pl.show() and the ps file is corrupted :( Matthieu 2008/2/1, Michael Droettboom [EMAIL PROTECTED]: Can you provide an example of your code? Often, it is a matter of configuring/using Python correctly to indicate accents. Is the problem only with EPS or other backends as well? Cheers, Mike Matthieu Brucher wrote: Hi, I'm trying to export a MAtplotlib figure which has some axes labels, such as 'coût'. The problème is that the generated eps is corrupted because of these accents. Is there a way to generate an acceptable eps file ? Matthieu -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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 -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- French PhD student Website : http://matthieu-brucher.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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] power law fitting of data
Hi, You could use another package, like openopt and the generic optimizers that give you what you want provided that you create at least the gradient of the function (I didn't create a class that can numerically derive a fit function). For instance http://projects.scipy.org/scipy/scikits/wiki/Optimization/tutorial#FittingDatagives you an example. Matthieu 2007/12/6, Ping Yeh [EMAIL PROTECTED]: Hi, I have (x,y) data that I want to fit to the formula y = a * x^b to determine a and b. How can I do it? The current manual only lists linear fit and polynomial fit. Or, putting it in a more general setting, is there a module to do fitting to an arbitrary function? It would be something like pars = fit(x, y, func) where func is a function like y = func(x, pars) with pars a 1-D array. Thanks, Ping - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] cannot find wxmsw26uh_vc.dll
I have this problem with the embedding samples that use wxagg. Otherwise, I have no problem. Jeff do you import something using wxagg ? Matthieu 2007/11/12, Michael Droettboom [EMAIL PROTECTED]: Can you send the entire traceback you get with this error? I'm curious which module is requiring this. Also, if you start a python console and type import wx, do you get this error? Cheers, Mike Jeff Peery wrote: Hello, thanks for the response. I changed my matplotlibrc file from 'WxAgg' to 'Wx'. I'm still using wxpython 2.8 and matplotlib 0.90.1, and I am still getting the error that wxmsw26uh_vc.dll cannot be found. what else can I do? can I just put this file in the place that it is trying to look? thanks, Jeff __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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 -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - 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 -- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - 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] cannot find wxmsw26uh_vc.dll
Hi, mpl does not build the wxagg bridge starting from wxPython 2.8, thanks to an upgraded system. So you can use wx directly without (much ?) loss of speed. Matthieu 2007/11/10, Jeff Peery [EMAIL PROTECTED]: Hello, I've been using wxpython 2.6 unicode version and I recently upgraded to 2.8 unicode version. I'm using matplotlib 0.90.1 wxAgg in my wx app and when I fire it up it gives me a message that it cannot find 'wxmsw26uh_vc.dll'. I've had this problem before and the solution was to install the unicode version of wxpython. But it doesn't seem to solve the problem with wxpython 2.8. how do I get rid of this error? thanks! Jeff __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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 -- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn : http://www.linkedin.com/in/matthieubrucher - 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] Creating a Figure in a wx.Panel(or a NotebookPage more precisely)
Hi, I'm trying to integrate a Figure Canvas with a ToolBar in an application that uses a noteboo for displaying several graphs. My problem is that using a NotebookPanel leads to the FigureCanvas taking all the space in the panel, the toolbar is not usable (it isn't even displayed with a light gray background) and so are other widgets I want to use. If I replace the NotebookPage by Frame, everything works fine (but it is not integrated in my application...). Is there something that we should know about the use of FigureCanvas in a Panel ? Matthieu - 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] Bug in boxplot ?
Hi, I just encountered something odd. I have (with import numpy as n and import pylab as pl) : x = n.arange(0, 2*n.pi, n.pi/30) z = n.array([n.cos(x), n.sin(x)]).T If I draw a boxplot on z : pl.boxplot(z) the values z are modified. Is this a feature or a bug ? Matthieu - 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] Plotting one figure on sevral subplots
Although I am not completely sure what you are asking, I think you are asking for: subplot(221) subplot(222) subplot(212) then the last subplot (bottom row) will span both columns. JDH Thank you for the fast answer :) That should be what I asked for. Won't the other subplots be erased ? Matthieu - 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] Plotting one figure on sevral subplots
Only if this subplots overlap -- in this case they do not. When a previous subplot is overlapped by a new subplot, the old one is erased. That means too that having a plot on 2/3 of the screen is not possible, I suppose ? Matthieu - 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] [Newbie question] Is 0:3:100 possible?
Hi, numpy.arange(0, 100, 3) perhaps ? Matthieu 2007/9/4, Robert Dailey [EMAIL PROTECTED]: Hi, I come from using Matlab and I was just curious if it was possible to create an arange from a quick for loop of numbers? For example: 0:3:100 would generate: 0, 3, 6, 9, 12, , 96, 99 And I would want this range to be in an arange() object. Is there a similar way of doing this? Thanks. - 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
Re: [Matplotlib-users] problem with set in current svn HEAD
Hi, I think you must type : set(gca(), 'xticklabels', []) Matthieu 2007/8/16, Johann Cohen-Tanugi [EMAIL PROTECTED]: hello, I must be doing something stupid I am trying to test the snippets of code in http://matplotlib.sourceforge.net/users_guide_0.90.0.pdf p.29, and I get : [EMAIL PROTECTED] python]$ python Python 2.5 (r25:51908, Apr 10 2007, 10:29:13) [GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2 Type help, copyright, credits or license for more information. from pylab import * subplot(211) matplotlib.axes.Subplot instance at 0x9c5412c plot([1,2,3],[1,2,3]) [matplotlib.lines.Line2D instance at 0x9c5a8ac] set(gca(), xticklabels=[]) Traceback (most recent call last): File stdin, line 1, in module TypeError: set() does not take keyword arguments Can somebody help me understand what goes wrong here? thanks, Johann - 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
Re: [Matplotlib-users] 3D plotting?
2007/8/10, william ratcliff [EMAIL PROTECTED]: so it would be something like: c=numpy.array([[1,2,3],[0,0,4],[0,2,4]]), where the values in the array go from 0-255 and denote r,g,b values? Thanks! I use floatting point values, don't know if integers work. I thing that colormap could be used, but I really don't know, I do not use them. Matthieu - 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, 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]: 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 - 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
Yes, Python is written in C, but it is responsible for providing the good flags so that extensions are compatible with the interpreter (there is an option is Python steup for the C++ compiler for instance). The exemple you give is valid for GCC, but is not for other compilers that will crash with this kind of options. In fact, it would be far better if Python provided out of the box a correct set of flags for g++ (and for the other C++ compilers). I have to say that with ICC, there are far more warning than for gcc. Matthieu 2007/7/23, Xavier Gnata [EMAIL PROTECTED]: 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] numpy and matrix operations
I want to do some matrix operations, like a singular value decomposition (svd) or to calculate random number from the multivariate_normal distributions. These two functions exist in 'numeric', but I cannot use them (they hang up or give some errors). Maybe there is any package to download that is compatible with the current numpy/pylab/matplotlib specifications? Or any other simple way to deal with such matrix operations? That would be very helpful... Linear algebra (svd) can be found in numpy.linalg and random numbers can be generated with the numpy.random module. Matthieu - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Displaying several points with different colors
Hi, I tried to dig into the 3D code, and in fact, it is RegularPolyCollection that seems to be incompatible with Axes3D. Axes3D uses _verts to create z values, and it crashes when trying to figure out how to display it (art3d.pylines 208-221). I don't know enough to correct it. But I have another idea, but I suppose some had it before. In the plot, scatter, ... code, only one colour can be used, it is tested upon, so my question will be, why not enhancing the test to allow colors for each point ? it would be a sequence of the same size as x or y, but with rgba value, or tuples, ... Matthieu P.S. : if I had more time, I would try to solve the problem, but at the moment, I can't :( 2007/3/12, Eric Firing [EMAIL PROTECTED]: Matthieu Brucher wrote: OK, I'm trying to the same but in 3D, and there, no documentaion. I tried to launch axes3d.py to see exactly what I can do, but the example file does not work. For instance, Axes3D takes two parameters for method __init__ and only one is provided. Did someone test it ? I'm trying to use collection as well, but for once I prefer MatLab simplicity here, it's way to complicated, some arguments must be zipped, other are passed not in the collection, but when the collection is added to the subplot, ... Is there a simple and clear way to do 3D plotting with collections ? There may be, but all 3D plotting is shaky right now. The 3D code is essentially unmaintained and unsupported. Eric - 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
Re: [Matplotlib-users] Displaying several points with different colors
Hi, I tried it again, and now it works like charm with numpy arrays. I do not understand why it did not work before, but it works now, it's all that matters :) But 3D is another problem... Matthieu 2007/3/14, Eric Firing [EMAIL PROTECTED]: Matthieu Brucher wrote: What version of mpl are you using? The latest, I compiled it from the source as FC5 has a very old version - can't update myself the distribution - In recent versions, the collections should accept 2D numpy arrays as well as any sequence of tuples (and several other possibilities). For 2D plots, numpy arrays is accepted - but not for colors, it tells me there is a problem with tuples, I do not remember exactly, but I can check the error tomorrow -. Mathieu, Did you come up with a minimal example of this? If so, please send it to me directly. I would like to follow up on it. Thanks. Eric - 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
Re: [Matplotlib-users] Displaying several points with different colors
OK, I'm trying to the same but in 3D, and there, no documentaion. I tried to launch axes3d.py to see exactly what I can do, but the example file does not work. For instance, Axes3D takes two parameters for method __init__ and only one is provided. Did someone test it ? I'm trying to use collection as well, but for once I prefer MatLab simplicity here, it's way to complicated, some arguments must be zipped, other are passed not in the collection, but when the collection is added to the subplot, ... Is there a simple and clear way to do 3D plotting with collections ? Matthieu 2007/3/12, Matthieu Brucher [EMAIL PROTECTED]: I manage to do what I wanted to do, it was not that easy - the colours were in an array I had to transform into an array of tuples, the autoscale did not function, I had to put in the fig.subplot the correct xlim and ylim -, but now it works like a charm. Many thanks. Matthieu 2007/3/9, John Hunter [EMAIL PROTECTED]: On 3/9/07, Matthieu Brucher [EMAIL PROTECTED] wrote: What I have is a set of points in a numpy.array - for instance size (2000, 2) -. What I have as well is a nump.array of size (2000, 3). How can I make plot understand that each line of the set points must be painted with the corresponding line in the colour array ? You'll probably want to use a regular poly collection, as in the example below. Your array of facecolors can pretty much be whatever you want: from pylab import figure, nx, show, cm from matplotlib.collections import RegularPolyCollection fig = figure() ax = fig.add_subplot(111) offsets = nx.mlab.rand(20,2) facecolors = [cm.jet(x) for x in nx.mlab.rand(20)] black = (0,0,0,1) collection = RegularPolyCollection( fig.dpi, numsides=5, # a pentagon rotation=0, sizes=(50,), facecolors = facecolors, edgecolors = (black,), linewidths = (1,), offsets = offsets, transOffset = ax.transData, ) ax.add_collection (collection) show() Matthieu - 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 - 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
Re: [Matplotlib-users] Displaying several points with different colors
There may be, but all 3D plotting is shaky right now. The 3D code is essentially unmaintained and unsupported. Eric Sad to hear this, I hope someone will enhance it :) Matthieu - 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
Re: [Matplotlib-users] Displaying several points with different colors
What version of mpl are you using? The latest, I compiled it from the source as FC5 has a very old version - can't update myself the distribution - In recent versions, the collections should accept 2D numpy arrays as well as any sequence of tuples (and several other possibilities). For 2D plots, numpy arrays is accepted - but not for colors, it tells me there is a problem with tuples, I do not remember exactly, but I can check the error tomorrow -. For 3D plots, the offsets must be special, I suppose, as the array must be iterated on with a zip, I don't know why there is this need, but I didn't write it :) This difference in format is akward :| And the fact that the example file cannot be executed is still stranger. Autoscaling does not work well with arbitrary collections because there is a chicken-and-egg problem: a collection member may be drawn in pixels or other physical units, in which case its size in data units cannot be determined until it is drawn with a given xlim and ylim (and sometimes dpi). That is not my worst problem, I imposed the limits and it works now like a charm :) Matthieu - 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] Displaying several points with different colors
Hi, I'm trying to plot a set of points, each point having a different color. For the moment, I'm trying to do something like that : for indice in range(0, points.shape[0]): pl.plot(points[indice, 0], points[indice, 1], 'o', c = colours[indice,:], hold = True) where points is a numpy array of point and colours is a numpy array of dimension (points.shape[0], 3) With Matlab, something like this would function, but not in matplotlib, it tells me : ValueError: need more than 0 values to unpack I am missing something ? Matthieu - 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
Re: [Matplotlib-users] Displaying several points with different colors
Complete examples always help ince we have no way of knowing what the points data structures look like, but I'll hazard a gues. The x and y arguments to plot need to be sequences. Ie, something like plot([0.5], [0.5], 'ro') It can be inefficient to plot many separate points this way -- if you have a lot of points, use a matplotlib.collections.RegularPolyCollection or scatter. Thank you for your answer :) OK, I'll try to wrap them :|. The best solution would indeed be to paint them all at once, but I didn't manage to do that, even when I looked in the scatter_demo2 example :( What I have is a set of points in a numpy.array - for instance size (2000, 2) -. What I have as well is a nump.array of size (2000, 3). How can I make plot understand that each line of the set points must be painted with the corresponding line in the colour array ? Matthieu - 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
Re: [Matplotlib-users] Displaying several points with different colors
Thank you, I think thatthis will solve my problem :) I didn't know this class existed. Matthieu 2007/3/9, John Hunter [EMAIL PROTECTED]: On 3/9/07, Matthieu Brucher [EMAIL PROTECTED] wrote: What I have is a set of points in a numpy.array - for instance size (2000, 2) -. What I have as well is a nump.array of size (2000, 3). How can I make plot understand that each line of the set points must be painted with the corresponding line in the colour array ? You'll probably want to use a regular poly collection, as in the example below. Your array of facecolors can pretty much be whatever you want: from pylab import figure, nx, show, cm from matplotlib.collections import RegularPolyCollection fig = figure() ax = fig.add_subplot(111) offsets = nx.mlab.rand(20,2) facecolors = [cm.jet(x) for x in nx.mlab.rand(20)] black = (0,0,0,1) collection = RegularPolyCollection( fig.dpi, numsides=5, # a pentagon rotation=0, sizes=(50,), facecolors = facecolors, edgecolors = (black,), linewidths = (1,), offsets = offsets, transOffset = ax.transData, ) ax.add_collection(collection) show() Matthieu - 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 - 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