Skip to content

Commit

Permalink
Nits to make validation plots look nice
Browse files Browse the repository at this point in the history
  • Loading branch information
jzuhone committed Mar 10, 2024
1 parent da2d3ef commit ffc3f88
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions acis_thermal_check/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ def make_validation_plots(self, tlm, model_spec, outdir):
fmt=".c",
zorder=10,
)
ax.set_title(msid.upper() + " validation", loc="left", pad=10)
ax.set_title(msid.upper() + " validation", loc="left", pad=10, fontsize=15)
ax.set_xlabel("Date")
ax.set_ylabel(labels[msid])
ax.grid()
Expand All @@ -938,6 +938,13 @@ def make_validation_plots(self, tlm, model_spec, outdir):
# see all of the limits.
if self.msid == msid:
ymin, ymax = ax.get_ylim()
ax.axhline(
self.limits["yellow_hi"]["value"],
linestyle="-",
linewidth=2,
zorder=2,
color=self.limits["yellow_hi"]["color"],
)
if msid == "fptemp":
upper_limit.plot(
fig_ax=(fig, ax),
Expand All @@ -946,23 +953,14 @@ def make_validation_plots(self, tlm, model_spec, outdir):
use_colors=True,
show_changes=False,
)
ymax = max(self.limits["acis_hot_b"]["value"] + 1, ymax)
else:
ax.axhline(
self.limits["yellow_hi"]["value"],
linestyle="-",
linewidth=2,
zorder=2,
color=self.limits["yellow_hi"]["color"],
)
ax.axhline(
self.limits["planning_hi"]["value"],
linestyle="-",
linewidth=2,
zorder=2,
color=self.limits["planning_hi"]["color"],
)
ymax = max(self.limits["yellow_hi"]["value"] + 1, ymax)
if "planning_lo" in self.limits:
ax.axhline(
self.limits["yellow_lo"]["value"],
Expand All @@ -979,6 +977,7 @@ def make_validation_plots(self, tlm, model_spec, outdir):
color=self.limits["planning_lo"]["color"],
)
ymin = min(self.limits["yellow_lo"]["value"] - 1, ymin)
ymax = max(self.limits["yellow_hi"]["value"] + 1, ymax)
ax.set_ylim(ymin, ymax)
ax.set_xlim(xmin, xmax)

Expand Down Expand Up @@ -1152,14 +1151,15 @@ def make_validation_plots(self, tlm, model_spec, outdir):
fig_id += 1

if self.msid == "fptemp":
anchor = (0.295, 0.99)
anchor = (0.21, 0.99)
else:
anchor = (0.4, 0.99)
plots[self.msid]["lines"]["ax"].legend(
bbox_to_anchor=anchor,
loc="lower left",
ncol=3,
fontsize=14,
ncol=5 if self.msid == "fptemp" else 3,
fontsize=12 if self.msid == "fptemp" else 14,
columnspacing=1.5,
)

# Now write all of the plots after possible
Expand Down

0 comments on commit ffc3f88

Please sign in to comment.