JesusFreke - 2008-06-05

Logged In: YES
user_id=2104277
Originator: NO

I ran into this same problem. Here's a quick code sample that generates the error:

NPlot.Bitmap.PlotSurface2D plot = new NPlot.Bitmap.PlotSurface2D(1000, 1000);

LogAxis verticalAxis = new LogAxis();
plot.YAxis1 = verticalAxis;

System.Collections.ArrayList yvalues = new System.Collections.ArrayList();
yvalues.Add(1);
yvalues.Add(1000000);

System.Collections.ArrayList xvalues = new System.Collections.ArrayList();
xvalues.Add(0);
xvalues.Add(1);

LinePlot linePlot = new LinePlot(yvalues, xvalues);
plot.Add(linePlot);

A workaround to this issue is to add the lineplot first, and then the log axis.

The problem is because the yaxis range is increased by 8%, and then that new range is passed to the "LUB" method of the log axis, which complains because the lower bound of the "suggested" axis is negative. I'm not familiar enough with the code to know what the best way to fix this might be. I don't think it would be to remove the 8% range increase altogether, I assume that is done for display reasons, so that the data doesn't go right up against the top and bottom of the graph.