help-octave
[Top][All Lists]
Advanced

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

Re: 2 Y-axes in the same figure


From: Michael Goffioul
Subject: Re: 2 Y-axes in the same figure
Date: Fri, 21 Oct 2011 08:47:48 +0100

On Thu, Oct 20, 2011 at 11:24 PM, Eduardo J. Adam <address@hidden> wrote:
Dear friends,
It's me again.
Well,
after my last visit I have made ​​great progress with my octave code
. But, actually I have a new question.
The following code works very well for me.

clear all, clf
K=1; n=K; d=[1 0.2 1 0];
gs=tf(n,d);
[mag_gs,pha_gs,w]=bode(gs);
mag_gs_db=20*log(mag_gs);
h = plotyy(w,mag_gs_db,w,pha_gs);
set (h, 'xscale', 'log','xminortick', 'on'); grid

The problem appears when I try to plot again because I need to plot 2 or 3 times in different steps. For example, if I write
K=20; n=K; d=[1 0.2 1 0];
gs=tf(n,d);
[mag_gs,pha_gs,w]=bode(gs);
mag_gs_db=20*log(mag_gs);
h =plotyy(w,mag_gs_db,w,pha_gs);
set (h, 'xscale', 'log','xminortick', 'on'); grid

the semilogx scale desappear. Here, I include two figure that shows the problem.


If you don't care about loosing the previous plot, do a "clf" before plotting again.

Michael.


reply via email to

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