Subplot & Tick Mark Label

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Subplot & Tick Mark Label

Alvin W
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

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

subplot.pdf (18K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Subplot & Tick Mark Label

bpabbott
Administrator
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.

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Subplot & Tick Mark Label

Alvin W
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.
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Subplot & Tick Mark Label

bpabbott
Administrator

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


_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave