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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -