dsScatterPlot
Scatter plot of the first 2 dimensions of the given dataset
Contents
Syntax
- dsScatterPlot(DS)
- dsScatterPlot(DS, opt)
Description
dsScatterPlot(DS) give a 2D scatter plot of the dataset stored in DS.
- DS: data to be displayed
- DS.input: input part
- DS.output: output part (this part could be missing for DC)
- DS.dataName: data name (or description)
- DS.inputName: data input name
- DS.annotation: annotation for each data point
dsScatterPlot(DS, opt) use the info in opt to show annotation or legend.
- opt.showAnnotation: 1 to show the annotation of a data instance (when the cursor is near the data instance)
- opt.showLegend: 1 to show the legend is shown.
Example
dataCount=100; DS.input=2*rand(2, dataCount)-1; DS.output=1+(DS.input(1,:)+DS.input(2,:)>0); DS.dataName='Test Data (Move to a data point to show its index)'; for i=1:length(DS.output) DS.annotation{i}=sprintf('Data point %d\n(%f, %f)', i, DS.input(1,i), DS.input(2,i)); end opt=dsScatterPlot('defaultOpt'); opt.showAnnotation=1; dsScatterPlot(DS, opt);
Warning: Ignoring extra legend entries.
![](dsScatterPlot_help_01.png)