Reference > Style examples > Data is in rows, not columns

Data is in rows, not columns

Generally, a nested structure such as double[][] is taken to imply one series per element of the outer structure. If your data is more naturally organised the other way around, you can pass the same structure, but have the inner elements taken as the series values, effectively transposing the data matrix.


sp.DataStyle = DataStyles.Rows;

This is particularly useful when a simple vector of values represents one element from a set of different series. Because SharpPlot applies the color cycles to each series, this gives you a simple way to color the bars of a barchart individually, or have a different marker for each data value. Legend placeholders will be also created, one per item.

See also ...

SharpPlot Members | DataStyles Enumeration


Send comments on this topic
© Dyalog Ltd 2013