Skip to content

Instantly share code, notes, and snippets.

@VisualMelon
Created January 31, 2019 12:12
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 VisualMelon/a3627d7ffc22f06e2bc1009841d3279c to your computer and use it in GitHub Desktop.
Save VisualMelon/a3627d7ffc22f06e2bc1009841d3279c to your computer and use it in GitHub Desktop.
OxyPlot Minimal PNG Export
using System;
using OxyPlot;
using OxyPlot.Series;
using OxyPlot.WindowsForms;
namespace OxyConsoleTest
{
class Program
{
static void Main(string[] args)
{
PlotModel plot = new PlotModel() { Title = "Test" };
plot.Series.Add(new FunctionSeries(Math.Sin, 0, 10, 0.1, "Sin"));
PngExporter exporter = new PngExporter();
exporter.ExportToFile(plot, "test.png");
System.Diagnostics.Process.Start("test.png");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment