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
Thanks for this great package. Currently it supports Unitful xlim very nicely, but Unitful xticks leads to an error. This caught me because I often use xticks=[x[1],x[end]] to streamline plots and it fails if x has units. My workaround is xticks=[x[1],x[end]] / oneunit(x[1]) which is fine for now but I wanted to report the issue because it seems like it would be nicely consistent to support having the ticks be specified in the same units as the corresponding axis.
using Unitful, UnitfulRecipes, Plots
x =1u"mm"* (1:30)
scatter(x, 2x) # works as expectedscatter(x, 2x; xlim=(10u"mm", 20u"mm")) # works as expected!scatter(x, 2x; xlim=(1u"cm", 2u"cm")) # works as expected - yay!scatter(x, 2x; xticks=[1u"cm", 2u"cm"]) # error message
ERROR: DimensionError:0.13 and 1.0 cm are not dimensionally compatible.
The text was updated successfully, but these errors were encountered:
Thanks for reporting. Would be great to support this. Should also be not too hard to implement, we just have to strip the unit from the ticks, just like we to for e.g. the lims:
Thanks for this great package. Currently it supports Unitful
xlim
very nicely, but Unitfulxticks
leads to an error. This caught me because I often usexticks=[x[1],x[end]]
to streamline plots and it fails if x has units. My workaround isxticks=[x[1],x[end]] / oneunit(x[1])
which is fine for now but I wanted to report the issue because it seems like it would be nicely consistent to support having the ticks be specified in the same units as the corresponding axis.The text was updated successfully, but these errors were encountered: