How do I get my figure size to change with the length of the legend entry?

7 views (last 30 days)
Hi everyone,
I'm plotting some graphs to put in a report, and I have the legend outside the plot itself (location set as EastOutside). I can specify the size of the figure, but if the legend entry is quite long then the width of the plot itself shrinks to fit in the figure.
What I was wondering was whether it is possible to set the size of the plot itself and have the size of the figure expand if necessary? For example, I set the x-axis to be 10cm and the y-axis to be 5cm, but the width of the figure can resize to fit the legend text in (so for some plots the figure width would be maybe 12cm, in others maybe 14cm).
I hope this makes sense, and thanks in advance for your suggestions.
Rob

Answers (1)

Sean de Wolski
Sean de Wolski on 27 Sep 2012
doc addlistener

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!