Skip to content
Snippets Groups Projects
Commit b7e3054d authored by Cedric Verstege's avatar Cedric Verstege
Browse files

Make use of new tocker

parent 5e671a35
Branches
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ from analysis.framework.quantities import QUANTITIES, ybys_bins
from analysis.framework.tasks import AnalysisTask, ExcaliburConfig
from analysis.framework.utils import DY_Sets
from analysis.tasks.PostProcessing import MergeUncertainties
from analysis.tools.plotting.axes_ticker import set_ticklabels
from law.contrib.matplotlib import MatplotlibFormatter
from luigi.util import inherits
......@@ -118,6 +119,7 @@ class PlotUncertainties(AnalysisTask):
)
ax.set_ylabel("Relative uncertainty")
ax.set_xlabel(QUANTITIES["zpt"]["label"])
set_ticklabels(ax)
ax.legend(ncol=2)
fig.tight_layout()
MatplotlibFormatter.dump(self.output().targets[ybys], fig)
......@@ -10,6 +10,7 @@ from analysis.framework.tasks import AnalysisTask, ExcaliburConfig
from analysis.framework.utils import DY_Sets
from analysis.tasks.PostProcessing import MergeUncertainties
from analysis.tasks.Theory import TheoryPrediction
from analysis.tools.plotting.axes_ticker import set_ticklabels
from analysis.tools.plotting.CustomLegend import custom_ybys_legend
from law.contrib.matplotlib import MatplotlibFormatter
from luigi.util import inherits
......@@ -135,6 +136,7 @@ class StaggerPlot(AnalysisTask):
ax.set_ylim(low, 10 ** (np.log10(high) * 1.15))
ax.set_xlabel(QUANTITIES["zpt"]["label"])
ax.set_ylabel(QUANTITIES["zpt"]["xs_label"])
set_ticklabels(ax)
fig.tight_layout()
self.output().parent.touch()
MatplotlibFormatter.dump(self.output(), fig)
......@@ -10,6 +10,7 @@ from analysis.framework.tasks import AnalysisTask, ExcaliburConfig
from analysis.framework.utils import DY_Sets
from analysis.tasks.PostProcessing import MergeUncertainties
from analysis.tasks.Theory import TheoryPrediction
from analysis.tools.plotting.axes_ticker import set_ticklabels
from analysis.tools.plotting.CustomLegend import custom_ybys_legend
from law.contrib.matplotlib import MatplotlibFormatter
from luigi.util import inherits
......@@ -262,6 +263,7 @@ class TheoryDataComparison(AnalysisTask):
order=self.order, pdf=self.pdfs[0]
)
)
set_ticklabels(ax_single)
fig_single.tight_layout()
MatplotlibFormatter.dump(self.output().targets[ybys_bin], fig_single)
# only for summary plot from now on
......@@ -338,5 +340,6 @@ class TheoryDataComparison(AnalysisTask):
order=self.order, pdf=self.pdfs[0]
)
)
set_ticklabels(ax)
fig.tight_layout()
MatplotlibFormatter.dump(self.output().targets["summary"], fig)
......@@ -10,6 +10,7 @@ import law
import luigi
import mplhep as hep
from analysis.framework.quantities import QUANTITIES, ybys_bins
from analysis.tools.plotting.axes_ticker import set_ticklabels
from analysis.tools.plotting.legend_helpers import merge_legend_handles_labels
from analysis.tools.plotting.styles import colormap_5_no_grey
from law.contrib.matplotlib import MatplotlibFormatter
......@@ -234,6 +235,7 @@ class NPCorrections(law.Task):
fontproperties="Tex Gyre Heros",
transform=ax.transAxes,
)
set_ticklabels(ax)
fig.tight_layout()
self.output()["plots"].dir.touch()
MatplotlibFormatter.dump(self.output()["plots"][ybys], fig)
......
......@@ -8,6 +8,7 @@ import luigi
import mplhep as hep
from analysis.framework.quantities import QUANTITIES, ybys_bins
from analysis.tasks.Theory import GridEval, NPCorrections
from analysis.tools.plotting.axes_ticker import set_ticklabels
from analysis.tools.plotting.legend_helpers import merge_legend_handles_labels
from analysis.tools.plotting.styles import theory_styles
from law.contrib.matplotlib import MatplotlibFormatter
......@@ -171,6 +172,7 @@ class PlotTheoryComparison(law.Task):
fontproperties="Tex Gyre Heros",
transform=ax.transAxes,
)
set_ticklabels(ax)
fig.tight_layout()
self.output().dir.touch()
MatplotlibFormatter.dump(self.output()[ybys], fig)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment