Overlapped multi axes 2
1//! Right button click to show popup menu. //2//! Double Click to show customization dialog. //3//! Left-Click and drag to draw zoom box. Use popup memu or 'z' to undo zoom. //4 5// This example builds upon the basic CreateSimpleSGraph '100' example chart //6CreateSimpleSGraph(Pesgo1);7 8// Create 4 separate axes and then overlap in two groups //9Pesgo1.PeGrid.MultiAxesSubsets[0] = 1; // 1 subset on first axis10Pesgo1.PeGrid.MultiAxesSubsets[1] = 1; // 1 subset on second axis11Pesgo1.PeGrid.MultiAxesSubsets[2] = 1; // 1 subset on third axis12Pesgo1.PeGrid.MultiAxesSubsets[3] = 1; // 1 subset on fourth axis13Pesgo1.PeGrid.OverlapMultiAxes[0] = 2; // overlap first two axes in one group14Pesgo1.PeGrid.OverlapMultiAxes[1] = 2; // overlap second two axes in one group15Pesgo1.PeUserInterface.Allow.MultiAxesSizing = true;16 17Pesgo1.PeString.MainTitle = "With Multi-Axes-Sizing and Zoom-Limit-Axis features";18Pesgo1.PeUserInterface.Allow.ZoomLimits = ZoomLimits.AxisHorizontal;19 20// Match axis color and label to subset label //21Pesgo1.PeGrid.WorkingAxis = 0;22Pesgo1.PeColor.YAxis = Pesgo1.PeColor.SubsetColors[0];23Pesgo1.PeString.YAxisLabel = "Horsepower";24Pesgo1.PePlot.Method = SGraphPlottingMethod.Bar;25Pesgo1.PeGrid.WorkingAxis = 1;26Pesgo1.PeColor.YAxis = Pesgo1.PeColor.SubsetColors[1];27Pesgo1.PeString.YAxisLabel = "Torque";28Pesgo1.PePlot.Method = SGraphPlottingMethod.SplineArea;29Pesgo1.PeGrid.WorkingAxis = 2;30Pesgo1.PeColor.YAxis = Pesgo1.PeColor.SubsetColors[2];31Pesgo1.PeString.YAxisLabel = "Temperature";32Pesgo1.PePlot.Method = SGraphPlottingMethod.Bar;33Pesgo1.PeGrid.WorkingAxis = 3;34Pesgo1.PeColor.YAxis = Pesgo1.PeColor.SubsetColors[3];35Pesgo1.PeString.YAxisLabel = "Pressure";36Pesgo1.PePlot.Method = SGraphPlottingMethod.SplineArea;37Pesgo1.PeGrid.WorkingAxis = 0;38Pesgo1.PeString.TextShadows = TextShadows.NoShadows;39 40// Set Various Other Properties ///42Pesgo1.PeLegend.SubsetLineTypes[0] = LineType.MediumSolid;43Pesgo1.PeLegend.SubsetLineTypes[1] = LineType.MediumSolid;44Pesgo1.PeLegend.SubsetLineTypes[2] = LineType.MediumSolid;45Pesgo1.PeLegend.SubsetLineTypes[3] = LineType.MediumSolid;46Pesgo1.PePlot.MarkDataPoints = true;47 48Pesgo1.PeColor.BitmapGradientMode = true;49Pesgo1.PeColor.QuickStyle = QuickStyle.LightLine;50Pesgo1.PePlot.MarkDataPoints = true;52Pesgo1.PeLegend.Style = LegendStyle.OneLineTopOfAxis;53Pesgo1.PeGrid.LineControl = GridLineControl.Both;54Pesgo1.PeUserInterface.Menu.ShowLegend = MenuControl.Show;55Pesgo1.PeUserInterface.Menu.LegendLocation = MenuControl.Show;56 57// subset colors //58Pesgo1.PeColor.SubsetColors[0] = MainWindow.DemoColors[0];59Pesgo1.PeColor.SubsetColors[1] = MainWindow.DemoColors[1];60Pesgo1.PeColor.SubsetColors[2] = MainWindow.DemoColors[2];61Pesgo1.PeColor.SubsetColors[3] = MainWindow.DemoColors[3];62 63// change alphas to 100 //64Pesgo1.PeColor.SubsetColors[0] = Color.FromArgb(100, Pesgo1.PeColor.SubsetColors[0].R, Pesgo1.PeColor.SubsetColors[0].G, Pesgo1.PeColor.SubsetColors[0].B);65Pesgo1.PeColor.SubsetColors[1] = Color.FromArgb(100, Pesgo1.PeColor.SubsetColors[1].R, Pesgo1.PeColor.SubsetColors[1].G, Pesgo1.PeColor.SubsetColors[1].B);66Pesgo1.PeColor.SubsetColors[2] = Color.FromArgb(100, Pesgo1.PeColor.SubsetColors[2].R, Pesgo1.PeColor.SubsetColors[2].G, Pesgo1.PeColor.SubsetColors[2].B);67Pesgo1.PeColor.SubsetColors[3] = Color.FromArgb(100, Pesgo1.PeColor.SubsetColors[3].R, Pesgo1.PeColor.SubsetColors[3].G, Pesgo1.PeColor.SubsetColors[3].B);68 69// Generally call ReinitializeResetImage at end **'70Pesgo1.PeFunction.ReinitializeResetImage();71Pesgo1.Invalidate();72// Optionally call Pego1.Refresh() if you are not seeing changes immediatelyPego1.PeData.Y[s, p]Click underlined properties to view documentation