Change position of markers within legend
Show older comments
I want to change position of markers within legend. How to retrieve a marker object one by one in legend and change their position. I want to change position to reduce gap between text and marker.
Accepted Answer
More Answers (1)
Shashank Prasanna
on 26 Jan 2013
I am not sure which property you want to change, but you can get the handle to the legend by first searching for the figure's children. tag will tell you which one of the children is the legend. if it is the first one, then all the properties can be listed using the 3rd line of code. Some properties are in the children of the legend, and you can query them using the 4th command.
h=get(gcf,'children')
get(h,'tag')
get(h(1))
get(h(1),'children')
Look at all the legend properties that you can edit here:
you can use the set command to do that.
Categories
Find more on Legend in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!