[SciPy-user] organizing data
Tue Nov 20 05:21:29 CST 2007
I'm quite new to python, and I am breaking my mind on this:
I would like to organize data so I can plot them.
My data are the variation of 11 parameters, with 18 values for each. so
you can see them as an hypercube of 11 dimension. My goal is the
possibility to plot with gnuplot in 2D (or 3D). So I have to class my
data by slices of 9 (or 8) parameters constant.
That's my problem: it is not really an "hyper"matrix of data because i
did not discretized the space parameters equally for each parameters.
So i think i have to class and then recursively cut into the mass so I
can have small arrays I can plot with the gnuplot.py
As I said, i am quite new in pythonizing, and I sure can use a little
help. I have spent much time on this, and I can't figure it out how.
from numpy import *
from scipy import *
from operator import itemgetter
import Gnuplot, Gnuplot.PlotItems, Gnuplot.funcutils
#I read the data
#Then I class the whole array (sorted can class by each and every
columns just add a coma and a new col)
longueur = len(liste)
#Then i create a list of each values of the parameters so i can cut by
each constant "pieces"
for i in liste2[:,col] :
if listeSansDoublon.count(i) == 0:
and then... I don't know
I have guessed the array_split function
for i in listeSansDoublon:
j = array(where(i == liste2[:,col]))
jj= where(i == liste2[:,col])
but actually it doesn't work, as i have read the F*M*.
i have also think that I can only manipulate masks ans apply the final
recursively calculated mask on the data and then reduce to have the
correct form for gnuplot.
Thanks for your help if you can help me. I really passed much time on
this, and i still can't figure it out how.
More information about the SciPy-user