-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Legend overhaul including horizontal legends #2854
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2854 +/- ##
==========================================
+ Coverage 62.56% 63.34% +0.77%
==========================================
Files 28 29 +1
Lines 7547 8133 +586
==========================================
+ Hits 4722 5152 +430
- Misses 2825 2981 +156
Continue to review full report at Codecov.
|
I like it. |
perhaps we could have something like |
To make it even more simpler, it could just be called, |
I just came here to say I am very interested in this feature. |
98df542
to
12b7af5
Compare
I dicided to not go the named tuple road and instead make handling of keywords more ergonomic. Unfortunately at the moment this would be breaking unless we can make recipes consume aliased keywords as well. |
12b7af5
to
c858069
Compare
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
@daschw I have a hard time coming with critical tests, but this one works, but probably I got wrong what you meant with color matching. julia> struct A end
julia> @recipe function f(a::A)
legendfontcolor --> :magenta # alias for legend_font_color now
1:5
end
julia> plot(A()) |
Co-authored-by: t-bltg <[email protected]>
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
…uliaPlots/Plots.jl into bbs/horizontal-legends" This reverts commit d880d89.
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Plots.jl/Plots.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Awesome work @BeastyBlacksmith |
I think this was breaking because This line and 3 other similar lines in the diff: https://github.com/JuliaPlots/Plots.jl/pull/2854/files#diff-f6be56dc5fd8749a6cfca149f4d324d86aee499f760c2c2f95c4672598acca0fL375 |
What tests broke exactly? Happy to take a look. Internally the former |
Tests in one of Invenia's internal packages. I'll see if I can get a MWE and make an issue. It seems to work for a basic case, so there might be something specific we're doing that isn't working with this update. |
The problem is in the interaction with RecipesBase: #3903 |
* prototype * use add_attributes macro with modification * add Colors back * fix convertLegendValue * fix legendtitlefontsize * fix gr legend position * fix aliases * symbolic color is okay * remove redundant legend_forground_color aliases * legend -> legend_postion * fix inspectdr * add legendtitlefont pointsize and color * fix symbol cache * fix rebase woes * Update precompile_*.jl file [skip ci] (JuliaPlots#3885) Co-authored-by: BeastyBlacksmith <[email protected]> * fix gr * more fixes * add match_table to `@add_attributes` * fix match_map * Update src/backends/pgfplotsx.jl Co-authored-by: t-bltg <[email protected]> * fix font calls * apply formatter * readd descriptions * more missing descriptions * adjust pyplot to master * fix pgfplotsx * Revert "Merge branch 'bbs/horizontal-legends' of https://github.com/JuliaPlots/Plots.jl into bbs/horizontal-legends" This reverts commit d880d89. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: BeastyBlacksmith <[email protected]> Co-authored-by: t-bltg <[email protected]>
While preparing an implementation for horizontal legends in the pgfplotsx backend I got an idea.
Because I wanted to avoid creating another keyword, I hijacked the
legend
keyword, so now I can create legend columns likeHowever, now I can't change the position of the legend at the same time.
So my idea was to always convert the input to named tuples, something like
legend
inlegend
out:top
(pos = :top, columns = 1)
:horizontal
(pos = :best, columns = -1)
(:top, 2)
(pos = :top, colums = 2)
And passing the NamedTuple would be also allowed. Do you think this is a good idea?