UnitfulColors.jl

I was digging through my ~/.julia/dev/ folder and found this package which I worked on about a year ago.

https://github.com/gustaphe/UnitfulColors.jl

using UnitfulColors
using Unitful, Plots, UnitfulRecipes, Latexify, UnitfulLatexify
λ = (500:700)u"nm";
I = 1.3u"W/m^2"*exp.(-(λ .- 610u"nm").^2 ./ (50u"nm")^2);
plot(λ, I; st=:scatter, unitformat=latexify, color=colormatch.(λ), label=nothing, xguide="\\lambda", yguide="I", fontfamily="Computer Modern")

image

It also does light frequency and temperature (two different ways). I think it’s cute.

Do you see a use of this? Should I register it, or can you think of another package where it would fit?

12 Likes

Please, do it. A few days ago I was looking for a package like this one.

1 Like

There we go, ]add UnitfulColors.

5 Likes