[Scilab-users] legend lets disappear my plot

classic Classic list List threaded Threaded
3 messages Options
RudiLehn RudiLehn
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] legend lets disappear my plot

Hi friends with scilab,
in many plots I can without problems put a legend in my graphic. But now I
made plot, which doesn't accept anymore the legend? I make from my
complicate math a subset with a very simple result and show here the program
with the legend problem:

clear; // Variablen löschen
clf(); // bisherige Grafik löschen
alpha = [0: %pi/100 : %pi/2]
// Teilterme
sina = sin(alpha)^2;
// Legende zum Schaubild
legend("$R_p \cdot R_p^*$",2);
a = gca();
a.grid = [1,1];
a.x_location = "origin";
a.y_location = "origin";
a.auto_scale="off";
a.data_bounds = [0,0; %pi/2, 0.5];

Rp2 = sin(alpha) * 0.1;
plot2d(alpha,Rp2)

What could be wrong with the script?

Thanks for help

Regards
Rudi



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
jonasv16 jonasv16
Reply | Threaded
Open this post in threaded view
|

Re: legend lets disappear my plot

Put your legend(...)  after plot2d(...)

.

Jonas Vieira de Souza * Graduating in electronic engineering

[hidden email]

+55(48)9.9944-3117



Em sex, 8 de jun de 2018 às 09:09, RudiLehn <[hidden email]> escreveu:
Hi friends with scilab,
in many plots I can without problems put a legend in my graphic. But now I
made plot, which doesn't accept anymore the legend? I make from my
complicate math a subset with a very simple result and show here the program
with the legend problem:

clear; // Variablen löschen
clf(); // bisherige Grafik löschen
alpha = [0: %pi/100 : %pi/2]
// Teilterme
sina = sin(alpha)^2;
// Legende zum Schaubild
legend("$R_p \cdot R_p^*$",2);
a = gca();
a.grid = [1,1];
a.x_location = "origin";
a.y_location = "origin";
a.auto_scale="off";
a.data_bounds = [0,0; %pi/2, 0.5];

Rp2 = sin(alpha) * 0.1;
plot2d(alpha,Rp2)

What could be wrong with the script?

Thanks for help

Regards
Rudi



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
RudiLehn RudiLehn
Reply | Threaded
Open this post in threaded view
|

Re: legend lets disappear my plot

Hi Jonas,
you had a perfect idea. Thank you very much. May be it is always better to put all the graphic things after the plot2d command.

Regards
Rudi

Am 08.06.2018 um 14:13 schrieb Jonas <[hidden email]>:

Put your legend(...)  after plot2d(...)

.
Jonas Vieira de Souza * Graduating in electronic engineering
+55(48)9.9944-3117


Em sex, 8 de jun de 2018 às 09:09, RudiLehn <[hidden email]> escreveu:
Hi friends with scilab,
in many plots I can without problems put a legend in my graphic. But now I
made plot, which doesn't accept anymore the legend? I make from my
complicate math a subset with a very simple result and show here the program
with the legend problem:

clear; // Variablen löschen
clf(); // bisherige Grafik löschen
alpha = [0: %pi/100 : %pi/2]
// Teilterme
sina = sin(alpha)^2;
// Legende zum Schaubild
legend("$R_p \cdot R_p^*$",2);
a = gca();
a.grid = [1,1];
a.x_location = "origin";
a.y_location = "origin";
a.auto_scale="off";
a.data_bounds = [0,0; %pi/2, 0.5];

Rp2 = sin(alpha) * 0.1;
plot2d(alpha,Rp2)

What could be wrong with the script?

Thanks for help

Regards
Rudi



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users