Skip to content
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

rework layout macro to use Base types #3943

Merged
merged 7 commits into from
Nov 25, 2021
Merged

Conversation

BeastyBlacksmith
Copy link
Member

@BeastyBlacksmith BeastyBlacksmith commented Nov 18, 2021

this should enable users to use the @layout macro in recipes.

Currently this seems to work fine, except for the case of grid calls in the argument expression. Which is hardly documented and I am considering removing this option leaving things as they are, since it is usable while having Plots loaded and you can't use that in recipes either way.

Fix JuliaPlots/RecipesBase.jl#15

@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

Merging #3943 (b49ac99) into master (e9ae75d) will decrease coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3943      +/-   ##
==========================================
- Coverage   62.56%   62.43%   -0.13%     
==========================================
  Files          29       29              
  Lines        7268     7223      -45     
==========================================
- Hits         4547     4510      -37     
+ Misses       2721     2713       -8     
Impacted Files Coverage Δ
src/Plots.jl 33.33% <100.00%> (+1.90%) ⬆️
src/args.jl 72.01% <100.00%> (+0.04%) ⬆️
src/layouts.jl 67.26% <100.00%> (-0.63%) ⬇️
src/backends/gr.jl 87.99% <0.00%> (-0.33%) ⬇️
src/recipes.jl 58.44% <0.00%> (-0.12%) ⬇️
src/examples.jl 61.76% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b23c620...b49ac99. Read the comment docs.

@BeastyBlacksmith
Copy link
Member Author

Here is a case, that currently gives different results:

using Plots
plot(rand(100, 6), layout = @layout([_ ° _; ° ° °; ° ° °]), title = ["A" "B" "C"])

Master

layout

PR

plot_2

@BeastyBlacksmith BeastyBlacksmith marked this pull request as draft November 18, 2021 15:09
@BeastyBlacksmith
Copy link
Member Author

Tests need JuliaPlots/RecipesBase.jl#85 to pass

@BeastyBlacksmith BeastyBlacksmith merged commit e471ce8 into master Nov 25, 2021
@BeastyBlacksmith BeastyBlacksmith deleted the bbs/clean-layout branch November 25, 2021 10:40
isentropic pushed a commit to isentropic/Plots.jl that referenced this pull request Jan 16, 2022
* @layout -> Base types except for `grid` call

* add layout conversion of namedtuples, vectors and matrices

* add missing method

* rip it out

* fix slicing

* adjust compat

* add Measure conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for @layout
1 participant