help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with subplot


From: Henry F. Mollet
Subject: Re: problem with subplot
Date: Tue, 22 Feb 2005 11:19:38 -0800
User-agent: Microsoft-Entourage/10.1.1.2418

GNU Octave, version 2.1.46 (powerpc-apple-darwin6.6).
I no problems either but have not checked if the plot is actually what I'm
supposed to get. See attached.

*However*, at first I got only one subplot on the right at first as claimed.
I had to use *clear all* first to get rid of everything I had in the
workspace and then it worked
Henry



on 2/22/05 10:17 AM, Steve C. Thompson at address@hidden wrote:

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

Attachment: Figure 0.pdf
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]