graphics.h.in: Properly set image pixel size when unique(x/ydata) is scalar.
author |
Ben Abbott <bpabbott@mac.com> |
date |
Fri, 08 Oct 2010 07:33:36 -0400 |
parents |
3071d909ebab |
children |
2adf4736dafa |
files |
src/ChangeLog src/graphics.h.in |
diffstat |
2 files changed, 6 insertions(+), 1 deletions(-)
[+]
|
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-08 Ben Abbott <bpabbott@mac.com>
+
+ * graphics.h.in: Properly set image pixel size when unique(x/ydata)
+ is scalar.
+
2010-10-07 Rik <octave@nomad.inbox5.com>
* DLD-FUNCTIONS/conv2.cc (convn): Update docstring. Add 1 new test.
--- a/src/graphics.h.in
+++ b/src/graphics.h.in
@@ -3466,7 +3466,7 @@
octave_idx_type l = dim - 1;
float dp;
- if (l > 0)
+ if (l > 0 && limits(0) != limits(1))
dp = (limits(1) - limits(0))/(2*l);
else
{