当前位置: 首页>>代码示例>>C#>>正文


C# Altaxo.GetPropertyContext方法代码示例

本文整理汇总了C#中Altaxo.GetPropertyContext方法的典型用法代码示例。如果您正苦于以下问题:C# Altaxo.GetPropertyContext方法的具体用法?C# Altaxo.GetPropertyContext怎么用?C# Altaxo.GetPropertyContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Altaxo的用法示例。


在下文中一共展示了Altaxo.GetPropertyContext方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PlotPRESSValue

		/// <summary>
		/// Plots the PRESS value into a provided layer.
		/// </summary>
		/// <param name="table">The table of PLS output data.</param>
		public static void PlotPRESSValue(Altaxo.Data.DataTable table)
		{
			string newName = string.Format("GPRESS");
			var graphctrl = CreateNewGraphWithXYLayer(table.GetPropertyContext(), Main.ProjectFolder.CreateFullName(table.Name, newName), table.Name);
			PlotPRESSValue(table, graphctrl.Doc.GetFirstXYPlotLayer());
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:10,代码来源:ChemometricCommands.cs

示例2: PlotCrossPredictedVersusActualY

		/// <summary>
		/// Plots the cross prediction values of all y components invidually in a  graph.
		/// </summary>
		/// <param name="table">The table with the PLS model data.</param>
		/// <param name="allowGuiForMessages">If <see langword="true"/> and an error occurs, an error message box is presented to the user.</param>
		public static void PlotCrossPredictedVersusActualY(Altaxo.Data.DataTable table, bool allowGuiForMessages)
		{
			MultivariateContentMemento plsMemo = table.GetTableProperty("Content") as MultivariateContentMemento;
			if (plsMemo == null)
			{
				string msg = string.Format("The table <<{0}>> does not seem to contain multivariate analysis data (content memento is missing)", table.Name);
				if (allowGuiForMessages)
					Current.Gui.ErrorMessageBox(msg);
				else
					throw new ApplicationException(msg);
				return;
			}
			while (!Current.Project.DataTableCollection.Contains(plsMemo.OriginalDataTableName))
			{
				string msg = string.Format("The table of the original spectral data <<{0}>> does not exist (renamed?)", plsMemo.OriginalDataTableName);
				if (allowGuiForMessages)
				{
					Current.Gui.ErrorMessageBox(msg);
					string newName = plsMemo.OriginalDataTableName;
					// TODO replace by a TableChoiceDialogBox
					if (Current.Gui.ShowDialog(ref newName, "Please enter the table name of original spectral data", false))
						plsMemo.OriginalDataTableName = newName;
				}
				else
					throw new WorksheetAnalysis.OriginalDataTableNotFoundException(msg);
			}

			if (plsMemo.PreferredNumberOfFactors <= 0)
				QuestPreferredNumberOfFactors(plsMemo);

			for (int nComponent = 0; nComponent < plsMemo.NumberOfConcentrationData; nComponent++)
			{
				string newName = string.Format("GCrossPredVsActC{0}#{1}F", nComponent, plsMemo.PreferredNumberOfFactors);
				var graphctrl = CreateNewGraphWithXYLayer(table.GetPropertyContext(), Main.ProjectFolder.CreateFullName(table.Name, newName), table.Name);
				PlotCrossPredictedVersusActualY(table, graphctrl.Doc.GetFirstXYPlotLayer(), nComponent, plsMemo.PreferredNumberOfFactors);
			}
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:42,代码来源:ChemometricCommands.cs

示例3: PlotXCrossResiduals

		/// <summary>
		/// Plots the x (spectral) residuals (of cross prediction) of all spectra invidually in a graph.
		/// </summary>
		/// <param name="table">The table with the PLS model data.</param>
		public static void PlotXCrossResiduals(Altaxo.Data.DataTable table)
		{
			MultivariateContentMemento plsMemo = table.GetTableProperty("Content") as MultivariateContentMemento;
			if (plsMemo == null)
				return;
			if (plsMemo.PreferredNumberOfFactors <= 0)
				QuestPreferredNumberOfFactors(plsMemo);

			for (int nComponent = 0; nComponent < plsMemo.NumberOfConcentrationData; nComponent++)
			{
				string newName = string.Format("GXCrossResidualsC{0}#{1}F", nComponent, plsMemo.PreferredNumberOfFactors);
				var graphctrl = CreateNewGraphWithXYLayer(table.GetPropertyContext(), Main.ProjectFolder.CreateFullName(table.Name, newName), table.Name);
				PlotXResiduals(table, graphctrl.Doc.GetFirstXYPlotLayer(), nComponent, plsMemo.PreferredNumberOfFactors);
			}
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:19,代码来源:ChemometricCommands.cs

示例4: PlotXLeverage

		/// <summary>
		/// Plots the x (spectral) leverage into a graph.
		/// </summary>
		/// <param name="table">The table with the PLS model data.</param>
		public static void PlotXLeverage(Altaxo.Data.DataTable table)
		{
			MultivariateContentMemento plsMemo = table.GetTableProperty("Content") as MultivariateContentMemento;
			if (plsMemo == null)
				return;
			if (plsMemo.PreferredNumberOfFactors <= 0)
				QuestPreferredNumberOfFactors(plsMemo);

			string newName = string.Format("GXLeverage#{0}F", plsMemo.PreferredNumberOfFactors);
			newName = Main.ProjectFolder.CreateFullName(table.Name, newName);

			var graphctrl = CreateNewGraphWithXYLayer(table.GetPropertyContext(), Main.ProjectFolder.CreateFullName(table.Name, newName), table.Name);
			PlotXLeverage(table, graphctrl.Doc.GetFirstXYPlotLayer(), plsMemo.PreferredNumberOfFactors);
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:18,代码来源:ChemometricCommands.cs


注:本文中的Altaxo.GetPropertyContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。