Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fixes to matplotlib subplot handling #1205

Merged
merged 6 commits into from
May 24, 2020
Merged

fixes to matplotlib subplot handling #1205

merged 6 commits into from
May 24, 2020

Conversation

OriolAbril
Copy link
Member

Description

Minor changes to matplotlib subplot handling in plot_trace and plot_pair.

In plot_trace plot.max_subplots used to be checked on the number of rows in plot trace, this PR fixes it to check the actual number of subplots.

I also checked the behaviour in plot_pair to check that it takes into account the actual number of used subplots with or without marginals. I have also modified axes creation to avoid having extra blank spaces at the top and right of with marginals=False (see https://arviz-devs.github.io/arviz/examples/matplotlib/mpl_plot_pair.html for example)

Checklist

  • Follows official PR format
  • Includes new or updated tests to cover the new feature
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

@codecov
Copy link

codecov bot commented May 24, 2020

Codecov Report

Merging #1205 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1205   +/-   ##
=======================================
  Coverage   93.10%   93.10%           
=======================================
  Files          94       94           
  Lines        9480     9480           
=======================================
  Hits         8826     8826           
  Misses        654      654           
Impacted Files Coverage Δ
arviz/plots/backends/matplotlib/pairplot.py 90.64% <100.00%> (ø)
arviz/plots/traceplot.py 97.33% <100.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 f1db2c4...3b63b00. Read the comment docs.

@OriolAbril OriolAbril merged commit f5784b5 into master May 24, 2020
@OriolAbril OriolAbril deleted the max_subplots branch May 24, 2020 14:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant