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


C# ZedGraph.LineItem类代码示例

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


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

示例1: createGraph

        public void createGraph()
        {
            //zgc.GraphPane = new GraphPane();
            GraphPane myPane = zgc.GraphPane;

            // Set the titles and axis labels
            myPane.Title.Text = this.getMethod() + " results";
            myPane.XAxis.Title.Text = "distance";
            myPane.YAxis.Title.Text = "relative count";

            myCurveG = myPane.AddCurve("Genuines", new PointPairList(), Color.Green, SymbolType.Circle);
            myCurveI = myPane.AddCurve("Impostors", new PointPairList(), Color.Red, SymbolType.Circle);

            myCurveG.Line.Width = 1;
            myCurveI.Line.Width = 1;

            myCurveG.Line.Fill = new Fill(Color.FromArgb(60, 0, 255, 0));
            myCurveI.Line.Fill = new Fill(Color.FromArgb(60, 255, 0, 0));

            myCurveG.Symbol.Size = 2;
            myCurveI.Symbol.Size = 2;

            myCurveG.Symbol.Fill = new Fill(Color.Green);
            myCurveI.Symbol.Fill = new Fill(Color.Red);

            LineItem myCurveThresh = myPane.AddCurve("Thresh", threshPoints, Color.Black, SymbolType.None);
            myCurveThresh.Line.Width = 1;
            myCurveThresh.Line.Style = System.Drawing.Drawing2D.DashStyle.Dot;

            this.updatePanes();

            zgc.AxisChange();
        }
开发者ID:harpener,项目名称:BIO,代码行数:33,代码来源:BiometricAlgorithmGenuineImpostorResultGraph.cs

示例2: SetCollectProperty

 public SetCollectProperty(LineItem lineItem,string CollectId)
 {
     InitializeComponent();
     this.lineItem = lineItem;
     this.CollectId = CollectId;
     this.label_CollectId.Text = CollectId.ToString();
     this.comboBox_LineStyle.SelectedIndex = 0;
     this.comboBox_SymbolType.DataSource = Enum.GetNames(typeof(SymbolType));
 }
开发者ID:amedinarcr,项目名称:fop,代码行数:9,代码来源:SetCollectProperty.cs

示例3: Barier

 public Barier(Interval interval)
 {
     points = new PointPairList();
     this.interval = interval;
     curve = new LineItem("", points, Color.SteelBlue, SymbolType.Diamond);
     curve.Line.IsVisible = false;
     curve.Symbol.Fill.Color = Color.SteelBlue;
     curve.Symbol.Fill.Type = FillType.Solid;
     interval.graphPane.CurveList.Add(curve);
     barierType = "Равнины, луга, соланчаки";
 }
开发者ID:Leoleshucov008,项目名称:CalculationRRL,代码行数:11,代码来源:Interval.cs

示例4: KresliGraf

        public static ZedGraphControl KresliGraf(string nazovGrafu,List<Spread> myCustomObjects, ZedGraphControl zg1)
        {
            zg1.GraphPane.CurveList.Clear();
            zg1.GraphPane.GraphObjList.Clear();

            GraphPane myPane = zg1.GraphPane;

            // Set the titles and axis labels
            myPane.Title.Text = nazovGrafu;
            myPane.XAxis.Title.Text = "Date";
            myPane.YAxis.Title.Text = "$";
            myPane.XAxis.Type = AxisType.Date;

            PointPairList list = new PointPairList();
            int rok = myCustomObjects.First().Date.Year;
            DateTime predchadzDatum = myCustomObjects.First().Date;

            foreach (var item in myCustomObjects)
            {
                var x = (double)new XDate(DateTime.Parse(item.Date.ToShortDateString()));
                var y = item.Value;
                //Console.WriteLine(x + " " + y);
                list.Add(x, y);
                //Console.WriteLine(rok + " > " + item.Date.Year.ToString() + "  " + (item.Date + " > " + new DateTime(item.Date.Year, 1, 1)).ToString() + " " + (predchadzDatum + " < " + new DateTime(item.Date.Year, 1, 1)).ToString());
                //Console.WriteLine((rok > item.Date.Year).ToString() + "  " + (item.Date > new DateTime(item.Date.Year, 1, 1)).ToString() + " " + (predchadzDatum < new DateTime(item.Date.Year, 1, 1)).ToString());
                if (item.Date.Year != predchadzDatum.Year)
                {
                    LineItem line = new LineItem(String.Empty, new[] { x, x },    new[] { myPane.YAxis.Scale.Min, myPane.YAxis.Scale.Max },    Color.Black, SymbolType.None);
                    line.Line.Style = System.Drawing.Drawing2D.DashStyle.Dash;
                    line.Line.Width = 1f;
                    myPane.CurveList.Add(line);
                    Console.WriteLine("Datum  " + item.Date);
                }
                predchadzDatum = item.Date;
             }

            myPane.CurveList.Add(new LineItem("My Curve", list, Color.Blue, SymbolType.None));
            zg1.Refresh();
              //  LineItem myCurve = myPane.AddCurve("My Curve", list, Color.Blue, SymbolType.None);
            zg1.AxisChange();

            return zg1;
        }
开发者ID:Carpkiller,项目名称:SpreadCalculator,代码行数:43,代码来源:PracasGrafmi.cs

示例5: createGraph

        public void createGraph()
        {
            GraphPane myPane = zgc.GraphPane;

            // Set the titles and axis labels
            myPane.Title.Text = this.getMethod() + " results";
            myPane.XAxis.Title.Text = "template #";
            myPane.YAxis.Title.Text = "distance";

            myCurveG = myPane.AddCurve("Genuine", new PointPairList(), Color.Black, SymbolType.Diamond);
            myCurveG.Line.IsVisible = false;
            myCurveG.Symbol.Border.IsVisible = false;
            myCurveG.Symbol.Fill = new Fill(Color.Green);
            myCurveG.Symbol.Size = 6;

            myCurveI = myPane.AddCurve("Impostor", new PointPairList(), Color.Black, SymbolType.Diamond);
            myCurveI.Line.IsVisible = false;
            myCurveI.Symbol.Border.IsVisible = false;
            myCurveI.Symbol.Fill = new Fill(Color.Red);
            myCurveI.Symbol.Size = 5;

            this.updatePanes();

            threshPoints.Clear();
            threshPoints.Add(new PointPair(-1, this.getStatistics().Thresh));
            int max = 0;
            if (myCurveG.Points.Count > 0) {
                max = (int)myCurveG.Points[myCurveG.Points.Count - 1].X;
            }
            if (myCurveI.Points.Count > 0 && myCurveI.Points[myCurveI.Points.Count - 1].X > max) {
                max = (int)myCurveI.Points[myCurveI.Points.Count - 1].X;
            }
            threshPoints.Add(new PointPair(max + 1, this.getStatistics().Thresh));

            LineItem myCurveThresh = myPane.AddCurve("Thresh", threshPoints, Color.Black, SymbolType.None);
            myCurveThresh.Line.Style = System.Drawing.Drawing2D.DashStyle.Dot;

            // Calculate the Axis Scale Ranges
            zgc.AxisChange();
        }
开发者ID:harpener,项目名称:BIO,代码行数:40,代码来源:BiometricAlgorithmDetailResultGraph.cs

示例6: GcsMainPanel

        public GcsMainPanel()
        {
            InitializeComponent();
            _btn_ge_server.Enabled = false;
            _btn_goto_ge.Enabled = false;
            artificialHorizon.BackColor = toolStripContainer1.ContentPanel.BackColor;
            _heightLine = _zgc_height.GraphPane.AddCurve("Height", new PointPairList(), Color.Blue, SymbolType.None);
            _zgc_height.GraphPane.Title.IsVisible = false;
            _zgc_height.GraphPane.YAxis.MajorGrid.IsVisible = true;
            _zgc_height.GraphPane.XAxis.Title.IsVisible = false;
            _zgc_height.AxisChange();
            _zgc_height.GraphPane.Legend.IsVisible = false;
            _zgc_height.GraphPane.IsFontsScaled = false;
            _zgc_height.GraphPane.YAxis.Title.Text = "Height [m]";
            _zgc_height.GraphPane.XAxis.IsVisible = false;

            _speedLine = _zgc_speed.GraphPane.AddCurve("Speed", new PointPairList(), Color.Blue, SymbolType.None);
            _zgc_speed.GraphPane.Title.IsVisible = false;
            _zgc_speed.GraphPane.YAxis.MajorGrid.IsVisible = true;
            _zgc_speed.GraphPane.XAxis.Title.IsVisible = false;
            _zgc_speed.AxisChange();
            _zgc_speed.GraphPane.Legend.IsVisible = false;
            _zgc_speed.GraphPane.IsFontsScaled = false;
            _zgc_speed.GraphPane.YAxis.Title.Text = "Speed [km/h]";
            _zgc_speed.GraphPane.XAxis.IsVisible = false;

            _beginDateTime = DateTime.Now;
        }
开发者ID:TaehoJang,项目名称:gluonpilot,代码行数:28,代码来源:GcsMainPanel.cs

示例7: Form1

        public Form1()
        {
            InitializeComponent();
            myPane = myPlot.GraphPane;

            int status = myDevice.connect();
            if (status == 0)
            {
                MessageBox.Show("Device couldn't be found!");
                Environment.Exit(0);
            }

            myPane.XAxis.Scale.Min = 0;
            myPane.XAxis.Scale.Max = plotWidth;
            myPane.YAxis.Scale.Min = 0;
            myPane.YAxis.Scale.Max = 5;

            myDevice.pinMode(2, 1);

            myLine = myPane.AddCurve("Analog Voltage", myPoints, Color.Blue, SymbolType.None);
            myDevice.initPwm();

            myLine.Line.Width = 1;

            myPlot.Invalidate();
            myPlot.AxisChange();

            myTimer.Start();
        }
开发者ID:halitalptekin,项目名称:Little-Wire,代码行数:29,代码来源:Form1.cs

示例8: CreateGraph

        public void CreateGraph()
        {
            // get a reference to the GraphPane
            GraphPane myPane = this.zedGraphControlBode.GraphPane;
            a = this.myBodeFunction.bode(10, 20, 10, 10);

            zedGraphControlBode.Invalidate();
            zedGraphControlBode.AxisChange();

            // Generate a red curve with diamond
            // symbols, and "Porsche" in the legend

            // Generate a blue curve with circle
            // symbols, and "Piper" in the legend
             BodeCurve = myPane.AddCurve("Command", this.a, Color.Blue, SymbolType.None);
             this.BodeCurve.Line.Width = 3.0F;

            // Tell ZedGraph to refigure the`
            // axes since the data have changed
             myPane.XAxis.Type = AxisType.Linear;

            // myPane.XAxis.Scale.Format = "mm:ss"; // 24 hour clock for HH

             myPane.XAxis.MajorGrid.IsVisible = true;

            zedGraphControlBode.AxisChange();
        }
开发者ID:jnzim,项目名称:dev-repo,代码行数:27,代码来源:frmBodePlot.cs

示例9: GraphController

        public GraphController(Model model, ZedGraphControl graphControl)
        {
            this.model = model;
            this.graphControl = graphControl;
            this.graphPane = graphControl.GraphPane;

            // Initialize lines
            this.lineItemA = this.graphPane.AddCurve("Person A", new PointPairList(), Color.Red, SymbolType.Diamond);
            this.lineItemB = this.graphPane.AddCurve("Person B", new PointPairList(), Color.Blue, SymbolType.Circle);
            this.lineItemAgent = this.graphPane.AddCurve("Agent", new PointPairList(), Color.Green, SymbolType.Star);
            this.lineItemAgent.IsY2Axis = true;

            // Set the Titles
            this.graphPane.Title.Text = "Graph of persons' data and the agent's state";
            this.graphPane.XAxis.Title.Text = "Time";
            this.graphPane.XAxis.Type = AxisType.Date;
            this.graphPane.Y2Axis.Title.Text = "Agent's state";
            this.graphPane.YAxis.Scale.Min = -4;
            this.graphPane.YAxis.Scale.Max = 4;
            this.graphPane.Y2Axis.Scale.Min = -4;
            this.graphPane.Y2Axis.Scale.Max = 4;
            this.graphPane.Y2Axis.IsVisible = true;

            // Update threshold lines
            UpdateThresholdLines();
        }
开发者ID:navyon,项目名称:AffectiveAgent,代码行数:26,代码来源:GraphController.cs

示例10: AddCurve

        public void AddCurve(GraphPane pane, string name, string measure, Color color, SymbolType sType, int capacity)
        {
            _dataPointList = new RollingPointPairList(capacity);

            // Добавим кривую пока еще без каких-либо точек
            _myCurve = pane.AddCurve(string.Format("{0} ({1})",name,measure), _dataPointList, color, sType);
        }
开发者ID:Kelvin312,项目名称:KantVino,代码行数:7,代码来源:SingleGraph.cs

示例11: Form1_Load

        private void Form1_Load(object sender, EventArgs e)
        {
            // set your pane
            myPane = zedGraphControl1.GraphPane;

            // set a title
            myPane.Title.Text = "This is an example!";

            // set X and Y axis titles
            myPane.XAxis.Title.Text = "X Axis";
            myPane.YAxis.Title.Text = "Y Axis";

            // ---- CURVE ONE ----
            // draw a sin curve
            for (int i = 0; i < 100; i++)
            {
                listPointsOne.Add(i, Math.Sin(i));
            }

            // set lineitem to list of points
            myCurveOne = myPane.AddCurve(null, listPointsOne, Color.Black, SymbolType.Circle);
            // ---------------------

            // ---- CURVE TWO ----
            listPointsTwo.Add(10, 50);
            listPointsTwo.Add(50, 50);

            // set lineitem to list of points
            myCurveTwo = myPane.AddCurve(null, listPointsTwo, Color.Blue, SymbolType.None);
            myCurveTwo.Line.Width = 5;
            // ---------------------

            // delegate to draw
            zedGraphControl1.AxisChange();
        }
开发者ID:fpgentil,项目名称:ZedGraphApp,代码行数:35,代码来源:Form1.cs

示例12: IXAccelHome

        public IXAccelHome()
        {
            InitializeComponent();
            graphXIndex = 0;
            accelData = new List<Int16>();

            zedGraphDataList = new NoDupePointList();
            /*for (double i = 0; i < 36; i++)
            {
                double x = i * 10.0 + 50.0;
                double y = Math.Sin(i * Math.PI / 15.0) * 16.0;
                zedGraphDataList.Add(x, y);
            }*/

            zedGraphCurve = ZedGraphFrontPage.GraphPane.AddCurve("AccelData", zedGraphDataList, Color.Red);
            zedGraphCurve.Line.Width = 1.5F;
            zedGraphCurve.Symbol.Fill = new Fill(Color.White);
            zedGraphCurve.Symbol.Size = 5;
            zedGraphCurve.Label.IsVisible = false;
            
            ZedGraphFrontPage.GraphPane.YAxis.Scale.Min = -4096;
            ZedGraphFrontPage.GraphPane.YAxis.Scale.Max = 4096;
            ZedGraphFrontPage.GraphPane.XAxis.Scale.Min = 0;
            ZedGraphFrontPage.GraphPane.XAxis.Scale.Max = 500000;
            ZedGraphFrontPage.AxisChange();
            Refresh();
        }
开发者ID:Zordonia,项目名称:AdvisIXAccel,代码行数:27,代码来源:IXAccelHome.cs

示例13: CreateGraph

        private void CreateGraph()
        {
            GraphPane myPaneLeft = zedGraphControl1.GraphPane;
            GraphPane myPaneRight = zedGraphControl2.GraphPane;

            myPaneLeft.Title.Text = "Plot of Left Foot Motion.\n";
            myPaneLeft.XAxis.Title.Text = "Time (seconds)";
            myPaneLeft.YAxis.Title.Text ="Left foot motion (mm)";

            myPaneRight.Title.Text = "Plot of Right Foot Motion.\n";
            myPaneRight.XAxis.Title.Text = "Time (seconds)";
            myPaneRight.YAxis.Title.Text = "Right foot motion (mm)";

            //lists to save points as they come from the MCE
            xDataL = new PointPairList();
            yDataL = new PointPairList();
            zDataL = new PointPairList();
            xDataR = new PointPairList();
            yDataR = new PointPairList();
            zDataR = 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
            curveLeft = myPaneLeft.AddCurve("z-position", zDataL, Color.Blue, SymbolType.None);
            curveLeft = myPaneLeft.AddCurve("y-position", yDataL, Color.Red, SymbolType.None);
            curveLeft = myPaneLeft.AddCurve("x-position", xDataL, Color.Green, SymbolType.None);
            curveRight = myPaneRight.AddCurve("z-position", zDataR, Color.Blue, SymbolType.None);
            curveRight = myPaneRight.AddCurve("y-position", yDataR, Color.Red, SymbolType.None);
            curveRight = myPaneRight.AddCurve("x-position", xDataR, 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
            myPaneLeft.XAxis.Scale.Min = 0;
            myPaneLeft.XAxis.Scale.Max = 6.0;
            myPaneLeft.YAxis.Scale.Min = -800; //if needed, fix Y-axis to a max and min 
            myPaneLeft.YAxis.Scale.Max = 500;
            myPaneLeft.XAxis.Scale.MinorStep = 0.2;
            myPaneLeft.XAxis.Scale.MajorStep = 1.0;
            myPaneRight.XAxis.Scale.Min = 0;
            myPaneRight.XAxis.Scale.Max = 6.0;
            myPaneRight.YAxis.Scale.Min = -800; //if needed, fix Y-axis to a max and min 
            myPaneRight.YAxis.Scale.Max = 500;
            myPaneRight.XAxis.Scale.MinorStep = 0.2;
            myPaneRight.XAxis.Scale.MajorStep = 1.0;

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

示例14: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     met1.Clear();
     met1.Tag = "";
     var settings1 = GetSettings(new RuletteSelector(), new SelectionScreener());
     var calc1 = new SimpleCalculator(settings1);
     var d1 = DateTime.Now;
     var curve1V=calc1.Start();
     time1 = DateTime.Now.Subtract(d1);
     label12.Text = Math.Round(time1.TotalSeconds, 3).ToString(CultureInfo.InvariantCulture);
     met1 = zedGraphControl1.GraphPane.AddCurve("Метод1", new double[] { 0 }, new double[] { 0 }, Color.Red);
     foreach (var d in curve1V) { met1.AddPoint(d.Key, d.Value); }
     zedGraphControl1.AxisChange(); zedGraphControl1.RestoreScale(zedGraphControl1.GraphPane);
 }
开发者ID:kostua16,项目名称:GenMethods,代码行数:14,代码来源:Form1.cs

示例15: button2_Click

 private void button2_Click(object sender, EventArgs e)
 {
     met2.Clear();
     met2.Tag = "";
     var settings2 = GetSettings(new TurnirSelector(), new RandomScreeener());
     var calc2 = new SimpleCalculator(settings2);
     var d1 = DateTime.Now;
     var curve2V = calc2.Start();
     time2 = DateTime.Now.Subtract(d1);
     label13.Text = Math.Round(time2.TotalSeconds, 3).ToString(CultureInfo.InvariantCulture);
     met2 = zedGraphControl1.GraphPane.AddCurve("Метод2", new double[] { 0 }, new double[] { 0 }, Color.Blue);
     foreach (var d in curve2V) { met2.AddPoint(d.Key, d.Value); }
     zedGraphControl1.AxisChange(); zedGraphControl1.RestoreScale(zedGraphControl1.GraphPane);
 }
开发者ID:kostua16,项目名称:GenMethods,代码行数:14,代码来源:Form1.cs


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