Page 1 of 1

Phyton Script and PLOT

Posted: Sat Oct 20, 2018 5:59 am
by bunker
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