Re: [Matplotlib-users] how to make scatter plot and bar graphs in same figure?

2009-02-18 Thread Manuel Metz
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

Re: [Matplotlib-users] Plotting histograms with zero counts

2008-12-01 Thread Manuel Metz
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

Re: [Matplotlib-users] Plotting histograms with zero counts

2008-12-01 Thread Manuel Metz
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

Re: [Matplotlib-users] Make markers in legend to appear only once

2008-12-01 Thread Manuel Metz
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'

Re: [Matplotlib-users] Make markers in legend to appear only once

2008-12-01 Thread Manuel Metz
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

Re: [Matplotlib-users] Make markers in legend to appear only once

2008-12-01 Thread Manuel Metz
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

Re: [Matplotlib-users] Please help with 3d scatter plot

2008-10-27 Thread Manuel Metz
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

Re: [Matplotlib-users] Using Hex number with shape syntax

2008-08-04 Thread Manuel Metz
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,

Re: [Matplotlib-users] draw upper and lower limits

2008-07-31 Thread Manuel Metz
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

Re: [Matplotlib-users] how add axes scale to my plot?

2008-07-30 Thread Manuel Metz
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

Re: [Matplotlib-users] import pylab produces rounding error

2008-07-16 Thread Manuel Metz
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

Re: [Matplotlib-users] twinx memory leak

2008-07-15 Thread Manuel Metz
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

Re: [Matplotlib-users] twinx memory leak

2008-07-14 Thread Manuel Metz
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

Re: [Matplotlib-users] twinx memory leak

2008-07-14 Thread Manuel Metz
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

Re: [Matplotlib-users] import pylab produces rounding error

2008-07-10 Thread Manuel Metz
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

Re: [Matplotlib-users] Bug: mad interference between matplotlib and openbabel

2008-06-26 Thread Manuel Metz
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

Re: [Matplotlib-users] Version 0.98 behavior change - scatter

2008-06-16 Thread Manuel Metz
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...

Re: [Matplotlib-users] How is the size value used to generate symbols?

2008-05-23 Thread Manuel Metz
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

Re: [Matplotlib-users] hist is broken in SVN when using numpy 1.1.0.dev5077

2008-05-19 Thread Manuel Metz
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

Re: [Matplotlib-users] Easiest way of drawing a circle?

2008-05-08 Thread Manuel Metz
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

Re: [Matplotlib-users] Custom Pie-Like Marker In Scatter

2008-04-18 Thread Manuel Metz
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

Re: [Matplotlib-users] contour plot axis labels

2008-04-08 Thread Manuel Metz
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

Re: [Matplotlib-users] How do I widen the space for y coordinate ticks?

2008-04-03 Thread Manuel Metz
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 -

Re: [Matplotlib-users] Efficient scatter() w/ markers from plot()?

2008-03-20 Thread Manuel Metz
-- --- 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

Re: [Matplotlib-users] Point-specific colors with scatter

2008-03-14 Thread Manuel Metz
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

Re: [Matplotlib-users] Scatter legend doesn't show markers

2008-02-23 Thread Manuel Metz
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

Re: [Matplotlib-users] dashes and dpi?

2008-02-01 Thread Manuel Metz
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

Re: [Matplotlib-users] Subplot Questions

2008-01-28 Thread Manuel Metz
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

Re: [Matplotlib-users] [matplotlib] gscatter

2008-01-10 Thread Manuel Metz
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

Re: [Matplotlib-users] [matplotlib] gscatter

2008-01-10 Thread Manuel Metz
[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

Re: [Matplotlib-users] [matplotlib] gscatter

2008-01-10 Thread Manuel Metz
[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

Re: [Matplotlib-users] setting manual axis range?

2007-10-30 Thread Manuel Metz
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

[Matplotlib-users] facecolor and scatter

2007-10-18 Thread Manuel Metz
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

Re: [Matplotlib-users] facecolor and scatter

2007-10-18 Thread Manuel Metz
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

Re: [Matplotlib-users] error bars on scatter plot

2007-09-13 Thread Manuel Metz
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

Re: [Matplotlib-users] error bars on scatter plot

2007-09-13 Thread Manuel Metz
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

Re: [Matplotlib-users] combine eps files into a ps file ?

2007-09-12 Thread Manuel Metz
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