[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: 2D Density Plot from a 2 columns DATA file
From: pythonaddicted () gmail ! com
Date: 2016-07-28 9:23:26
Message-ID: 78d35482-3047-4027-aa3c-1b1a6784d17a () googlegroups ! com
[Download RAW message or body]
I am trying from 2 days and I don't get a result. I have 3 thermometer and I repeat \
the measurement for 5 days. I have a file of 2 columns: the first is the thermometer \
number, the second is the value of the thermometer.
For example:
1 25
2 37
3 24
1 18
2 36
3 48
1 37
2 24
3 15
It is clear that every 3 rows, from the beginning, I have a day.
Now I would like to make a 2D density plot like this \
http://stackoverflow.com/questions/4128699/using-scipy-stats-gaussian-kde-with-2-dimensional-data
I just use the two columns of my file:
# Create some dummy data
rvs = np.append(X,
Y,
axis=1)
instead of:
# Create some dummy data
rvs = np.append(stats.norm.rvs(loc=2,scale=1,size=(2000,1)),
stats.norm.rvs(loc=0,scale=3,size=(2000,1)),
axis=1)
but i got this message:
x_flat = np.r_[rvs[:,0].min():rvs[:,0].max():128j]
IndexError: invalid index
What is wrong?
Of course I have not a very dense distribution, but a dense distribution along Y, but \
I would call "discrete" distribution along X. Could be nice having a bin, along X, of \
dimension 1.
Thanks in advance!
Anita.
--
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic