do not plot legend upon single series#4964
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
y1to be displayed is surely weird if it is by its own