Skip to content

Commit

Permalink
Added doc for uncertainty ribbon plot option (JuliaPhysics#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
kapple19 committed Jan 27, 2024
1 parent fc888a4 commit 818b055
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,3 +607,15 @@ julia> plot(sin, [x ± 0.1 for x in 1:0.2:10], size = (1200, 800))
```

![image](plot-example.png)

Displaying errors as a ribbon plot is also supported, but only for the y-axis uncertainty (a limitation inherited from `Plots.jl` due to how `ribbon` implements a `fillrange`).

```julia
julia> x = range(0, 6, 301)

julia> y = measurement.(cospi.(x), (5 .+ 2sinpi.(5x))/10)

julia> plot(x, y, uncertainty_plot = :ribbon, color = :red)
```

![image](plot-example-ribbon.png)
Binary file added docs/src/plot-example-ribbon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 818b055

Please sign in to comment.