var model = new PlotModel { Title = "PNG Rendering" }; | |
model.Axes.Add(new LinearAxis { Position = AxisPosition.Left }); | |
model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom }); | |
model.Series.Add(new FunctionSeries(x => x * x, 0, 1, 1000)); | |
// export as PNG | |
var pngExporter = new OxyPlot.WindowsForms.PngExporter(); | |
using (var fs = System.IO.File.Open("test.png", System.IO.FileMode.Create)) | |
{ | |
pngExporter.Export(model, fs); | |
} |
var model = new PlotModel { Title = "PNG Rendering" }; | |
model.Axes.Add(new LinearAxis { Position = AxisPosition.Left }); | |
model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom }); | |
model.Series.Add(new FunctionSeries(x => x * x, 0, 1, 1000)); | |
// export as PNG | |
var pngExporter = new OxyPlot.WindowsForms.PngExporter(); | |
using (var fs = System.IO.File.Open("test.png", System.IO.FileMode.Create)) | |
{ | |
pngExporter.Export(model, fs); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment