[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with subplot
From: |
Steve C. Thompson |
Subject: |
Re: problem with subplot |
Date: |
Tue, 22 Feb 2005 10:17:01 -0800 |
User-agent: |
Mutt/1.3.28i |
Gunnar,
The figure looks good on my machine. See http://elsteve.com/subplot.png
I'm running:
gnuplot --version
gnuplot 4.0 patchlevel 0
octave --version
GNU Octave, version 2.1.64 (i386-pc-linux-gnu)
on Debian GNU/Linux (testing).
Good luck,
Steve
On Feb 22 11:43AM, Gunnar wrote:
> I'm trying to create a subplot (with 2 plots). The code is attached below.
> The result is just one plot, the right one, and it is not properly scaled so
> I can only see half the righthand plot. What can be wrong with this?
> I'm using version 2.1.64 on my Linux box.
>
> Gunnar.
>
>
> x=linspace(0,6);
> for i=1:4
> y(i,:)=cos(i*x);
> end
> subplot(1,2,1);
> plot(x,y(1,:),';x=1;');
> hold on
> plot(x,y(2,:),';x=2;');
> plot(x,y(3,:),';x=3;');
> plot(x,y(4,:),';x=4;');
> title('Funktionen y=cos(kt)');
> hold off
> subplot(1,2,2);
> x=linspace(0,20);
> plot(x,exp(-x/4));
> hold on;
> plot(x,exp(-x/4).*sin(x));
> title('f(x)=exp(-x/4)sin(x)');
> text(5,0.38,'exp(-x/4)');
> hold off;
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------