Skip to content

Commit

Permalink
fix format_coords_as_labels
Browse files Browse the repository at this point in the history
  • Loading branch information
OriolAbril committed Apr 5, 2024
1 parent d416ba0 commit abd1b38
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arviz/plots/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,8 @@ def format_coords_as_labels(dataarray, skip_dims=None):
coord_labels = coord_labels.values
if isinstance(coord_labels[0], tuple):
fmt = ", ".join(["{}" for _ in coord_labels[0]])
coord_labels[:] = [fmt.format(*x) for x in coord_labels]
else:
coord_labels[:] = [f"{s}" for s in coord_labels]
return coord_labels
return np.array([fmt.format(*x) for x in coord_labels])
return np.array([f"{s}" for s in coord_labels])


def set_xticklabels(ax, coord_labels):
Expand Down

0 comments on commit abd1b38

Please sign in to comment.