plot: fix limits handling, unknown kwargs and a old docstring reference

Open
#1,978 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
numpy, python

Research direction

Start with prepare_for_plot and the pairplot/marginal_plot type hints, then add the regression test requested for ndarray limits. Review diag_kwargs, upper_kwargs, and lower_kwargs handling so unrecognised keys are no longer silent. Finally inspect sbi/analysis/plot.py:1336 and plot.py:2860-2862; done means the references match the defined option helper.

Written by the indexing model from the issue text.

Description

bug diagnostics

Follow-up to #1425, which PR #1631 largely delivered. These are the concrete items that survive, each small and independent:

  1. prepare_for_plot compares limits == [], which is wrong for a np.ndarray. Use a length check, and align the pairplot / marginal_plot type hints. Needs a regression test.
  2. Warn or raise on unrecognised keys in diag_kwargs, upper_kwargs and lower_kwargs. A typo is currently silent.
  3. sbi/analysis/plot.py:1336 points readers at _get_default_fig_kwargs(), and the deprecation message at plot.py:2862 tells them to use it. That function does not exist. Only _get_default_opts is defined, at plot.py:2860.
Dominant language
Python
Stars
865
Forks
260
Avg merge
4d 3h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sbi-dev/sbi

All issues in sbi-dev/sbi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.