Skip to content

Commit

Permalink
Merge pull request #154 from BrillouinMicroscopy/fix/noid/2d-view
Browse files Browse the repository at this point in the history
Fix showing 2D data
  • Loading branch information
raimund-schluessler authored Apr 7, 2022
2 parents dabbf87 + 92bfdad commit b187157
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bmicro/gui/evaluation/evaluation_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,18 +261,19 @@ def refresh_plot(self):
if dimensionality == 2:
# We rotate the array so the x axis is shown as the
# horizontal axis
data = np.rot90(data)
image_map = data[tuple(dslice)]
image_map = np.rot90(image_map)
extent = np.nanmin(positions[idx[0]][tuple(dslice)]),\
np.nanmax(positions[idx[0]][tuple(dslice)]),\
np.nanmin(positions[idx[1]][tuple(dslice)]),\
np.nanmax(positions[idx[1]][tuple(dslice)])
if isinstance(self.image_map, matplotlib.image.AxesImage):
self.image_map.set_data(data[tuple(dslice)])
self.image_map.set_data(image_map)
self.image_map.set_extent(extent)
else:
self.clear_plots()
self.image_map = self.plot.imshow(
data[tuple(dslice)], interpolation='nearest',
image_map, interpolation='nearest',
extent=extent
)
self.colorbar =\
Expand Down

0 comments on commit b187157

Please sign in to comment.