本文整理汇总了C#中ZedGraph.CurveList类的典型用法代码示例。如果您正苦于以下问题:C# CurveList类的具体用法?C# CurveList怎么用?C# CurveList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CurveList类属于ZedGraph命名空间,在下文中一共展示了CurveList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CalculateMaxPoints
static int CalculateMaxPoints(CurveList curves)
{
int max = 0;
foreach (CurveItem curve in curves)
max = Math.Max(max, curve.NPts);
return max;
}
开发者ID:adrianj,项目名称:AdriansLib,代码行数:7,代码来源:CsvWriter.cs
示例2: addGrafica
public void addGrafica(CurveList g, DataTable dt)
{
tablas[posActual] = dt;
graficas[posActual] = g.Clone();
aumentarPos();
}
开发者ID:pablopatarca,项目名称:Sistema-Educativo-Teoria-Control-UTN-FRRo,代码行数:7,代码来源:Historial.cs
示例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;
}
开发者ID:adrianj,项目名称:AdriansLib,代码行数:7,代码来源:CsvWriter.cs
示例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;
}
开发者ID:BiYiTuan,项目名称:framework,代码行数:34,代码来源:DataSeriesBox.cs
示例5: asignarGrafica
private void asignarGrafica(ZedGraphControl z, int i)
{
CurveList g = new CurveList();
g = h.getGrafica(i);
if (g != null)
z.GraphPane.CurveList = g;
}
开发者ID:pablopatarca,项目名称:Sistema-Educativo-Teoria-Control-UTN-FRRo,代码行数:9,代码来源:FrmCompara.cs
示例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);
}
}
开发者ID:adrianj,项目名称:AdriansLib,代码行数:9,代码来源:CsvWriter.cs
示例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() );
}
}
开发者ID:JohnChantzis,项目名称:bark_GUI,代码行数:13,代码来源:CurveList.cs
示例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);
}
开发者ID:adrianj,项目名称:AdriansLib,代码行数:10,代码来源:DataExporter.cs
示例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();
}
开发者ID:pablopatarca,项目名称:Sistema-Educativo-Teoria-Control-UTN-FRRo,代码行数:11,代码来源:Historial.cs
示例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);
}
开发者ID:adrianj,项目名称:AdriansLib,代码行数:12,代码来源:DataExporter.cs
示例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();
}
}
开发者ID:adrianj,项目名称:AdriansLib,代码行数:12,代码来源:CsvWriter.cs
示例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();
}
}
开发者ID:pablopatarca,项目名称:Sistema-Educativo-Teoria-Control-UTN-FRRo,代码行数:13,代码来源:FrmCompara.cs
示例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);
}
开发者ID:adrianj,项目名称:AdriansLib,代码行数:14,代码来源:TestCsvWriter.cs
示例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;
}
开发者ID:xyicheng,项目名称:Accord,代码行数:17,代码来源:ScatterplotView.cs
示例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;
}
开发者ID:KommuSoft,项目名称:accord_framework,代码行数:44,代码来源:ScatterplotView.cs
示例16: TestComplexData
public void TestComplexData()
{
string[] labels = { "complex1", "complex2","complex3" };
double[] x1 = { 4e12, 5e13, 6e14 };
double[] y1 = { 12e-10, 15e-10, 18e-10 };
double[] x2 = { -2, -3, -4, -5, -6, -7, -8, -9, -10, -11 };
double[] y2 = { 0.001, 0.01, 0.1, 1, 10, 100, 1000, 10000, 100000, 1000000 };
double[] z2 = { 1.23453456345345345, 2.6450985347635, 3.45237895638925, 4.42378962387534, 5.4532498734563,
6.429874343, 7.5349857345, 8.5347637634, 9.3764684593453, 10.53948756876345 };
double[] x3 = { 1, 2, 3, 4, 5, 6, 7, 8 };
double[] y3 = new double[x3.Length];
CurveList cl = new CurveList();
cl.Add(new LineItem(labels[0], x1, y1, Color.Black, SymbolType.Circle));
PointPairList ppl = new PointPairList();
for(int i = 0; i < x2.Length; i++)
ppl.Add(x2[i],y2[i],z2[i]);
cl.Add(new LineItem(labels[1], ppl, Color.Black, SymbolType.Circle));
cl.Add(new LineItem(labels[2], x3, y3, Color.Black, SymbolType.Circle));
string filename = folder + labels[0] + ".csv";
Console.WriteLine("Writing for file: " + filename);
CsvWriter.ExportToCsv(cl, filename);
}
开发者ID:adrianj,项目名称:AdriansLib,代码行数:22,代码来源:TestCsvWriter.cs
示例17: GraphPane
/// <summary>
/// Constructor for deserializing objects
/// </summary>
/// <param name="info">A <see cref="SerializationInfo"/> instance that defines the serialized data
/// </param>
/// <param name="context">A <see cref="StreamingContext"/> instance that contains the serialized data
/// </param>
protected GraphPane( SerializationInfo info, StreamingContext context )
: base(info, context)
{
// The schema value is just a file version parameter. You can use it to make future versions
// backwards compatible as new member variables are added to classes
int sch = info.GetInt32( "schema2" );
_xAxis = (XAxis)info.GetValue( "xAxis", typeof( XAxis ) );
if ( sch >= 11 )
_x2Axis = (X2Axis)info.GetValue( "x2Axis", typeof( X2Axis ) );
else
_x2Axis = new X2Axis( "" );
_yAxisList = (YAxisList)info.GetValue( "yAxisList", typeof( YAxisList ) );
_y2AxisList = (Y2AxisList)info.GetValue( "y2AxisList", typeof( Y2AxisList ) );
_curveList = (CurveList)info.GetValue( "curveList", typeof( CurveList ) );
_chart = (Chart) info.GetValue( "chart", typeof( Chart ) );
_barSettings = (BarSettings)info.GetValue( "barSettings", typeof( BarSettings ) );
_barSettings._ownerPane = this;
_isIgnoreInitial = info.GetBoolean( "isIgnoreInitial" );
_isBoundedRanges = info.GetBoolean( "isBoundedRanges" );
_isIgnoreMissing = info.GetBoolean( "isIgnoreMissing" );
_isAlignGrids = info.GetBoolean( "isAlignGrids" );
_lineType = (LineType)info.GetValue( "lineType", typeof( LineType ) );
_zoomStack = new ZoomStateStack();
}
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:39,代码来源:GraphPane.cs
示例18: FindNearestPoint
/// <summary>
/// Find the data point that lies closest to the specified mouse (screen)
/// point.
/// </summary>
/// <remarks>
/// This method will search through the specified list of curves to find which point is
/// nearest. It will only consider points that are within
/// <see cref="Default.NearestTol"/> pixels of the screen point, and it will
/// only consider <see cref="CurveItem"/>'s that are in
/// <paramref name="targetCurveList"/>.
/// </remarks>
/// <param name="mousePt">The screen point, in pixel coordinates.</param>
/// <param name="targetCurveList">A <see cref="CurveList"/> object containing
/// a subset of <see cref="CurveItem"/>'s to be searched.</param>
/// <param name="nearestCurve">A reference to the <see cref="CurveItem"/>
/// instance that contains the closest point. nearestCurve will be null if
/// no data points are available.</param>
/// <param name="iNearest">The index number of the closest point. The
/// actual data vpoint will then be <see cref="CurveItem.Points">CurveItem.Points[iNearest]</see>
/// . iNearest will
/// be -1 if no data points are available.</param>
/// <returns>true if a point was found and that point lies within
/// <see cref="Default.NearestTol"/> pixels
/// of the screen point, false otherwise.</returns>
public bool FindNearestPoint( PointF mousePt, CurveList targetCurveList,
out CurveItem nearestCurve, out int iNearest )
{
CurveItem nearestBar = null;
int iNearestBar = -1;
nearestCurve = null;
iNearest = -1;
// If the point is outside the ChartRect, always return false
if ( !_chart._rect.Contains( mousePt ) )
return false;
double x, x2;
double[] y;
double[] y2;
//ReverseTransform( mousePt, out x, out y, out y2 );
ReverseTransform( mousePt, out x, out x2, out y, out y2 );
if ( !AxisRangesValid() )
return false;
ValueHandler valueHandler = new ValueHandler( this, false );
double xPixPerUnit = _chart._rect.Width / ( _xAxis._scale._max - _xAxis._scale._min );
//double yPixPerUnit = chartRect.Height / ( yAxis.Max - yAxis.Min );
//double y2PixPerUnit; // = chartRect.Height / ( y2Axis.Max - y2Axis.Min );
double yPixPerUnitAct, yAct, yMinAct, yMaxAct;
double minDist = 1e20;
double xVal, yVal, dist = 99999, distX, distY;
double tolSquared = Default.NearestTol * Default.NearestTol;
int iBar = 0;
foreach ( CurveItem curve in targetCurveList )
{
//test for pie first...if it's a pie rest of method superfluous
if ( curve is PieItem && curve.IsVisible )
{
if ( ( (PieItem)curve ).SlicePath != null &&
( (PieItem)curve ).SlicePath.IsVisible( mousePt ) )
{
nearestBar = curve;
iNearestBar = 0;
}
continue;
}
else if ( curve.IsVisible )
{
int yIndex = curve.GetYAxisIndex( this );
Axis yAxis = curve.GetYAxis( this );
if ( curve.IsY2Axis )
{
yAct = y2[yIndex];
yMinAct = _y2AxisList[yIndex]._scale._min;
yMaxAct = _y2AxisList[yIndex]._scale._max;
}
else
{
yAct = y[yIndex];
yMinAct = _yAxisList[yIndex]._scale._min;
yMaxAct = _yAxisList[yIndex]._scale._max;
}
yPixPerUnitAct = _chart._rect.Height / ( yMaxAct - yMinAct );
IPointList points = curve.Points;
float barWidth = curve.GetBarWidth( this );
double barWidthUserHalf;
Axis baseAxis = curve.BaseAxis( this );
bool isXBaseAxis = ( baseAxis is XAxis || baseAxis is X2Axis );
if ( isXBaseAxis )
barWidthUserHalf = barWidth / xPixPerUnit / 2.0;
//.........这里部分代码省略.........
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:101,代码来源:GraphPane.cs
示例19: FindContainedObjects
// Revision: JCarpenter 10/06
/// <summary>
/// Find any objects that exist within the specified (screen) rectangle.
/// This method will search through all of the graph objects, such as
/// <see cref="Axis"/>, <see cref="Legend"/>, <see cref="PaneBase.Title"/>,
/// <see cref="GraphObj"/>, and <see cref="CurveItem"/>.
/// and see if the objects' bounding boxes are within the specified (screen) rectangle
/// This method returns true if any are found.
/// </summary>
public bool FindContainedObjects( RectangleF rectF, Graphics g,
out CurveList containedObjs )
{
containedObjs = new CurveList();
foreach ( CurveItem ci in this.CurveList )
{
for ( int i = 0; i < ci.Points.Count; i++ )
{
if ( ci.Points[i].X > rectF.Left &&
ci.Points[i].X < rectF.Right &&
ci.Points[i].Y > rectF.Bottom &&
ci.Points[i].Y < rectF.Top )
{
containedObjs.Add( ci );
}
}
}
return ( containedObjs.Count > 0 );
}
开发者ID:cliffton2008,项目名称:JNMAutoTrader_Capital,代码行数:29,代码来源:GraphPane.cs
示例20: Select
/// <summary>
/// Place a list of <see cref="CurveItem" />'s in the selection list, removing all other
/// items.
/// </summary>
/// <param name="master">The <see cref="MasterPane" /> that is the "owner"
/// of the <see cref="CurveItem" />'s.</param>
/// <param name="ciList">The list of <see cref="CurveItem" /> to be added to the list.</param>
public void Select( MasterPane master, CurveList ciList )
{
//Clear the selection, but don't send the event,
//the event will be sent in "AddToSelection" by calling "UpdateSelection"
ClearSelection( master, false );
AddToSelection( master, ciList );
}
开发者ID:Jungwon,项目名称:ZedGraph,代码行数:15,代码来源:Selection.cs
注:本文中的ZedGraph.CurveList类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论