1. How to get started with plots - Part 2

  • We use the simple flexible riser case found in SIMA examples

  • The initial condition is run and used to show how to make a plot calling a new workflow and copy the figure to a file in a storage task

    • Note: storage task is a folder that is visible on the SIMA navigator.

  • Files used in this tutorial

2. Why make a workflow for making a single plot ?

  • Note that this the same as calling a subroutine/function in for instance Matlab or python

  • You can use the workflow (note: function/subroutine) for several signals you want to plot

  • Using the variable possibilities in SIMA, you can make the plotting both flexible and generic

3. Make workflow for plotting

  • Make a new workflow

  • Give it a new name.

    • here: wf_makeSinglePlot

165269649 image13
1235704390 image14
1753351061 image15

4. Handy tools to make a plot in a workflow

  • Workflow input

    • Input to the workflow; in this case the input is the signal

  • Flatten

    • Removes the folder structure and convert this into a string

  • Rename

    • This is used to rename a signal

  • Extract signal property

    • Is used to extract properties of the signal. In this example we extract the name.

  • Plot

    • This one we use to make the plot

  • File copy

    • Copy the plot/figure to a folder

1157355851 image16

5. Add workflow input

845336280 image17
2119023697 image18
  • We must add functionalities in the new workflow

  • You can step into the workflow using inspect

  • or by clicking on the name of the workflow in the navigator

165196893 image19
978517058 image20

6. Call the workflow from main workflow

  • Drag and drop the workflow operation

  • Connect the workflow operation to the new workflow

  • Connect the output slot from signal selection to the workflow operation

1283487199 image21
  • Select and Run the workflow

    • step into

    • You may check the incoming signals by slicking on the slots

1431715027 image22
276536262 image23
1868313286 image24
1403692473 image25
  • You can rerun the workflow using the input that you have sent by using:

    • Rerun workflow without clearing inspected inputs

1484320656 image26

7. flatten

  • Drag and drop the flatten operation into the workflow sheet

  • Rename , here:

    • flatten: remove folder structure

1549143991 image27

8. rename

  • Drag and drop the rename operation into the workflow sheet

  • Rename, here:

    • rename to signal to make it general

  • Call all signal that fits the path requirement * to signal

  • Connect the output slot from flatten to input slot of rename

1101311067 image28
2121577865 image29

9. Extract property

  • Drag and drop the Extract property operation into the workflow sheet

  • Rename, here:

    • Extract Signal property: I get the name of the signal

  • Connect the output slot from flatten to input slot of Extract property

305896651 image30

10. Plot

  • Drag and drop the plot operation into the workflow sheet

  • Select the signal

  • Click on Fix plot

  • Then you may configure the plot

    • We will set the title to editable and set it as input

    • Change the font size

    • The plot will also be available for copying to file

1915388487 image31
1876357992 image32
2031959796 image33
846439417 image34

11. Change font size on x-axis, y-axis, title and legend

1428697716 image35
419465773 image36
310474631 image37
338117032 image38

12. Make a storage task

  • Make storage task for storing the plots in the SIMA workspace

  • Give it a name, here

    • ST_myPlots

768893996 image39
1411408402 image40
321196406 image41

13. File copy

  • Drag and drop the file copy operation into workflow sheet

  • Rename; here

    • Copy plot to storage task

  • Connect to image slot

989572846 image42
  • Create input for local scripting

  • Give it a name, here: nameofSignal

  • Connect to extract property operation

355545407 image43
1546571045 image44
1949315154 image45

14. Set path as script in File copy

1607369005 image46
1845722778 image47
  • Note: sima:// gives the path to the root of the SIMA workspace

15. Run the total workflow and find plot in storage task

836485727 image48
2051320223 image49

16. Notes

You are viewing documentation for an older version of SIMA. Go to the latest documentation →