[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56137] Y-axis label is cut-off in the saved p
From: |
Pantxo Diribarne |
Subject: |
[Octave-bug-tracker] [bug #56137] Y-axis label is cut-off in the saved png file |
Date: |
Mon, 15 Apr 2019 03:54:13 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
Update of bug #56137 (project octave):
Item Group: Other => Inaccurate Result
Status: None => Confirmed
Release: 4.4.1 => dev
Operating System: Microsoft Windows => Any
_______________________________________________________
Follow-up Comment #1:
Confirmed. Note that this is not only visible when printing, the onscreen
figure is also cropped.
This is due to the addition of a colorbar, which makes the subplots stop
adapting their size depending on the labels. The workaround is to add the
colorbars last:
close all
clear all
start = datenum (2019, 4, 11, 12, 00);
time = (start:7:start+99*7)';
y_name = {'Niveaumessung 1', 'Niveaumessung 2', 'Entleerungspumpe'};
data = rand (100, 3);
figure (1);
colormap ('autumn');
nsp = size (data, 2);
for ii = 1:nsp
subplot (nsp, 1, ii)
imagesc (time, nsp-1, data(:, ii)', [0 1]);
datetick ('x', 'mm-dd');
set (gca, 'YTick', 2, 'YTickLabel', y_name{ii});
endfor
filename = 'example.png';
for ii = 1:nsp
subplot (nsp, 1, ii)
colorbar
endfor
saveas (1, filename);
Changing release to "dev", since this bug is also present in the current
development version, and OS to any since I can reproduce on linux.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56137>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/