Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a54d39 commit 7b7fcbbCopy full SHA for 7b7fcbb
1 file changed
hyperspy/signal.py
@@ -257,10 +257,12 @@ def plot(self, axes_manager=None):
257
if self.axes_manager._non_slicing_axes:
258
self._plot.image_data_function = self._get_explorer
259
self._plot.image_title = ''
260
- self._plot.pixel_size = \
261
- self.axes_manager._non_slicing_axes[0].scale
262
- self._plot.pixel_units = \
263
- self.axes_manager._non_slicing_axes[0].units
+ if self.axes_manager.navigation_dimension == 1:
+ scalebar_axis = self.axes_manager._slicing_axes[0]
+ else:
+ scalebar_axis = self.axes_manager._non_slicing_axes[-1]
264
+ self._plot.pixel_size = scalebar_axis.scale
265
+ self._plot.pixel_units = scalebar_axis.units
266
self._plot.plot()
267
268
elif axes_manager.signal_dimension == 2:
0 commit comments