Mercurial > repos > public > sbplib_julia
changeset 1631:ee3fc2d83c73 feature/grids/plotting
Write out available plot methods in docs
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 25 Jun 2024 08:38:08 +0200 |
| parents | 27d270c9cb89 |
| children | a154dd5f453d |
| files | docs/src/grids_and_grid_functions.md |
| diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r 27d270c9cb89 -r ee3fc2d83c73 docs/src/grids_and_grid_functions.md --- a/docs/src/grids_and_grid_functions.md Mon Jun 24 21:36:17 2024 +0200 +++ b/docs/src/grids_and_grid_functions.md Tue Jun 25 08:38:08 2024 +0200 @@ -7,6 +7,24 @@ ## Interface for grids All grids are expected to work as a grid function for the coordinate function, and thus implements Julia's Indexing- and Iteration-interfaces. Notably they are *not* abstract arrays because that inteface is too restrictive for the types of grids we wish to implement. + +## Plotting +Plotting of grids and grid functions is supported through a package extension with Makie.jl. + +For grids we have: +* `plot(::Grid{<:Any,2})` (same as `lines`) +* `lines(::Grid{<:Any,2})` +* `scatter(::Grid{<:Any,2})` + +For 1D grid functions we have: +* `plot(::Grid{<:Any,1}, ::AbstractVector)` (same as `lines`) +* `lines(::Grid{<:Any,1}, ::AbstractVector)` +* `scatter(::Grid{<:Any,1}, ::AbstractVector)` + +For 2D grid functions we have: +* `plot(::Grid{<:Any,2}, ::AbstractArray{<:Any,2})` (constructs a 2d mesh) +* `surface(::Grid{<:Any,2}, ::AbstractArray{<:Any,2})` + ## To write about <!-- # TODO: --> * Grid functions
