Re: [Matplotlib-users] how to make scatter plot and bar graphs in same figure?
Ryan May wrote: On Mon, Feb 16, 2009 at 7:22 AM, Manuel Metz mm...@astro.uni-bonn.dewrote: Attached is a very simple example that shows how to do something similar to scatterhist in matplotlib That's a nice example. Are you going to check that into SVN? Yes, soon ... Ryan -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plotting histograms with zero counts
Yang Zhang wrote: Hi, when I do: hist([0,0,0], bins=10, range=(0,10)) How come the single bin takes up the entire plot? Same with just two values, or anything less than 10 - the two bars take up the entire plot, no matter what I plug in for range. I'd just like 10 bins, from 0 to 9. That's a bug in the current implementation (see also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503148). mm - 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] Plotting histograms with zero counts
Manuel Metz wrote: Yang Zhang wrote: Hi, when I do: hist([0,0,0], bins=10, range=(0,10)) How come the single bin takes up the entire plot? Same with just two values, or anything less than 10 - the two bars take up the entire plot, no matter what I plug in for range. I'd just like 10 bins, from 0 to 9. That's a bug in the current implementation (see also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503148). This is fixed now on the trunk. mm - 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] Make markers in legend to appear only once
Alejandro Weinstein wrote: Hi: I am plotting using markers, in a similar way than this example: http://matplotlib.sourceforge.net/examples/pylab_examples/legend_demo2.html As you can see in the example above, the markers in the legend appear twice: 'green circle' 'green circle' oscillatory. Is it possible to make the markers to appear only once, like 'green circle' oscillatory ? You can use the keyword numpoints in the legend method: legend( (l2, l4), ('oscillatory', 'damped'), 'upper right', shadow=True, numpoints=1) should do the job. mm Regards, Alejandro. - 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
Re: [Matplotlib-users] Make markers in legend to appear only once
Alejandro Weinstein wrote: On Mon, Dec 1, 2008 at 7:13 AM, Manuel Metz [EMAIL PROTECTED] wrote: You can use the keyword numpoints in the legend method: Thank you! It did the trick. Now how you conclude that from the documentation is a mystery: From the docs: numpoints: integer The number of points in the legend line, default is 4 Ah, that's apparently a bug in the docs, which I've fixed in the sources. Regards, Alejandro. - 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
Re: [Matplotlib-users] Make markers in legend to appear only once
Manuel Metz wrote: Alejandro Weinstein wrote: On Mon, Dec 1, 2008 at 7:13 AM, Manuel Metz [EMAIL PROTECTED] wrote: You can use the keyword numpoints in the legend method: Thank you! It did the trick. Now how you conclude that from the documentation is a mystery: From the docs: numpoints: integer The number of points in the legend line, default is 4 Ah, that's apparently a bug in the docs, which I've fixed in the sources. I have to correct myself. John Hunter applied a patch which fixed the docs. Regards, Alejandro. - 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 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] Please help with 3d scatter plot
Jeremy Conlin wrote: I have a function (shown below) that would take a 3D numpy array and plot points in 3D. I recently updated my matplotlib with the latest Enthought Python Distribution and now it doesn't work; I guess matplotlib changed the api a little bit. The first problem arises because there is no matplotlib.axes3d anymore. I can't find the equivalent in the newest version. Can someone help me figure this out? The axes3d support has been completely removed in matplotlib 0.98.x Thanks, Jeremy #=== import matplotlib.pyplot as pyplot import matplotlib.axes3d as p3 def PlotPoints(P): fig = pyplot.figure() ax = p3.Axes3D(fig) ax.plot3D(P[:,0],P[:,1],P[:,2],'.') pyplot.show() return ax - 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
Re: [Matplotlib-users] Using Hex number with shape syntax
stuartornum wrote: Hi, I am just playing around with different shapes and colours at the moment, I have managed the standard colours like this: plot(Time, Value, 'r.') Which obviously prints a red dot. However how do use the hex colour map with the ., I have tried: plot(Time, Value, '#330066.') plot(Time, Value, '#330066,.') plot(Time, Value, '#330066' '.') plot(Time, Value, '#330066', '.') Not quite sure on the syntax. Use the named kwarg linestyle: plot(Time, Value, '#330066', linestyle='.') - 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] draw upper and lower limits
Antonino Cucchiara wrote: Hi, I have some graphs with lower and upper limits. I found a couple of ideas online, but nothing like plotting symbols like arrows. I am using the mathtex upperarrow symbol but it is quite unconfortable positioning the tex character in the righ X-Y position. Do you know if there is an easier way to plot arrows as markers? Thanks, Nino Have a look at examples/pylab_examples/errorbar_limits.py. This shows how to plot upper/lower limits errorbars ... (if this is what you need) - 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] how add axes scale to my plot?
sa6113 wrote: I am using matplotlib to draw and show my plot, now I want to know how may I add manual axes scale to it. I need to manually show the axes scale (from min to max value that I have) the below is some part of my code. . . . from matplotlib.figureimport Figure self.fig = Figure( figsize =5, 4 )) yLine = self.ax.plot( xData, yData, 'ro-', linewidth = 2 ) fitLine = self.ax.plot( xData, fitData,'bo-', linewidth = 1 ) self.ax.set_xlabel('X') self.ax.set_ylabel('Y ) Maybe this is what you need: self.ax.set_xlim(xmin, xmax) ? - 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] import pylab produces rounding error
John Hunter wrote: On Wed, Jul 16, 2008 at 6:12 AM, Angela Rivera Campos [EMAIL PROTECTED] wrote: Hi, again I've trying to install everything, from the begining on another machine, this one's running openSUSE 10.3. So I've installed the latest versions of numpy, scipy and matplotlib and I've discovered something new which also happens in the first machine, the one with openSUSE 10.2. The first time I imported pylab this is what I got: - from pylab import * /usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py:69: GtkWarning: could not open display If you cannot open the display, most likely it is because either you are running as root (bad, bad) or you are running over a remot connection (ssh) and do not have X11 forwarding properly enabled or configures. If you want to use mpl with an interactive window, you will need to have access to the display. The fact that you see this error only on the first time you import pylab is typical of exceptions that are thrown at module import time -- python only tries to import once so you see the exception only once. To solve this, trying running as a normal user rather than root or sudo, and if you are on a remote machine, try using ssh -X to enable X11 forwarding. We will need to know more about exactly what you are doing to help. For remote access you also need to allow the remote machine to access the display via xhost +name on the local machine. So googling a bit, I've found that to avoid this error an option would be to add, before the pylab import, the following: import matplotlib matplotlib.use('Agg') This way the results floating problem disappears and I've got the correct tuples, though now I can't make my script show the figure I'm trying to plot. Is this related with matplotlibrc configuration? I haven't modified this file and the only lines that are not commented are backend : GTKAgg numerix : numpy # numpy, Numeric or numarray Running my script with and without these lines with --verbose-debug, I've found that when they're written I get: backend agg version v2.2 and when they are not: backend GTKAgg version 2.10.6 This isn't a problem with matplotlib, but with the connection to the display as I mentioned above. Hopefully once you get the display problem sorted out, all will be well. Let us know. 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
Re: [Matplotlib-users] twinx memory leak
John Hunter wrote: On Mon, Jul 14, 2008 at 3:05 PM, Michael Droettboom [EMAIL PROTECTED] wrote: I can confirm this. Commenting out del Gcf.figs[num] in Gcf.destroy (in _pylab_helpers.py) also seems to resolve the leak. But I have no idea why, so I won't commit it just yet. I don't have much time to look deeper now. Does anyone (who probably understands figure management better than me) have an idea what might cause this? Can you post the script you are using to test -- I am a little confused from reading this thread by whether or not twinx is implicated. Also, I saw that you committed some changes vis-a-vis the twinx leak r5747 | mdboom | 2008-07-11 13:21:53 -0500 (Fri, 11 Jul 2008) | 2 lines Fix memory leak when using shared axes. so I thought that part was resolved already... JDH I use a modified version of the script Laurent Oget posted (see attachment). Here is the output if I don't comment out PL.close(1). ~/python/test$ python looptest.py -dGTK 0 GC 69354 69354 0 13854 100 GC 84354 150 0 15163 200 GC 99354 150 0 16306 300 GC 114354 150 0 17364 400 GC 129354 150 0 18576 ~/python/test$ python looptest.py -dTK 0 GC 69521 69521 0 14065 100 GC 84521 150 0 15444 200 GC 99521 150 0 16581 300 GC 114521 150 0 17719 400 GC 129521 150 0 18715 ~/python/test$ python looptest.py -dPS 0 GC 59307 59307 0 7705 100 GC 59307 0 0 8037 200 GC 59307 0 0 8038 300 GC 59307 0 0 8038 400 GC 59307 0 0 8038 (so for the window-less backend PS no objects are left) And now I commented out the line PL.close(1): ~/python/test$ python looptest.py -dGTK 0 GC 69379 69379 0 13855 100 GC 69379 0 0 14253 200 GC 69379 0 0 14253 300 GC 69379 0 0 14253 400 GC 69379 0 0 14252 Manuel import math import gc import pylab as PL from matplotlib.cbook import report_memory def looptest(): oldlen = 0 for i in xrange(401): fig=PL.figure(1) ax = fig.gca() ax=fig.add_subplot(211) ax.set_position((0,0,0.9,0.45)) ax1=PL.twinx(ax) t = PL.arange(1000) st = PL.sin(t*0.01) ax.plot(t,st) fig.clf() # any of these causes a memleak #PL.close(1) #PL.close(fig) #PL.close() gc.collect() val = report_memory(i) if i % 100 == 0: print i, GC, print len(gc.get_objects()), len(gc.get_objects())-oldlen, print len(gc.garbage), print val oldlen = len(gc.get_objects()) looptest()- 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] twinx memory leak
Michael Droettboom wrote: Thanks for the report. So we can diagnose this, what version of matplotlib are you reporting this for? Also, you may be interested in the following FAQ (and the one following it): http://matplotlib.sourceforge.net/faq.html#LEAKS Hi, I tested this with the lastest svn, and I do also see a leak. But it's not related to twinx, but to pylab.close(). If I just comment out this one line, the memleak disappears ... Manuel Cheers, Mike laurent oget wrote: i forgot two imports. import math import gc import pylab as PL def looptest(): while(1): fig=PL.figure(1) ax=fig.add_subplot(211) ax.set_position((0,0,0.9,0.45)) ax1=PL.twinx(ax) t=range(1000) st=[math.sin(x*0.01) for x in t] ax.plot(t,st) fig.clf() PL.close(1) gc.collect() print GC print len(gc.get_objects()) print len(gc.garbage) looptest() 2008/7/11 laurent oget [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: I think i narrowed down the memory leak i have been chasing for a while. If i remove the call to twinx i get a slow leak, which would cause me trouble after a very long time. With the call to twinx, however i am losing thousands of objects at each loop. Thanks, Laurent import pylab as PL def looptest(): while(1): fig=PL.figure(1) ax=fig.add_subplot(211) ax.set_position((0,0,0.9,0.45)) ax1=PL.twinx(ax) t=range(1000) st=[math.sin(x*0.01) for x in t] ax.plot(t,st) fig.clf() PL.close(1) gc.collect() print GC print len(gc.get_objects()) print len(gc.garbage) looptest() - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] twinx memory leak
Michael Droettboom wrote: Which backend? GTK, GTKAgg, TK, but not with any backend without a window: Agg, Cairo, PS, PDF, SVG ... Cheers, Manuel Cheers, Mike Manuel Metz wrote: Michael Droettboom wrote: Thanks for the report. So we can diagnose this, what version of matplotlib are you reporting this for? Also, you may be interested in the following FAQ (and the one following it): http://matplotlib.sourceforge.net/faq.html#LEAKS Hi, I tested this with the lastest svn, and I do also see a leak. But it's not related to twinx, but to pylab.close(). If I just comment out this one line, the memleak disappears ... Manuel Cheers, Mike laurent oget wrote: i forgot two imports. import math import gc import pylab as PL def looptest(): while(1): fig=PL.figure(1) ax=fig.add_subplot(211) ax.set_position((0,0,0.9,0.45)) ax1=PL.twinx(ax) t=range(1000) st=[math.sin(x*0.01) for x in t] ax.plot(t,st) fig.clf() PL.close(1) gc.collect() print GC print len(gc.get_objects()) print len(gc.garbage) looptest() 2008/7/11 laurent oget [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: I think i narrowed down the memory leak i have been chasing for a while. If i remove the call to twinx i get a slow leak, which would cause me trouble after a very long time. With the call to twinx, however i am losing thousands of objects at each loop. Thanks, Laurent import pylab as PL def looptest(): while(1): fig=PL.figure(1) ax=fig.add_subplot(211) ax.set_position((0,0,0.9,0.45)) ax1=PL.twinx(ax) t=range(1000) st=[math.sin(x*0.01) for x in t] ax.plot(t,st) fig.clf() PL.close(1) gc.collect() print GC print len(gc.get_objects()) print len(gc.garbage) looptest() - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] import pylab produces rounding error
Angela Rivera Campos wrote: Hi, I'm quite a newbie on matplotlib. I'm trying to get some data from a file. I've got a function that reads the data from the file and stores it in a tuple as a set of floats. When I use this without importing pylab it just go well but when I do it after importing this module there's a rounding and I don't get the proper data: import myModule as m spc = m.Collection() spc.ReadCollection('file') sp = spc.GetCSVBlock('00074') sp.GetDataRecord(0) (0.0, 0.10001, 0.0503450001, 616.0, 24.818, 616.0) --- import myModule as m from pylab import * spc = m.Collection() spc.ReadCollection('file') sp = spc.GetCSVBlock('00074') sp.GetDataRecord(0) (0.0, 0.0, 0.0, 616.0, 24.0, 616.0) What's the problem here? What can I do to avoid it? Try import pylab instead of from pylab import * Manuel Thanks in advance, AR - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug: mad interference between matplotlib and openbabel
Hi Florian, you should try import pylab or import pylab as P. from pylab import * might overwrite some functions or methods ... if a pylab function/method has the same name as one in a module imported with * before. See the following example: #file a.py def foo(): print I'm a # file b.py def foo(): print I'm b # file import_ab.py from a import * foo() from b import * foo() The output is: I'm a I'm b as the function foo() is overwritten by the second import... Manuel Florian Koelling wrote: Hi folks! I' m working on a code to identify ligand's information from pdb crystal structures. For this purpose I use the openbabel package. I' m encoding the ligand's information in smarts. For checking if the smarts are assigned correctly I 'm writing a sdf file (to control whether the features are placed correctly). This part works fine - but I get into deep trouble when I try to plot simple count statistics of my smarts, when I use the from pylab import* , or from pylab import matplotlib statements (trouble appears just after IMPORTING - I do not use a pylab function in this state of the program yet): Smart features are not recognized anymore, the feature coordinates are shifted and so on - But I don' t know why. my code snip: import os from numpy import* from time import* SMARTING import numpy import openbabel from openbabel import* import pybel from pybel import* LIGAND DETECTION import Bio.PDB from Bio.PDB import* import Numeric from Bio.PDB.StructureBuilder import * #from pylab import* -- RAISES THE PROBLEMS def projecting_smarts(isolated_ligand, method ,color, output): Bio PDB- 2 get ligand coords parser =PDBParser() structure = parser.get_structure('s', isolated_ligand) atom = structure.get_atoms() ### print smarting successfully started! mol = readfile(pdb, isolated_ligand).next() smart_list= [] result_acceptor = method.findall(mol)#finds acceptors for i in result_acceptor:#Result Donor= list from tuples list_element1 = (list(i)[0]) # - resolve hierarchy smart_list.append(list_element1) print smart_list,ACCEPTOR_LIST #list of smart features Maybe one of you might know what to do! Thanx alot! flo - 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 - 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
Re: [Matplotlib-users] Version 0.98 behavior change - scatter
Eric Firing wrote: Michael Droettboom wrote: As a quick-fix workaround, you can do: from matplotlib.pyplot import * p = scatter([0,1,2,3], [4,5,6,7], c ='k', alpha=0, edgecolor = 'k') p._alpha = 1.0 p.set_edgecolor('k') show() But the deeper question is for the rest of the list is... what's the correct behavior? Should we just revert to what it did in 0.91, or add another kwarg to set the edge alpha? I think 0.91 behavior was odd, if alpha applied only to the fill; making alpha apply to everything strikes me as a bugfix, not a regression, so I would not favor reverting to the old behavior. What is really needed may be some rethinking (or perhaps just codification) of overall alpha handling throughout mpl, including kwargs and explicit color specification. At present it seems rather messy, for understandable historical reasons, partly owing to backend quirks and limitations (e.g., no alpha at all in postscript). If the kwarg strategy is chosen, then everywhere there can be an edge and a face, we should support alpha= to apply to both, edgealpha= for the edge alone, and facealpha= for the face. Or something like that. +1 Eric Cheers, Mike S Murthy Kambhampaty wrote: There seems to have been a change to the behavior of the 'alpha' keyword option to scatter(): where previously alpha only affected the facecolor, and the edgecolor always had an alpha of 1.0, alpha now seems to affect both facecolor and edgecolor. Tested with 0.93.1 and 0.98. Tested with new API for 0.98 as well. ax.scatter(xSeries, ySeries, s=sY, c='k', alpha=0, edgecolor='k') and plot1=ax.scatter(xSeries, ySeries, s=sY, c='k') plot1.set_alpha(0) plot1.set_edgecolor('k') Is there any way to get the old behavior using version 0.98 and forward? Thanks, Murthy - 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 - 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 - 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
Re: [Matplotlib-users] How is the size value used to generate symbols?
Neil Crighton wrote: I'd like to plot values where the area of a marker is proportional to some value. How is the size value given in, say: scatter(x,y,'o',s=10) used to generate the markers? By eye it looks like the size value is proportional to the area (i.e. proportional to the radius squared for circle markers), but it would be nice to know for sure. Hi Neil, good eyes ;-) Have a look at the scatter documentation: s is a size in points^2. It is a scalar or an array of the same length as x and y. Manuel Thanks, Neil - 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 - 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] hist is broken in SVN when using numpy 1.1.0.dev5077
Hi Glenn, please update numpy!!! Indeed, it is the other way around: The new keyword-arg isn't deprecated it is *NEW* (has been added in numpy revision r5085, you are using r5077). Have a look at this: http://projects.scipy.org/scipy/numpy/roadmap#Semanticchangeforhistogram Please note that this also means a change in the semantic of the matplotlib hist API, see API_CHANGES. Manuel G Jones wrote: Hello, I am using r5186 from the SVN with numpy 1.1.0.dev5077. When I try hist(rand(512),arange(-128,127)) I get: --- type 'exceptions.TypeError' Traceback (most recent call last) /home/gej/casper_work/backend/qtSpec/src/ipython console in module() /usr/lib/python2.5/site-packages/matplotlib/pyplot.py in hist(*args, **kwargs) 1688 hold(h) 1689 try: - 1690 ret = gca().hist(*args, **kwargs) 1691 draw_if_interactive() 1692 except: /usr/lib/python2.5/site-packages/matplotlib/axes.py in hist(self, x, bins, normed, cumulative, bottom, histtype, align, orientation, width, log, **kwargs) 5472 if not self._hold: self.cla() 5473 n, bins = np.histogram(x, bins, range=None, - 5474 normed=bool(normed), new=True) 5475 5476 if cumulative: type 'exceptions.TypeError': histogram() got an unexpected keyword argument 'new' I guess the new keyword argument has been deprecated? - 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 - 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] Easiest way of drawing a circle?
Søren Nielsen wrote: Hi, I'm using wxpython with matplotlib, I now have a figurecanvas embedded in my program and I can plot stuff using: a = self.fig.gca() a.plot(x,y) But what is the easiest and fastest way to draw a circle? I saw that the artist class has a draw_arc function.. but I don't know how to use the artist class with my figure canvas.. Like I can't do a.draw_arc() for instance ... Can anyone point me in the right direction? Thanks, Soren from matplotlib.patches import Circle cir = Circle( (0,0), radius=0.5) a.add_patch(cir) Manuel - 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] Custom Pie-Like Marker In Scatter
Andrea Gavana wrote: Hi All, I was wondering about custom markers in the scatter method, and I thought to ask here for some suggestions. Basically, I have 3 variables to show, which are oil, gas and water production. I would like to define the bubble size by the sum of these three variables (or something akin), and then I would like to be able to split the bubble marker in 3 sections (like having a small pie chart in place of the marker), with each section area proportional to the value of oil, gas and water production respectively. I know this might sound not very clear, I attach a small picture of what I mean (the picture shows the bubble divided into 2 sections, but the purpose is the same). I know about custom marker, but I am not so expert with matplotlib to be able to implement it... could someone please share some suggestion on how to do this? Thank you very much. Andrea. Hi, as you already suggested, you have to do a little hand-work, but its not too hard. I attached an example, which you can use as a starting point... Manuel Imagination Is The Only Weapon In The War Against Reality. http://xoomer.alice.it/infinity77/ - 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 inline: pie_example.pngimport pylab from numpy import * # # first define the ratios # r1 = 0.2 # 20% r2 = r1 + 0.4 # 40% # # define some sizes of the scatter marker # sizes = [60,80,120] # # calculate the points of the first pie marker # # these are just the origin (0,0) + # some points on a circle cos,sin # x = [0] + cos(linspace(0, 2*math.pi*r1, 10)).tolist() y = [0] + sin(linspace(0, 2*math.pi*r1, 10)).tolist() xy1 = zip(x,y) # ... x = [0] + cos(linspace(2*math.pi*r1, 2*math.pi*r2, 10)).tolist() y = [0] + sin(linspace(2*math.pi*r1, 2*math.pi*r2, 10)).tolist() xy2 = zip(x,y) x = [0] + cos(linspace(2*math.pi*r2, 2*math.pi, 10)).tolist() y = [0] + sin(linspace(2*math.pi*r2, 2*math.pi, 10)).tolist() xy3 = zip(x,y) pylab.scatter( arange(3), arange(3), marker=(xy1,0), s=sizes, facecolor='blue' ) pylab.scatter( arange(3), arange(3), marker=(xy2,0), s=sizes, facecolor='green' ) pylab.scatter( arange(3), arange(3), marker=(xy3,0), s=sizes, facecolor='red' ) pylab.show()- 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] contour plot axis labels
Jochen Küpper wrote: Hi, when I create a contour plot with the following grid: xval = [ 1.3324, 1.9971, 1.00016618] yval = [250, 260, 270] data = ones((3,3)) contourf(xval, yval, data) matplotlib creates a contour plot with an x-axes labels of 0.324, ... and adds a +1 in the lower right corner. Actually, it is often not visible at all. How can I set it to always use the correct values directly as labels? Greetings, Jochen Hi, you can use gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) see also examples/newscalarformatter_demo.py Manuel - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. 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] How do I widen the space for y coordinate ticks?
carlwenrich wrote: without having to increase the width of the whole chart? Have a look at examples/major_minor_demo1.py and examples/major_minor_demo2.py. I guess you are looking for something like this ... Manuel - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Efficient scatter() w/ markers from plot()?
Ted Drain wrote: I need to efficiently plot a set of x,y points where each point has a different color. I tried multiple calls to plot() with a single point each but that is way too slow. I switched to using scatter() and passing in a list of colors which works great. However, I'd really like to have the marker options from plot() (things like '+' and 'x') which don't work w/ scatter. What's the easiest way to get the markers from plot() with the efficiency (and multi-colors) from scatter? Thanks, Ted Hi Ted, oh - you can use '+' and 'x' and many more markers with scatter. It's unfortunately just not documented in the current release but is fixed in the repository. pylab.scatter(x,y, marker=(4,2)) gives a '+', and pylab.scatter(x,y, marker=(4,2,math.pi/4.)) gives a 'x'. The logic is a follows: marker(numside, type, angle) numside is the number of edges, i.e. 4 for a plus or a cross. type : 0 - a filled symbol, 1 - a star-like symbol, 2 - a asterisk like symbol angle: the symbol gets rotated by this angle So in principle with this you can produce an endless number of different markers... :-) Manuel -- --- Manuel Metz [EMAIL PROTECTED] Argelander Institut fuer Astronomie Auf dem Huegel 71 (room 3.06) D - 53121 Bonn E-Mail: [EMAIL PROTECTED] Web:www.astro.uni-bonn.de/~mmetz Phone: (+49) 228 / 73-3660 Fax:(+49) 228 / 73-3672 --- - 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] Point-specific colors with scatter
Fred Mailhot wrote: Hi there, I've got 4 time series that live in a 2-d space (imagine points at (1,1), (1,2),(2,1), and (2,2) that drift a little over time), and I'm using scatter() to show them. How can I plot so that each of the groups of points has the same colour? I've checked the docs and examples and can't seem to find quite what I'm looking for. A sample script or indication of where to look in the docs would be appreciated. Many thanks! Fred. What you can do is something like this: x = arange(4) # just some test-data y = x**2 c = ['#ff', '#cc3300', '#996600', '#66cc00'] # the color sequence pylab.scatter(x,y, color=c) I think you get what you are looking for if you do this for each group separately. Manuel - 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] Scatter legend doesn't show markers
Erik Tollerud wrote: I use the scatter(x,y) command to make scatter plots, but I noticed today (on the SVN version of mpl) that when I call legend() after giving scatter(x,y,label='somelabel') , the legend doesn't show the marker symbols - it only has a square patch colored in the color that was used for the scatter plot. Is this a bug, or intended behavior? (and is there a work-around to show the marker symbols in the legend?) Hi Erik, I would say it's neither a bug nor an intended bahavior. It's just not implemented -- so you might call it a misbehaviour ;-) I too hope that this will be fixed/added, since it's an issue open some time now (I guess since scatter was implemented !?) Manuel - 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] dashes and dpi?
Mark Bakker wrote: Alan - You started a discussion about dpi on the figures. Yet here you claim that 1pt = 1/72 inch. Is that always the case? Yes, I that's *by definition* always the case ! pt is a point - not a dot or a pixel !!! Point is a unit of measurement used in typography that is equal to 1/72 inch. It is used primarily for representing the height of characters and the amount of space between lines, also known as leading. -- see http://support.microsoft.com/kb/76388 Manuel And why? How does mpl figure that out, if there are also different dpi settings? The plot thickens... Mark Alan Isaac wrote: Note: 1pt = 1/72 inch hth, Alan Isaac - 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 - 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] Subplot Questions
Cheng-Kong Wu wrote: Dear all, I am working on sending vibration results to two plots: subplot(211) and subplot(212). I have the following questions: 1. How to define the size of the figure? I will eventually import the figure into Microsoft Word, and I hope I can fit the figure into one page. fig = pylab.figure(figsize=(6,10), dpi=96) [...] pylab.savefig(filename.eps, dpi=96) ,where figsize in the figure size in inches. 2. If I want to make both the subplots square sized, how do I achieve it? xylims = (-10,10) # set your axis limits here pylab.gca().set_xlim(xylims) pylab.gca().set_ylim(xylims) pylab.gca().set_aspect('equal') That's the quick-and-easy way. If the limits differ, you can create your own new axes instance, have a look at axes_demo.py in the examples. Manuel Thanks! Cheng-Kong Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - 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 - 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] [matplotlib] gscatter
Hi, you are limited to 10 named symbols. But you can use much more symbols with scatter !!! Have a look at examples/scatter_star_symbols.py. You can use: pylab.scatter(x,y,marker=(5,0)) produces a 5-sided regular polygon. pylab.scatter(x,y,marker=(5,1)) produces a starlike polygon pylab.scatter(x,y,marker=(5,2)) produces an asterisk. You can even define your own symbols by defining the vertices of a polygon: verts = zip( [x1,x2,x3...], [y1,y2,y3,...]) pylab.scatter(x,y,marker=(verts,0)) Note that there is a third, optional parameter for the marker keyword, ie. marker=(5,0,math.pi/4.) that defines the rotation of a symbol. Manuel [EMAIL PROTECTED] wrote: I was wondering if there exist a functino like Matlab (TM) gscatter in matplot lib but I coulnd't find one. I also seen that in matplot lib we are limited to 10 symbols in scatter while in MT we have 13 (and I have to plot 12 :))) is it possible to implement the new function (gscatter) and other symbols ;) thanks Giorgio - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [matplotlib] gscatter
[EMAIL PROTECTED] wrote: Thanks ! i didn't know that. Do you know also if it is possible to have something similar to a scatter group ? Sorry, but what do you mean by scatter group ? Thanks Giorgio - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [matplotlib] gscatter
[EMAIL PROTECTED] wrote: matalb has a gscatter command that work like this GSCATTER(X,Y,G) creates a scatter plot of the vectors X and Y grouped by G. Points with the same value of G are shown with the same color and marker. G is a grouping variable defined as a vector, a cell array of strings, or a string matrix, and it must have the same number of rows as X and Y. Alternatively G can be a cell array of grouping variables (such as {G1 G2 G3}) to group the values in X by each unique combination of grouping variable values. GSCATTER(X,Y,G,CLR,SYM,SIZ) specifies the colors, markers, and size to use. CLR is either a string of color specifications or a three-column matrix of color specifications. SYM is a string of marker specifications. Type help plot for more information. For example, if SYM='o+x', the first group will be plotted with a circle, the second with plus, and the third with x. SIZ is a marker size to use for all plots. By default, the marker is '.'. GSCATTER(X,Y,G,CLR,SYM,SIZ,DOLEG) lets you control whether legends are created. Set DOLEG to 'on' (default) or 'off'. GSCATTER(X,Y,G,CLR,SYM,SIZ,DOLEG,XNAM,YNAM) specifies XNAM and YNAM as the names of the X and Y variables. Each must be a character string. If you omit XNAM and YNAM, GSCATTER attempts to determine the names of the variables passed in as the first and second arguments. H = GSCATTER(...) returns an array of handles to the objects created. Example: Scatter plot of car data coded by country. load carsmall gscatter(Weight, MPG, Origin) See also grpstats, grp2idx. it's very very useful instead of doing multiple scatter and merging them togheter. I think it can be easily implemented but i don't know how much request there is for it. Giorgio I don't think something like that work in matplotlib with scatter for the marker parameter. But it's possible to use an array of sizes and colors, ie. s = [20,30,40] x = arange(3) y = arange(3) scatter(x,y,s=s) See scatter doc string: Arguments s and c can also be given as kwargs; this is encouraged for readability. s is a size in points^2. It is a scalar or an array of the same length as x and y. c is a color and can be a single color format string, or a sequence of color specifications of length N, or a sequence of N numbers to be mapped to colors using the cmap and norm specified via kwargs (see below). Note that c should not be a single numeric RGB or RGBA sequence because that is indistinguishable from an array of values to be colormapped. c can be a 2-D array in which the rows are RGB or RGBA, however. Manuel - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] setting manual axis range?
Darran Edmundson wrote: Two simple questions: 1) How does one create a simple xy plot with a user-specified y-axis range? Combination of setting kwargs ylim and autoscale_on doesn't seem to do it ... pylab.ylim( (ymin, ymax) ) or pylab.gca().set_ylim( (ymin, ymax) ) ? 2) If I want to regenerate this plot with revised y data (but same axes), what is the quickest option? At the moment I'm doing an ax.clear(), presumably tossing out everything and starting from scratch. I do it this way - just replot everthing ... As always, any help is much appreciated. Cheers, Darran. - 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] facecolor and scatter
It seems that the keywords facecolor (or color) and alpha can not be used simultaniously when using scatter: import pylab x = pylab.npy.arange(0,10) pylab.scatter(x,x, s=50, alpha=0.5) pylab.scatter(x,x+0.5, facecolor='blue', s=50, alpha=0.5) pylab.show() The alpha value of the second call is not set correctly, but kept fix at alpha=1.0. Any idea ??? Manuel - 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] facecolor and scatter
John, svn works fine now. thanks. John Hunter wrote: On 10/18/07, John Hunter [EMAIL PROTECTED] wrote: You should use the c argument for scatter -- this controls the facecolor. scatter(x,x+0.5, c='blue', s=50, alpha=0.5) This is a bit of an anachronism from matlab compatibility. This is now fixed in svn, so you can use facecolor as well. Note that for constant size and color markers, plot will be significantly faster ax.plot(x, x+0.5, mfc='blue', alpha=0.5, ms=20) JDH - 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] error bars on scatter plot
Hi, pylab.scatter(x,y) pylab.errorbar(x,y,yerr,linestyle='None') if you want to use scatter, or alternatively: pylab.errorbar(x,y,yerr,fmt='o',linestyle='None') Manuel Armen Nalian wrote: Hello, I was wondering where I can get an example of a scatter plot with error bars. I have time measurements and the stds 0 23 0.23 1 25.1 0.21 4 27 0.1 7 29 0.21 9 35 0.1 how can I get a scatter plot with error bars? I know I can get a bar plot, but I need just a symbol with error bars. Thank you, Armen - 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 - 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] error bars on scatter plot
Hi, pylab.scatter(x,y) pylab.errorbar(x,y,yerr,linestyle='None') if you want to use scatter, or alternatively: pylab.errorbar(x,y,yerr,fmt='o',linestyle='None') Manuel Armen Nalian wrote: Hello, I was wondering where I can get an example of a scatter plot with error bars. I have time measurements and the stds 0 23 0.23 1 25.1 0.21 4 27 0.1 7 29 0.21 9 35 0.1 how can I get a scatter plot with error bars? I know I can get a bar plot, but I need just a symbol with error bars. Thank you, Armen - 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 - 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] combine eps files into a ps file ?
On a Linux box: psmerge -ooutfile.ps figure1.eps figure2.eps Anyway, I guess you need an external tool to do this ... Manuel Lingyun Yang wrote: Hi, I am using matplotlib to visualize my data, but the data sometimes have several sets. Can I plot each set as usual to a EPS file, and combine these EPS file into a single ps file, each page of this ps file is only one EPS file I got before. Thanks. Lingyun - 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 - 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