-
Notifications
You must be signed in to change notification settings - Fork 1
Series axis and annotation creation cmdlets
OxyPlot CLI provides the cmdlets corresponding to the series, axis and annotation classes defined in OxyPlot. By calling these cmdlets, you can create any object of the type.
Cmdlet | Class |
---|---|
New-OxyAreaSeries | OxyPlot.Series.AreaSeries |
New-OxyBarSeries | OxyPlot.Series.BarSeries |
New-OxyBoxPlotSeries | OxyPlot.Series.BoxPlotSeries |
New-OxyCandleStickAndVolumeSeries | OxyPlot.Series.CandleStickAndVolumeSeries |
New-OxyCandleStickSeries | OxyPlot.Series.CandleStickSeries |
New-OxyColumnSeries | OxyPlot.Series.ColumnSeries |
New-OxyContourSeries | OxyPlot.Series.ContourSeries |
New-OxyErrorColumnSeries | OxyPlot.Series.ErrorColumnSeries |
New-OxyFunctionSeries | OxyPlot.Series.FunctionSeries |
New-OxyHeatMapSeries | OxyPlot.Series.HeapMapSeries |
New-OxyHighLowSeries | OxyPlot.Series.HighLowSeries |
New-OxyIntervalBarSeries | OxyPlot.Series.IntervalBarSeries |
New-OxyLinearBarSeries | OxyPlot.Series.LinearBarSeries |
New-OxyLineSeries | OxyPlot.Series.LineSeries |
New-OxyPieSeries | OxyPlot.Series.PieSeries |
New-OxyRectangleBarSeries | OxyPlot.Series.RectangleBarSeries |
New-OxyScatterErrorSeries | OxyPlot.Series.ScatterErrorSeries |
New-OxyScatterSeries | OxyPlot.Series.ScatterSeries |
New-OxyStairStepSeries | OxyPlot.Series.StairStepSeries |
New-OxyStemSeries | OxyPlot.Series.StemSeries |
New-OxyThreeColorLineSeries | OxyPlot.Series.ThreeColorLineSeries |
New-OxyTornadoBarSeries | OxyPlot.Series.TornadoBarSeries |
New-OxyTwoColorAreaSeries | OxyPlot.Series.TwoColorAreaSeries |
New-OxyTwoColorLineSeries | OxyPlot.Series.TwoColorLineSeries |
New-OxyVolumeSeries | OxyPlot.Series.VolumeSeries |
Cmdlet | Class |
---|---|
New-OxyAngleAxis | OxyPlot.Axes.AngleAxis |
New-OxyCategoryAxis | OxyPlot.Axes.CategoryAxis |
New-OxyDateTimeAxis | OxyPlot.Axes.DateTimeAxis |
New-OxyLinearAxis | OxyPlot.Axes.LinearAxis |
New-OxyLinearColorAxis | OxyPlot.Axes.ColorAxis |
New-OxyLogarithmicAxis | OxyPlot.Axes.LogarithmicAxis |
New-OxyMagnitudeAxis | OxyPlot.Axes.MagnitudeAxis |
New-OxyRangeColorAxis | OxyPlot.Axes.RangeColorAxis |
New-OxyTimeSpanAxis | OxyPlot.Axes.TimeSpanAxis |
Cmdlet | Class |
---|---|
New-OxyArrowAnnotation | OxyPlot.Annotations.ArrowAnnotation |
New-OxyEllipseAnnotation | OxyPlot.Annotations.EllipseAnnotation |
New-OxyFunctionAnnotation | OxyPlot.Annotations.FunctionAnnotation |
New-OxyImageAnnotation | OxyPlot.Annotations.ImageAnnotation |
New-OxyLineAnnotation | OxyPlot.Annotations.LineAnnotation |
New-OxyPointAnnotation | OxyPlot.Annotations.PointAnnotation |
New-OxyPolygonAnnotation | OxyPlot.Annotations.PolygonAnnotation |
New-OxyPolylineAnnotation | OxyPlot.Annotations.PolylineAnnotation |
New-OxyRectangleAnnotation | OxyPlot.Annotations.RectangleAnnotation |
New-OxyTextAnnotation | OxyPlot.Annotations.TextAnnotation |
For series cmdlets, the following aliases are defined:
Cmdlet | Alias |
---|---|
New-OxyAreaSeries | oxyarea |
New-OxyBarSeries | oxybar |
New-OxyBoxPlotSeries | oxyboxplot, oxybox |
New-OxyCandleStickAndVolumeSeries | oxycandlestickandvolume, oxycandlev |
New-OxyCandleStickSeries | oxycandlestick, oxycandle |
New-OxyColumnSeries | oxycolumn, oxycol |
New-OxyContourSeries | oxycontour |
New-OxyErrorColumnSeries | oxyerrorcolumn, oxyecol |
New-OxyFunctionSeries | oxyfunction, oxyfunc |
New-OxyHeatMapSeries | oxyheatmap |
New-OxyHighLowSeries | oxyhighlow |
New-OxyIntervalBarSeries | oxyintervalbar, oxyibar |
New-OxyLinearBarSeries | oxylinearbar, oxylbar |
New-OxyLineSeries | oxyline |
New-OxyPieSeries | oxypie |
New-OxyRectangleBarSeries | oxyrectanglebar, oxyrbar |
New-OxyScatterErrorSeries | oxyscattererror, oxyscate |
New-OxyScatterSeries | oxyscatter, oxyscat |
New-OxyStairStepSeries | oxystarstep |
New-OxyStemSeries | oxystem |
New-OxyThreeColorLineSeries | oxythreecolorline, oxy3line |
New-OxyTornadoBarSeries | oxytornadobar, oxytornado |
New-OxyTwoColorAreaSeries | oxytwocolorarea, oxy2area |
New-OxyTwoColorLineSeries | oxytwocolorline, oxy2line |
New-OxyVolumeSeries | oxyvolume |
These cmdlets provide the parameters corresponding to the properties of the corresponding classes. With these parameters, you can set any property value of an object instance.
For example, the following script:
$line = New-OxyLineSeries -Color Red -LineStyle Dash
is equivalent to the following code in C#:
var line = new LineSeries();
line.Color = OxyColors.Red;
line.LineStyle = LineStyle.Dash;
Note: Several properties of non-scalar types are interpreted by the converters to help users enter the values of such parameters on command line. The Color
property (of the type OxyPlot.OxyColor
) is one example.
Most of series objects require a set of a specific kind of data points (or items). For example, LineSeries
requires data points containing the X
and Y
elements, and PieSeries
requires items containing the Label
and Value
elements.
You can assign data points (or items) to a series object in two ways.
Each cmdlet provides parameters with the names of the data point elements. You can provide a set of elements with these parameters. For example, the -X
and -Y
parameters are defined in New-OxyLineSeries
.
$line = New-OxyLineSeries -X 1, 2, 3 -Y 21, 35, 17
The above code assigns three points (X, Y) = (1, 21) , (2, 35) and (3, 17) to a LineSeries object. Not to mention, the numbers of those elements should be the same.
You can give a data source to a cmdlet through pipeline, and specify mappings between the data source and the data point elements by cmdlet parameters. The names of such parameters begin with element names, followed by Name
. For example, the New-OxyLineSeries
cmdlet provides the -XName
and -YName
parameters.
$data = Import-Csv datasets\iris.csv
$line = $data | New-OxyLineSeries -XName Sepal.Width -YName Sepal.Length
(TBD)