How can I add an extra text line in a legend of matlab graph? -
i need help!!!!!
i have following legend in line graph in matlab:
--- esme --- manta --- senchu
with respectives lines --- , want have text in top of legend like:
sources --- esme --- manta --- senchu
how can add such text?
thank much!!!
if using matlab version prior 2014b, can use method detailed here:
hleg = legend('esme','manta','senchu'); %// create legend , handle it. htitle = get(hleg,'title'); %// handle legend's title. set(htitle,'string','sources'); %// set desired title.
for newer versions of matlab (or handle graphics, precise) above no longer option (as mentioned here), in case can use this file exchange submission desired result. method works obtaining position
of legend, creating axes
@ same coordinates , set its title
something.
please refer this undocumentedmatlab post discusses exact question.
Comments
Post a Comment