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


C# PointPairList.Clone方法代码示例

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


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

示例1: DrawMatrixGraph

		public void DrawMatrixGraph(string fileName) {
			
			GraphPane myPane;
			RectangleF rect = new RectangleF( 0, 0, 1200, 600 );
			
			PointPairList ppl = new PointPairList();
			if (columns == 1) {
				myPane = new GraphPane( rect, "Matrix", "Rows", "Value" );
				for(int i = 0; i < rows; i++) {
					ppl.Add(i, d[i,0]);
				}
				LineItem myCurve = myPane.AddCurve("", ppl.Clone(), Color.Black, SymbolType.None);
			} else if (rows == 1) {
				myPane = new GraphPane( rect, "Matrix", "Columns", "Value" );
				for(int i = 0; i < columns; i++) {
					ppl.Add(i, d[0,i]);
				}
				LineItem myCurve = myPane.AddCurve("", ppl.Clone(), Color.Black, SymbolType.None);
			} else if (columns > rows) {
				myPane = new GraphPane( rect, "Matrix", "Columns", "Value" );
				for(int i = 0; i < rows; i++)
				{
					ppl.Clear();
					for(int j = 0; j < columns; j++)
					{
						ppl.Add(j, d[i,j]);
					}
					Color color = ColorUtils.MatlabGraphColor(i);
					LineItem myCurve = myPane.AddCurve("", ppl.Clone(), color, SymbolType.None);
				}
			} else { // (columns < rows)
				myPane = new GraphPane( rect, "Matrix", "Rows", "Value" );
				for(int j = 0; j < columns; j++)
				{
					ppl.Clear();
					for(int i = 0; i < rows; i++)
					{
						ppl.Add(i, d[i,j]);
					}
					Color color = ColorUtils.MatlabGraphColor(j);
					LineItem myCurve = myPane.AddCurve("", ppl.Clone(), color, SymbolType.None);
				}
			}

			Bitmap bm = new Bitmap( 1, 1 );
			using ( Graphics g = Graphics.FromImage( bm ) )
				myPane.AxisChange( g );
			
			myPane.GetImage().Save(fileName, ImageFormat.Png);
		}
开发者ID:khairy-mohamed,项目名称:FindSimilar,代码行数:50,代码来源:Matrix.cs

示例2: DrawMelFiltersBank

		public void DrawMelFiltersBank(string fileName) {
			GraphPane myPane = new GraphPane( new RectangleF( 0, 0, 1200, 600 ),
			                                 "Mel Filter Bank", "X Title", "Y Title" );

			Random random = new Random();
			
			PointPairList ppl = new PointPairList();
			double[] filterSpectrum;
			foreach(var filter in filters) {
				ppl.Clear();
				if (filter.IsEnabled()) {
					filterSpectrum = filter.GetFilterSpectrum();
					for (int i = 0; i < 200; i++) {
						ppl.Add(i, filterSpectrum[i]);
					}
					Color color = Color.FromArgb(random.Next(0, 255), random.Next(0,255),random.Next(0,255));
					LineItem myCurve = myPane.AddCurve("", ppl.Clone(), color, SymbolType.None );
				}
			}

			Bitmap bm = new Bitmap( 1, 1 );
			using ( Graphics g = Graphics.FromImage( bm ) )
				myPane.AxisChange( g );
			
			myPane.GetImage().Save(fileName, ImageFormat.Png);
		}
开发者ID:khairy-mohamed,项目名称:FindSimilar,代码行数:26,代码来源:MelFiltersBank.cs

示例3: rectasEjeReal

        public List<PointPairList> rectasEjeReal()
        {
            rectasEje = new List<PointPairList>();
            PointPairList semiRecta = new PointPairList();

            if ((n + m) % 2 != 0)                   //Si el numero de ceros y polos es Impar la ultima raiz va hacia el infinito
            {
                for (int i = 0; i < pYcOrdenados[0].Length-1; i += 2)      //Se los agrupa en pares y se crean rectas
                {
                    semiRecta.Clear();
                    for (double d = pYcOrdenados[0][i]; d >= pYcOrdenados[0][i + 1]; d -= pasoX)
                    {
                        PointPair pto = new PointPair(d, 0);
                        pto.Z = calculaK(pto);
                        semiRecta.Add(pto);
                    }
                    rectasEje.Add(semiRecta.Clone());
                }
                //Esta raiz queda sola y va hacia el infinito
                semiRecta.Clear();
                for (double d = pYcOrdenados[0][pYcOrdenados[0].Length-1]; d >= this.InicioEjeX; d-= pasoX)
                {
                    PointPair pto = new PointPair(d, 0);
                    pto.Z = calculaK(pto);
                    semiRecta.Add(pto);
                }
                rectasEje.Add(semiRecta.Clone());
            }
            else
            {
                for (int i = 0; i < pYcOrdenados[0].Length; i += 2)      //Se los agrupa en pares y se crean rectas
                {
                    semiRecta.Clear();
                    for (double d = pYcOrdenados[0][i]; d >= pYcOrdenados[0][i + 1]; d -= pasoX)
                    {
                        PointPair pto = new PointPair(d, 0);
                        pto.Z = calculaK(pto);
                        semiRecta.Add(pto);
                    }
                    rectasEje.Add(semiRecta.Clone());
                }

            }

            return rectasEje;
        }
开发者ID:pablopatarca,项目名称:Sistema-Educativo-Teoria-Control-UTN-FRRo,代码行数:46,代码来源:RootLocus.cs


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