public static GraphPane AddPanel(this ZedGraphControl zgcGraph) { var result = new GraphPane(); zgcGraph.MasterPane.Add(result); zgcGraph.AxisChange(); return result; }
public static void Graph(this ZedGraphControl zed, Function f, double a, double b, double h, Color c) { PointPairList list = new PointPairList(); for (double x = a; x <= b; x += h) { list.Add(x, f(x)); zed.GraphPane.AddCurve("", list, c, SymbolType.None); zed.AxisChange(); } }
public static MasterPane InitMasterPanel(this ZedGraphControl zgcGraph, Graphics g, int graphCount, string title, PaneLayout pl = PaneLayout.SingleColumn) { MasterPane myMaster = zgcGraph.MasterPane; myMaster.PaneList.Clear(); myMaster.Margin.All = 10; myMaster.InnerPaneGap = 10; // Set the master pane title myMaster.Title.Text = title; myMaster.Title.IsVisible = true; myMaster.Legend.IsVisible = false; for (int i = 0; i < graphCount; i++) { myMaster.Add(new GraphPane()); } myMaster.SetLayout(g, pl); zgcGraph.AxisChange(); return myMaster; }
public static void UpdateGraph(this ZedGraphControl zgc) { // Tell ZedGraph to calculate the axis ranges // Note that you MUST call this after enabling IsAutoScrollRange, since AxisChange() sets // up the proper scrolling parameters zgc.AxisChange(); // Make sure the Graph gets redrawn zgc.Invalidate(); }