You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just ran into a use case that I hadn't before, and I'm wondering if there's a way to deal with it. I'm trying to get the scalebar value from a scalebar object created with length_fraction (and thus an automatically chosen value) so that I can use it in another place. Eg, in the below plot, I want to get the value of 25 or 25 m out so that I can use it. Is there a way to do this?
importmatplotlib_scalebar.scalebarasscalebarimportmatplotlib.pyplotaspltfig, ax=plt.subplots()
ax.plot(np.arange(100))
scale_bar=mpu.add_traj_scalebar(ax, dx=1, length_fraction=0.3, location="lower right")
# How can I do this?# scale_bar_value = scale_bar.
The text was updated successfully, but these errors were encountered:
I'd also like to do that, because I'm drawing arrows onto images with something like the code below.
The arrows are drawn onto images with highly different size, but all with a scale bar.
It would be cool if I could use the length_fraction chosen by matplotlib-scalebar to scale the horizontal and vertical displacement of the drawn arrow, making them all approximately the same length, independent of the wildly varying image size...
First, thanks for the great package!
I just ran into a use case that I hadn't before, and I'm wondering if there's a way to deal with it. I'm trying to get the scalebar value from a scalebar object created with length_fraction (and thus an automatically chosen value) so that I can use it in another place. Eg, in the below plot, I want to get the value of
25
or25 m
out so that I can use it. Is there a way to do this?The text was updated successfully, but these errors were encountered: