Plot multivariate data in Python
<p>I have a data of human activity performing various leg movements. The data consists of X, Y, Z gyro sensor orientation. Data looks like below:</p>

<p>Activity 1:</p>

<p>timestamp,              X rad/sec,      y rad/sec,   z rad/sec</p>

<p>1474242172.0203,      -0.440601,     -2.377124 ,  -0.379635</p>

<p>1474242172.09023,    -0.402881,      0.03603,    -0.436877</p>

<p>1474242172.11018,    -0.079664,      0.071131,     -0.969909</p>

<p>Activity 2:</p>

<p>1474242172.13019,   0.504345,  0.21577,        -1.171976</p>

<p>1474242172.15017,   1.485681,  0.95263,        -1.050102</p>

<p>1474242172.32995,  2.162143,   -2.888519,  -1.274397</p>

<p>1474242172.34995,  2.178419,   -2.332485,  -1.130116</p>

<p>Activity 3:</p>

<p>1474242172.27003,  2.71125,        -0.618401,  -0.394154</p>

<p>1474242172.29002,  2.421668,   -1.14887,   -0.846701</p>

<p>1474242172.30999,  2.212555,   -2.497823,  -1.096355</p>

<p>I have collected for 3 activities for a 7 days. Each data is in separate csv file. I would like to plot this data in Python/R. I want to take avg of X value, y value and Z value for each activity for one day and plot them using parallel coordinates. Activity(1,2,3) on one coordinate, Day 1 through Day 7 on different coordinates. X,Y,Z being different colors flowing. My classification of activity is not present in data set. I have to program the ticks for Activity. </p>

<p>Can any one suggest if parallel coordinates is the right way to show consistency of each activity over 7days? Or is their any appealing way to plot them in either surface plot or a 3D plot.</p>

<p>Can anyone provide inputs? I greatly appreciate for any advice or example of similar situation. </p>

<p>in python, you could use <a href="http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html" rel="nofollow">pylab</a> to plot in 3d using something like: <code>plt.plot(x_vals_list,y_vals_list,z_vals_list)</code> . If you have more than 3 dimensions you can use <a href="http://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html" rel="nofollow">Principle Component Analysis</a> to break down those dimensions into 3 major components. </p>

python matplotlib plot plotly