hepi.plot

Module Contents

Functions

title(i: hepi.input.Input, axe=None, scenario='', diff_L_R=None, extra='', cms_energy=True, pdf_info=True, id=False, **kwargs)

Sets the title on axis axe.

energy_plot(dict_list, y, yscale=1.0, xaxis='E [GeV]', yaxis='$\\sigma$ [pb]', label=None, **kwargs)

Plot energy on the x-axis.

mass_plot(dict_list, y, part, logy=True, yaxis='$\\sigma$ [pb]', yscale=1.0, label=None, **kwargs)

mass_vplot(dict_list, y, part, logy=True, yaxis='$\\sigma$ [pb]', yscale=1.0, label=None, mask=None, **kwargs)

get_mass(l: dict, iid: int)

Get the mass of particle with id iid out of the list in the "slha" element in the dict.

plot(dict_list, x, y, label=None, xaxis='E [GeV]', yaxis='$\\sigma$ [pb]', ratio=False, K=False, K_plus_1=False, logy=True, yscale=1.0, mask=None, **kwargs) → None

Creates a plot based on the entries x`and `y in dict_list.

index_open(var, idx)

slha_data(li, index_list)

slha_plot(li, x, y, **kwargs)

vplot(x, y, label=None, xaxis='E [GeV]', yaxis='$\\sigma$ [pb]', logy=True, yscale=1.0, interpolate=True, plot_data=True, data_color=None, mask=-1, fill=False, data_fmt='.', fmt='-', print_area=False, sort=True, **kwargs)

Creates a plot based on the values in x`and `y.

mass_mapplot(dict_list, part1, part2, z, logz=True, zaxis='$\\sigma$ [pb]', zscale=1.0, label=None)

mapplot(dict_list, x, y, z, xaxis=None, yaxis=None, zaxis=None, **kwargs)

Examples

scatterplot(dict_list, x, y, z, xaxis=None, yaxis=None, zaxis=None, **kwargs)

Scatter map 2d.

err_plt(axes, x, y, label=None, error=False)

scale_plot(dict_list, vl, seven_point_band=False, cont=False, error=True, li=None, plehn_color=False, yscale=1.0, unit='pb', yaxis=None, **kwargs)

Creates a scale variance plot with 5 panels (xline).

central_scale_plot(dict_list, vl, cont=False, error=True, yscale=1.0, unit='pb', yaxis=None)

Creates a scale variance plot with 3 panels (ystacked).

init_double_plot(figsize=(6, 8), sharex=True, sharey=False, gridspec_kw={'height_ratios': [3, 1]})

Initialze subplot for Ratio/K plots with another figure below.

Attributes

map_vplot

scatter_vplot

fig

axs

lines

labels

hepi.plot.title(i: hepi.input.Input, axe=None, scenario='', diff_L_R=None, extra='', cms_energy=True, pdf_info=True, id=False, **kwargs)[source]

Sets the title on axis axe.

hepi.plot.energy_plot(dict_list, y, yscale=1.0, xaxis='E [GeV]', yaxis='$\\sigma$ [pb]', label=None, **kwargs)[source]

Plot energy on the x-axis.

hepi.plot.mass_plot(dict_list, y, part, logy=True, yaxis='$\\sigma$ [pb]', yscale=1.0, label=None, **kwargs)[source]
hepi.plot.mass_vplot(dict_list, y, part, logy=True, yaxis='$\\sigma$ [pb]', yscale=1.0, label=None, mask=None, **kwargs)[source]
hepi.plot.get_mass(l: dict, iid: int)[source]

Get the mass of particle with id iid out of the list in the “slha” element in the dict.

Returns

list of float : masses of particles in each element of the dict list.

hepi.plot.plot(dict_list, x, y, label=None, xaxis='E [GeV]', yaxis='$\\sigma$ [pb]', ratio=False, K=False, K_plus_1=False, logy=True, yscale=1.0, mask=None, **kwargs) None[source]

Creates a plot based on the entries x`and `y in dict_list.

Examples

>>> import urllib.request
>>> import hepi
>>> dl = hepi.load(urllib.request.urlopen(
... "https://raw.githubusercontent.com/fuenfundachtzig/xsec/master/json/pp13_hino_NLO%2BNLL.json"
... ))
>>> hepi.plot(dl,"N1","NLO_PLUS_NLL",xaxis="$m_{\\tilde{\\chi}_1^0}$ [GeV]")

(Source code, png, hires.png, pdf)

../../../_images/index-11.png
hepi.plot.index_open(var, idx)[source]
hepi.plot.slha_data(li, index_list)[source]
hepi.plot.slha_plot(li, x, y, **kwargs)[source]
hepi.plot.vplot(x, y, label=None, xaxis='E [GeV]', yaxis='$\\sigma$ [pb]', logy=True, yscale=1.0, interpolate=True, plot_data=True, data_color=None, mask=- 1, fill=False, data_fmt='.', fmt='-', print_area=False, sort=True, **kwargs)[source]

Creates a plot based on the values in x`and `y.

hepi.plot.mass_mapplot(dict_list, part1, part2, z, logz=True, zaxis='$\\sigma$ [pb]', zscale=1.0, label=None)[source]
hepi.plot.mapplot(dict_list, x, y, z, xaxis=None, yaxis=None, zaxis=None, **kwargs)[source]

Examples

>>> import urllib.request
>>> import hepi
>>> dl = hepi.load(urllib.request.urlopen(
... "https://raw.githubusercontent.com/APN-Pucky/xsec/master/json/pp13_SGmodel_GGxsec_NLO%2BNLL.json"
... ),dimensions=2)
>>> hepi.mapplot(dl,"gl","sq","NLO_PLUS_NLL",xaxis="$m_{\\tilde{g}}$ [GeV]",yaxis="$m_{\\tilde{q}}$ [GeV]" , zaxis="$\\sigma_{\\mathrm{NLO+NLL}}$ [pb]")

(Source code, png, hires.png, pdf)

../../../_images/index-21.png
hepi.plot.map_vplot[source]
hepi.plot.scatter_vplot[source]
hepi.plot.scatterplot(dict_list, x, y, z, xaxis=None, yaxis=None, zaxis=None, **kwargs)[source]

Scatter map 2d. Central color is the central value, while the inner and outer ring are lower and upper bounds of the uncertainty interval.

Examples

>>> import urllib.request
>>> import hepi
>>> dl = hepi.load(urllib.request.urlopen(
... "https://raw.githubusercontent.com/APN-Pucky/xsec/master/json/pp13_hinosplit_N2N1_NLO%2BNLL.json"
... ),dimensions=2)
>>> hepi.scatterplot(dl,"N1","N2","NLO_PLUS_NLL",xaxis="$m_{\\tilde{\\chi}_1^0}$ [GeV]",yaxis="$m_{\\tilde{\\chi}_2^0}$ [GeV]" , zaxis="$\\sigma_{\\mathrm{NLO+NLL}}$ [pb]")

(Source code, png, hires.png, pdf)

../../../_images/index-31.png
hepi.plot.fig[source]
hepi.plot.axs[source]
hepi.plot.lines = [][source]
hepi.plot.labels = [][source]
hepi.plot.err_plt(axes, x, y, label=None, error=False)[source]
hepi.plot.scale_plot(dict_list, vl, seven_point_band=False, cont=False, error=True, li=None, plehn_color=False, yscale=1.0, unit='pb', yaxis=None, **kwargs)[source]

Creates a scale variance plot with 5 panels (xline).

hepi.plot.central_scale_plot(dict_list, vl, cont=False, error=True, yscale=1.0, unit='pb', yaxis=None)[source]

Creates a scale variance plot with 3 panels (ystacked).

hepi.plot.init_double_plot(figsize=(6, 8), sharex=True, sharey=False, gridspec_kw={'height_ratios': [3, 1]})[source]

Initialze subplot for Ratio/K plots with another figure below.