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: Eduardo J. Adam
Subject: Re: 2 Y-axes in the same figure
Date: Thu, 20 Oct 2011 19:24:34 -0300

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.


image.pngimage.png


error: addproperty: a `__plotyy_axes__' property already exists in the graphics

object

error: called from:

error: /usr/share/octave/3.2.4/m/plot/plotyy.m at line 193, column 1

error: /usr/share/octave/3.2.4/m/plot/plotyy.m at line 111, column 1

error: /home/eadam/Desktop/example2.m at line 17, column 3



Eduardo



2011/10/18 Eduardo J. Adam <address@hidden>
Thanks very much for your help.


2011/10/18 Michael Goffioul <address@hidden>
On Tue, Oct 18, 2011 at 9:56 PM, Eduardo J. Adam <address@hidden> wrote:
> Michel,
> Thanks a lot.
> The command written as follow
>
> set (h, 'xscale', 'log','xminortick', 'on'); grid
>
> is working very well.
>
> Where I can find good documentation for making graphics?

There's some documentation here:
http://www.gnu.org/software/octave/doc/interpreter/ in chapter 15.

Michael.



--

Dr. Eduardo J. Adam
Prof. Adjunto Instrumentación y Control de Procesos
Facultad de Ingeniería Química
Santiago del Estero 2654, (S3000AOJ), Santa Fe, SF, Argentina
Tel. +54 (0342) 457-1167 Int. 2742
http://www.fiq.unl.edu.ar/control/index.php?page=adam




--

Dr. Eduardo J. Adam
Prof. Adjunto Instrumentación y Control de Procesos
Facultad de Ingeniería Química
Santiago del Estero 2654, (S3000AOJ), Santa Fe, SF, Argentina
Tel. +54 (0342) 457-1167 Int. 2742
http://www.fiq.unl.edu.ar/control/index.php?page=adam


reply via email to

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