// Shared initialization code void Initialize() { this.AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable; BackColor = Color.Wheat; PlotPanel = new PlotPanel(Frame); this.AddSubview(PlotPanel); // Subscribing to a paint eventhandler to drawingPanel: PlotPanel.Paint += new PaintEventHandler(PlotPanelPaint); // Set Form1 size: // this.Width = 350; // this.Height = 300; // Subscribing to a paint eventhandler to drawingPanel: cs = new ChartStyle(this); dc = new DataCollection(); cm = new ColorMap(100, 180); // Specify chart style parameters: cs.Title = "Bar Chart"; cs.XLimMin = 0f; cs.XLimMax = 5f; cs.YLimMin = 0f; cs.YLimMax = 10f; cs.XTick = 1f; cs.YTick = 2f; cs.BarType = ChartStyle.BarTypeEnum.Vertical; }