Example 130: Scientific Graph showing extra x axes

PesgoScientific Graph Objectintermediate

Extra x axes

Preview

ProEssentials Pesgo Scientific Graph Object - Scientific Graph showing extra x axes
Click to enlarge

Source Code

Form3.cs
1//! Extra top and bottom x axes //
2//! Try Zooming and Scrolling. //
3
4// This example builds upon the basic CreateSimpleSGraph '100' example chart //
5CreateSimpleSGraph(Pesgo1);
6
7Pesgo1.PeGrid.MultiAxesSubsets[0] = 2;
8Pesgo1.PeGrid.MultiAxesSubsets[1] = 2;
9Pesgo1.PeGrid.OverlapMultiAxes[0] = 2;
10
11// Last subset, first axes on right //
12Pesgo1.PePlot.TXAxisComparisonSubsets = 1;
13
14Pesgo1.PeGrid.WorkingAxis = 0;
15Pesgo1.PePlot.RYAxisComparisonSubsets = 1;
16Pesgo1.PeColor.YAxis = Color.FromArgb(255, 198, 0, 0);
17Pesgo1.PeColor.XAxis = Color.FromArgb(255, 198, 0, 0);
18Pesgo1.PeColor.RYAxis = Color.FromArgb(255, 0, 198, 198);
19Pesgo1.PeColor.TXAxis = Color.FromArgb(255, 0, 198, 198);
20Pesgo1.PePlot.Method = SGraphPlottingMethod.Area;
21Pesgo1.PePlot.MethodII = SGraphPlottingMethodII.PointsPlueBestFitCurve;
22
23Pesgo1.PeGrid.WorkingAxis = 1;
24Pesgo1.PePlot.RYAxisComparisonSubsets = 1;
25Pesgo1.PeColor.YAxis = Color.FromArgb(255, 198, 198, 0);
26Pesgo1.PeColor.RYAxis = Color.FromArgb(255, 0, 198, 0);
27Pesgo1.PePlot.Method = SGraphPlottingMethod.Area;
28Pesgo1.PePlot.MethodII = SGraphPlottingMethodII.PointsPlueBestFitCurve;
29
30Pesgo1.PeGrid.WorkingAxis = 0;
31Pesgo1.PeFunction.SetExtraAxisX(10.0F, 310.0F, "Extra Axis 1", 0.0F, 0.0F, "", ShowAxis.All, ShowTickMarks.TicksInside, false, false, Color.FromArgb(255, 198, 198, 0));
32
33// Create extra top axis //
34Pesgo1.PeFunction.SetExtraAxisTX(-100.0F, 100.0F, "Top Extra Axis 1", 0.0F, 0.0F, "", ShowAxis.All, ShowTickMarks.TicksInside, false, false, Color.FromArgb(255, 0, 198, 0));
35
36// Set Various Other Properties //
37Pesgo1.PeColor.BitmapGradientMode = true;
38Pesgo1.PeColor.QuickStyle = QuickStyle.DarkInset;
39Pesgo1.PePlot.Option.BestFitDegree = BestFitDegree.Fourth;
40
41Pesgo1.PeLegend.SubsetLineTypes[0] = LineType.MediumSolid;
42Pesgo1.PeLegend.SubsetLineTypes[1] = LineType.MediumSolid;
43Pesgo1.PeLegend.SubsetLineTypes[2] = LineType.MediumSolid;
44Pesgo1.PeLegend.SubsetLineTypes[3] = LineType.MediumSolid;
45
46Pesgo1.PeUserInterface.Scrollbar.ScrollingVertZoom = true;
47Pesgo1.PeUserInterface.Scrollbar.ScrollingHorzZoom = true;
48Pesgo1.PeColor.TickColor = Color.FromArgb(0, 1, 0, 0); // Empty equiv Color.Empty;
49Pesgo1.PeString.MainTitle = "Zoom and Scroll the chart!";
50
51Pesgo1.PeUserInterface.Dialog.Subsets = false;
52
53// Generally call ReinitializeResetImage at end **'
54Pesgo1.PeFunction.ReinitializeResetImage();
55Pesgo1.Invalidate();
56// Optionally call Pesgo1.Refresh() if you are not seeing changes immediately
Tip: Uses property syntax like Pego1.PeData.Y[s, p]Click underlined properties to view documentation