adlofts created page: postprocessingscript authored by Andrew Lofts's avatar Andrew Lofts
......@@ -123,7 +123,7 @@ For Example:
This pattern matches for most of the marks.
**Pie Chart Example**
Below is the code for the pie chart separating the channel types. This code exclusively uses the marks structure for its data.
Below is the code for the pie chart separating the channel types. This code exclusively uses the marks structure for its data. The function ```pie``` can take a multitude of formatting inputs including explode,axis, and labels. The data needs to be a row vector with a number for each category. The fraction of the chart is based off of the % of each of these compared to one another.
```matlab
% Pie Chart
c1 = length(EEG.marks.chan_info(1).flags); % Collect Number of Epochs
......@@ -143,7 +143,8 @@ title('Data Channel Classification'); % Set the title of
```
**Calculation->Flag->Mark/Criteria Plot Example**
Below is the code for the s way subplot of calculating channel marks. This code exclusively uses the EEG. calculation matrices for its data.
Below is the code for the s way subplot of calculating channel marks. This code exclusively uses the EEG. calculation matrices for its data. The function ```surf``` can take a multitude of formatting inputs including line style, axis, view, and face alpha. The data needs to be a matrix where the x and y values are gathered from the dimensions of the matrix, and the z values gathered on the data contained at each index. Plot in this example only uses the optional axis location input. Both x and y need to be row matrices containing the co-ordinates of the data points to plot. To plot 2 lines on the same graph add a second row to the row vector, or run the plot command again with the new x row vector after using ```hold on;```.
```matlab
% Collect Data
z = EEG.data_sd_ch; % Finding the calculated values of the standard deviations
......@@ -179,9 +180,12 @@ ylabel('Channel Number');
axis([-0.05 1 0 (length(x + 1))]); % Axis trimming (xmin xmax ymin ymax)
````
The time plot is very similar to this but has a few unique lines of code, adjusting the subplot locations and the x and y variables.
To see the code for other sections type:
```matlab
edit diagnostics
```
This will open up the function and you can see behind the scenes.
......
......