Last active
May 21, 2021 12:55
-
-
Save tommylees112/0dd706bf1ec016b39ac853e790d7900b to your computer and use it in GitHub Desktop.
Plotting the predictions from LSTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xarray as xr | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
from pathlib import Path | |
data_dir = Path("C:\\Users\\anton\\Downloads") | |
preds = xr.open_dataset(data_dir / "preds.nc") | |
f, ax = plt.subplots(figsize=(12, 4)) | |
preds.isel(pixel=0).sel(time="2007").obs.plot(ax=ax, color="k") | |
preds.isel(pixel=0).sel(time="2007").sim.plot(ax=ax) | |
ax.set_ylabel("Level") | |
sns.despine() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment