Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ch-hristov/bcf417aa890cf11dc827178ed1745e3e to your computer and use it in GitHub Desktop.
Save ch-hristov/bcf417aa890cf11dc827178ed1745e3e to your computer and use it in GitHub Desktop.
PlotModel
var plot = new PlotModel();
plot.Axes.Add(new OxyPlot.Axes.CategoryAxis());
plot.Axes.Add(new OxyPlot.Axes.CategoryAxis());
OxyPlot.Series.ScatterSeries s;
plot.Series.Add(s = new OxyPlot.Series.ScatterSeries());
s.Points.Add(new ScatterPoint() { X = 1, Y = 2 });
s.Points.Add(new ScatterPoint() { X = 3, Y = 3 });
PngExporter png = new PngExporter();
using (var f = File.OpenWrite("file.png"))
{
png.Export(plot, f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment