[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58492] Setting DataAspectRatio moves legend o
From: |
A.R. Burgers |
Subject: |
[Octave-bug-tracker] [bug #58492] Setting DataAspectRatio moves legend out of axes |
Date: |
Thu, 4 Jun 2020 09:34:06 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763 |
Follow-up Comment #3, bug #58492 (project octave):
The inside/outside issue appears to be fixed!
Modifying the script slightly and comparing the legend position with/without
DataAspectRatio set, I notice on horizontal resize of figure f2, in the OpenGL
case the legend moves horizontally, whereas in the gnuplot case (or matlab)
the legend has a fixed distance to the left axis, in the qt toolkit it seems
to be located at a certain fraction along the x-axis. See attached
DataAspectRatio_notset_legend.png.
This might be an unrelated issue.
if exist ('OCTAVE_VERSION', 'builtin');
graphics_toolkit gnuplot;
graphics_toolkit qt;
end
np = 11;
x = linspace(0, 10, np);
y = x + 1;
f1 = figure;
plot(x, y);
legend({'tst'}, 'location', 'northwest');
set(gca, 'DataAspectRatio', [1 1 1]);
title('DataAspectRatio set');
f2 = figure;
plot(x, y);
legend({'tst'}, 'location', 'northwest');
title('DataAspectRatio not set');
pause
print(f1, 'DataAspectRatio_set_legend.png', '-dpng');
print(f2, 'DataAspectRatio_notset_legend.png', '-dpng');
(file #49210)
_______________________________________________________
Additional Item Attachment:
File name: DataAspectRatio_notset_legend.png Size:11 KB
<https://savannah.gnu.org/file/DataAspectRatio_notset_legend.png?file_id=49210>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58492>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/