\[\newcommand{\vect}[1]{\vec{\boldsymbol{#1}}}
\newcommand{\uvect}[1]{\hat{\boldsymbol{#1}}}
\newcommand{\abs}[1]{\lvert#1\rvert}
\newcommand{\Abs}[1]{\left\lvert#1\right\rvert}
\newcommand{\norm}[1]{\lVert#1\rVert}
\newcommand{\I}{\mathrm{i}}
\newcommand{\ket}[1]{\left|#1\right\rangle}
\newcommand{\bra}[1]{\left\langle#1\right|}
\newcommand{\braket}[1]{\langle#1\rangle}
\newcommand{\Braket}[1]{\left\langle#1\right\rangle}
\newcommand{\op}[1]{\hat{#1}}
\newcommand{\mat}[1]{\underline{\boldsymbol{#1}}}
\providecommand{\d}{\mathrm{d}}
\renewcommand{\d}{\mathrm{d}}
\newcommand{\D}[1]{\mathcal{D}[#1]\;}
\newcommand{\pdiff}[3][]{\frac{\partial^{#1}#2}{\partial{#3}^{#1}}}
\newcommand{\diff}[3][]{\frac{\d^{#1} #2}{\d{#3}^{#1}}}
\newcommand{\ddiff}[3][]{\frac{\delta^{#1} #2}{\delta{#3}^{#1}}}
\newcommand{\floor}[1]{\left\lfloor#1\right\rfloor}
\newcommand{\ceil}[1]{\left\lceil#1\right\rceil}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\erfi}{erfi}
\DeclareMathOperator{\sech}{sech}
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\sn}{sn}
\DeclareMathOperator{\cn}{cn}
\DeclareMathOperator{\dn}{dn}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\order}{O}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\span}{span}
\newcommand{\mylabel}[1]{\label{#1}\tag{#1}}
\newcommand{\degree}{\circ}
% These replace SIunitx. They should not be defined in LaTeX.
\newcommand{\SI}[2]{#1\;\mathrm{#2}}
\newcommand{\si}[1]{\mathrm{#1}}
\let\qty\SI
\let\unit\si
\newcommand{\squared}{{^{2}}}
\newcommand{\cubed}{{^{3}}}
\newcommand{\per}{/}
\newcommand{\tera}{T}
\newcommand{\giga}{G}
\newcommand{\mega}{M}
\newcommand{\kilo}{k}
\newcommand{\milli}{m}
\newcommand{\micro}{μ}
\newcommand{\nano}{n}
\newcommand{\kilogram}{\text{kg}\,}
\newcommand{\meter}{\text{m}\,}
\newcommand{\second}{\text{s}\,}
\newcommand{\ampere}{\text{A}\,}
\newcommand{\kelvin}{\text{K}\,}
\newcommand{\mol}{\text{mol}\,}
\newcommand{\candela}{\text{cd}\,}
\newcommand{\newton}{\text{N}\,}
\newcommand{\hertz}{\text{Hz}\,}
\newcommand{\pascal}{\text{Pa}\,}
\newcommand{\volt}{\text{V}\,}
\newcommand{\watt}{\text{W}\,}
\newcommand{\joule}{\text{J}\,}
\newcommand{\henry}{\text{H}\,}
\newcommand{\farad}{\text{F}\,}
\newcommand{\coulomb}{\text{C}\,}
\newcommand{\ohm}{\Omega\,}
\newcommand{\weber}{\text{Wb}\,}
\newcommand{\tesla}{\text{T}\,}
\newcommand{\degree}{\text{deg}\,}
\]
Back to top
gpe.plot_utils
Module Contents
hv [source]
class MPLFigure ( data , ** kwargs ) [source]
Bases: hv
Wraps a matplotlib figure.
class MPLGrid ( fig = None , subplot_spec = None , ax = None , direction = 'down' , right = False , scale = True , space = None , share = False , size = 1 , ** kw ) [source]
Object for stacking plots.
After initializing the object, call next() to get the next axis. By
default axes will stack vertically.
down
If True, then stack elements vertically growing down. Otherwise stack
elements horizontally growing right.
Type:
bool
ratios [source]
List of relative size of each entry.
Type:
[float ]
axes [source]
List of axes of nested grid objects.
Type:
[Axes, MPLGrid ]
direction [source]
Direction of growth.
Type:
[‘down’, ‘right’]
right [source]
Specify if y axis labels should be on the right or left.
Type:
bool
scale [source]
If False, then when a parent MPLGrid is being adjusted, the ratio for
this grid component will be the sum of the ratios rather than the
specified parent ratio. If True, then all the components will be
scaled to fit into the parents ratio.
Type:
bool
share [source]
If True , then axes in the growth direction are shared, and tick labels
etc. are suppressed except for the final one.
Type:
bool
space [source]
Space (hspace or wspace) between grids. If this is None, then the space
is set of zero if the axes are shared and 0.1 otherwise.
Type:
float , None
size [source]
Default size for new elements.
Type:
float
fig = None [source]
subplot_spec = None [source]
shape = [0, 0] [source]
kw [source]
right = False [source]
share = False [source]
direction = 'down' [source]
_ratios = [] [source]
axes = [] [source]
space = None [source]
scale = True [source]
size = 1 [source]
__getitem__ ( key ) [source]
adjust ( ) [source]
Adjust the positions of all the axes.
__repr__ ( ) [source]
property ratios [source]
Return the size ratios for the various axes.
If the sub-axis is an MPLGrid instance with scale == False, then the
ratio is the sum of the sub-grid’s ratios.
property _gridspec [source]
next ( size = None ) [source]
Return the next axis.
empty ( size = None ) [source]
Return the next axis but hide it so it acts as a space.
grid ( size = None , ** kw ) [source]
Insert a sub-grid and return it.
rescale ( tight = None , scalex = True , scaley = True , force = False ) [source]