very narrow imagesc subplots

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

very narrow imagesc subplots

In the following simple example code, the (sub)plots are coming out much
too narrow in width (x-direction) by default; they are unreadable.  The
default amount of whitespace is truly excessive. When I attempt to widen
the 3rd subplot by a factor beta, I get unexpected results.  I am
expecting the 3rd subplot to remain in position and to simply widen in
the x-direction, but instead the subplot seems to move around and stay
narrow.  This suggests the origin of the subplot is far away, but why
would the subplot stay narrow?  If someone would please run this brief
example code, play with the value of beta, and explain what is
happening, I would be grateful.  What is a simple way to make these
subplots wider?

This code is based on the first web link in the initial comments.  I did
try "tightfig.m" and "tight_subplot.m" from the Matlab File Exchange on
some different code than below (but still imagesc in subplots), and
experienced similar frustration.

Using octave 3.8.1 in Ubuntu 14.04.


close all;

ax(1) = subplot(1,3,1);imagesc(rand(100,1),[0 1]);
ax(2) = subplot(1,3,2);imagesc(rand(100,1),[0 1]);
ax(3) = subplot(1,3,3);imagesc(rand(100,1),[0 1]);

ax2(1) = subplot(1,3,1);imagesc(rand(100,1),[0 1]);
ax2(2) = subplot(1,3,2);imagesc(rand(100,1),[0 1]);
ax2(3) = subplot(1,3,3);imagesc(rand(100,1),[0 1]);

% Get positions of all the subplot
posa = get(ax,'position');
posa2 = get(ax2,'position');
%h    = colorbar;

%attempt to make the 3rd subplot wider in figure 20.  why does this fail???


Help-octave mailing list
[hidden email]