[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Subplot & Tick Mark Label
From: |
Ben Abbott |
Subject: |
Re: Subplot & Tick Mark Label |
Date: |
Fri, 04 Jun 2010 18:02:26 -0400 |
On Jun 4, 2010, at 5:34 PM, Alvin W wrote:
> On 06/01/10 04:34, Ben Abbott wrote:
>> On May 27, 2010, at 9:41 AM, Alvin W wrote:
>>
>>> I was trying to print a several graphs that were merged under subplot
>>> command, but they kept overlapping with each other. Reducing the tick
>>> mark label didn't help.
>>>
>>> What should I do?
>>>
>>> Thanks
>>>
>> At present, the only option is to modify each axes "position" property.
>>
>> The position property is a 4 element vector, [xLL, yLL, xW, yH], specifying
>> the lower left coordinates and the axes' width and height. The units for
>> this property are normalized to the figure (i.e. zero to one).
>>
>> In the future, Octave will be able to make the adjustments you desire
>> automatically.
>>
>> Ben
>>
>> p.s. If you'd like to follow up, please tell us what version of Octave and
>> what version of Gnuplot you are running.
>>
>>
> I'm running Gnuplot 4.2.6 & Octave 3.2.4.
Here's an example of how you can avoid overlapping the plots.
clf
r = 3;
c = 3;
fmt = {'horizontalalignment', 'center', 'verticalalignment', 'middle'};
for n = 1:(r*c)
subplot (r, c, n)
xlabel (sprintf ("xlabel #%d", n))
ylabel (sprintf ("ylabel #%d", n))
title (sprintf ("title #%d", n))
text (0.5, 0.5, sprintf('(%d,%d,%d)', r, c, n), fmt{:})
axis ([0 1 0 1])
endfor
dx = 1/(10*r);
dy = 1/(10*c);
hax = findobj (gcf, "type", "axes");
for n = 1:numel(hax)
set (hax(n), "position", get (hax(n), "position") + [dx,dy,-2*dx,-2*dy]);
endfor
Another option is to change the font size. This can be done by ...
set (findall (gcf, "-property", "fontsize"), "fontsize", 8)
Ben