Skip to content

Commit

Permalink
Fix docs (#69)
Browse files Browse the repository at this point in the history
* Fix docs
  • Loading branch information
briochemc committed Nov 2, 2021
1 parent d98de3d commit 7741be7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
26 changes: 14 additions & 12 deletions docs/lit/examples/2_Plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

2 comments on commit 7741be7

@briochemc
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/47929

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.5.3 -m "<description of version>" 7741be773eebb10b1d86c87f767e42c50e98e72b
git push origin v1.5.3

Please sign in to comment.