[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axe
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used |
Date: |
Fri, 24 Feb 2012 15:45:20 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 |
Follow-up Comment #16, bug #32980 (project octave):
It should be possible to shift (and normalized?) the xdata, ydata, zdata,
cdata in __init_fltk__.cc.
A simple example from the command line that illustrates the problem for xdata
is below.
graphics_toolkit fltk
close all
figure (1)
xdata = datenum (2012, 02, 22, 18, 00, 00) : 0.01 : now;
ydata = sin (xdata);
ydata(2:2:end) = NaN;
plot (xdata (~isnan (ydata)), ydata (~isnan (ydata)))
datetick ("x", 13)
By offsetting the xdata by its median the problem by be resolved. After
running the commands above, add those below.
xtick = get (gca, "xtick");
xticklabel = get (gca, "xticklabel");
ytick = get (gca, "ytick");
yticklabel = get (gca, "yticklabel");
ztick = get (gca, "ztick");
zticklabel = get (gca, "zticklabel");
xoffset = mean (xlim ());
yoffset = mean (ylim ());
zoffset = mean (zlim ());
limits = axis ();
limits = limits - [xoffset*[1 1], yoffset*[1 1], zoffset*[1
1]](1:numel(limits));
for h = get (gca, "children")
xdata = get (h, "xdata");
ydata = get (h, "ydata");
zdata = get (h, "zdata");
xdata = xdata - xoffset;
ydata = ydata - yoffset;
zdata = zdata - zoffset;
set (h, "xdata", xdata, "ydata", ydata, "zdata", zdata);
endfor
xtick = xtick - xoffset;
ytick = ytick - yoffset;
ztick = ztick - zoffset;
set (gca, "xtick", xtick, "xticklabel", xticklabel)
set (gca, "ytick", ytick, "yticklabel", yticklabel)
set (gca, "ztick", ztick, "zticklabel", zticklabel)
axis (limits)
Is this a proper approach ?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32980>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used, Ben Abbott, 2012/02/17
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used, Michael Godfrey, 2012/02/18
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used,
Ben Abbott <=
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used, Rik, 2012/02/24
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used, Ben Abbott, 2012/02/24
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used, Rik, 2012/02/24
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used, Ben Abbott, 2012/02/24
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used, John W. Eaton, 2012/02/24
- [Octave-bug-tracker] [bug #32980] for backend FLTK, real is used for axes. double should be used, Ben Abbott, 2012/02/24