diff --git a/Project.toml b/Project.toml index a5c181b..672f61e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "UnitfulRecipes" uuid = "42071c24-d89e-48dd-8a24-8a12d9b8861f" authors = ["Benoit Pasquier", "Jan Weidner"] -version = "1.5.2" +version = "1.5.3" [deps] RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" diff --git a/docs/lit/examples/2_Plots.jl b/docs/lit/examples/2_Plots.jl index 121a4de..c7e599e 100644 --- a/docs/lit/examples/2_Plots.jl +++ b/docs/lit/examples/2_Plots.jl @@ -75,35 +75,37 @@ n = length(styles) y = cumsum(randn(20, n), dims=1) * u"km" plot(y, line=(5, styles), label=map(string, styles), legendtitle="linestyle") - # ## Ribbons -# + # Ribbons can be added to lines via the `ribbon` keyword; # you can pass: -#* a single Array (for symmetric ribbons) -#* a Function -#* or a number. -#Currently unsupported: a tuple of arrays (upper and lower bounds) +# * an array (for symmetric ribbons) +# * a function +# * a number +# (Tuple of arrays for upper and lower bounds are currently unsupported.) # + x = y = (0:10)*u"m" plot( - #plot((0:10)*u"m"; ribbon = (LinRange(0, 2, 11)*u"m", LinRange(0, 1, 11)*u"m")), plot(x,y; ribbon = (0:0.5:5)*u"m", label = "Vector"), plot(x,y; ribbon = sqrt, label = "Function"), - plot(x,y; ribbon = 1u"m", label = "Constant"), link=:all + plot(x,y; ribbon = 1u"m", label = "Constant"), + link=:all ) # ## Fillrange -# the fillrange keyword defines a second line and fills between it and the y data. -# Note: ribbons are fillranges + +# The fillrange keyword defines a second line and fills between it and the y data. +# Note: ribbons are fillranges. + x = y = (0:10)*u"m" plot( plot(x,y; fillrange = (0:0.5:5)*u"m", label = "Vector"), plot(x,y; fillrange = sin, label = "Function"), - plot(x,y; fillrange = 0u"m", label = "Constant"), link = :all + plot(x,y; fillrange = 0u"m", label = "Constant"), + link = :all ) - # ## Marker types markers = intersect(Plots._shape_keys, Plots.supported_markers())