From 7e4deebd80c74afbd5864d345adbe2775134b59e Mon Sep 17 00:00:00 2001 From: MGBergweiler <50400171+MGBergweiler@users.noreply.github.com> Date: Sat, 1 Aug 2020 22:32:44 +0200 Subject: [PATCH] Update ContourSeriesExamples.cs X and Y axes were inverted. Fixes issue #42. --- .../Series/ContourSeriesExamples.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ExampleGenerator/Series/ContourSeriesExamples.cs b/ExampleGenerator/Series/ContourSeriesExamples.cs index 6ebf6cb..a9fd4e9 100644 --- a/ExampleGenerator/Series/ContourSeriesExamples.cs +++ b/ExampleGenerator/Series/ContourSeriesExamples.cs @@ -12,21 +12,21 @@ public class ContourSeriesExamples public static PlotModel ContourSeries() { var model = new PlotModel { Title = "ContourSeries" }; - double x0 = -3.1; - double x1 = 3.1; - double y0 = -3; - double y1 = 3; + double x0 = -3; + double x1 = 3; + double y0 = -3.1; + double y1 = 3.1; Func peaks = (x, y) => 3 * (1 - x) * (1 - x) * Math.Exp(-(x * x) - (y + 1) * (y + 1)) - 10 * (x / 5 - x * x * x - y * y * y * y * y) * Math.Exp(-x * x - y * y) - 1.0 / 3 * Math.Exp(-(x + 1) * (x + 1) - y * y); - var xx = ArrayBuilder.CreateVector(x0, x1, 100); - var yy = ArrayBuilder.CreateVector(y0, y1, 100); + var xx = ArrayBuilder.CreateVector(x0, x1, 120); + var yy = ArrayBuilder.CreateVector(y0, y1, 90); var peaksData = ArrayBuilder.Evaluate(peaks, xx, yy); var cs = new ContourSeries { Color = OxyColors.Black, LabelBackground = OxyColors.White, - ColumnCoordinates = yy, - RowCoordinates = xx, + ColumnCoordinates = xx, + RowCoordinates = yy, Data = peaksData }; model.Series.Add(cs); @@ -34,4 +34,4 @@ public static PlotModel ContourSeries() return model; } } -} \ No newline at end of file +}