Re: multiple graphs in 1 plot

"Shai Ayal" <[email protected]> Thu, 7 Dec 2006 11:01:43 +0200
Newsgroups gmane.comp.gnu.octave.graphics
Message-ID <[email protected]>
You need to "hold" the first plot sing the hold("on") command, so the
follwing should work:

function [y1,y2] = test(x)
y1 = x + 4
plot(y1,'1')
hold("on"); ## new line !
y2 = 2*x.^2 + 3*x + 2
plot(y2,'2')
endfunction

Shai

p.s. you would get faster and better help from the help list

On 12/7/06, huub <[email protected]> wrote:
> Hi,
>
> I'm trying to get more than 1 graph in a plot, but so far I only get the
> last one visible.
>
> function [y1,y2] = test(x)
> y1 = x + 4
> plot(y1,'1')
> y2 = 2*x.^2 + 3*x + 2
> plot(y2,'2')
> endfunction
>
> I can see y1 for a very short time. Then y2 is plotted and y1 isn't
> visible anymore. Any solution to this?
>
> Thanks,
>
> Huub
>
> _______________________________________________
> Octave-graphics mailing list
> [email protected]
> https://www.cae.wisc.edu/mailman/listinfo/octave-graphics
>