-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default legend position to :outertopright #3399
Comments
well the arguably biggest plotting package matplotlib does |
Really? I haven't used Python or matplotlib in a long time, but I thought it used a heuristic to place the legend where it doesn't overlap the data. So if Plots.jl had a similar heuristic then an inside legend would be OK, but otherwise it really should place the legend outside. |
I agree, that it would be nicer. Maybe we could change it with the next major release. For now, you can make it your default by adding |
I still think that the current implementation is good already. It's actually Backends are supposed to find the best location that does not overlap with data but still manages to be within the plot. This is the best of both worlds, it is compact and does not intersect. Most backends are unable to find the best location for the legend, hence they just fallback to All in all, I think the current default is really good. |
What could be changed is the inclusion of the legend by default for single series data. If only a single series is added perhaps the default |
I have written a simple function set the legend position in a tentative minimal-overlapping position (see https://discourse.julialang.org/t/making-plots-place-its-legend-in-a-better-spot/74986/11?u=leandromartinez98) What if Plots, with a function like that, defined the 'best' position and send it to the backend, instead of expecting the backend to support that feature? Apparently pyplot is the only one having that option. |
I agree that having a @lmiq, can you create a We'd need to |
I can try, the function which is there is already fast (on the tenths of micro seconds), and can probably be optimized still. What would be helpful for me is just a pointer on where such a function should be implemented, within GR. |
👍 See the placeholder here:
|
That's perfect. As soon as possible I'll revise that function, possibly improve it l, and write a PR. |
I think the function itself can reside in |
Done here: #4536 |
I think a nice way to test the placeholder is to plot repeatedly |
Fixed by #4536. |
This is halfway between a bug report and a feature request, so I'm not tagging it with either.
Please change the default legend position to :outertopright. Here's my one and only argument: a visualization package should not default to hiding part of the data you're trying to visualize.
The text was updated successfully, but these errors were encountered: