Skip to content

Commit

Permalink
Merge pull request #88 from cyrraz/v1.0
Browse files Browse the repository at this point in the history
v1.0
  • Loading branch information
0ctagon authored Dec 6, 2023
2 parents 8fabeb3 + 7369042 commit d03686a
Show file tree
Hide file tree
Showing 12 changed files with 146 additions and 133 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ plothist
:target: https://badge.fury.io/py/plothist
.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. |Docs from latest| image:: https://img.shields.io/badge/docs-v0.9-blue.svg
.. |Docs from latest| image:: https://img.shields.io/badge/docs-v1.0-blue.svg
:target: https://plothist.readthedocs.io/en/latest/
.. |Docs from main| image:: https://img.shields.io/badge/docs-main-blue.svg
:target: https://plothist.readthedocs.io/en/main/
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
author = "Cyrille Praz, Tristan Fillinger"

# The short X.Y version
version = "0.9"
version = "1.0"
# The full version, including alpha/beta/rc tags
release = "0.9"
release = "1.0"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/model_ex/model_all_comparisons.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
h1_label="Data",
h2_label="Pred.",
ratio_uncertainty_type="split",
hist_1_uncertainty_type="asymmetrical",
h1_uncertainty_type="asymmetrical",
)
add_text(
f' $\mathbf{{→}}$ comparison = "{comparison}"', ax=ax_comparison, fontsize=13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
h1_label="Data",
h2_label="Pred.",
ratio_uncertainty_type="split",
hist_1_uncertainty_type="asymmetrical",
h1_uncertainty_type="asymmetrical",
)
if comparison == "pull":
# Since the uncertainties of the model are neglected, the pull label is "(Data - Pred.)/sigma_Data"
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/model_ex/model_comparisons_ratio_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
h1_label="Data",
h2_label="Pred.",
ratio_uncertainty_type=ratio_uncertainty_type,
hist_1_uncertainty_type="asymmetrical",
h1_uncertainty_type="asymmetrical",
)
add_text(
f' $\mathbf{{→}}$ comparison = "ratio", \n $\mathbf{{→}}$ ratio_uncertainty_type="{ratio_uncertainty_type}", model_uncertainty = {model_uncertainty}',
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/utility/matplotlib_vs_plothist_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
hist_0, bins, _ = ax1.hist(
df["variable_0"], bins=20, histtype="step", linewidth=1.2, label="h1"
)
hist_1 = ax1.hist(
h1 = ax1.hist(
df["variable_1"], bins=bins, histtype="step", linewidth=1.2, label="h2"
)
ax1.set_ylabel("Entries")
ax1.legend()

# Calculate the ratio of histogram values and plot in the second subplot (ax2)
ratio = hist_0 / hist_1[0] # Divide bin values of variable_0 by variable_1
ratio = hist_0 / h1[0] # Divide bin values of variable_0 by variable_1
bin_centers = 0.5 * (bins[:-1] + bins[1:]) # Calculate bin centers

# Create fake error bars for the ratio
Expand Down
2 changes: 1 addition & 1 deletion plothist/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Plot histograms in a scalable way and a beautiful style."""
__version__ = "0.9"
__version__ = "1.0"

from .plotters import (
create_comparison_figure,
Expand Down
Loading

0 comments on commit d03686a

Please sign in to comment.