[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plotting Question
From: |
Tatsuro MATSUOKA |
Subject: |
Re: Plotting Question |
Date: |
Mon, 22 Jun 2015 10:28:46 +0900 (JST) |
----- Original Message -----
> From: Thomas D. Dean
> To: Octave users list
> Cc:
> Date: 2015/6/22, Mon 08:08
> Subject: Plotting Question
>
> Linux X11.
>
> I have a script that works when sourced from within octave, but, when I start
> from the command line, I get no plot.
>
>> cat dotest.m
> 1;
> A = load ( 'test.dat' );
> ax =plotyy(A(:,1)/1000, 20*log10(A(:,3)./A(:,2)), A(:,1)/1000, A(:,4));
> title ( 'Insertion Loss and Phase' );
> xlabel ( 'Frequency kHz' );
> ylabel ( ax(1), 'Insertion Loss db' );
> ylabel ( ax(2), 'Phase, debrees' );
> ylabel ( ax(2), 'Phase, debrees' );
> legend ( 'Insertion Loss','Phase' );
> grid on;
> ans = input ( 'Press return to close plot and exit' );
> close all;
>
>> /usr/local/bin/octave dotest.m
> Press return to close plot and exit
>
> No plot displayed.
>
> I believe this has to do with the shell, bash, forking and then exec'ing
> octave. Correct?
>
I do understand why you can see plot from command line.
If you add drawnow(); like:
grid on;
drawnow();
ans = input ( 'Press return to close plot and exit' );
what happens?
Tatsuro
- Plotting Question, Thomas D. Dean, 2015/06/21
- Re: Plotting Question,
Tatsuro MATSUOKA <=