Skip to content

Commit

Permalink
RelationMap visualisation bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
hpparvi committed Aug 30, 2024
1 parent d92cf87 commit 77fedd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spright/relationmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def init_data(self, data: ndarray, x: ndarray, y: ndarray, probs: ndarray,
yx_icdf : Optional[ndarray], optional
The inverse cumulative distribution function (ICDF) for the yx relation.
"""
self._pmapc = data.copy()
self._pmapf = self._pmapc.sum(0)
self._pmapc = data.copy() # Component-wise data as a 3D ndarray
self._pmapf = self._pmapc.sum(0) # Flattened data as a 2D ndarray
self.x = x.copy()
self.y = y.copy()
self.probs = probs.copy()
Expand Down Expand Up @@ -267,7 +267,7 @@ def plot_map(self, ax=None, cm=None, norm=None):
"""
if ax is None:
fig, ax = subplots()
ax.imshow(self._pmapc.T, origin='lower', aspect='auto', cmap=cm, norm=norm, interpolation='bicubic',
ax.imshow(self._pmapf.T, origin='lower', aspect='auto', cmap=cm, norm=norm, interpolation='bicubic',
extent=(self.x[0], self.x[-1], self.y[0], self.y[-1]))
setp(ax, xlabel=f"{self.xname} [{self.xunit}]", ylabel=f"{self.yname} [{self.yunit}]")

Expand Down

0 comments on commit 77fedd7

Please sign in to comment.