public PlotRender Plot() { if (data == null) { throw new ArgumentNullException("Data cannot be null"); } string withString = !type.HasValue ? "" : $"with {type.Value.AsGNUPlotArg()}"; string usingString = columns == null ? "" : $"using {string.Join(":", columns)} "; string titleString = title == null ? "" : $"title {title} "; GNUPlotExecutor script = width.HasValue && height.HasValue ? new GNUPlotExecutor(width.Value, height.Value):new GNUPlotExecutor(); PlotRender results = script.ExecuteGNUPlot($" {withString} {usingString} {titleString}", data).Result; return(results); }
public static Image AsImage(this PlotRender d) { return(Image.FromFile(d.Output.FullName)); }