Re: [Matplotlib-users] Histograms

2011-09-28 Thread Michal
Stupid mistake, My data array was wrong I had it just to rotate and now it is working. On Thu, Sep 29, 2011 at 2:01 PM, Michal wrote: > Thank you for the links, but I had trouble to get them running with > Matplotlib 1.0.1. However, I downloaded the source code from the Matplotlib > book ( http:

Re: [Matplotlib-users] Histograms

2011-09-28 Thread Michal
Thank you for the links, but I had trouble to get them running with Matplotlib 1.0.1. However, I downloaded the source code from the Matplotlib book ( http://www.packtpub.com/support?nid=4110 ) and in chapter 9 is an example (7900_09_04_cvs.py) with work with csv files. I have tried to modify the

Re: [Matplotlib-users] Histograms

2011-09-28 Thread Klonuo Umom
IMHO, when looking for basics and even more with intent to replicate some graph, it's easy to start by looking at matplotlib gallery: http://matplotlib.sourceforge.net/gallery.html and find best match. In you case: http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo_extended.h

[Matplotlib-users] Histograms

2011-09-27 Thread Michal
Hello, I have found the following histogram example http://gnuplot.sourceforge.net/demo/histograms.4.png which was created with the following gnuplot code: http://gnuplot.sourceforge.net/demo/histograms.4.gnu and with this data set http://212.182.0.171/cgi-bin/dwww/usr/share/doc/gnuplot-doc/examp

Re: [Matplotlib-users] histograms : xmax

2009-07-09 Thread Sebastian Busch
hey there! Pau wrote: > ... > 0.00e+00 1.00e-04 81039 > 1.00e-04 2.00e-04 4472 > 2.00e-04 3.00e-04 2033 > ... > > The bins are given by the two first number columns. > > For instance, the first bin is from 0.00e+00 to 1.00e-04 and has the > number of data 81039 hey pau! i do not unders

Re: [Matplotlib-users] histograms : xmax

2009-07-08 Thread Pau
Hello, any hint about this? If somebody wants to understand better what I mean, my data are here: www.aei.mpg.de/~pau/histo3.dat thanks Pau 2009/7/8 Pau : > Hello, > > two days ago Sebastian helped me to finish in a hurry a histogram with bar() > > I would like now to understand how to make t

[Matplotlib-users] histograms : xmax

2009-07-07 Thread Pau
Hello, two days ago Sebastian helped me to finish in a hurry a histogram with bar() I would like now to understand how to make the plot with hist() First of all, my data (after a massage) looks like : - 0.00e+00 1.00e-04 81039 1.00e-04 2.00e-04 4472 2

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Sebastian Busch
> Pau wrote: >> ... >> MODE: 0.00e+00 - 1.00e-04 >> >> (2226):** >>1: 1.00e-04 - 2.00e-04 ( 482):* >>2: 2.00e-04 - 3.00e-04 ( 273):

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Sebastian Busch
Pau wrote: > ... > 2009/7/5 Gökhan SEVER : >> On Sun, Jul 5, 2009 at 3:41 PM, Pau wrote: >>> ... >>> Traceback (most recent call last): >>> File "./prova.py", line 14, in >>>y.append(int(line.split('(')[1].split(')')[0])) >>> IndexError: list index out of range 2009/7/5 Sebastian Busch

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Gökhan SEVER
OK, You are one step closer to point out the error. Look for an instance of line. What does it output? Then try fiddling with the split() function and proper indexes. Haha, are you a Mediterranean person or what? On Sun, Jul 5, 2009 at 3:54 PM, Pau wrote: > Hello, > > thanks, yes, I had done

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Pau
Hello, thanks, yes, I had done this already. It's pointing to the append place for y, but I am absolutely lost at that line. I don't understand it. I guess this has to do with the format of the data (see previous e-mail) ---> 13y.append(int(line.split('(')[1].split(')')[0])) anyway... thank

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Gökhan SEVER
On Sun, Jul 5, 2009 at 3:41 PM, Pau wrote: > ok, I installed now scipy > > Traceback (most recent call last): > File "./prova.py", line 14, in >y.append(int(line.split('(')[1].split(')')[0])) > IndexError: list index out of range > > what is out of range? > > sorry for the spamming... :( >

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Pau
ok, I installed now scipy Traceback (most recent call last): File "./prova.py", line 14, in y.append(int(line.split('(')[1].split(')')[0])) IndexError: list index out of range what is out of range? sorry for the spamming... :( 2009/7/5 Pau : > Hello! > > thanks for the quick answer! > >

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Pau
Hello! thanks for the quick answer! I have removed the text lines (do you mean the ones starting with a hash, #? I removed those) It complained about from scipy import * # complained "ImportError: No module named scipy" So I commented it out and added from pylab import * But it's crashing:

Re: [Matplotlib-users] histograms ...

2009-07-05 Thread Sebastian Busch
Pau wrote: > ... > MODE: 0.00e+00 - 1.00e-04 > (2226):** >1: 1.00e-04 - 2.00e-04 ( 482):* >2: 2.00e-04 - 3.00e-04 ( 273): >3: 3.00e-04 - 4.00e-04 ( 173):**

[Matplotlib-users] histograms ...

2009-07-05 Thread Pau
Hello, I am trying to make a histogram with matplotlib and I do not understand the example I found http://n2.nabble.com/Python-MatPlotLib-histogram-example-td1922503.html I have a data file called "histo.dat" which looks like - # # Eccentricity on ent

Re: [Matplotlib-users] histograms and masked arrays

2007-03-14 Thread Eric Firing
Peter Melchior wrote: > Hello everybody, > > First I have to say, how much I appreciate using matplotlib. > > But there are some annoyances. One I stumbled over recently is that histograms > don't deal with masked arrays properly. Fixed now in svn. If you don't want to install from svn, use hi

[Matplotlib-users] histograms and masked arrays

2007-03-14 Thread Peter Melchior
Hello everybody, First I have to say, how much I appreciate using matplotlib. But there are some annoyances. One I stumbled over recently is that histograms don't deal with masked arrays properly. For example: from numpy import * from pylab import * bins = arange(21) data_masked = ma.masked_v

Re: [Matplotlib-users] histograms

2006-12-16 Thread Eric Firing
Simson, Using your example I get most of the values around 0.5, and the ends near 2.3. This is correct for a probability density function; the integral of the pdf over the range of the bins should be 1. This way the pdf values as a function of x don't change with changes in the number of bin

[Matplotlib-users] histograms

2006-12-16 Thread Simson Garfinkel
I'm plotting some histograms with hist() --- well, actually with ax.hist(), where ax is an axis --- and the "normed=1" isn't working the way I would expect. from pylab import * data = sin(arange(0.0,100,.01)) fig = figure() ax = fig.add_subplot(111) ax.hist(data,bins=50,normed=1,align='cen