2DGraph HorizontalBar: Difference between revisions

From Software Product Documentation
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Draw horizontal bars on a Report Graph===
{| align="right"
| __TOC__
|}
 
=Draw horizontal bars on a Report Graph=
 
<b>This is especially useful for creating ON/OFF bars for EMG data</b>. An example of creating a simple horizontal line is provided after this example.
 
{| style= width="100%" align="left"
| style="width: 50%" align="left" style="vertical-align:top"|
This example creates a line that is ON/OFF to express when an EMG signal is expected to be ON/OFF through the gait cycle (red line in picture on right):
| style= "width: 50%" align="right" style="vertical-align:top"|
[[File:BarGraph3.jpg|400px]]
|}


As a simple example, create a P2D signal representing the frames and ON/OFF values
As a simple example, create a P2D signal representing the frames and ON/OFF values


:! make the GLOBAL workspace active
! make the GLOBAL workspace active
'''Select_Active_File'''
/FILE_NAME=GLOBAL
! /QUERY=
''';'''
! create a signal of ON/OFF values
'''Evaluate_Expression'''
/EXPRESSION=LIST(VECTOR(0,1),VECTOR(1,0),VECTOR(2,1),VECTOR(3,0),VECTOR(4,1))
/RESULT_TYPES=P2D
/RESULT_FOLDERS=BARS
/RESULT_NAME=BAR1
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
''';'''
 
The resulting signal is:
 
[[File:BarGraph1.jpg|400px]]


:'''Select_Active_File'''
Create a Report 2D Graph:
:/FILE_NAME=GLOBAL
:! /QUERY=
:''';'''


:! create a signal of ON/OFF values
[[File:BarGraph2.jpg|400px]]


:'''Evaluate_Expression'''
=Simple Horizontal Line=
:/EXPRESSION=LIST(VECTOR(0,1),VECTOR(1,0),VECTOR(2,1),VECTOR(3,0),VECTOR(4,1))
:/RESULT_TYPES=P2D
:/RESULT_FOLDERS=BARS
:/RESULT_NAME=BAR1
:! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
:''';'''


The resulting signal is
{| style= width="100%" align="left"
| style="width: 50%" align="left" style="vertical-align:top"|
This example is to create a simple horizontal line straight across using P2D signals (purple line in graph on right):
| style= "width: 50%" align="right" style="vertical-align:top"|
[[File:P2D_Horizontal_Graph.png|350px]]
|}


[[File:BarGraph1.jpg]]
Create the horizontal line as a P2D signal:


Create a Report 2D Graph
Evaluate_Expression
/EXPRESSION=
  LIST (
  VECTOR(1,50) ,
  VECTOR(101,50) )
! /SIGNAL_TYPES=
! /SIGNAL_FOLDER=ORIGINAL
! /SIGNAL_NAMES=
  /RESULT_TYPES=P2D
  /RESULT_FOLDERS=HORIZON
/RESULT_NAME=GLOBAL::FIFTY
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
;


[[File:BarGraph2.jpg]]
{| style= width="100%" align="left"
| style="width: 50%" align="left" style="vertical-align:top"|
Plot the P2D Signal:
| style= "width: 50%" align="right" style="vertical-align:top"|
<br>
[[File:P2D_Horizontal_Graph_Definition.png|350px]]
|}


The resulting graph is


[[File:BarGraph3.jpg]]


[[Category:Visual3D_Reports]]
[[Category:Visual3D_Reports]]
[[Category:P2D]]
[[Category:P2D]]

Latest revision as of 17:46, 20 April 2022

Draw horizontal bars on a Report Graph

This is especially useful for creating ON/OFF bars for EMG data. An example of creating a simple horizontal line is provided after this example.

This example creates a line that is ON/OFF to express when an EMG signal is expected to be ON/OFF through the gait cycle (red line in picture on right):

As a simple example, create a P2D signal representing the frames and ON/OFF values

! make the GLOBAL workspace active

Select_Active_File
/FILE_NAME=GLOBAL
! /QUERY=
;

! create a signal of ON/OFF values

Evaluate_Expression
/EXPRESSION=LIST(VECTOR(0,1),VECTOR(1,0),VECTOR(2,1),VECTOR(3,0),VECTOR(4,1))
/RESULT_TYPES=P2D
/RESULT_FOLDERS=BARS
/RESULT_NAME=BAR1
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
;

The resulting signal is:

Create a Report 2D Graph:

Simple Horizontal Line

This example is to create a simple horizontal line straight across using P2D signals (purple line in graph on right):

Create the horizontal line as a P2D signal:

Evaluate_Expression
/EXPRESSION=
 LIST (
  VECTOR(1,50) ,
  VECTOR(101,50) )
! /SIGNAL_TYPES=
! /SIGNAL_FOLDER=ORIGINAL
! /SIGNAL_NAMES=
 /RESULT_TYPES=P2D
 /RESULT_FOLDERS=HORIZON
/RESULT_NAME=GLOBAL::FIFTY
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
;

Plot the P2D Signal:


Retrieved from ""