Skip to content

Commit

Permalink
convert before plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartenBransen committed Oct 25, 2023
1 parent 7058b65 commit cdf9bf2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scm_confocal/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,10 @@ def _export_with_scalebar(exportim,pixelsize,unit,filename,multichannel,
if cmap in pure_maps:
cmap = _get_pure_cmap(cmap)

#convert pixelsize
if draw_bar or draw_text:
pixelsize,unit = _convert_length(pixelsize, unit, convert)

#draw original figure before changing exportim
if show_figure:
fig,ax = plt.subplots(1,1)
Expand Down Expand Up @@ -1928,10 +1932,6 @@ def _on_lim_change(call):
ax.callbacks.connect("ylim_changed", _on_lim_change)
plt.show(block=False)

#convert pixelsize
if draw_bar or draw_text:
pixelsize,unit = _convert_length(pixelsize, unit, convert)

#(optionally) crop
if not crop is None:

Expand Down

0 comments on commit cdf9bf2

Please sign in to comment.