Re: [Matplotlib-users] Histograms

2011-09-29 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 micta...@gmail.com 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-users] Histograms

2011-09-28 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

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:

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 : 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 understand hist

[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

[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

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):

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 Pau
ok, I installed now scipy Traceback (most recent call last): File ./prova.py, line 14, in module 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 vim.u...@googlemail.com: Hello! thanks

Re: [Matplotlib-users] histograms ...

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

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...

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 vim.u...@googlemail.com wrote: Hello,

Re: [Matplotlib-users] histograms ...

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

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

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)

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