From 9d820615b7e6931a9fb11d193ae3a53e09f11801 Mon Sep 17 00:00:00 2001 From: rkansal47 Date: Thu, 18 Jul 2024 03:56:17 -0500 Subject: [PATCH] update legend font size --- src/HHbbVV/postprocessing/PlotFits.ipynb | 12 ++++++------ src/HHbbVV/postprocessing/plotting.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/HHbbVV/postprocessing/PlotFits.ipynb b/src/HHbbVV/postprocessing/PlotFits.ipynb index 0640cccf..60ef0376 100644 --- a/src/HHbbVV/postprocessing/PlotFits.ipynb +++ b/src/HHbbVV/postprocessing/PlotFits.ipynb @@ -49,7 +49,7 @@ "k2v0sig = False\n", "unblinded = True\n", "\n", - "plot_dir = MAIN_DIR / f\"plots/PostFit/24Jul15Fig8Prelim\"\n", + "plot_dir = MAIN_DIR / f\"plots/PostFit/24Jul18Fig8Prelim\"\n", "# plot_dir = (\n", "# MAIN_DIR\n", "# / \"plots/PostFit/24Apr9ggFScan/nTF1/ggf_txbb_MP_ggf_bdt_0.9965_vbf_txbb_HP_vbf_bdt_0.999_lepton_veto_Hbb\"\n", @@ -217,7 +217,7 @@ "metadata": {}, "outputs": [], "source": [ - "ylims = {\"passggf\": 40, \"passvbf\": 9, \"fail\": 6e5}\n", + "ylims = {\"passggf\": 60, \"passvbf\": 10, \"fail\": 7e5}\n", "title_label = \" Asimov Dataset\" if asimov else \"\"\n", "sig_scale_dict = {\n", " \"HHbbVV\": 100,\n", @@ -228,8 +228,8 @@ "sig_scale_dict = {key: val for key, val in sig_scale_dict.items() if key in sig_keys}\n", "\n", "for shape, shape_label in shapes.items():\n", - " if shape != \"postfit\":\n", - " continue\n", + " # if shape != \"postfit\":\n", + " # continue\n", " for region, region_label in selection_regions.items():\n", " pass_region = region.startswith(\"pass\")\n", " for i, shape_var in enumerate(shape_vars):\n", @@ -244,7 +244,7 @@ " \"ylim\": ylims[region],\n", " \"title\": f\"{shape_label} {region_label} Region{title_label}\",\n", " \"name\": f\"{plot_dir}/{shape}_{region}_{shape_var.var}.pdf\",\n", - " \"ncol\": 2 if region == \"passvbf\" else 1,\n", + " \"ncol\": 2, # if region == \"passvbf\" else 1,\n", " \"ratio_ylims\": [0, 5] if region == \"passvbf\" else [0, 2],\n", " \"cmslabel\": \"Preliminary\",\n", " }\n", @@ -341,7 +341,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "undefined.undefined.undefined" + "version": "3.9.15" }, "orig_nbformat": 4, "vscode": { diff --git a/src/HHbbVV/postprocessing/plotting.py b/src/HHbbVV/postprocessing/plotting.py index e7d9a0e9..20f57791 100644 --- a/src/HHbbVV/postprocessing/plotting.py +++ b/src/HHbbVV/postprocessing/plotting.py @@ -465,9 +465,9 @@ def ratioHistPlot( if log: ax.set_yscale("log") # two column legend - ax.legend(fontsize=16, ncol=2) + ax.legend(fontsize=20, ncol=2) else: - ax.legend(fontsize=16, ncol=ncol) + ax.legend(fontsize=20, ncol=ncol) y_lowlim = 0 if not log else 1e-5 if ylim is not None: