[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48562] "(xy)axislocation" should support "ori
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #48562] "(xy)axislocation" should support "origin" |
Date: |
Tue, 1 Nov 2016 23:07:25 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #5, bug #48562 (project octave):
This is certainly a big improvement. I applied the patch here
(http://hg.savannah.gnu.org/hgweb/octave/rev/074765d5c83b).
One thing to note is that the labels at the origin overlap the axes line now.
A simple workaround is to manually set the ticks to exclude the origin. But
it might be nice to have this done automatically. This could be done either
in graphics.cc where the ticks are calculated, or in gl-render.cc where the
ticks are displayed. In either case, there is a bit of mixing between the X
and Y axes. For example, if the X axes is "top", then it is the maximum ytick
which needs to be removed.
Example from 'demo axis 13'
clf;
x = -10:0.1:10;
y = sin (x)./(1+abs (x)) + 0.1*x - 0.4;
plot (x, y);
set (gca, "xaxislocation", "top");
set (gca, "yaxislocation", "origin");
box off;
title ({"no plot box", "xaxislocation = top, yaxislocation = origin"});
Corrected by
set (gca, "ytick", get (gca, "ytick")(1:end-1));
What does Matlab return for
clf;
x = -10:0.1:10;
y = sin (x)./(1+abs (x)) + 0.1*x - 0.4;
plot (x, y);
get (gca, 'ytick')
set (gca, 'xaxislocation', 'top');
set (gca, 'yaxislocation', 'origin');
get (gca, 'ytick')
That might tell us whether the ticks are being chosen differently, or whether
it is only the display of the ticks which is suppressed.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48562>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48562] "(xy)axislocation" should support "origin",
Rik <=