<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 28: PlotSurface2D displays data incorrectly when YAxis1.Reversed</title><link>https://sourceforge.net/p/nplot/bugs/28/</link><description>Recent changes to 28: PlotSurface2D displays data incorrectly when YAxis1.Reversed</description><atom:link href="https://sourceforge.net/p/nplot/bugs/28/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 11 Feb 2009 21:22:53 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/nplot/bugs/28/feed.rss" rel="self" type="application/rss+xml"/><item><title>PlotSurface2D displays data incorrectly when YAxis1.Reversed</title><link>https://sourceforge.net/p/nplot/bugs/28/</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brent Browning</dc:creator><pubDate>Wed, 11 Feb 2009 21:22:53 -0000</pubDate><guid>https://sourceforge.netbe013327767ecc68bc899b1513dfbd7dd6aacb2a</guid></item></channel></rss>