Skip to content

Commit a069521

Browse files
committed
add CairoMakie extension doc page
1 parent 5b8da61 commit a069521

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const PAGES = [
5959
"Two-time correlation functions" => "users_guide/two_time_corr_func.md",
6060
"Extensions" => [
6161
"users_guide/extensions/cuda.md",
62+
"users_guide/extensions/cairomakie.md",
6263
],
6364
],
6465
"Tutorials" => [
@@ -82,7 +83,7 @@ makedocs(;
8283
modules = [
8384
QuantumToolbox,
8485
Base.get_extension(QuantumToolbox, :QuantumToolboxCairoMakieExt),
85-
],
86+
],
8687
authors = "Alberto Mercurio and Yi-Te Huang",
8788
repo = Remotes.GitHub("qutip", "QuantumToolbox.jl"),
8889
sitename = "QuantumToolbox.jl",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# [Extension for CairoMakie.jl](@id doc:CairoMakie)
2+
3+
## Introduction
4+
5+
This is an extension to support visualization (plotting functions) using [`CairoMakie.jl`](https://github.com/MakieOrg/Makie.jl/tree/master/CairoMakie) library.
6+
7+
This extension will be automatically loaded if user imports both `QuantumToolbox.jl` and [`CairoMakie.jl`](https://github.com/MakieOrg/Makie.jl/tree/master/CairoMakie):
8+
9+
```julia
10+
using QuantumToolbox
11+
using CairoMakie
12+
```
13+
14+
To plot with [`CairoMakie.jl`](https://github.com/MakieOrg/Makie.jl/tree/master/CairoMakie) library, specify the keyword argument `library = Val(:CairoMakie)` for the plotting functions. The supported plotting functions are listed as follows:
15+
16+
!!! warning "Beware of type-stability!"
17+
If you want to keep type stability, it is recommended to use `Val(:CairoMakie)` instead of `:CairoMakie`. See [this link](https://docs.julialang.org/en/v1/manual/performance-tips/#man-performance-value-type) and the [related Section](@ref doc:Type-Stability) about type stability for more details.
18+
19+
| **Plotting Function** | **Description** |
20+
|:----------------------|:----------------|
21+
| [`plot_wigner`](@ref) | Wigner function |

0 commit comments

Comments
 (0)