Skip to content

Commit

Permalink
plot_enbpi so nice
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Morzadec committed Jun 13, 2022
1 parent c3234fa commit 3f779ec
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions examples/regression/2-advanced-analysis/plot_timeseries_enbpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

from typing import cast

import matplotlib
from matplotlib import pylab as plt
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -190,16 +189,13 @@

# Plot estimated prediction intervals on test set
fig, axs = plt.subplots(
nrows=2, ncols=1, figsize=(30, 25), sharex="col"
nrows=2, ncols=1, figsize=(15, 12), sharex="col"
)
font = {"weight": "bold", "size": 22}
matplotlib.rc("font", **font)


for i, (ax, w, result) in enumerate(
zip(axs, ["EnbPI, without partial_fit", "EnbPI with partial_fit"], results)
):
ax.set_ylabel("Hourly demand (GW)")
ax.set_ylabel("Hourly demand (GW)", fontsize=20)
ax.plot(demand_test.Demand, lw=2, label="Test data", c="C1")

ax.plot(
Expand All @@ -223,7 +219,12 @@

ax.set_title(
w + "\n"
f"Coverage:{result['coverage']:.3f} Width:{result['width']:.3f}"
f"Coverage:{result['coverage']:.3f} Width:{result['width']:.3f}",
fontweight="bold",
size=20
)
axs[0].legend()
plt.xticks(size=15, rotation=45)
plt.yticks(size=15)

axs[0].legend(prop={'size': 22})
plt.show()

0 comments on commit 3f779ec

Please sign in to comment.