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


C# ZedGraph.PointPairList类代码示例

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


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

示例1: DateAxisSampleDemo

        public DateAxisSampleDemo()
            : base("Code Project Date Axis Sample",
			"Date Axis Sample", DemoType.Tutorial)
        {
            GraphPane myPane = base.GraphPane;

            // Set the titles and axis labels
            myPane.Title.Text = "My Test Date Graph";
            myPane.XAxis.Title.Text = "Date";
            myPane.YAxis.Title.Text = "My Y Axis";

            // Make up some data points based on the Sine function
            PointPairList list = new PointPairList();
            for ( int i=0; i<36; i++ )
            {
                double x = (double) new XDate( 1995, 5, i+11 );
                double y = Math.Sin( (double) i * Math.PI / 15.0 );
                list.Add( x, y );
            }

            // Generate a red curve with diamond
            // symbols, and "My Curve" in the legend
            LineItem myCurve = myPane.AddCurve( "My Curve",
                list, Color.Red, SymbolType.Diamond );

            // Set the XAxis to date type
            myPane.XAxis.Type = AxisType.Date;

            base.ZedGraphControl.AxisChange();
        }
开发者ID:Jungwon,项目名称:ZedGraph,代码行数:30,代码来源:DateAxisSampleDemo.cs

示例2: getData

        static PointPairList getData(string site_code, string var_code, DateTime dStart, DateTime dEnd, dbConnection dataObject, double lBnd, double upBnd)
        {
            PointPairList graphPoints = new PointPairList();

            DataTable values1yr = dataObject.getDVCstm(site_code, var_code, dStart, dEnd, lBnd, upBnd);
            Double NoDV = dataObject.getNoDV(var_code);

            double testBnds;
            foreach (DataRow row in values1yr.Rows)
            {
                testBnds = Convert.ToDouble(row["DataValue1"]);
                DateTime dateShowing = convDate(row["LocalDateTime"].ToString());

                try
                {
                    if (!(Convert.ToDouble(row["DataValue1"]) == NoDV || Convert.ToDouble(row["DataValue1"]) < lBnd || Convert.ToDouble(row["DataValue1"]) > upBnd))
                    {
                        graphPoints.Add((double)new XDate(dateShowing.Year, dateShowing.Month, dateShowing.Day, dateShowing.Hour, dateShowing.Minute, dateShowing.Second), Convert.ToDouble(row["DataValue1"]));
                    }
                    else
                    {
                        graphPoints.Add((double)new XDate(dateShowing.Year, dateShowing.Month, dateShowing.Day, dateShowing.Hour, dateShowing.Minute, dateShowing.Second), double.NaN);
                    }
                }
                catch (Exception ex)
                {
                    System.Console.WriteLine("found error " +ex.Message);
                }

            }
            graphPoints = cleanValues(graphPoints, values1yr);
            return graphPoints;
        }
开发者ID:luiseduardohdbackup,项目名称:InteractivePlots,代码行数:33,代码来源:Program.cs

示例3: DrawGraphics

        private void DrawGraphics()
        {
            int length = resultsList.Count();
            PointPairList avgsValues = new PointPairList();
            PointPairList sigmasValues = new PointPairList();

            foreach (double d in resultsList[length - 1].trajectoryAvgs.Keys)
            {
                avgsValues.Add(d, resultsList[length - 1].trajectoryAvgs[d]);
            }

            foreach (double d in resultsList[length - 1].trajectorySigmas.Keys)
            {
                sigmasValues.Add(d, resultsList[length - 1].trajectorySigmas[d]);
            }

            avgsGraphic.GraphPane.Legend.FontSpec.Size = 8;
            LineItem avgsL = avgsGraphic.GraphPane.AddCurve(resultsList[length - 1].parameterLine,
                avgsValues, currentColor, SymbolType.Circle);
            avgsL.IsVisible = this.currentPointView;

            avgsGraphic.AxisChange();
            avgsGraphic.Invalidate();
            avgsGraphic.Refresh();

            sigmasGraphic.GraphPane.Legend.FontSpec.Size = 8;
            LineItem sigmasL = sigmasGraphic.GraphPane.AddCurve(resultsList[length - 1].parameterLine,
                sigmasValues, currentColor, SymbolType.Circle);
            sigmasL.IsVisible = this.currentPointView;

            sigmasGraphic.AxisChange();
            sigmasGraphic.Invalidate();
            sigmasGraphic.Refresh();
        }
