/// <summary> /// Create Gtk.Table visualising 2D table data. /// </summary> public TableWidget2D(Util.Coloring coloring, float[] axisX, float[] valuesY, float axisXmin, float axisXmax, float valuesYmin, float valuesYmax) : base(coloring, axisX, valuesY, axisXmin, axisXmax, valuesYmin, valuesYmax) { if (axisX.Length != valuesY.Length) { throw new ArgumentException("axisX.Length != valuesY.Length"); } this.cols = DataColLeft + 2 + 1; this.rows = this.countX + DataRowTop; }
// could also use LINQ to calc min/max since performance does not matter here public TableWidgetBase(Util.Coloring coloring, float[] axisX, float[] values, float axisXmin, float axisXmax, float valuesMin, float valuesMax) { this.coloring = coloring; this.axisX = axisX; this.axisXmin = axisXmin; this.axisXmax = axisXmax; this.values = values; this.valuesMin = valuesMin; this.valuesMax = valuesMax; this.countX = this.axisX.Length; }
// Use LINQ to calc min/max // public TableWidget (Util.Coloring coloring, float[] axisX, float[] axisY, float[] valuesZ) : // this(coloring, axisX, axisY, valuesZ, valuesZ.Min (), valuesZ.Max ()) // { // } /// <summary> /// Create Gtk.Table for 3D table data. /// </summary> public TableWidget(Util.Coloring coloring, float[] axisX, float[] axisY, float[] valuesZ, float valuesZmin, float valuesZmax) { this.coloring = coloring; this.axisX = axisX; this.axisY = axisY; this.values = valuesZ; this.valuesMin = valuesZmin; this.valuesMax = valuesZmax; this.countX = this.axisX.Length; this.countY = this.axisY.Length; if (axisX.Length * axisY.Length != valuesZ.Length) throw new ArgumentException ("x.Length * y.Length != z.Length"); this.cols = this.countX + DataColLeft; this.rows = this.countY + DataRowTop; }
/// <summary> /// Create Gtk.Table visualising 3D table data. /// </summary> public TableWidget3D(Util.Coloring coloring, float[] axisX, float[] axisY, float[] valuesZ, float axisXmin, float axisXmax, float axisYmin, float axisYmax, float valuesZmin, float valuesZmax) : base(coloring, axisX, valuesZ, axisXmin, axisXmax, valuesZmin, valuesZmax) { this.axisY = axisY; this.axisYmin = axisYmin; this.axisYmax = axisYmax; this.countY = this.axisY.Length; if (axisX.Length * axisY.Length != valuesZ.Length) { throw new ArgumentException("x.Length * y.Length != z.Length"); } this.cols = this.countX + DataColLeft; this.rows = this.countY + DataRowTop; }
// Use LINQ to calc min/max // public TableWidget (Util.Coloring coloring, float[] axisX, float[] axisY, float[] valuesZ) : // this(coloring, axisX, axisY, valuesZ, valuesZ.Min (), valuesZ.Max ()) // { // } /// <summary> /// Create Gtk.Table for 3D table data. /// </summary> public TableWidget(Util.Coloring coloring, float[] axisX, float[] axisY, float[] valuesZ, float valuesZmin, float valuesZmax) { this.coloring = coloring; this.axisX = axisX; this.axisY = axisY; this.values = valuesZ; this.valuesMin = valuesZmin; this.valuesMax = valuesZmax; this.countX = this.axisX.Length; this.countY = this.axisY.Length; if (axisX.Length * axisY.Length != valuesZ.Length) { throw new ArgumentException("x.Length * y.Length != z.Length"); } this.cols = this.countX + DataColLeft; this.rows = this.countY + DataRowTop; }
public NPlotGradient(Util.Coloring coloring) { this.coloring = coloring; }
public FlorenceGradient(Util.Coloring coloring) { this.coloring = coloring; }