From: SourceForge.net <no...@so...> - 2009-02-11 21:22:58
|
Bugs item #2590560, was opened at 2009-02-11 13:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=2590560&group_id=161868 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: 0.9.9.2 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Brent Browning (brent_browning) Assigned to: Nobody/Anonymous (nobody) Summary: PlotSurface2D displays data incorrectly when YAxis1.Reversed Initial Comment: I am using NPlot to display contour charts using PlotSurface2D. When I reverse the Y axis order the chart does not display correctly. My data goes from 0,0 to 10,10 (11 rows and 11 columns). I want data point 0,0 to appear in the upper left hand corner of the plot. The default has Y values increasing so 0,0 is in the lower left. When I set YAxis1.Reversed I get the desired effect of the numbers on the Y axis (0 is at the top and 10 is at the bottom). But the data is plotted incorrectly. Data from row 0 is plotted on row 1, etc. Here is a code fragment for how I am plotting the data: int row = 10; int col = 10; double[,] map = new double[row, col]; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { map[i, j] = i; } } this.myPlotSurface.Clear(); myPlotSurface.Title = "Grid Survey"; NPlot.ImagePlot ip = new NPlot.ImagePlot(map, 0, 1, 0, 1); ip.Gradient = new NPlot.LinearGradient(Color.Blue, Color.Red); ip.Center = false; myPlotSurface.Add(ip); // Reverse Y axis so grid matches physical space myPlotSurface.YAxis1.Reversed = true; NPlot.Grid grid = new NPlot.Grid(); grid.HorizontalGridType = NPlot.Grid.GridType.Fine; grid.VerticalGridType = NPlot.Grid.GridType.Fine; myPlotSurface.Add(grid); myPlotSurface.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default; myPlotSurface.AddInteraction(new NPlot.Windows.PlotSurface2D.Interactions.MouseWheelZoom()); myPlotSurface.Refresh(); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=821568&aid=2590560&group_id=161868 |