开发者ID:kocharyan-ani,项目名称:random_networks_explorer,代码行数:34,代码来源:ExtendedGraphic.cs

示例4: FilterToZoomedRange

        /// <summary>
        /// Filters the <see cref="DataFrameBuilder.Points"/> down to just those that are 
        /// visible if the graph has been zoomed in.
        /// This method only filters based on the value on the Base Axis 
        /// (i.e. the X-Axis for most curves).
        /// </summary>
        public virtual DataFrameBuilder FilterToZoomedRange(DataFrameBuilder dataFrameBuilder)
        {
            var graphPane = dataFrameBuilder.GraphPane;
            var pointList = dataFrameBuilder.Points;
            var baseAxis = dataFrameBuilder.CurveItem.BaseAxis(graphPane);
            if (baseAxis.Scale.IsAnyOrdinal)
            {
                // If the Scale is either Ordinal or Text, then don't
                // filter the PointList, because the point values
                // are derived from their position in the list.
                return dataFrameBuilder;
            }
            Func<PointPair, double> valueOfPointFunc = ValueOfPointFuncForAxis(dataFrameBuilder, baseAxis);
            if (null == valueOfPointFunc)
            {
                return dataFrameBuilder;
            }

            double min = baseAxis.Scale.Min;
            double max = baseAxis.Scale.Max;
            var pointPairList = new PointPairList();
            for (int i = 0; i < pointList.Count; i++)
            {
                var pointPair = pointList[i];
                double value = valueOfPointFunc(pointPair);
                if (value < min || value > max)
                {
                    continue;
                }
                pointPairList.Add(pointPair);
            }
            return dataFrameBuilder.SetPoints(pointPairList);
        }
开发者ID:AlexandreBurel,项目名称:pwiz-mzdb,代码行数:39,代码来源:CurveDataHandler.cs

示例5: btnCalc_Click

 private void btnCalc_Click(object sender, EventArgs e)
 {
     int seed = int.Parse(Seed.Text);
     IRandomMethod method = new MethodMiddleOfSquare(seed);
     if (radioButton1.Checked) method = new MethodMiddleOfSquare(seed);
     if (radioButton2.Checked) method = new MultiplicativeCongruentialMethod(seed, 3453, 5675673);
     int countNumbers = int.Parse(CountNumbers.Text);
     int countNumbers2 = int.Parse(CountNumbers2.Text);
     int numberSections = int.Parse(textBox1.Text);
     ITestingMethod testingMethod = new EasyTesting();
     double M, D;
     double[] values = testingMethod.TestingUniformity(method, numberSections, countNumbers2, out M, out D);
     double C = testingMethod.TestingtestingIndependence(method, countNumbers);
     Correlation.Text = string.Format("Correlation = {0}", C);
     MValue.Text = string.Format("M = {0}", M);
     DValue.Text = string.Format("D = {0}", D);
     ZedGraph.PointPairList table = new PointPairList();
     for(int i=0;i<numberSections;i++)
     {
         table.Add(i,values[i]);
     }
     zedGraphControl1.GraphPane.AddCurve("", table, Color.Blue, SymbolType.Square);
     zedGraphControl1.AxisChange();
     zedGraphControl1.Invalidate();
 }
开发者ID:Hartigan,项目名称:MathematicModeling,代码行数:25,代码来源:Form1.cs

