My goal is to plot something similar to the top graph of the following link.
I have several txt files, every one of them corresponding to a different sample. Currently, I have my data loaded as pandas dataframes (although I'm not sure if it could be easier if I had loaded as numpy arrays):
sample4.head()
Out[61]:
20 40 60 80 100
x
1.10 1.09734 1.25772 1.41810 1.57847 1.73885
1.11 1.06237 1.21307 1.36378 1.51448 1.66518
1.12 1.02176 1.16346 1.30516 1.44686 1.58856
1.13 0.97769 1.11097 1.24426 1.37754 1.51083
1.14 0.93162 1.05702 1.18241 1.30781 1.43321
test5.head()
Out[62]:
20 40 60 80 100
x
1.10 1.12427 1.31545 1.50663 1.69781 1.88899
1.11 1.06327 1.24045 1.41763 1.59482 1.77200
1.12 0.99875 1.16302 1.32730 1.49158 1.65585
1.13 0.93276 1.08509 1.23742 1.38975 1.54208
1.14 0.86668 1.00792 1.14916 1.29040 1.43164
test6.head()
Out[63]:
20 40 60 80 100
x
1.10 1.08463 1.30038 1.51612 1.73187 1.94761
1.11 0.99905 1.19626 1.39346 1.59067 1.78788
1.12 0.91255 1.09283 1.27310 1.45337 1.63365
1.13 0.82706 0.99181 1.15656 1.32131 1.48605
1.14 0.74381 0.89429 1.04477 1.19525 1.34572
As it can be seen, all samples share one column. The following approach works for a single sample, giving a simple 2D plot:
sample4.plot()
But my idea is to plot all dataframes I have along the y axis, meaning that the y axis should be each of the individual samples I have, in a 3d graph like the example above, but I don't know how to "stack" dataframes and plot them using a third axis.
Any help would be appreciated.
Thanks in advance.