-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
Hi!
I want to save my plot with the ScaleBar, here is my code:
fig, ax = plt.subplots()
ax.axis("off")
ax.imshow(my_slice3, cmap="gray")
scalebar = ScaleBar(650, "nm", length_fraction=0.25, location= "lower right")
ax.add_artist(scalebar)
plt.savefig('foo.png')When I save the image, the resolution is not anymore the resolution of the original image.
At Stack Overflow I found the hint, that one can use imsave , but that is not working with the Scalebar.
https://stackoverflow.com/questions/31544130/saving-an-imshow-like-image-while-preserving-resolution
I know that I can increase the resolution e.g. with
plt.rcParams['figure.dpi'] = 300 .
But that is not leading to the exact pixel-by-pixel image.
Any idea how to solve this?
Metadata
Metadata
Assignees
Labels
No labels