How to place white space on matlab legend to the right of the text? I will use a combination of psfrag (and adobe illustrator for several other diagram modifications) and replace the placeholder text in the figure with an equation. The problem is that it tightly limits the placeholder text field, while I want to leave room for my equation
Start with a simple number;
h_plot = plot([0 1], [0 1]); h_legend = legend('A',0);
The interval that I really want will be something like
h_plot = plot([0 1], [0 1]); h_legend = legend('A!!!!!!!!',0);
Where!!!!!!!! is actually a space, and it really is stored as a single “A” character.
A few things that don't seem to work:
One obvious solution: just add to the text, for example, "A !!!!!!!!!!!!!" and replace all text with my equation in psfrag. However, if I touch a file using Adobe Illustrator, it converts the text to separate characters, which causes psfrag to break (for example, http://engineeringrevision.com/314/getting-illustrator-to-play-nicely-with-psfrag/ ), So I really just need to specify the character "A" as a string.
Another is trying to stretch a box, but beating a position or proportion stretches the text and line, respectively.
For example, the following simply stretches the width
h_plot = plot([0 1], [0 1]); h_legend = legend('A',0); leg_pos = get(h_legend,'position'); leg_pos(3) = leg_pos(3) * 2; set(h_legend, 'position', leg_pos);
- The
legendflex file looks very interesting, but I think that the control over buffering in the form of spaces was only for the position of the legend itself.
source share