Exemple #1
0
		/// <summary>
		/// Plots the cross PRESS value into a provided layer.
		/// </summary>
		/// <param name="table">The table of PLS output data.</param>
		/// <param name="layer">The layer to plot into.</param>
		public static void PlotCrossPRESSValue(Altaxo.Data.DataTable table, XYPlotLayer layer)
		{
			Altaxo.Data.DataColumn ycol = table[WorksheetAnalysis.GetCrossPRESSValue_ColumnName()];
			Altaxo.Data.DataColumn xcol = table[WorksheetAnalysis.GetNumberOfFactors_ColumnName()];
			var groupNumber = table.DataColumns.GetColumnGroup(ycol);

			XYColumnPlotData pa = new XYColumnPlotData(table, groupNumber, xcol, ycol);
			G2DPlotStyleCollection ps = new G2DPlotStyleCollection(LineScatterPlotStyleKind.LineAndScatter, layer.GetPropertyContext());
			layer.PlotItems.Add(new XYColumnPlotItem(pa, ps));

			layer.DefaultXAxisTitleString = "Number of factors";
			layer.DefaultYAxisTitleString = "Cross PRESS value";
		}
Exemple #2
0
		/// <summary>
		/// This plots a label plot into the provided layer.
		/// </summary>
		/// <param name="layer">The layer to plot into.</param>
		/// <param name="table">The table of PLS output data.</param>
		/// <param name="xcol">The x column.</param>
		/// <param name="ycol">The y column.</param>
		/// <param name="labelcol">The label column.</param>
		public static void PlotOnlyLabel(XYPlotLayer layer, Altaxo.Data.DataTable table, Altaxo.Data.DataColumn xcol, Altaxo.Data.DataColumn ycol, Altaxo.Data.DataColumn labelcol)
		{
			var context = layer.GetPropertyContext();

			var groupNumber = table.DataColumns.GetColumnGroup(ycol);
			XYColumnPlotData pa = new XYColumnPlotData(table, groupNumber, xcol, ycol);

			G2DPlotStyleCollection ps = new G2DPlotStyleCollection(LineScatterPlotStyleKind.Empty, layer.GetPropertyContext());
			LabelPlotStyle labelStyle = new LabelPlotStyle(labelcol, context);
			labelStyle.BackgroundStyle = new FilledRectangle(NamedColors.LightCyan);
			ps.Add(labelStyle);

			layer.PlotItems.Add(new XYColumnPlotItem(pa, ps));
		}