Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modelskill/comparison/_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def rename(self, mapping: Dict[str, str]) -> "ComparerCollection":
return ComparerCollection(cmps)

@overload
def __getitem__(self, x: slice | Iterable[Hashable]) -> ComparerCollection: ...
def __getitem__(self, x: slice | Iterable[Hashable]) -> ComparerCollection: ... # type: ignore[overload-overlap]

@overload
def __getitem__(self, x: int | Hashable) -> Comparer: ...
Expand Down
4 changes: 3 additions & 1 deletion src/modelskill/comparison/_vertical_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ def hovmoller(
V = v.reshape(len(T), n_layers)
T_grid, _ = np.meshgrid(T, np.arange(n_layers), indexing="ij")
cf = ax.contourf(T_grid, Z, V, **kwargs)
cbar = ax.figure.colorbar(cf, ax=ax)
fig = ax.figure
assert fig is not None
cbar = fig.colorbar(cf, ax=ax)
cbar.set_label(cmp._unit_text)
if self._pos_z():
ax.invert_yaxis()
Expand Down
Loading