Tue 12 Sep 2017 05:10:50 PM UTC, comment #11:
This issue is fixed on the development branch with changeset 24030 from bug #43606:
http://hg.savannah.gnu.org/hgweb/octave/rev/ec3d37eeafa2
|
Fri 14 Oct 2016 11:58:59 AM UTC, comment #10:
It might be too late. But can this still be considered for 4.2.0? It is only a minor fix.
|
Tue 26 Jul 2016 08:06:42 AM UTC, comment #9:
The underlying difference seems to be deeper in Octave's graphics code than I initially suspected. The following example also fails in Octave but works flawlessly in Matlab:
In Matlab, an "inf" limit seems to indicate a tight axis limit on that border.
Octave does a similar thing when calling the higher level function xlim() with "inf" limits: It manually sets the axis limit on that border that would be used if "(XYZ)LimMode" was set to auto.
The attached changeset does the same for logplots with a "0" border. This prevents the original example from throwing an error. And makes Octave behave more self-consistently, I guess.
However, the underlying difference still persists. Maybe, keep this bug open even if this changeset should be applied. Or open a new bug.
(file #38026)
|
Mon 25 Jul 2016 05:08:17 PM UTC, comment #8:
That's exactly the issue which seems to be handled a little bit more "gracefully" in Matlab. Matlab seems to omit the boundary point in the plot vector if one x-limit is set to 0 for a semilogx() plot.
Without knowing the exact call stack I'd guess that somewhere before the call to opengl_renderer::draw_axes() a
for the lower bound of the semilogx() plot is calculated.
-Inf as the value for x_min in draw_axes() then triggers the
statement, the warning gets thrown and further plot outputs are cancelled.
|
Mon 25 Jul 2016 12:25:34 PM UTC, comment #7:
Opps. I over looked the xlim() command. I'm attaching an updated script and figure image.
I now see warnings due to zeroes in xdata and ydata as well as zeros in xlim and ylim.
(file #38020, file #38021)
|
Mon 25 Jul 2016 09:04:47 AM UTC, comment #6:
I can reproduce the original issue from comment #0 with both 4.0.3 and a current tip.
The example fails for qt and fltk with the error message given in comment #0.
For gnuplot, the following error is thrown:
The issue seems to be that there should be a check to the axis limits for logarithmic plots when the axis limit mode is "manual" and one axis limit is set to "0".
I can try and have a look into it if no one else beats me to it.
|
Mon 25 Jul 2016 01:07:25 AM UTC, comment #5:
I've tried both the default branch and the stable branch. In each case, the script (test_log.m which is attached) produces the output below.
I do not see the warning from libinterp/corefcn/gl-render.cc.
I've attached a png of the figure I get using the qt graphics toolkit.
@Franz, when you see the warning from gl-render.cc are you using the fltk, or qt graphics toolkit? You can check by entering "graphics_toolkit" at Octave's prompt (I don't encounter the error from gl-render.cc for fltk either).
(file #38015, file #38016)
|
Sun 24 Jul 2016 09:03:02 PM UTC, comment #4:
I just found the corresponding code in the online Mercurial browser.
The code throwing the warning is in libinterp/corefcn/gl-render.cc and presumably prepares and draws the axes for the plot window. After the warning a return statement directly follows. So obviously drawing the axes (and the entire following plot graph) seems to stop here, what corresponds to the behaviour I see in Octave: I get an empty plot window without any graph, and on subsequent events in the plot window (onMouseClick, onResize, ...) the warning gets thrown again.
|
Sun 24 Jul 2016 08:38:31 PM UTC, comment #3:
Ben, I'm using the latest 4.0.3, but I'm running it on Windows 10 64 Bit.
|
Sun 24 Jul 2016 06:22:50 PM UTC, comment #2:
Thew warning is coming from libinter/corefcn/graphics.cc
Using the default branch, I get the same result as with Matlab. For compatibility, should this warning be removed?
Franz, can you tell us which version of Octave you are using?
|
Sun 24 Jul 2016 05:56:58 PM UTC, comment #1:
I can confirm Matlab's behavior (I recently noticed Matlab's behavior). As a point of clarification, Matlab ignores leading zeros in the data when the corresponding axes scale is 'log'
yields
Iv'e attached the resulting plot.
(file #38006)
|
Sun 24 Jul 2016 01:25:37 PM UTC, original submission:
If you're trying to plot with semilogx and scaling the x-axis with xlim from 0 to some upper value, the lower bound at 0 in xlim causes a
opengl_renderer: data values greater than float capacity. (1) Scale data, or (2) Use gnuplot
warning. No plot output is produced in this case.
Some test code to reproduce the warning:
Matlab seems to avoid the 0 lower limit problem by simply omitting the very first sample in the vector to be plotted.
|