-
Notifications
You must be signed in to change notification settings - Fork 33
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
add_scale(1e-9) gives wrong scalebar #46
Comments
OK it also took me some time to figure this. test = spm.SXM(test_file).get_channel('[P8]_Lockin_X')
test.show()
test.add_scale(1)
plt.show() |
Great, thank you!! It works now. Von: Olivier Scholder ***@***.***>Gesendet: Samstag, Juni 15, 2024 2:47 PMAn: scholi/pySPM ***@***.***>Cc: kabiel ***@***.***>; Author ***@***.***>Betreff: Re: [scholi/pySPM] add_scale(1e-9) gives wrong scalebar (Issue #46)
OK it also took me some time to figure this.
First: you need to plot your image first, then use add_scale
Second: add_scale expect a value (unitless) which is expressed in the same unit as the plot.
Can you try:
test = spm.SXM(test_file).get_channel('[P8]_Lockin_X')
test.show()
test.add_scale(1)
plt.show()
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
![wrong_scalebar](https://private-user-images.githubusercontent.com/36822145/339906292-34964877-429b-4d7e-85cc-4dbff7f21aed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4OTg4MjAsIm5iZiI6MTcyMzg5ODUyMCwicGF0aCI6Ii8zNjgyMjE0NS8zMzk5MDYyOTItMzQ5NjQ4NzctNDI5Yi00ZDdlLTg1Y2MtNGRiZmY3ZjIxYWVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE3VDEyNDIwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc5MjNmODQyNWZhN2NjZGMwN2U4MmI4YTYyMTRkOGE5MjdjMmU5YzBlMmQ0NWE4YjhjMzAxNmE5Zjc4YzNkMjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.60yzDklEQmeslYS3mq0RTZyixc7VF-mpX0DUrm07Q7Q)
add_scale(1e-9) gives wrong scalebar:
To Reproduce
test = spm.SXM(test_file).get_channel('[P8]_Lockin_X')
test.add_scale(1e-9) # adds scale bar; something wrong
test.show()
plt.show()
Files
If applicable, upload or link the file you are having a problem with.
System Information
Run the following and attach the result with your issue:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: