本文整理汇总了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);
}
示例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);
}
示例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;
}