Phyton Script and PLOT

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Andrea Morelli
Posts: 89
Joined: Thu Jan 24, 2008 1:10 pm

Phyton Script and PLOT

Post by Andrea Morelli » Sat Oct 20, 2018 5:59 am

I "created" a script based on the example in the opensim folder.
There's any guide/manual where to find tutorial or example that permit to scale charted data into the PLOT ?

I would like to rescale the "x axis" for an interval for example from time=2.5sec to time=3.5sec and to manual scale the Y axis.

Is there a way to select not only the folder but also a specific file name without inserting it into the code ?

This is an example to plot some data:

Code: Select all

####################################
resultsFolder = utils.FileUtils.getInstance().browseForFolder("Select the folder results");
# Plot DX and SX Vertical force
# Create Plotter panel and set the title
plotGRF = createPlotterPanel("Ground Reaction Force")

# Load and plot kinetics data from GRF file
src = addDataSource(plotGRF, resultsFolder+"/filename.mot")
addCurve(plotGRF, src, "time", "DxGRF_force_vy")
addCurve(plotGRF, src, "time", "SxGRF_force_vy")
Thank you in advance
Andrea

Tags:

POST REPLY