Open kabiel opened 3 weeks ago
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()
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: @.***>
Describe the bug add_scale(1e-9) gives wrong scalebar:![wrong_scalebar](https://github.com/scholi/pySPM/assets/36822145/34964877-429b-4d7e-85cc-4dbff7f21aed)
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.