[Gtk-sharp-list] Gtk# 2.0 + NPlot 0.9.9.2

Decadence brahman63 at mail.ru
Tue Apr 5 05:39:41 EDT 2011


Hi all!
I try to use NPlot library in my project.

I add references to my project and compile this code successfully:

double[] a = {0, 200, 140, 14, 240, 320, 150, 80, 170, 90};
LinePlot lp = new LinePlot();
lp.DataSource = a;
lp.Label = "My Label";
lp.Pen = PenName;
Grid myGrid = new Grid();
myGrid.VerticalGridType = Grid.GridType.Fine;
myGrid.HorizontalGridType = Grid.GridType.None;
NPlot.Gtk.PlotSurface2D plot = new NPlot.Gtk.PlotSurface2D();
plot.Clear();
plot.Parent = fixed1;
plot.Title = "Title";
plot.Legend = new Legend();
plot.Legend.AttachTo(NPlot.PlotSurface2D.XAxisPosition.Bottom,
NPlot.PlotSurface2D.YAxisPosition.Right);
plot.Legend.YOffset = 16;
plot.Legend.HorizontalEdgePlacement = Legend.Placement.Outside;
plot.Legend.VerticalEdgePlacement = Legend.Placement.Inside;
plot.Padding = 40;
plot.SmoothingMode=System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
plot.Add(myGrid);
plot.Add(lp);
plot.YAxis1.Label = "Money";
plot.YAxis1.NumberFormat = "{0:n}";
plot.Refresh();

but on button click nothing is happening... what do I do wrong?
And can I somehow add NPlot as an element in Toolbox?

--
View this message in context: http://mono.1490590.n4.nabble.com/Gtk-2-0-NPlot-0-9-9-2-tp3427532p3427532.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.


More information about the Gtk-sharp-list mailing list