<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 28: PlotSurface2D displays data incorrectly when YAxis1.Reversed</title><link href="https://sourceforge.net/p/nplot/bugs/28/" rel="alternate"/><link href="https://sourceforge.net/p/nplot/bugs/28/feed.atom" rel="self"/><id>https://sourceforge.net/p/nplot/bugs/28/</id><updated>2009-02-11T21:22:53Z</updated><subtitle>Recent changes to 28: PlotSurface2D displays data incorrectly when YAxis1.Reversed</subtitle><entry><title>PlotSurface2D displays data incorrectly when YAxis1.Reversed</title><link href="https://sourceforge.net/p/nplot/bugs/28/" rel="alternate"/><published>2009-02-11T21:22:53Z</published><updated>2009-02-11T21:22:53Z</updated><author><name>Brent Browning</name><uri>https://sourceforge.net/u/userid-2398137/</uri></author><id>https://sourceforge.netbe013327767ecc68bc899b1513dfbd7dd6aacb2a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am using NPlot to display contour charts using PlotSurface2D.  When I reverse the Y axis order the chart does not display correctly.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Here is a code fragment for how I am plotting the data:&lt;/p&gt;
&lt;p&gt;int row = 10;&lt;br /&gt;
int col = 10;&lt;br /&gt;
double[,] map = new double[row, col];&lt;br /&gt;
for (int i = 0; i &amp;lt; row; i++)&lt;br /&gt;
{&lt;br /&gt;
for (int j = 0; j &amp;lt; col; j++)&lt;br /&gt;
{&lt;br /&gt;
map[i, j] = i;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
this.myPlotSurface.Clear();&lt;br /&gt;
myPlotSurface.Title = "Grid Survey";&lt;br /&gt;
NPlot.ImagePlot ip = new NPlot.ImagePlot(map, 0, 1, 0, 1);&lt;br /&gt;
ip.Gradient = new NPlot.LinearGradient(Color.Blue, Color.Red);&lt;br /&gt;
ip.Center = false;&lt;br /&gt;
myPlotSurface.Add(ip);&lt;/p&gt;
&lt;p&gt;// Reverse Y axis so grid matches physical space&lt;br /&gt;
myPlotSurface.YAxis1.Reversed = true;&lt;/p&gt;
&lt;p&gt;NPlot.Grid grid = new NPlot.Grid();&lt;br /&gt;
grid.HorizontalGridType = NPlot.Grid.GridType.Fine;&lt;br /&gt;
grid.VerticalGridType = NPlot.Grid.GridType.Fine;&lt;br /&gt;
myPlotSurface.Add(grid);&lt;br /&gt;
myPlotSurface.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;&lt;br /&gt;
myPlotSurface.AddInteraction(new NPlot.Windows.PlotSurface2D.Interactions.MouseWheelZoom());&lt;br /&gt;
myPlotSurface.Refresh();&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>