[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48879] imagesc plotting is incorrect with Ope
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #48879] imagesc plotting is incorrect with OpenGL toolkit |
Date: |
Tue, 23 Aug 2016 22:52:55 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
URL:
<http://savannah.gnu.org/bugs/?48879>
Summary: imagesc plotting is incorrect with OpenGL toolkit
Project: GNU Octave
Submitted by: rik5
Submitted on: Tue 23 Aug 2016 03:52:53 PM PDT
Category: Plotting with OpenGL
Severity: 4 - Important
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
The algorithm for scaled cdata is supposed to be
index = fix((C-cmin)/(cmax-cmin)*m)+1;
%Clamp values outside the range [1 m]
index(index<1) = 1;
index(index>m) = m;
Matlab and the gnuplot toolkit correctly implement that.
For qt and fltk toolkits, the 'round' function, instead of 'fix', seems to be
used.
index = round((C-cmin)/(cmax-cmin)*m)+1;
%Clamp values outside the range [1 m]
index(index<1) = 1;
index(index>m) = m;
I've added a new demo (#5) to imagesc that shows this. Try
demo imagesc 5
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48879>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48879] imagesc plotting is incorrect with OpenGL toolkit,
Rik <=