-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
do not plot legend upon single series #4964
base: v2
Are you sure you want to change the base?
Conversation
I'll fix the tests, once we agree if it goes into 2.0 or not |
I'm in favor |
there is a small problem here, I propose adding a new keyword |
Yeah, I would prefer to set the label to |
I dived into the processing pipeline and how things are handled, but there doesn't seem to be a way to introduce this functionality without adding a new keyword without hacks. The problem this in this statement
The pipeline updates the legend_position before processing series. So we can't set Another way is to do this after series are processed. Now that all series are processed, the labels are already set to Another way might be while series are processed. But there is problem in that it is not easy to know how many more series are to come. It is kinda impossible to tell if there will be only one series in the subplot. I couldn't find a reliable way to count series while they are being processed. A dirty solution is to make a new arg Another solution is just to disable this auto labelling into |
Thats fine with me too |
default to not put autolabelling
31b9a96
to
68e2173
Compare
Well, I simplified the change to |
Gotta say now that there is no default label, all images look much cleaner. Remind me what is the policy about making reference images. I'm on a mac, and my ref images look always different even for the ones that don't change. How should I handle this |
I have a feeling that we should disable reference image checking in macos too. And maybe for the purpose of a cleaner transition maybe I should embed PlotsRefImages repo inside here the same way you wanted to that with PlotsDocs? @BeastyBlacksmith |
Thats pretty big. But it wouldn't be impossible to automate the creation of the ref images and opening of the pull request via CI, that would also ensure that its built on the same architecture |
Stolen from https://github.com/JuliaPlots/Plots.jl/pull/3732/files
Basically do not insert label in case there is only single series being plotted. For me it feels like a good default. Legend would show in case you provide a custom label for a single series it of course. Having
y1
to be displayed is surely weird if it is by its own