private void button4_Click(object sender, RoutedEventArgs e)
 {
     lineModel = new MainViewModel();
     setLineModel();
     LineSeries yLine = new LineSeries();
     yLine.Title = "X=" + xcorofMax.ToString() + " ,Z=" + zcorofMax.ToString() + "时结果随Y轴变化对数曲线";
     for (int i = 0; i < ybins; i++)
     {
         int index = zcorofMax * ybins * xbins + i * xbins + xcorofMax;
         double currentY = ymin + i * ywidth;
         yLine.Points.Add(new DataPoint(currentY, Convert.ToDouble(results[index])));
     }
     lineModel.MyModel.Series.Add(yLine);
     this.DataContext = new MainViewModel();
     this.DataContext = lineModel;
 }
 private void button2_Click(object sender, RoutedEventArgs e)
 {
     logModel = new MainViewModel();
     setLogModel();
     LineSeries logYLine = new LineSeries();
     logYLine.Title = "X=" + xcorofMax.ToString() + " ,Z=" + zcorofMax.ToString() + "时结果随Y轴变化对数曲线";
     for (int i = 0; i < ybins; i++)
     {
         int index = zcorofMax * ybins * xbins + i * xbins + xcorofMax;
         double currentY = ymin + i * ywidth;
         logYLine.Points.Add(new DataPoint(currentY, Convert.ToDouble(results[index])*factor));
     }
     logModel.MyModel.Series.Add(logYLine);
     this.DataContext = new MainViewModel();
     this.DataContext = logModel;
     //var pdfe = new PdfExporter();
     //DataPackage newc = new DataPackage();
     //var stream = File.Create("aaa");
     //pdfe.Export(logModel.MyModel, stream, 600, 400);
 }