Beispiel #1
0
        public void CreateChart(ZedGraphControl zgc)
        {
            EventHandler method = null;

            this._myMainPane.Title.Text                = this._reportTitle;
            this._myMainPane.XAxis.Title.Text          = "TOW";
            this._myMainPane.YAxis.Title.Text          = "Data";
            this._myMainPane.XAxis.IsVisible           = true;
            this._myMainPane.XAxis.Type                = AxisType.Linear;
            this._myMainPane.YAxis.MajorGrid.IsVisible = true;
            this._myMainPane.YAxis.MinorGrid.IsVisible = true;
            this._myMainPane.CurveList.Clear();
            this._myMainPane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45f);
            if ((this._myMainXaxisData != null) && (this._myMainXaxisData.Length > 0))
            {
                this._myMainPane.AddCurve(this._curveLabel, this._myMainXaxisData, this._myMainYaxisData, this._curveColor, SymbolType.Diamond);
                this._myMainPane.AxisChange();
                if (method == null)
                {
                    method = delegate {
                        zgc.Update();
                        zgc.Refresh();
                    };
                }
                base.Invoke(method);
            }
            zgc.Size = new Size(base.ClientRectangle.Width - 0x19, base.ClientRectangle.Height - 40);
        }
Beispiel #2
0
        public static void PlotReflection(Chromatogram topChroma, Chromatogram bottomChroma, ZedGraphControl control, bool isColor = true)
        {
            control.GraphPane.CurveList.Clear();
            var ptListTop    = new PointPairList();
            var ptListBottom = new PointPairList();

            foreach (var peak in topChroma)
            {
                ptListTop.Add(new PointPair(peak.Time, (peak.Intensity)));
            }
            foreach (var peak in bottomChroma)
            {
                ptListBottom.Add(new PointPair(peak.Time, -(peak.Intensity)));
            }
            var topLine    = new LineItem("", ptListTop, Color.DodgerBlue, SymbolType.None);
            var bottomLine = new LineItem("", ptListBottom, Color.Red, SymbolType.None);

            if (!isColor)
            {
                topLine.Line.Color    = Color.Gray;
                bottomLine.Line.Color = Color.Gray;
            }
            control.GraphPane.CurveList.Add(topLine);
            control.GraphPane.CurveList.Add(bottomLine);
            control.GraphPane.Title.Text       = "Analyte v. Background";
            control.GraphPane.XAxis.Title.Text = "Retention Time (Minutes)";
            control.GraphPane.YAxis.Title.Text = "Intensity";
            control.GraphPane.XAxis.Scale.Min  = topChroma.FirstTime;
            control.GraphPane.XAxis.Scale.Max  = topChroma.LastTime;
            control.AxisChange();
            control.Update();
            control.Refresh();
        }
Beispiel #3
0
        public void CreateChart(ZedGraphControl zgc)
        {
            EventHandler method = null;

            this._myMainPane.YAxis.MajorGrid.IsVisible = true;
            this._myMainPane.YAxis.MinorGrid.IsVisible = true;
            this._myMainPane.CurveList.Clear();
            this._myMainPane.Chart.Fill          = new Fill(Color.White, Color.LightGoldenrodYellow, 45f);
            this._myMainPane.Title.Text          = this._reportTitle;
            this._myMainPane.XAxis.Title.Text    = "Data";
            this._myMainPane.YAxis.Title.Text    = "Probability";
            this._myMainPane.YAxis.Scale.MaxAuto = false;
            this._myMainPane.YAxis.Scale.MinAuto = false;
            this._myMainPane.YAxis.Scale.Max     = 1.0;
            this._myMainPane.YAxis.Scale.Min     = 0.0;
            if ((this._myMainXaxisData != null) && (this._myMainXaxisData.Length > 0))
            {
                Stats    stats = new Stats();
                double[] y     = new double[this._myMainXaxisData.Length];
                for (int i = 0; i < this._myMainXaxisData.Length; i++)
                {
                    y[i] = (i + 1) * (1.0 / ((double)this._myMainXaxisData.Length));
                }
                stats.SortArray(this._myMainXaxisData.Length, this._myMainXaxisData);
                this._myMainPane.AddCurve(this._curveLabel, this._myMainXaxisData, y, this._curveColor, SymbolType.Diamond);
                this._myMainPane.AxisChange();
                if (method == null)
                {
                    method = delegate {
                        zgc.Update();
                        zgc.Refresh();
                    };
                }
                base.Invoke(method);
            }
            zgc.Size = new Size(base.ClientRectangle.Width - 0x19, base.ClientRectangle.Height - 0x2d);
        }
Beispiel #4
0
 public static void UpdateZedGraph(ZedGraphControl control)
 {
     control.AxisChange();
     control.Update();
     control.Refresh();
 }