示例6: CreateGraph

        private void CreateGraph( ZedGraphControl zgc )
        {
            GraphPane myPane = zgc.GraphPane;

            // Set the titles and axis labels
            myPane.Title.Text = "My Test Graph";
            myPane.XAxis.Title.Text = "X Value";
            myPane.YAxis.Title.Text = "My Y Axis";

            // Make up some data points from the Sine function
            PointPairList list = new PointPairList();
            for ( double x = 0; x < 36; x++ )
            {
                double y = Math.Sin( x * Math.PI / 15.0 );

                list.Add( x, y );
            }

            // Generate a blue curve with circle symbols, and "My Curve 2" in the legend
            LineItem myCurve = myPane.AddCurve( "My Curve", list, Color.Blue,
                                    SymbolType.Circle );
            // Fill the area under the curve with a white-red gradient at 45 degrees
            myCurve.Line.Fill = new Fill( Color.White, Color.Red, 45F );
            // Make the symbols opaque by filling them with white
            myCurve.Symbol.Fill = new Fill( Color.White );

            // Fill the axis background with a color gradient
            myPane.Chart.Fill = new Fill( Color.White, Color.LightGoldenrodYellow, 45F );

            // Fill the pane background with a color gradient
            myPane.Fill = new Fill( Color.White, Color.FromArgb( 220, 220, 255 ), 45F );

            // Calculate the Axis Scale Ranges
            zgc.AxisChange();
        }
开发者ID:maveroke,项目名称:PerformanceProgression,代码行数:35,代码来源:Form1.cs

示例7: LinearScaleForm

        public LinearScaleForm(MosaicWindow window)
        {
            InitializeComponent();

            mosaicWindow = window;

            // Set the Titles
            this.zedGraphControl.GraphPane.Title.Text = "LUT";
            this.zedGraphControl.GraphPane.XAxis.Title.Text = "Input Intensity";
            this.zedGraphControl.GraphPane.YAxis.Title.Text = "Output Intensity";

            this.list = new PointPairList();

            this.cursor1 =
               new VerticalZedGraphCursor(this.zedGraphControl, Color.Red);

            this.cursor2 =
                new VerticalZedGraphCursor(this.zedGraphControl, Color.Green);

            zedGraphControl.ZedGraphCursorChangingHandler +=
                new ZedGraphCursorHandler<ZedGraphWithCursorsControl, ZedGraphCursorEventArgs>(OnCursorChangingHandler);

            zedGraphControl.ZedGraphCursorChangedHandler += new ZedGraphCursorHandler<ZedGraphWithCursorsControl, ZedGraphCursorEventArgs>(OnCursorChangedHandler);

            this.cursor1.Position = this.min;
            this.cursor2.Position = this.max;

            this.zedGraphControl.AddVerticalCursor(cursor1);
            this.zedGraphControl.AddVerticalCursor(cursor2);
        }
开发者ID:atdgroup,项目名称:Mosaic,代码行数:30,代码来源:LinearScaleTool.cs

示例8: FrmDiagramaDeBloques

 public FrmDiagramaDeBloques(PointPairList polos, PointPairList ceros, RootLocus rl)
     : this()
 {
     this.rl = rl;
     this.polos = polos;
     this.ceros = ceros;
 }
开发者ID:pablopatarca,项目名称:Sistema-Educativo-Teoria-Control-UTN-FRRo,代码行数:7,代码来源:FrmDiagramaDeBloques.cs

示例9: CreateGraph

        private void CreateGraph()
        {
            GraphPane myPane = zedGraphControl1.GraphPane;
            myPane.Title.Text = "Plot of " + foot + " foot motion.\n";
            myPane.XAxis.Title.Text = "Time (seconds)";
            myPane.YAxis.Title.Text =foot + "foot motion (mm)";

            //lists to save points as they come from the MCE
            xData = new PointPairList();
            yData = new PointPairList();
            zData = new PointPairList();
            
            // Initially, a curve is added with no data points (list is empty)
            // Color is blue, and there will be no symbols
            // 2nd line graph (red) added to show peaks
            curve = myPane.AddCurve("z-position", zData, Color.Blue, SymbolType.None);
            curve = myPane.AddCurve("y-position", yData, Color.Red, SymbolType.None);
            curve = myPane.AddCurve("x-position", yData, Color.Green, SymbolType.None);
            //curve = myPane.AddCurve("Peak", peakData, Color.Red, SymbolType.Plus);

            // Just manually control the X axis range so it scrolls continuously
            // instead of discrete step-sized jumps
            myPane.XAxis.Scale.Min = 0;
            myPane.XAxis.Scale.Max = 6.0;
            myPane.YAxis.Scale.Min = -700; //if needed, fix Y-axis to a max and min 
            myPane.YAxis.Scale.Max = 400;
            myPane.XAxis.Scale.MinorStep = 0.2;
            myPane.XAxis.Scale.MajorStep = 1.0;

            // Scale the axes
            zedGraphControl1.AxisChange();
        }
开发者ID:matalangilbert,项目名称:stromohab-2008,代码行数:32,代码来源:ZedGraphPlotForm.cs

示例10: StepChartDemo

        public StepChartDemo()
            : base("A sample step chart",
									"Step Chart Demo", DemoType.Line)
        {
            GraphPane myPane = base.GraphPane;

            // Set the title and axis labels
            myPane.Title.Text = "Demo for Step Charts";
            myPane.XAxis.Title.Text = "Time, Days";
            myPane.YAxis.Title.Text = "Widget Production (units/hour)";

            // Generate some sine-based data values
            PointPairList list = new PointPairList();
            for ( double i=0; i<36; i++ )
            {
                double x = i * 5.0;
                double y = Math.Sin( i * Math.PI / 15.0 ) * 16.0;
                list.Add( x, y );
            }

            // Add a red curve with circle symbols
            LineItem curve = myPane.AddCurve( "Step", list, Color.Red, SymbolType.Circle );
            curve.Line.Width = 1.5F;
            // Fill the area under the curve
            curve.Line.Fill = new Fill( Color.White, Color.FromArgb( 60, 190, 50), 90F );
            // Fill the symbols with white to make them opaque
            curve.Symbol.Fill = new Fill( Color.White );
            curve.Symbol.Size = 5;

            // Set the curve type to forward steps
            curve.Line.StepType = StepType.ForwardStep;

            base.ZedGraphControl.AxisChange();
        }
开发者ID:Jungwon,项目名称:ZedGraph,代码行数:34,代码来源:StepChartDemo.cs

示例11: HistogramXY

        public HistogramXY(int [] x, String axis)
        {
            int i;

            InitializeComponent();

            // get a reference to the GraphPane
            GraphPane myPane = zedGraphControl1.GraphPane;

            //Set the titles
            myPane.Title.Text = "Histograma";
            myPane.XAxis.Title.Text = axis;
            myPane.YAxis.Title.Text = "Contagem";
            //list points
            PointPairList list1 = new PointPairList();
            for (i = 0; i < x.Length; i++)
            {
                list1.Add(i, x[i]);
            }
            //add bar series
            myPane.AddCurve(axis, list1, Color.Gray, SymbolType.None);
            myPane.XAxis.Scale.Min = 0;
            myPane.XAxis.Scale.Max = x.Length-1;
            zedGraphControl1.AxisChange();
        }
开发者ID:jmdbo,项目名称:SS,代码行数:25,代码来源:HistogramXY.cs

示例12: HiLowBarDemo

        public HiLowBarDemo()
            : base("A demo demonstrating HiLow Bars.\n" +
									"These are bars in which the top and the bottom of the bar is defined with user data",
										"Hi-Low Bar", DemoType.Bar)
        {
            GraphPane myPane = base.GraphPane;

            // Set the title and axis labels
            myPane.Title.Text = "Hi-Low Bar Graph Demo";
            myPane.XAxis.Title.Text = "Event";
            myPane.YAxis.Title.Text = "Range of Values";

            // Make up some data points based on the Sine function
            PointPairList list = new PointPairList();
            for ( int i=1; i<45; i++ )
            {
                double y = Math.Sin( (double) i * Math.PI / 15.0 );
                double yBase = y - 0.4;
                list.Add( (double) i, y, yBase );
            }

            // Generate a red bar with "Curve 1" in the legend
            HiLowBarItem myCurve = myPane.AddHiLowBar( "Curve 1", list, Color.Red );
            // Fill the bar with a red-white-red gradient for a 3d look
            myCurve.Bar.Fill = new Fill( Color.Red, Color.White, Color.Red, 0 );
            // Make the bar width based on the available space, rather than a size in points
            //			myCurve.Bar.IsAutoSize = true;

            // Fill the axis background with a color gradient
            myPane.Chart.Fill = new Fill( Color.White,
                Color.FromArgb( 255, 255, 166), 45.0F );

            base.ZedGraphControl.AxisChange();
        }
开发者ID:Jungwon,项目名称:ZedGraph,代码行数:34,代码来源:HiLowBarDemo.cs

示例13: FrmDatos

 //double finK;
 //int cantPtos;
 public FrmDatos(PointPairList polos, PointPairList ceros, RootLocus rl)
 {
     InitializeComponent();
     this.rl = rl;
     this.polos = polos;
     this.ceros = ceros;
 }
开发者ID:pablopatarca,项目名称:Sistema-Educativo-Teoria-Control-UTN-FRRo,代码行数:9,代码来源:FrmDatos.cs

示例14: EveryNumCycleLoad

		void EveryNumCycleLoad(object sender, EventArgs e)
		{
			MasterPane myMaster = zedGraphControl1 .MasterPane ;			
			myMaster.PaneList.Clear();
			myMaster.Title.Text = "MasterPane Test";
			myMaster.Title.IsVisible = true;
			myMaster.Fill = new Fill( Color.White, Color.MediumSlateBlue, 45.0F );
			int[][] everyRes = DataProcess .AllSingleCycle (MainForm .arr ) ;
			for ( int j=0; j< 10; j++ )
			{
				GraphPane myPane = new GraphPane();
				myPane.Title.Text = "My Test Graph #" + (j+1).ToString();
				myPane.XAxis.Title.Text = "X Axis";
				myPane.YAxis.Title.Text = "Y Axis";
				//myPane.Fill = new Fill( Color.White, Color.LightYellow, 45.0F );
				//myPane.BaseDimension = 6.0F;
				PointPairList list = new PointPairList();
				for ( int i=0; i < everyRes [j ].Length ; i++ )
				{
					int x = i ;
					int y = everyRes [j ][i ] ;
					list.Add( x, y );
				}
				LineItem myCurve = myPane.AddCurve( "label" + j.ToString(),list, Color.Red, SymbolType.Diamond );
				myMaster.Add( myPane );
			}
			using ( Graphics g = this.CreateGraphics() )
			{
				 myMaster .SetLayout( g, PaneLayout.SquareColPreferred );
			}
		}
开发者ID:windygu,项目名称:asxinyunet,代码行数:31,代码来源:EveryNumCycle.cs

示例15: RTGraph

        public RTGraph(TelemetryLapManager telemetryLapManager, bool cbest, bool clast, String xlabel, String YLabel)
        {
            this.cbest = cbest;
            this.clast = clast;
            this.Xlabel = xlabel;
            this.Ylabel = YLabel;

            InitializeComponent();

            this.telemetryLapManager = telemetryLapManager;
            GraphPane myPane = zedGraphControl1.GraphPane;

            if (cbest && telemetryLapManager.ComparisonLap != null)
            {
                var fastestLap = telemetryLapManager.ComparisonLap;
                LoadLap(fastestLap, "FastLap", Color.Green);
            }

            PointPairList pl = new PointPairList();
            var myCurve = myPane.AddCurve("RealTime", pl, Color.Red, SymbolType.None);
            myPane.Title.Text = Xlabel + " " + Ylabel;
            myPane.XAxis.Title.Text = Xlabel;
            myPane.YAxis.Title.Text = Ylabel;
            myCurve.Line.Width = 3.0F;

            telemetryLapManager.PacketProcessed += telemetryLapManager_PacketProcessed;
            telemetryLapManager.CompletedFullLap += telemetryLapManager_CompletedFullLap;
            telemetryLapManager.SetFastestLap += telemetryLapManager_SetFastestLap;
            telemetryLapManager.FinishedOutLap += telemetryLapManager_FinishedOutLap;
            telemetryLapManager.RemovedLap += telemetryLapManager_RemovedLap;

            t1.Interval = F1SpeedSettings.RefreshRate;
            t1.Tick += t1_Tick;
            t1.Start();
        }
开发者ID:tpastor,项目名称:F1_201x_TelemetrySystem,代码行数:35,代码来源:RTGraph.cs


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