Class Plot
Represents a single array of data with X and Y scales and other info useful for plotting a graph.
Was first used to represent a track of scores at the bottom of a sonogram image.
Assembly: TowseyLibrary.dll
Syntax
Constructors
|
Improve this Doc
View Source
Plot(String, Double[], Double)
Declaration
public Plot(string _title, double[] _data, double _threshold)
Parameters
Properties
|
Improve this Doc
View Source
data
Declaration
public double[] data { get; set; }
Property Value
|
Improve this Doc
View Source
threshold
Declaration
public double threshold { get; set; }
Property Value
|
Improve this Doc
View Source
title
Declaration
public string title { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
DrawAnnotatedPlot(Int32)
Declaration
public Image<Rgb24> DrawAnnotatedPlot(int height)
Parameters
Type |
Name |
Description |
Int32 |
height |
|
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
DrawPlot(Int32)
Assumes that the data has been normalised by a call to plot.NormalizeData(double min, double max) or equivalent.
Declaration
public Image<Rgb24> DrawPlot(int height)
Parameters
Type |
Name |
Description |
Int32 |
height |
height of the plot.
|
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
FindStartsAndEndsOfScoreEvents(Double[], Double, Int32, Int32, out Double[], out List<Point>)
Declaration
public static void FindStartsAndEndsOfScoreEvents(double[] scores, double scoreThreshold, int minDuration, int maxDuration, out double[] prunedScores, out List<Point> startEnds)
Parameters
Type |
Name |
Description |
Double[] |
scores |
|
Double |
scoreThreshold |
|
Int32 |
minDuration |
|
Int32 |
maxDuration |
|
Double[] |
prunedScores |
|
List<SixLabors.ImageSharp.Point> |
startEnds |
|
|
Improve this Doc
View Source
NormaliseData()
Declaration
public void NormaliseData()
|
Improve this Doc
View Source
NormalizeData(Double, Double)
Declaration
public void NormalizeData(double min, double max)
Parameters
|
Improve this Doc
View Source
PreparePlot(Double[], String, Double)
Prepares a plot of an array of score values.
To obtain a more useful display, the maximum display value is set to 3 times the threshold value.
Declaration
public static Plot PreparePlot(double[] array, string title, double threshold)
Parameters
Type |
Name |
Description |
Double[] |
array |
an array of double.
|
String |
title |
to accompany the plot.
|
Double |
threshold |
A threshold value to be drawn on the plot.
|
Returns
Type |
Description |
Plot |
the plot.
|
|
Improve this Doc
View Source
PruneScoreArray(Double[], Double, Int32, Int32)
Declaration
public static double[] PruneScoreArray(double[] scores, double scoreThreshold, int minDuration, int maxDuration)
Parameters
Returns
|
Improve this Doc
View Source
ScaleDataArray(Int32)
Declaration
public void ScaleDataArray(int newLength)
Parameters
Type |
Name |
Description |
Int32 |
newLength |
|
Extension Methods