Discussion:
linewidth in 2d plot and legend
(too old to reply)
grokwik
2008-06-11 07:41:19 UTC
Permalink
Hello,

I've just discovered octave and I like it. I'm using octave 3.0.1.
I've written a script and I'm happy with it except for the graphic
part.

The plot is "ok" but :

I can't change the legend location :
I tried
legend('Pm
+Pb','sxx','syy','szz','sxy','syz','sxz',"location",'southeast');
but it didn't work (the legend is still on its default location)
i can't change the linewidth

My script :

plot(xc,TRESCA,'k') ;
hold on ;
plot(xc,CHAMP) ;

grid on ;
xlabel('Abcisse curviligne');
ylabel('Contrainte en MPa');
title('Linearisation des contraintes');
legend('Pm+Pb','sxx','syy','szz','sxy','syz','sxz');
print('depsc', 'linearisation.eps');
grokwik
2008-06-11 09:34:24 UTC
Permalink
Post by grokwik
Hello,
I've just discovered octave and I like it. I'm using octave 3.0.1.
I've written a script and I'm happy with it except for the graphic
part.
I tried
legend('Pm
+Pb','sxx','syy','szz','sxy','syz','sxz',"location",'southeast');
but it didn't work (the legend is still on its default location)
i can't change the linewidth
plot(xc,TRESCA,'k') ;
hold on ;
plot(xc,CHAMP) ;
grid on ;
xlabel('Abcisse curviligne');
ylabel('Contrainte en MPa');
title('Linearisation des contraintes');
legend('Pm+Pb','sxx','syy','szz','sxy','syz','sxz');
print('depsc', 'linearisation.eps');
I found how to set linewidth but tle legend location still doesn't
work :

clf
plot(xc,TRESCA,'k','linewidth',3) ;
hold on ;
plot(xc,CHAMP,'linewidth',2) ;
grid on ;
xlabel('Abcisse curviligne');
ylabel('Contrainte en MPa');
title('Linearisation des contraintes');
legend('Pm+Pb','sxx','syy','szz','sxy','syz','sxz');
print('depsc', 'linearisation.eps');
grokwik
2008-06-11 09:38:16 UTC
Permalink
Post by grokwik
Post by grokwik
Hello,
I've just discovered octave and I like it. I'm using octave 3.0.1.
I've written a script and I'm happy with it except for the graphic
part.
I tried
legend('Pm
+Pb','sxx','syy','szz','sxy','syz','sxz',"location",'southeast');
but it didn't work (the legend is still on its default location)
i can't change the linewidth
plot(xc,TRESCA,'k') ;
hold on ;
plot(xc,CHAMP) ;
grid on ;
xlabel('Abcisse curviligne');
ylabel('Contrainte en MPa');
title('Linearisation des contraintes');
legend('Pm+Pb','sxx','syy','szz','sxy','syz','sxz');
print('depsc', 'linearisation.eps');
I found how to set linewidth but tle legend location still doesn't
clf
plot(xc,TRESCA,'k','linewidth',3) ;
hold on ;
plot(xc,CHAMP,'linewidth',2) ;
grid on ;
xlabel('Abcisse curviligne');
ylabel('Contrainte en MPa');
title('Linearisation des contraintes');
legend('Pm+Pb','sxx','syy','szz','sxy','syz','sxz');
print('depsc', 'linearisation.eps');- Masquer le texte des messages précédents -
- Afficher le texte des messages précédents -
legend now works but I have to set a gend name :

legend1=legend('Pm+Pb','sxx','syy','szz','sxy','syz','sxz');
set(legend1,'Location','Northwest')

Loading...