Commit 4b7acb70 authored by ulrich_y's avatar ulrich_y
Browse files

Added routine for three panel plots

parent 66a0d457
......@@ -213,6 +213,51 @@ def twopanel(labelx="",
return fig, axs
def threepanel(labelx="",
upleft=[], labupleft="", colupleft=defcol,
middleleft=[], labmiddleleft="", colmiddleleft=defcol,
downleft=[], labdownleft="", coldownleft=defcol):
if type(upleft) == np.ndarray:
upleft = [upleft]
if type(middleleft) == np.ndarray:
middleleft = [middleleft]
if type(downleft) == np.ndarray:
downleft = [downleft]
fig, axs = plt.subplots(
3, sharex=True, gridspec_kw={'hspace': 0}
)
axs = list(axs)
if type(labelx) == str:
axs[2].set_xlabel(labelx)
else:
axs[2].set_xlabel(**labelx)
if type(labupleft) == str:
axs[0].set_ylabel(labupleft)
else:
axs[0].set_ylabel(**labupleft)
for i, c in zip(upleft, colupleft):
errorband(i, ax=axs[0], col=c)
if type(labmiddleleft) == str:
axs[1].set_ylabel(labmiddleleft)
else:
axs[1].set_ylabel(**labmiddleleft)
for i, c in zip(middleleft, colmiddleleft):
errorband(i, ax=axs[1], col=c)
if type(labdownleft) == str:
axs[2].set_ylabel(labdownleft)
else:
axs[2].set_ylabel(**labdownleft)
for i, c in zip(downleft, coldownleft):
errorband(i, ax=axs[2], col=c)
return fig, axs
def kplot(sigma, labelx='$x_e$', labelsigma=None,
labelknlo="$K^{(1)}$", labelknnlo="$K^{(2)}$",
legend={'lo': r'$\rm LO$', 'nlo': r'$\rm NLO$', 'nnlo': r'$\rm NNLO$'},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment