[Top][All Lists]

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

Re: Adding a legend for every new plot in a GUI?

From: Andreas Weber
Subject: Re: Adding a legend for every new plot in a GUI?
Date: Sat, 17 Jun 2017 09:16:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

Am 16.06.2017 um 10:13 schrieb shank1207:
> Hello,
> In my program I generate a new plot on top of a previous plot everytime i
> update a slider and push the push button in GUI. I want to add a legend to
> this new plot based on the value calculated after the slider is updated. Is
> this possible to update and add new legend everytime i update the slider?
> <>   
> Like shown in the figure there are three curve the legend has the value of
> the slider of  the last curve but the color of the first graph. I want to
> add legend for all three graph 

It's always a good idea to create a minimal example which shows what
you've done so far. I can only guess what your code looks like.

If you use "hold on" you can give a legend for every new plot. Try this:

plot (1:10, ";foo;")
hold on
plot (10:20, ";bar;")
plot (30:40, ";baz;")

-- Andy

reply via email to

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