本文整理汇总了C#中ZedGraph.CurveList类的典型用法代码示例。如果您正苦于以下问题:C# CurveList类的具体用法?C# CurveList怎么用?C# CurveList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CurveList类属于ZedGraph命名空间,在下文中一共展示了CurveList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateMaxPoints
static int CalculateMaxPoints(CurveList curves)
{
int max = 0;
foreach (CurveItem curve in curves)
max = Math.Max(max, curve.NPts);
return max;
}
示例2: addGrafica
public void addGrafica(CurveList g, DataTable dt)
{
tablas[posActual] = dt;
graficas[posActual] = g.Clone();
aumentarPos();
}
示例3: CalculateValidDimensions
static List<bool[]> CalculateValidDimensions(CurveList curves)
{
List<bool[]> ret = new List<bool[]>();
foreach (CurveItem curve in curves)
ret.Add(DimensionContainsNonZeroData(curve));
return ret;
}
示例4: DataSeriesBox
private DataSeriesBox()
{
InitializeComponent();
series = new CurveList();
zedGraphControl.BorderStyle = System.Windows.Forms.BorderStyle.None;
zedGraphControl.GraphPane.Border.IsVisible = false;
zedGraphControl.GraphPane.Border.Color = Color.White;
zedGraphControl.GraphPane.Border.Width = 0;
// zedGraphControl.IsAntiAlias = true;
zedGraphControl.GraphPane.Fill = new Fill(Color.White);
zedGraphControl.GraphPane.Chart.Fill = new Fill(Color.GhostWhite);
zedGraphControl.GraphPane.CurveList = series;
zedGraphControl.GraphPane.Legend.IsVisible = true;
zedGraphControl.GraphPane.Legend.Position = LegendPos.Right;
zedGraphControl.GraphPane.Legend.IsShowLegendSymbols = false;
zedGraphControl.GraphPane.XAxis.MajorGrid.IsVisible = true;
zedGraphControl.GraphPane.XAxis.MinorGrid.IsVisible = false;
zedGraphControl.GraphPane.XAxis.MajorGrid.Color = Color.LightGray;
zedGraphControl.GraphPane.XAxis.MajorGrid.IsZeroLine = false;
zedGraphControl.GraphPane.XAxis.Scale.MaxGrace = 0;
zedGraphControl.GraphPane.XAxis.Scale.MinGrace = 0;
zedGraphControl.GraphPane.YAxis.MinorGrid.IsVisible = false;
zedGraphControl.GraphPane.YAxis.MajorGrid.IsVisible = true;
zedGraphControl.GraphPane.YAxis.MajorGrid.Color = Color.LightGray;
zedGraphControl.GraphPane.YAxis.MajorGrid.IsZeroLine = false;
zedGraphControl.GraphPane.YAxis.Scale.MaxGrace = 0;
zedGraphControl.GraphPane.YAxis.Scale.MinGrace = 0;
}
示例5: asignarGrafica
private void asignarGrafica(ZedGraphControl z, int i)
{
CurveList g = new CurveList();
g = h.getGrafica(i);
if (g != null)
z.GraphPane.CurveList = g;
}
示例6: ExportToCsv
public static void ExportToCsv(CurveList curves, string filename)
{
validDimensions = CalculateValidDimensions(curves);
using (StreamWriter writer = new StreamWriter(filename, false, ASCIIEncoding.ASCII))
{
WriteHeaders(curves, writer);
WriteData(curves, writer);
}
}
示例7: CurveList
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The XAxis object from which to copy</param>
public CurveList( CurveList rhs )
{
this.maxPts = rhs.maxPts;
foreach ( CurveItem item in rhs )
{
this.Add( (CurveItem) ((ICloneable)item).Clone() );
}
}
示例8: SaveDataAs
public static void SaveDataAs(CurveList curves, string filename)
{
string ext = Path.GetExtension(filename).ToLower();
if (!ExportMethods.ContainsKey(ext))
{
MessageBox.Show("Cannot write to file format: " + ext);
return;
}
ExportMethods[ext](curves, filename);
}
示例9: addGrafica
public void addGrafica(CurveList g, double finX, double finY, double inicioX, double inicioY, DataTable dt)
{
tablas[posActual] = dt;
graficas[posActual] = g.Clone();
this.finX[posActual] = finX;
this.finY[posActual] = finY;
this.inicioX[posActual] = inicioX;
this.inicioY[posActual] = inicioY;
aumentarPos();
}
示例10: QueryUserAndSaveAs
public static void QueryUserAndSaveAs(CurveList curves)
{
if (curves.Count < 1)
{
MessageBox.Show("No data to save!");
return;
}
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = CreateFilter();
if (sfd.ShowDialog() == DialogResult.OK)
SaveDataAs(curves, sfd.FileName);
}
示例11: WriteData
static void WriteData(CurveList curves, StreamWriter writer)
{
int maxPoints = CalculateMaxPoints(curves);
Console.WriteLine(maxPoints);
for (int i = 0; i < maxPoints; i++)
{
Console.WriteLine("line: " + i);
firstElementInLine = true;
WriteDataRow(curves, i, writer);
writer.WriteLine();
}
}
示例12: asignarGrafica
private void asignarGrafica(ZedGraphControl z, int i)
{
CurveList g = new CurveList();
g = h.getGrafica(i);
if (g != null)
{
z.GraphPane.CurveList = g;
z.Invalidate();
z.Refresh();
}
}
示例13: TestEasyData
public void TestEasyData()
{
string [] labels = {"basic1","basic2"};
double[] x1 = { 4, 5, 6 };
double[] y1 = { 12, 15, 18 };
double[] x2 = { -2, -3, -4 };
double[] y2 = { 0.01, 0.1, 1 };
CurveList cl = new CurveList();
cl.Add(new LineItem(labels[0], x1, y1, Color.Black, SymbolType.Circle));
cl.Add(new LineItem(labels[1], x2, y2, Color.Black, SymbolType.Circle));
string filename = folder + labels[0]+".csv";
Console.WriteLine("Writing for file: " + filename);
CsvWriter.ExportToCsv(cl, filename);
}
示例14: ScatterplotView
/// <summary>
/// Constructs a new instance of the ScatterplotView.
/// </summary>
public ScatterplotView()
{
InitializeComponent();
scatterplot = new Scatterplot();
classes = new CurveList();
zedGraphControl.GraphPane.Title.Text = "Scatter Plot";
zedGraphControl.GraphPane.XAxis.Title.Text = "X";
zedGraphControl.GraphPane.YAxis.Title.Text = "Y";
zedGraphControl.GraphPane.Fill = new Fill(Color.WhiteSmoke);
zedGraphControl.GraphPane.CurveList = classes;
}
示例15: ScatterplotView
/// <summary>
/// Constructs a new instance of the ScatterplotView.
/// </summary>
///
public ScatterplotView(Scatterplot scatterplot)
{
InitializeComponent();
classes = new CurveList();
zedGraphControl.BorderStyle = System.Windows.Forms.BorderStyle.None;
zedGraphControl.GraphPane.Border.IsVisible = false;
zedGraphControl.GraphPane.Border.Color = Color.White;
zedGraphControl.GraphPane.Border.Width = 0;
// zedGraphControl.IsAntiAlias = true;
zedGraphControl.GraphPane.Fill = new Fill(Color.White);
zedGraphControl.GraphPane.Chart.Fill = new Fill(Color.GhostWhite);
zedGraphControl.GraphPane.CurveList = classes;
zedGraphControl.GraphPane.Legend.IsVisible = true;
zedGraphControl.GraphPane.Legend.Position = LegendPos.Right;
zedGraphControl.GraphPane.Legend.IsShowLegendSymbols = false;
zedGraphControl.GraphPane.XAxis.MajorGrid.IsVisible = true;
zedGraphControl.GraphPane.XAxis.MinorGrid.IsVisible = false;
zedGraphControl.GraphPane.XAxis.MajorGrid.Color = Color.LightGray;
zedGraphControl.GraphPane.XAxis.MajorGrid.IsZeroLine = false;
zedGraphControl.GraphPane.XAxis.Scale.MaxGrace = 0;
zedGraphControl.GraphPane.XAxis.Scale.MinGrace = 0;
zedGraphControl.GraphPane.YAxis.MinorGrid.IsVisible = false;
zedGraphControl.GraphPane.YAxis.MajorGrid.IsVisible = true;
zedGraphControl.GraphPane.YAxis.MajorGrid.Color = Color.LightGray;
zedGraphControl.GraphPane.YAxis.MajorGrid.IsZeroLine = false;
zedGraphControl.GraphPane.YAxis.Scale.MaxGrace = 0;
zedGraphControl.GraphPane.YAxis.Scale.MinGrace = 0;
ScaleTight = false;
SymbolSize = 7;
LinesVisible = false;
this.scatterplot = scatterplot;
}