Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to change a Scilab graphic legend position?

1,049 views
Skip to first unread message

regis.nasc...@gmail.com

unread,
Jun 20, 2014, 8:53:21 PM6/20/14
to
Dear folks!

I am in trouble how to change a position of a legend!

I am plotting the following instruction:

plot2d(phi,[CCO2 CCO HH2 NN2 SSO2 CCH4],[-1,-2,-3,-4,-5,-6],'121',leg='CO2@CO@H2@N2@SO2@CH4',rect = [2.3, 0, 5, 55])
xtitle("Composição do Gás")
xlabel('Razão de Equivalência')
ylabel('Concentração Volumétrica(%)')
xgrid()

The legend appears bellow to x axis, how can i change to a top right corner?

Tks

Regis

akhorshidi

unread,
Jun 22, 2014, 1:44:45 AM6/22/14
to
Hi;
It would be preferable to use legend() function. But you can also change legend position by modifying the axes properties. For example suppose we've run the last example in plot2d help and now we want to move the legend into upper-right corner; So just try this:

a=gca();
a.children(2).legend_location="in_upper_right";

For more info, please see: http://help.scilab.org/docs/current/en_US/legend.html and http://help.scilab.org/docs/current/en_US/graphics_entities.html

HTH,
Mehran
_


akhorshidi

unread,
Jun 22, 2014, 1:58:45 AM6/22/14
to
Unfortunately this forum has already died!
So,as a side note, I suggest you to send your question directly to Scilab mailing list: us...@lists.scilab.org or http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
There, you'll find a lot of friendly folk who'll try to help users.

Merci,
Mehran
_
0 new messages