Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot scalebar when the axis scale have different sign #2658

Conversation

ericpre
Copy link
Member

@ericpre ericpre commented Mar 8, 2021

Fixes #2557.

Progress of the PR

  • Plot scalebar for signals with different axis scale,
  • add entry to CHANGES.rst (if appropriate),
  • add tests,
  • ready for review.

Minimal example of the bug fix or the new feature

import hyperspy.api as hs
import numpy as np

N = 10
s = hs.signals.Signal2D(np.arange(N**2).reshape([10]*2))
s2 = s.isig[:, ::-1]
s2.plot()

Now the scale is displayed.

@ericpre ericpre added this to the v1.6.2 milestone Mar 8, 2021
@ericpre ericpre changed the title Plot scalebar when the axis scale have different sign. Plot scalebar when the axis scale have different sign Mar 8, 2021
@codecov
Copy link

codecov bot commented Mar 8, 2021

Codecov Report

Merging #2658 (db40a9e) into RELEASE_next_patch (4e56181) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           RELEASE_next_patch    #2658   +/-   ##
===================================================
  Coverage               76.58%   76.58%           
===================================================
  Files                     201      201           
  Lines                   29673    29673           
  Branches                 6496     6496           
===================================================
  Hits                    22724    22724           
  Misses                   5183     5183           
  Partials                 1766     1766           
Impacted Files Coverage Δ
hyperspy/drawing/image.py 72.43% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e56181...32f41c0. Read the comment docs.

@francisco-dlp francisco-dlp merged commit a2e37c8 into hyperspy:RELEASE_next_patch Mar 9, 2021
@ericpre ericpre deleted the plot_scalebar_scale_different_sign branch March 9, 2021 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants