/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.Plot = new OxyPlot.WindowsForms.PlotView(); this.SuspendLayout(); // // Plot // this.Plot.Dock = System.Windows.Forms.DockStyle.Fill; this.Plot.Location = new System.Drawing.Point(0, 0); this.Plot.Name = "Plot"; this.Plot.PanCursor = System.Windows.Forms.Cursors.Hand; this.Plot.Size = new System.Drawing.Size(546, 405); this.Plot.TabIndex = 0; this.Plot.Text = "plot1"; this.Plot.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; this.Plot.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; this.Plot.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; // // ProcessForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(546, 405); this.Controls.Add(this.Plot); this.Name = "ProcessForm"; this.Text = "ProcessForm"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ProcessForm_FormClosed); this.ResumeLayout(false); }
public Form1() { InitializeComponent(); b = new BigFunction(); pv1 = new PlotView(); pv1.Location = new Point(100, 50); pv1.Size = new Size(200, 200); this.Controls.Add(pv1); pv1.Model = new PlotModel { Title = "Calculus" }; //s1 = new FunctionSeries(); //s1.MouseDown += (S, e) => //{ // if (!bounderChecked) // { // lowerbound = s1.InverseTransform(e.Position).X; // bounderChecked = true; // } // else // { // upperbound = s1.InverseTransform(e.Position).X; // bounderChecked = false; // } //}; }
public CStepRespPlot(PlotView _plotBodeMag) { m_plotBodeMag = _plotBodeMag; // Mag m_plotBodeMag.Dock = System.Windows.Forms.DockStyle.Bottom; m_plotBodeMag.Location = new System.Drawing.Point(0, 0); m_plotBodeMag.Name = "StepRespPlot"; m_plotBodeMag.PanCursor = System.Windows.Forms.Cursors.Hand; m_plotBodeMag.Size = new System.Drawing.Size(200, 120); m_plotBodeMag.TabIndex = 0; m_plotBodeMag.Text = "StepRespPlot"; m_plotBodeMag.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; m_plotBodeMag.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; m_plotBodeMag.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; m_PlotModelBodeMag = new OxyPlot.PlotModel(); m_PlotModelBodeMag.Title = "Step Response"; m_PlotModelBodeMag.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Maximum = 0, Minimum = 1e-3 }); //X m_PlotModelBodeMag.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Maximum = 5, Minimum = -5 }); //Y seriesBodeMag = new LineSeries(); seriesBodeMag.Title = "(output)";// legend seriesBodeMag.MarkerType = MarkerType.None; seriesBodeMag.Points.Add(new DataPoint(0, 0)); seriesBodeMag.Points.Add(new DataPoint(1, 10)); seriesBodeMag.Background = OxyColors.White; m_PlotModelBodeMag.Series.Add(seriesBodeMag); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent(List <double[]> paths) { this.components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Text = "SimulationGraphics"; this.Plot = Graph(paths); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent(List<double[]> paths) { this.components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Text = "SimulationGraphics"; this.Plot = Graph(paths); }
private PlotView CreateDefaultPlotView() { var plot = new PlotView(); plot.Dock = DockStyle.Fill; plot.Name = "plot"; plot.TabIndex = 0; plot.ZoomHorizontalCursor = Cursors.SizeWE; plot.ZoomRectangleCursor = Cursors.SizeNWSE; plot.ZoomVerticalCursor = Cursors.SizeNS; return plot; }
public PlotView createPlot() { PlotView plot; plot = new OxyPlot.WindowsForms.PlotView(); plot.Dock = System.Windows.Forms.DockStyle.Fill; plot.Location = new System.Drawing.Point(0, 0); plot.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; plot.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; plot.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; return(plot); }
public btnAddPoint() { InitializeComponent(); b = new BigFunction(); m = new Matrix(); pv1 = new PlotView(); DrawGraph(); for (int i = 1; i <= 8; i++) { cbNrOfTerms.Items.Add(i); } }
public OxyPlot.WindowsForms.PlotView Graph(List<double[]> paths) { OxyPlot.WindowsForms.PlotView myPlot = new OxyPlot.WindowsForms.PlotView(); myPlot.Model = new PlotModel(); myPlot.Dock = DockStyle.Fill; this.Controls.Add(myPlot); myPlot.Model.PlotType = PlotType.XY; myPlot.Model.Background = OxyColor.FromRgb(255, 255, 255); myPlot.Model.TextColor = OxyColor.FromRgb(0, 0, 0); List<LineSeries> lsList = new List<LineSeries>(); for (int i = 0; i < paths.Count; i++) lsList.Add(CreateLineSeries(paths[i], "LS" + i)); foreach (LineSeries ls in lsList) myPlot.Model.Series.Add(ls); return myPlot; }
public Form1(PlotModel myModel) { //this.InitializeComponent(); this.plot1 = new OxyPlot.WindowsForms.PlotView(); this.SuspendLayout(); this.plot1.Model = myModel; this.plot1.Dock = System.Windows.Forms.DockStyle.Fill; this.plot1.Location = new System.Drawing.Point(0, 0); this.plot1.Margin = new System.Windows.Forms.Padding(0); this.plot1.Name = "Plot"; this.plot1.Size = new System.Drawing.Size(632, 446); this.plot1.TabIndex = 0; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(632, 446); this.Controls.Add(this.plot1); this.Name = "Form"; this.Text = "OxyPlot in Windows Forms"; this.ResumeLayout(false); }
public OxyPlot.WindowsForms.PlotView Graph(List <double[]> paths) { OxyPlot.WindowsForms.PlotView myPlot = new OxyPlot.WindowsForms.PlotView(); myPlot.Model = new PlotModel(); myPlot.Dock = DockStyle.Fill; this.Controls.Add(myPlot); myPlot.Model.PlotType = PlotType.XY; myPlot.Model.Background = OxyColor.FromRgb(255, 255, 255); myPlot.Model.TextColor = OxyColor.FromRgb(0, 0, 0); List <LineSeries> lsList = new List <LineSeries>(); for (int i = 0; i < paths.Count; i++) { lsList.Add(CreateLineSeries(paths[i], "LS" + i)); } foreach (LineSeries ls in lsList) { myPlot.Model.Series.Add(ls); } return(myPlot); }
public void ChartInit() { MyPlot_ch1 = new OxyPlot.WindowsForms.PlotView(); MyPlot_ch1.Model = CustomPlotModel_ch1(); MyPlot_ch1.Dock = DockStyle.Fill; this.chartPanel1.Controls.Add(MyPlot_ch1); MyPlot_ch2 = new OxyPlot.WindowsForms.PlotView(); MyPlot_ch2.Model = CustomPlotModel_ch2(); MyPlot_ch2.Dock = DockStyle.Fill; this.chartPanel2.Controls.Add(MyPlot_ch2); }
public CbodePlot(PlotView _plotBodeMag, PlotView _plotBodePh) { m_plotBodeMag = _plotBodeMag; m_plotBodePh = _plotBodePh; // Mag m_plotBodeMag.Dock = System.Windows.Forms.DockStyle.Bottom; m_plotBodeMag.Location = new System.Drawing.Point(0, 0); m_plotBodeMag.Name = "BodeMag"; m_plotBodeMag.PanCursor = System.Windows.Forms.Cursors.Hand; m_plotBodeMag.Size = new System.Drawing.Size(100, 120); m_plotBodeMag.TabIndex = 0; m_plotBodeMag.Text = "BodeMag"; m_plotBodeMag.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; m_plotBodeMag.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; m_plotBodeMag.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; m_PlotModelBodeMag = new OxyPlot.PlotModel(); //m_PlotModelBodeMag.Title = "Magnitude"; m_PlotModelBodeMag.Axes.Add(new OxyPlot.Axes.LogarithmicAxis { Position = AxisPosition.Bottom, Maximum = 100, Minimum = 0 }); //X m_PlotModelBodeMag.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Maximum = 40, Minimum = 0 }); //Y seriesBodeMag = new LineSeries(); seriesBodeMag.Title = "dB";// legend seriesBodeMag.MarkerType = MarkerType.None; seriesBodeMag.Points.Add(new DataPoint(0, 0)); seriesBodeMag.Points.Add(new DataPoint(1, 10)); seriesBodeMag.Background = OxyColors.White; m_PlotModelBodeMag.Series.Add(seriesBodeMag); // Phase m_plotBodePh.Dock = System.Windows.Forms.DockStyle.Bottom; m_plotBodePh.Location = new System.Drawing.Point(0, 0); m_plotBodePh.Name = "BodePh"; m_plotBodePh.PanCursor = System.Windows.Forms.Cursors.Hand; m_plotBodePh.Size = new System.Drawing.Size(100, 120); m_plotBodePh.TabIndex = 0; m_plotBodePh.Text = "BodePh"; m_plotBodePh.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; m_plotBodePh.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; m_plotBodePh.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; m_PlotModelBodePh = new OxyPlot.PlotModel(); //m_PlotModelBodePh.Title = "Phase"; m_PlotModelBodePh.Axes.Add(new OxyPlot.Axes.LogarithmicAxis { Position = AxisPosition.Bottom, Maximum = 100, Minimum = 0 }); //X m_PlotModelBodePh.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Maximum = 40, Minimum = 0 }); //Y seriesBodePh = new LineSeries(); seriesBodePh.Title = "Deg";// legend seriesBodePh.MarkerType = MarkerType.None; //seriesBodePh.Points.Add(new DataPoint(0, -0.5)); //seriesBodePh.Points.Add(new DataPoint(1, -10)); seriesBodePh.Background = OxyColors.White; m_PlotModelBodePh.Series.Add(seriesBodePh); }
private void DisplayComparisonPlot(MSSpectra spectrumX, MSSpectra spectrumY, double mzTolerance, string path = "comparison.png", string newTitle = "MS/MS Spectra") { var model = CreatePlot(spectrumX.Peaks, spectrumY.Peaks, mzTolerance); model.Title = newTitle; var plot = new PlotView(); plot.Model = model; var form = new Form(); form.Size = Screen.PrimaryScreen.WorkingArea.Size; plot.Dock = DockStyle.Fill; form.Controls.Add(plot); form.Show(); IO.Utilities.SleepNow(3); using (var bitmap = new Bitmap(form.Width, form.Height)) { form.DrawToBitmap(bitmap, form.DisplayRectangle); bitmap.Save(path); } }
private void InitializeTrajectoryPlot() { this.trajectoryPlot = new OxyPlot.WindowsForms.PlotView(); this.SuspendLayout(); this.trajectoryPlot.Dock = System.Windows.Forms.DockStyle.Fill; this.trajectoryPlot.Location = new System.Drawing.Point(0, 0); this.trajectoryPlot.Name = "trajectoryPlot"; this.trajectoryPlot.PanCursor = System.Windows.Forms.Cursors.Hand; this.trajectoryPlot.Size = new System.Drawing.Size(200, 200); this.trajectoryPlot.TabIndex = 0; this.trajectoryPlot.Text = "trajectory"; this.trajectoryPlot.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; this.trajectoryPlot.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; this.trajectoryPlot.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; TrajectoryPlotPanel.Controls.Add(this.trajectoryPlot); this.ResumeLayout(false); trajectorySeries = new OxyPlot.Series.LineSeries(); var myModel = new PlotModel { Title = "Trajectory" }; myModel.Series.Add(trajectorySeries); this.trajectoryPlot.Model = myModel; using (StreamWriter outputFile = new StreamWriter("Pages.txt")) { int start = 21; var line = ""; while (start <= 120) { line = line + start + ","; start++; line = line + start + ","; start+=3; } line.Remove(line.Length - 1); outputFile.WriteLine(line); start = 23; line = ""; while (start <= 120) { line = line + start + ","; start++; line = line + start + ","; start+=3; } line.Remove(line.Length - 1); outputFile.WriteLine(line); } }
private void InitializeKinematicsPlot() { this.kinematicsPlot = new OxyPlot.WindowsForms.PlotView(); this.SuspendLayout(); this.kinematicsPlot.Dock = System.Windows.Forms.DockStyle.Fill; this.kinematicsPlot.Location = new System.Drawing.Point(0, 0); this.kinematicsPlot.Name = "KinematicsPlot"; this.kinematicsPlot.PanCursor = System.Windows.Forms.Cursors.Hand; this.kinematicsPlot.Size = new System.Drawing.Size(200, 200); this.kinematicsPlot.TabIndex = 0; this.kinematicsPlot.Text = "Kinematics"; this.kinematicsPlot.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; this.kinematicsPlot.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; this.kinematicsPlot.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; KinematicsPlotPanel.Controls.Add(this.kinematicsPlot); this.ResumeLayout(false); positionSeries = new OxyPlot.Series.LineSeries(); positionSeries.Title = "x(t)"; velocitySeries = new OxyPlot.Series.LineSeries(); velocitySeries.Title = "v(t)"; accelerationSeries = new OxyPlot.Series.LineSeries(); accelerationSeries.Title = "a(t)"; errorSeries = new OxyPlot.Series.LineSeries(); errorSeries.Title = "err(t)"; var myModel = new PlotModel { Title = "Kinematics" }; myModel.Series.Add(positionSeries); myModel.Series.Add(velocitySeries); myModel.Series.Add(accelerationSeries); myModel.Series.Add(errorSeries); this.kinematicsPlot.Model = myModel; }
private void InitializeForcesPlot() { this.forcesPlot = new OxyPlot.WindowsForms.PlotView(); this.SuspendLayout(); this.forcesPlot.Dock = System.Windows.Forms.DockStyle.Fill; this.forcesPlot.Location = new System.Drawing.Point(0, 0); this.forcesPlot.Name = "ForcesPlot"; this.forcesPlot.PanCursor = System.Windows.Forms.Cursors.Hand; this.forcesPlot.Size = new System.Drawing.Size(200, 200); this.forcesPlot.TabIndex = 0; this.forcesPlot.Text = "Forces"; this.forcesPlot.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; this.forcesPlot.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; this.forcesPlot.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; ForcesPlotPanel.Controls.Add(this.forcesPlot); this.ResumeLayout(false); fSeries = new OxyPlot.Series.LineSeries(); fSeries.Title = "f(t)"; gSeries = new OxyPlot.Series.LineSeries(); gSeries.Title = "g(t)"; hSeries = new OxyPlot.Series.LineSeries(); hSeries.Title = "h(t)"; var myModel = new PlotModel { Title = "Forces" }; myModel.Series.Add(fSeries); myModel.Series.Add(gSeries); myModel.Series.Add(hSeries); this.forcesPlot.Model = myModel; }
private void InitializeDisplacementPlot() { this.displacementPlot = new OxyPlot.WindowsForms.PlotView(); this.SuspendLayout(); this.displacementPlot.Dock = System.Windows.Forms.DockStyle.Fill; this.displacementPlot.Location = new System.Drawing.Point(0, 0); this.displacementPlot.Name = "displacementPlot"; this.displacementPlot.PanCursor = System.Windows.Forms.Cursors.Hand; this.displacementPlot.Size = new System.Drawing.Size(200, 200); this.displacementPlot.TabIndex = 0; this.displacementPlot.Text = "displacement"; this.displacementPlot.ZoomHorizontalCursor = System.Windows.Forms.Cursors.SizeWE; this.displacementPlot.ZoomRectangleCursor = System.Windows.Forms.Cursors.SizeNWSE; this.displacementPlot.ZoomVerticalCursor = System.Windows.Forms.Cursors.SizeNS; DisplacementPlotPanel.Controls.Add(this.displacementPlot); this.ResumeLayout(false); wSeries = new OxyPlot.Series.LineSeries(); wSeries.Title = "w(t)"; xSeries = new OxyPlot.Series.LineSeries(); xSeries.Title = "x(t)"; wxSeries = new OxyPlot.Series.LineSeries(); wxSeries.Title = "w(t) - x(t)"; var myModel = new PlotModel(); myModel.Series.Add(wSeries); myModel.Series.Add(xSeries); myModel.Series.Add(wxSeries); this.displacementPlot.Model = myModel; }
private void DisplayComparisonPlot(MSSpectra spectrumX, MSSpectra spectrumY, double mzTolerance, string newTitle = "MS/MS Spectra") { var model = CreatePlot(spectrumX.Peaks, spectrumY.Peaks, mzTolerance); model.Title = newTitle; var plot = new PlotView {Model = model, Dock = DockStyle.Fill}; var form = new Form {Size = Screen.PrimaryScreen.WorkingArea.Size}; form.Controls.Add(plot); form.Show(); MultiAlignTestSuite.IO.Utilities.SleepNow(3); }
private void SetupCombWave() { this.plotCombWave = new PlotView(); this.plotCombWave.Dock = DockStyle.Fill; this.plotCombWave.Name = "plot"; this.plotCombWave.TabIndex = 0; this.plotCombWave.ZoomHorizontalCursor = Cursors.SizeWE; this.plotCombWave.ZoomRectangleCursor = Cursors.SizeNWSE; this.plotCombWave.ZoomVerticalCursor = Cursors.SizeNS; this.tabCombWave.Controls.Add(plotCombWave); var myModel = new PlotModel { Title = "Comb Wave Decomposition" }; mCombWaveDecomposer = new CombWave(); mCombWaveDecomposer.Begin = (int)numS.Value; mCombWaveDecomposer.End = (int)numR.Value; myModel.Axes.Add(new LinearAxis { Title = "Y", Position = AxisPosition.Left, ExtraGridlines = new[] { 0.0d } }); mCombOriginal = new LineSeries(); mCombOriginal.Title = "Original"; mCombCompressed = new LineSeries(); mCombCompressed.Title = "Compressed"; mCombWave = new LineSeries(); mCombWave.Title = "Wave"; myModel.Series.Add(mCombOriginal); myModel.Series.Add(mCombCompressed); myModel.Series.Add(mCombWave); this.plotCombWave.Model = myModel; }