Skip to content

How to plot individual components of a signal using TimeSeries.plot #138

Discussion options

You must be logged in to vote

Hello @gaozelle

The TimeSeries.plot function is a somewhat basic helper function that uses Matplotlib to quickly see selected signals with events. There is no option to extract a given component of a signal. If you want more control on what you want to visualize, you can use matplotlib.pyplot.plot directly. Assuming (maybe wrongly) some labels for your data:

plt.figure()
plt.plot(markers.time, markers.data['LHipAngles'][:, 2], label="Hip flexion")
plt.plot(markers.time, markers.data['LKneeAngles'][:, 2], label="Knee extension")
plt.plot(markers.time, markers.data['RGroundReactionForce'][:, 2], label="Ground reaction force")
plt.legend()
...

Or maybe better yet, you could generate a new T…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gaozelle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants