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


C# PointPairList.Select方法代码示例

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


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

示例1: SaveListToFile

        // function to save a given arry's bytes to file
        public void SaveListToFile(string FileLocation, PointPairList list)
        {
            File.AppendAllText(FileLocation, Convert.ToString(DateTime.Now) + "\r\n");
            File.AppendAllText(FileLocation, this.filename.Text + "\r\n");
            File.AppendAllText(FileLocation, "Data from Graph" + "\r\n");

            double[] SaveArray = list.Select(P => P.Y).ToArray();
            Console.WriteLine("Size of SvarArray {0}", SaveArray.Length);

            //  Stop = true;
            for (int j = 0; j < SaveArray.Length; j++)
            {
                string Reading = SaveArray[j].ToString() + "\r\n";
                File.AppendAllText(FileLocation, Reading);
            }

            SumProcessedBytes1 = 0;
            SumProcessedBytes2 = 0;
            PreviousScreenRemainder1 = 0;
            PreviousScreenRemainder2 = 0;
            AverageIndex1 = 1;
            AverageIndex2 = 1;
            list1.Clear();
            list2.Clear();
            Array.Clear(ScreenBuffer, 0, ScreenBuffer.Length);
            COPY_POS = 0;
            CreateGraph(zgc);
        }
开发者ID:seth-obi-msci,项目名称:CSharp,代码行数:29,代码来源:Form1.cs

示例2: UpdateGraph

        public void UpdateGraph()
        {
            zedGraphControl.GraphPane.CurveList.Clear();
            zedGraphControl.GraphPane.GraphObjList.Clear();
            if (!(bindingSource.Current is DataRow))
            {
                return;
            }
            var currentRow = (DataRow) bindingSource.Current;
            var alignedFile = currentRow.AlignedRetentionTimes;
            if (alignedFile == null)
            {
                zedGraphControl.GraphPane.Title.Text = Resources.AlignmentForm_UpdateGraph_Waiting_for_retention_time_alignment;
                return;
            }
            var points = new PointPairList();
            var outliers = new PointPairList();
            var peptideTimes = alignedFile.Regression.PeptideTimes;
            for (int i = 0; i < peptideTimes.Count; i++)
            {
                var peptideTime = peptideTimes[i];
                var point = new PointPair(alignedFile.OriginalTimes[peptideTime.PeptideSequence],
                                            peptideTime.RetentionTime,
                                            peptideTime.PeptideSequence);
                if (alignedFile.OutlierIndexes.Contains(i))
                {
                    outliers.Add(point);
                }
                else
                {
                    points.Add(point);
                }
            }

            var goodPointsLineItem = new LineItem("Peptides", points, Color.Black, SymbolType.Diamond) // Not L10N?
                {
                    Symbol = {Size = 8f},
                    Line = {IsVisible = false}
                };
            goodPointsLineItem.Symbol.Border.IsVisible = false;
            goodPointsLineItem.Symbol.Fill = new Fill(RTLinearRegressionGraphPane.COLOR_REFINED);

            if (outliers.Count > 0)
            {
                var outlierLineItem = zedGraphControl.GraphPane.AddCurve(Resources.AlignmentForm_UpdateGraph_Outliers, outliers, Color.Black,
                                                                        SymbolType.Diamond);
                outlierLineItem.Symbol.Size = 8f;
                outlierLineItem.Line.IsVisible = false;
                outlierLineItem.Symbol.Border.IsVisible = false;
                outlierLineItem.Symbol.Fill = new Fill(RTLinearRegressionGraphPane.COLOR_OUTLIERS);
                goodPointsLineItem.Label.Text = Resources.AlignmentForm_UpdateGraph_Peptides_Refined;
            }
            zedGraphControl.GraphPane.CurveList.Add(goodPointsLineItem);
            if (points.Count > 0)
            {
                double xMin = points.Select(p => p.X).Min();
                double xMax = points.Select(p => p.X).Max();
                var regression = alignedFile.RegressionRefined ?? alignedFile.Regression;
                var regressionLine = zedGraphControl.GraphPane
                        .AddCurve(Resources.AlignmentForm_UpdateGraph_Regression_line, new[] { xMin, xMax },
                        new[] { regression.Conversion.GetY(xMin), regression.Conversion.GetY(xMax) },
                        Color.Black);
                regressionLine.Symbol.IsVisible = false;
            }
                zedGraphControl.GraphPane.Title.Text = string.Format(Resources.AlignmentForm_UpdateGraph_Alignment_of__0__to__1_,
                currentRow.DataFile,
                currentRow.Target.Name);
                zedGraphControl.GraphPane.XAxis.Title.Text = string.Format(Resources.AlignmentForm_UpdateGraph_Time_from__0__,
                    currentRow.DataFile);
                zedGraphControl.GraphPane.YAxis.Title.Text = Resources.AlignmentForm_UpdateGraph_Aligned_time;
            zedGraphControl.GraphPane.AxisChange();
            zedGraphControl.Invalidate();
        }
开发者ID:lgatto,项目名称:proteowizard,代码行数:73,代码来源:AlignmentForm.cs

