• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ZedGraph.PointPairList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: ChordPrepare

        private void ChordPrepare(double a, double b)
        {
            zedChord.GraphPane.CurveList.Clear();

            MyExtension.Function f = (x => x*x*x - 18*x - 83);
            
            zedChord.Graph(f, 2, 10, 0.1, Color.Blue);

           double x0 = a, x1 = b, x2;

            PointPairList list = new PointPairList();
            ChordLogger.Items.Clear();

            do
            {
                x2 = x1 - f(x1)*(x1 - x0)/(f(x1) - f(x0));
                x0 = x1;
                x1 = x2;
                list.Add(x2, f(x2));

                ChordLogger.Items.Add(
                    String.Format("x = {0:0.#####}, f(x) = {1:0.##########}", x2, f(x2)));

            } while (Math.Abs(f(x2)) > Eps);


            LineItem line = zedChord.GraphPane.AddCurve("", list, Color.Green, SymbolType.Diamond);
            line.Line.IsVisible = false;

            zedChord.AxisChange();
        }
开发者ID:DVitinnik,项目名称:UniversityApps,代码行数:31,代码来源:Form1.cs


示例17: Form2

        public Form2(Form1 f2)
        {
            
           
            InitializeComponent();
            GraphPane pane = zedGraph.GraphPane;

            // Очистим список кривых на тот случай, если до этого сигналы уже были нарисованы
            pane.CurveList.Clear();

            // Создадим список точек
           PointPairList list = new PointPairList();
           PointPairList list2 = new PointPairList();
            // Заполняем список точек

            // Создадим кривую с названием "Функція", 
            // которая будет рисоваться голубым цветом (Color.Blue),
            // Опорные точки выделяться не будут (SymbolType.None)
            LineItem myCurve = pane.AddCurve("Функція Y", list, Color.Blue, SymbolType.None);
            LineItem myCurve2 = pane.AddCurve("Функція Y(точ)", list2, Color.Red, SymbolType.None);
           
            for (int i = 0; i < f2.dataGridView1.RowCount-1; i++)
            {
                list.Add(Convert.ToDouble( f2.dataGridView1[0, i].Value),Convert.ToDouble( f2.dataGridView1[1, i].Value));
                list2.Add(Convert.ToDouble(f2.dataGridView1[0, i].Value), Convert.ToDouble(f2.dataGridView1[2, i].Value));
                
            }

         
            zedGraph.AxisChange();
            pane.Title.Text = "Графік";
            // Обновляем график
            zedGraph.Invalidate();
        }
开发者ID:Innazvrtn,项目名称:Numerical-Methods,代码行数:34,代码来源:Form2.cs


示例18: FormEnergyCurve_Load

        private void FormEnergyCurve_Load(object sender, EventArgs e)
        {
            if (CoeffList.Count < 2)
                return;

            string curveName = "";
            int counter = 0;
            foreach (double coeff in CoeffList)
            {
                curveName += coeff.ToString("E") + " * x^" + counter.ToString() + " + ";
                counter++;
            }
            curveName = curveName.Substring(0, curveName.Length - 3);

            Det.EnergyCurveCoefficients.Clear();
            Det.EnergyCurveCoefficients.AddRange(CoeffList);

            GraphPane pane = graph.GraphPane;
            PointPairList list = new PointPairList();
            for (int i = 0; i < Det.CurrentNumChannels; i++)
                list.Add((double)i, Det.GetEnergy(i));            

            LineItem energyCurve = pane.AddCurve(curveName, list, Color.Green, SymbolType.None);

            graph.RestoreScale(pane);
            graph.AxisChange();
            graph.Refresh();
        }
开发者ID:corebob,项目名称:crash,代码行数:28,代码来源:FormEnergyCurve.cs


示例19: InitialSampleDemo

        public InitialSampleDemo()
            : base("Code Project Initial Sample",
			"Initial Sample", DemoType.Tutorial)
        {
            GraphPane myPane = base.GraphPane;

            // Set the title and axis labels
            myPane.Title.Text = "My Test Graph\n(For CodeProject Sample)";
            myPane.XAxis.Title.Text = "My X Axis";
            myPane.YAxis.Title.Text = "My Y Axis";

            // Make up some data arrays based on the Sine function
            PointPairList list1 = new PointPairList();
            PointPairList list2 = new PointPairList();
            for ( int i=0; i<36; i++ )
            {
                double x = (double) i + 5;
                double y1 = 1.5 + Math.Sin( (double) i * 0.2 );
                double y2 = 3.0 * ( 1.5 + Math.Sin( (double) i * 0.2 ) );
                list1.Add( x, y1 );
                list2.Add( x, y2 );
            }

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

            // Generate a blue curve with circle
            // symbols, and "Piper" in the legend
            LineItem myCurve2 = myPane.AddCurve( "Piper",
                list2, Color.Blue, SymbolType.Circle );

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


示例20: CreateGraph

        private void CreateGraph(ZedGraphControl zgc)
        {
            string[] mesi = { "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre" };
            GraphPane myPane = zgc.GraphPane;

            // Set the titles and axis labels
            myPane.Title.Text = "Km percorsi per anno";
            myPane.XAxis.Title.Text = "Mese";
            myPane.XAxis.Type = AxisType.Text;
            myPane.XAxis.Scale.TextLabels = mesi;
            myPane.YAxis.Title.Text = "Km percorsi";

            PointPairList list = new PointPairList();
            for (double x = 1; x < 13; x++)
            {
                double y = MesiKm[int.Parse(x.ToString())];
                list.Add(x, y, mesi[int.Parse((x-1).ToString())].ToString() +" "+ textBox1.Text);
            }

            BarItem bar =  myPane.AddBar(textBox1.Text, list, Color.Blue);

            // 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:Mabloza,项目名称:GPS-Vehicle-Tracking,代码行数:30,代码来源:frmKmAnno.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ZedGraph.TextObj类代码示例发布时间:2022-05-26
下一篇:
C# ZedGraph.PointPair类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap