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

Make layouts tolerant of having too-few items #4247

Merged
merged 4 commits into from
Jun 23, 2022

Conversation

BioTurboNick
Copy link
Member

@BioTurboNick BioTurboNick commented Jun 22, 2022

A big headache I have is that you currently have to have exactly the right number of layout spots for the number of plots you want to render. It makes rendering variable numbers of plots a bit of a headache.

This PR loosens the constraints so that fewer plots are acceptable, while too many plots still errors. One step towards a more flexible layout. that will continue with #4234

plot(plot(), plot(), plot(), layout = grid(2, 2))

image

@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #4247 (1c706e2) into master (ec77b97) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4247   +/-   ##
=======================================
  Coverage   77.87%   77.87%           
=======================================
  Files          28       28           
  Lines        7115     7111    -4     
=======================================
- Hits         5541     5538    -3     
+ Misses       1574     1573    -1     
Impacted Files Coverage Δ
src/layouts.jl 75.81% <100.00%> (+0.29%) ⬆️
src/args.jl 74.31% <0.00%> (-0.16%) ⬇️
src/types.jl 82.60% <0.00%> (ø)
src/subplots.jl 95.00% <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 ec77b97...1c706e2. Read the comment docs.

@BioTurboNick
Copy link
Member Author

I see it passes all current tests, so I'll add one to enforce the permissive behavior if it otherwise checks out.

@BioTurboNick BioTurboNick marked this pull request as ready for review June 23, 2022 03:51
@BeastyBlacksmith BeastyBlacksmith merged commit 03d015c into JuliaPlots:master Jun 23, 2022
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.

2 participants