示例3: SaveListToFile

        // function to save a given arry's bytes to file
        public void SaveListToFile(string FileLocation, PointPairList list)
        {
            MetaData(1)[4] = this.filename.Text;

            File.AppendAllText(FileLocation, "Data from LHS Graph" + "\r\n");
            File.AppendAllText(FileLocation, MetaData(1)[0] + "\r\n");
            File.AppendAllText(FileLocation, MetaData(1)[1] + "\r\n");
            File.AppendAllText(FileLocation, MetaData(1)[2] + "\r\n");
            File.AppendAllText(FileLocation, MetaData(1)[3] + "\r\n");
            File.AppendAllText(FileLocation, MetaData(1)[4] + "\r\n");

            double[] SaveArray = list.Select(P => P.Y).ToArray();
            Console.WriteLine("Size of SvarArray {0}", SaveArray.Length);

            //  Stop = true;
            for (int j = 0; j < SaveArray.Length; j++)
            {
                string Reading = SaveArray[j].ToString() + "\r\n";
                File.AppendAllText(FileLocation, Reading);
            }
        }
开发者ID:seth-obi-msci,项目名称:CSharp,代码行数:22,代码来源:Form1.cs

示例4: SaveListToFile

        // function to save a given list's values to file
        public void SaveListToFile(string FileLocation, PointPairList list, int Pane)
        {
            MetaData(1)[4] = this.filedescription.Text;

            //Add some MetaData at beginning of file
            File.AppendAllText(FileLocation, MetaData(Pane)[0] + "\r\n");
            File.AppendAllText(FileLocation, MetaData(Pane)[1] + "\r\n");
            File.AppendAllText(FileLocation, MetaData(Pane)[2] + "\r\n");
            File.AppendAllText(FileLocation, MetaData(Pane)[3] + "\r\n");
            File.AppendAllText(FileLocation, MetaData(Pane)[4] + "\r\n");

            //List converted to array for saving
            double[][] SaveArray = new double[Convert.ToInt32(list.LongCount())][];
            SaveArray[0] = list.Select(P => P.X).ToArray();
            SaveArray[1] = list.Select(P => P.Y).ToArray();

            for (int j = 0; j < SaveArray.Length; j++)
            {
                string Reading = SaveArray[0][j].ToString() + "\t" + SaveArray[1][j] + "\r\n";
                File.AppendAllText(FileLocation, Reading);
            }
        }
开发者ID:seth-obi-msci,项目名称:CSharp,代码行数:23,代码来源:Form1.cs

示例5: SaveBothListsToFile

        // function to save both graphs' data
        public void SaveBothListsToFile(string FileLocation, PointPairList listA, PointPairList listB)
        {
            MetaData(1)[4] = this.filedescription.Text;
            string LHSfile = FileLocation + "Pane1.txt";
            string RHSfile = FileLocation + "Pane2.txt";

            File.AppendAllText(LHSfile, "Data from Pane1 Graph" + "\r\n");
            File.AppendAllText(LHSfile, MetaData(1)[0] + "\r\n");
            File.AppendAllText(LHSfile, MetaData(1)[1] + "\r\n");
            File.AppendAllText(LHSfile, MetaData(1)[2] + "\r\n");
            File.AppendAllText(LHSfile, MetaData(1)[3] + "\r\n");
            File.AppendAllText(LHSfile, MetaData(1)[4] + "\r\n");

            // Array of values to be saved (LHS Graph)
            double[][] SaveArray1 = new double[Convert.ToInt32(listA.LongCount())][];
            SaveArray1[0] = listA.Select(P => P.X).ToArray();
            SaveArray1[1] = listA.Select(P => P.Y).ToArray();
            for (int j = 0; j < SaveArray1.Length; j++)
            {
                string Reading = SaveArray1[0][j].ToString() + "\t" + SaveArray1[1][j] + "\r\n";
                File.AppendAllText(LHSfile, Reading);
            }

            File.AppendAllText(RHSfile, "Data from Pane2 Graph" + "\r\n");
            File.AppendAllText(RHSfile, MetaData(2)[0] + "\r\n");
            File.AppendAllText(RHSfile, MetaData(2)[1] + "\r\n");
            File.AppendAllText(RHSfile, MetaData(2)[2] + "\r\n");
            File.AppendAllText(RHSfile, MetaData(2)[3] + "Environment time = " + Convert.ToString(Environment.TickCount - tickStart) + "\r\n");
            File.AppendAllText(RHSfile, MetaData(2)[4] + "\r\n");

            double[][] SaveArray2 = new double[Convert.ToInt32(listB.LongCount())][];
            SaveArray2[0] = listB.Select(P => P.X).ToArray();
            SaveArray2[1] = listB.Select(P => P.Y).ToArray();
            for (int j = 0; j < SaveArray2.Length; j++)
            {
                string Reading = SaveArray2[0][j].ToString() + "\t" + SaveArray2[1][j].ToString() + "\r\n";
                File.AppendAllText(RHSfile, Reading);
            }

            Reset(zgc);
            Reset(Window2.zgc2);
        }
开发者ID:seth-obi-msci,项目名称:CSharp,代码行数:43,代码来源:Form1.cs


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