if exist ('OCTAVE_VERSION', 'builtin'); graphics_toolkit gnuplot; graphics_toolkit qt; end np = 11; x = linspace(0, 10, np); y = x + 1; plot(x, y); legend({'tst'}, 'location', 'northwest'); set(gca, 'DataAspectRatio', [1 1 1]); print('DataAspectRatio_legend.png', '-dpng'); pause