-
-
Notifications
You must be signed in to change notification settings - Fork 344
Support for Unitful.Gain in axis recipes? #4801
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
Comments
It seems like that would be pretty simple to add along with some function overloads on our end. I'm not a Unitful expert, but if you'd like to have a go at this I'd be happy to support from our end. |
Maybe just needs to be added to
|
Thanks all for taking a look and for the quick feedback! oof, I was hoping that we could just update For example, it seems that I am running into PainterQubits/Unitful.jl#463 when Makie.jl/src/dim-converts/unitful-integration.jl Lines 93 to 94 in 2fe1ac4
i.e., it seems that things like julia> using Unitful
julia> (1u"dB" + 5u"dB") / 2.0
ERROR: no automatic promotion of Gain{Unitful.LogInfo{:Decibel, 10, 10}, :?, Int64} and Float64. are not currently supported in Unitful Additionally, it seems there are places where Makie tries to convert things to Makie.jl/src/dim-converts/unitful-integration.jl Lines 158 to 161 in 2fe1ac4
which doesn't play nicely with Is this a blocker for trying to support these kinds of logarithmic objects in Makie? |
At any rate, here's a suuuper rough first attempt. Will continue the convo over there if this still seems like a worthwhile pursuit 👍🏾 |
Feature description
Would it be possible to add
Unitful.Gain
to the list of supported units in unitful-integrations.jl?We're investigating transitioning some of our JuliaAstro plotting infra over to Makie.jl, but are currently hitting this issue when trying to work with units that are not
Quantities
, which comes up when dealing with magnitudes in UnitfulAstro or logarithmic units in base Unitful for example:At any rate, #3226 has been a game changer for working with Unitful.jl, thank you for adding this support!
For plot types, please add an image of how it should look like
The text was updated successfully, but these errors were encountered: