コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: aldente-hu/AES
        async Task WritePltCommands(TextWriter writer, string source, string chart_destination, ChartFormat format)
        {
            var gnuplot = new Gnuplot
            {
                Format      = format,
                Width       = 800,
                Height      = 600,
                FontScale   = 1.2,
                Destination = chart_destination
            };

            gnuplot.DataSeries.Add(new LineChartSeries
            {
                SourceFile = source,
                XColumn    = 1,
                YColumn    = 2,
                Style      = new LineChartSeriesStyle(LineChartStyle.Lines)
                {
                    Style = new LinePointStyle
                    {
                        LineColor = "#FF0000"
                    }
                }
            });

            gnuplot.DataSeries.Add(new LineChartSeries
            {
                SourceFile = source,
                XColumn    = 1,
                YColumn    = 3,
                Style      = new LineChartSeriesStyle(LineChartStyle.Lines)
                {
                    Style = new LinePointStyle
                    {
                        LineColor = "#CC0000"
                    }
                }
            });

            await gnuplot.OutputPltFileAsync(writer);
        }