我想利用nplot在winForm上面显示数据图表,这里有一个example,但是它的例子是让图片显示在webform上面,如果我想把图表显示在winform上面,应该怎么做呢?(下面是例子中的代码,作用应该是生成一幅位图)public void ProcessRequest(HttpContext context)
{
// create a new bitmap plotsurface on which to construct the chart.
NPlot.Bitmap.PlotSurface2D plotSurface = new NPlot.Bitmap.PlotSurface2D( 328, 240 ); // set up an array of random data to chart.
int seed = 0;
Random r = new Random(seed);
int[] data = new int[ Convert.ToInt32( context.Request["number"] ) ];
for (int i=0; i<data.Length; ++i)
data[i] = r.Next(30); // create a plot object for the data and add it to the plot surface.
LinePlot lp = new LinePlot();
lp.DataSource = data;
plotSurface.Add( lp ); // set the background color and tilte and create the chart.
plotSurface.BackColor = Color.White;
plotSurface.Title = context.Request["title"];
plotSurface.Refresh();

// now return it to the browser.
context.Response.ContentType = "image/png";
MemoryStream m = plotSurface.ToStream( System.Drawing.Imaging.ImageFormat.Png );
m.WriteTo( context.Response.OutputStream );
}