jw3126 / UnitfulRecipes.jl

Plots.jl recipes for Unitful.jl arrays
MIT License
37 stars 10 forks source link

Recipe request for Plots with ribbon keyword #65

Closed rafael-guerra-www closed 3 years ago

rafael-guerra-www commented 3 years ago

It would be useful to add a recipe for plotting ribbons. They provide very nice way of displaying propagation errors during simulations using MCM.jl, for instance.

using Unitful, UnitfulRecipes, Plots
x = 1:10
plot(x, -x.^2 .* 1u"m", ribbon=5)       # OK
plot(x, -x.^2 .* 1u"m", ribbon=1u"m")   # ERROR
briochemc commented 3 years ago

I agree this would be nice to have.

I think ribbon is always along the y axis (c.f. my xribbon request), so I submitted a PR that should provide a fix dealing with just the y axis... (Waiting on CI and co.)