multi graph in Octave

Ben Abbott bpabbott at mac.com
Mon Dec 1 17:43:36 CST 2008


On Dec 1, 2008, at 2:28 PM, Oscar Bayona Candel wrote:

> Hi all,
>
> I have made a multi graph  using this instructions:
>
> subplot(1,2,1)
> plot(Fluido)
> xlabel 'volumen'
> ylabel 'presión'
> subplot(1,2,2)
> plot(Masa)
> xlabel 'volumen'
> ylabel 'presión'
>
> I have three questions:
>
> First, how can I put an "on the top title"? Not on each Graph only a  
> General title.

Running 3.0.3 you can try

x = 1:100;
y = 1./x;
Fluido = [x, 1i*y];
Masa = Fluido;

subplot (1, 2, 1)
plot (Fluido)
xlabel ('volumen')
ylabel ('presión')
title (' ')
subplot (1, 2, 2)
plot (Masa)
xlabel ('volumen')
ylabel ('presión')
title (' ')
ax = axes;
set(ax, 'visible', 'off')
title ('on the top title')

The *trick* I'm using is to add an extra axes and then to turn it  
visibility off.

In future versions you'll be able to modify the position and location  
of each axes. That will make what you want to do much easier.

Ben





More information about the Help-octave mailing list