Skip to content

Commit

Permalink
fix plot_pair labels (#1533)
Browse files Browse the repository at this point in the history
* fix plot_pair labels

* add to changelog
  • Loading branch information
OriolAbril authored Feb 6, 2021
1 parent 525e311 commit 1193532
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
### Maintenance and fixes
* Fixed ovelapping titles and repeating warnings on circular traceplot ([1517](https://github.com/arviz-devs/arviz/pull/1517))
* Removed repetitive variable names from forest plots of multivariate variables ([1527](https://github.com/arviz-devs/arviz/pull/1527))
* Fixed regression in `plot_pair` labels that prevented coord names to be shown when necessary ([1533](https://github.com/arviz-devs/arviz/pull/1533))

### Deprecation

Expand Down
9 changes: 4 additions & 5 deletions arviz/plots/pairplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from .plot_utils import (
get_plotting_function,
xarray_to_ndarray,
filter_plotters_list,
xarray_var_iter,
make_label,
)


Expand Down Expand Up @@ -194,11 +194,10 @@ def plot_pair(
# Get posterior draws and combine chains
dataset = convert_to_dataset(data, group=group)
var_names = _var_names(var_names, dataset, filter_vars)
plotters = filter_plotters_list(
list(xarray_var_iter(get_coords(dataset, coords), var_names=var_names, combined=True)),
"plot_pair",
plotters = list(
xarray_var_iter(get_coords(dataset, coords), var_names=var_names, combined=True)
)
flat_var_names = [plotter[0] for plotter in plotters]
flat_var_names = [make_label(var_name, selection) for var_name, selection, _ in plotters]

divergent_data = None
diverging_mask = None
Expand Down

0 comments on commit 1193532

Please sign in to comment.