from pyhs3.data import BinnedData
from pyhs3.axes import BinnedAxis

data = BinnedData(
    name="custom",
    type="binned",
    contents=[12.0, 18.0, 15.0, 22.0, 19.0, 14.0],
    axes=[BinnedAxis(name="x", min=0.0, max=6.0, nbins=6)]
)

h = data.to_hist()

# Customize the plot
h.plot(
    histtype="fill",
    alpha=0.5,
    color="steelblue",
    edgecolor="darkblue",
    linewidth=2,
    label="Custom Style"
)

plt.xlabel("Variable", fontsize=14, fontweight="bold")
plt.ylabel("Counts", fontsize=14, fontweight="bold")
plt.title("Customized Histogram", fontsize=16)
plt.grid(True, alpha=0.3, linestyle="--")
plt.legend(fontsize=12)
plt.show()