help-octave
[Top][All Lists]
Advanced

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

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


From: Doug Stewart
Subject: Re: Adding a legend for every new plot in a GUI?
Date: Mon, 19 Jun 2017 06:18:30 -0400



On Mon, Jun 19, 2017 at 3:22 AM, shank1207 <address@hidden> wrote:
Hello,

Thanks for your answer, I am sorry for not putting the code anyways it was
intuitive of you to guess what I was asking :) ,  the legend works for every
new graph but when i tried to modify the code by using num2str for every new
graph it doesnt convert the number to string is there a work around for this
problem?

Here is what i am doing

 P=num2str(alpha);
semilogx(f,20*log10(abs(H)),";P;",'linewidth',3)

try

P=";" + num2str(alpha) + ";" ;
semilogx(f,20*log10(abs(H)), P ,'linewidth',3)

or

P=num2str(alpha);
semilogx(f,20*log10(abs(H)),";"+P+";",'linewidth',3)



this is untested by me but give it a try


 and this is what i get in the graph
<http://octave.1599824.n4.nabble.com/file/n4683750/ex2.png>



--
View this message in context: http://octave.1599824.n4.nabble.com/Adding-a-legend-for-every-new-plot-in-a-GUI-tp4683698p4683750.html
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave



--
DASCertificate for 206392


reply via email to

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