File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ Plot the [Fock state](https://en.wikipedia.org/wiki/Fock_state) distribution of
163163# Returns
164164- `fig`: The figure object.
165165- `ax`: The axis object.
166+ - `bp`: The barplot object.
166167
167168!!! note "Import library first"
168169 [`CairoMakie`](https://github.com/MakieOrg/Makie.jl/tree/master/CairoMakie) must first be imported before using this function.
@@ -207,14 +208,14 @@ function _plot_fock_distribution(
207208 lyt = GridLayout (location)
208209 ax = Axis (lyt[1 , 1 ])
209210
210- barplot! (ax, xvec, real (diag (ρ)); kwargs... )
211+ bp = barplot! (ax, xvec, real (diag (ρ)); kwargs... )
211212
212213 ax. xticks = (xvec, fock_numbers)
213214 ax. xlabel = " Fock number"
214215 ax. ylabel = " Occupation probability"
215216 unit_y_range && ylims! (ax, 0 , 1 )
216217
217- return fig, ax
218+ return fig, ax, bp
218219end
219220
220221raw """
You can’t perform that action at this time.
0 commit comments