コード例 #1
0
ファイル: PlotBuilder.cs プロジェクト: ben-oxley/GNU.Plot
        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);
        }
コード例 #2
0
 public static Image AsImage(this PlotRender d)
 {
     return(Image.FromFile(d.Output.FullName));
 }