[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52176] contourf() does not enforce size compa
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #52176] contourf() does not enforce size compatibility |
Date: |
Fri, 6 Oct 2017 07:46:06 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?52176>
Summary: contourf() does not enforce size compatibility
Project: GNU Octave
Submitted by: None
Submitted on: Fri 06 Oct 2017 11:46:04 AM UTC
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Missed Error or Warning
Status: None
Assigned to: None
Originator Name: William Rosenthal
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.1
Operating System: Microsoft Windows
_______________________________________________________
Details:
ERROR: contourf(x,y,f) plots without error an array f which is smaller in at
least 1 dimension than the length of the coordinate vectors x and y.
IMPACT: This results in unexpected behavior, because it is not obvious whether
the function will pad the plot with white space, pad the array with zeros, or
truncate the excessive x or y vector. It also is not obvious whether the
function will align the array with the first or last values of the excessive x
or y vector. The lack of precise input checking also allows dimension mismatch
issues to persist, and makes overall debugging more difficult.
MINIMAL EXAMPLE: This code should, but does not, throw an error citing
dimension mismatch between the array A and one or more of the coordinate
vectors x and y:
clc, clear all, close all
A = zeros(100,99);
for j = 1:100, for k = 1:99, A(j,k) = j + 2*k; end, end
x = (1:100)';
y = (1:100)';
contourf(y,x,A), colorbar, xlabel('x'), ylabel('y')
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52176>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52176] contourf() does not enforce size compatibility,
anonymous <=