We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Upon mirroring an axis, the scalebar on the display does not display anymore.
#generate a sample gaussian lineshape dataset shape = (8,4,1000) dat = np.zeros(shape) for i in range(shape[0]): for j in range(shape[1]): dat[i,j,:] = np.histogram(np.random.normal(360,8,int(1e5)),bins=1000,range=(300,800))[0].astype('int32') ax0 = {'size': shape[1], 'name':'X', 'units':'um', 'scale':1.05, 'offset':0, 'navigate': True} ax1 = {'size': shape[0], 'name':'Y', 'units':'um', 'scale':1.05, 'offset':0, 'navigate': True} ax2 = {'size': 1000, 'name':'WL', 'units':'nm', 'scale':0.5, 'offset':300, 'navigate': False} a = hs.signals.Signal1D(dat,axes=[ax1,ax0,ax2]) a.metadata.General.title = "a" b = a.inav[:,::-1] b.metadata.General.title = "b" a.plot(scalebar=True) b.plot(scalebar=True)
The annotation position must not be adapted to the new axis values. I've noticed that upon running
bprime = a.inav[:,::-1] bprime.axes_manager[1].scale = a.axes_manager[1].scale bprime.axes_manager[1].offset = a.axes_manager[1].offset bprime.metadata.General.title = "b prime" bprime.plot()
The bug disappears
Any insight on how to patch this? It's probably a simple trait update missing but I couldn't find it. Also, possible link with #1228 ?
Best Regards
Nico
The text was updated successfully, but these errors were encountered:
Could it because the two axis doesn't have the same scale anymore? One of the two in b is now negative?
b
Sorry, something went wrong.
#1228 should be a different issue to do with how the scale bar is anchored or not, or something along these lines.
No branches or pull requests
Upon mirroring an axis, the scalebar on the display does not display anymore.
The annotation position must not be adapted to the new axis values. I've noticed that upon running
The bug disappears
Any insight on how to patch this? It's probably a simple trait update missing but I couldn't find it.
Also, possible link with #1228 ?
Best Regards
Nico
The text was updated successfully, but these errors were encountered: