I am getting fed up of specifying the position of my legend and having it overlap data-points when some property of my data changes.
Here is a thought: How hard would it be to ask “How many datapoints does this legend placement overlap?” ? Preferably without doing the math inside my macro, since presumably I would have to emulate lots of ROOT subtleties and things like error bars, the log state… I also assume I am not the first to think of this as a concept. Is there prior art?
I already have a macro which allows me to specify as a parameter “XY” where X=“LCR” and Y=“MBR”. It would be ideal if I could automatically try these in turn and take the one that overlaps the least points. I’m guessing this is non-trivial to compute though, especially to come to agreement with ROOT from outside ROOT.
Another thing I will do is to place the legend outside the plot, but often the plots do contain lots of space, so it would be good to place the legend inside.
Thanks in advance,