Skip to content

Commit

Permalink
Merge pull request #1138 from wright-group/interact2D-imshow-bugfix
Browse files Browse the repository at this point in the history
interact2D use_imshow bugfix
  • Loading branch information
kameyer226 authored Aug 10, 2023
2 parents b8a3a44 + 51cca77 commit 1212151
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

## [Unreleased]

### Fixed
- `interact2D`: fixed bug where use_imshow broke the sliders

## [3.5.0]

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions WrightTools/artists/_interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ def update_slider(info, use_imshow=use_imshow):
)
if use_imshow:
transpose = _order_for_imshow(
current_state[xaxis.natural_name][:],
current_state[yaxis.natural_name][:],
current_state.dat[xaxis.natural_name][:],
current_state.dat[yaxis.natural_name][:],
)
obj2D.set_data(current_state.dat[channel.natural_name][:].transpose(transpose))
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/artists/test_interact2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_4D():
data.create_variable("d_1", values=tau[None, None, None, :], units="ps")

data.transform("w_1", "w_2", "w_3", "d_1")
return wt.artists.interact2D(data, xaxis=0, yaxis=1, local=True)
return wt.artists.interact2D(data, xaxis=0, yaxis=1, local=True, use_imshow=True)


if __name__ == "__main__":
Expand Down

0 comments on commit 1212151

Please sign in to comment.