From 5c747381473d0e031eebf34ff9f4e03ceb1939f9 Mon Sep 17 00:00:00 2001 From: Matthew Johnson <mattjj@csail.mit.edu> Date: Tue, 7 Mar 2017 10:57:19 -0800 Subject: [PATCH] use pcolormesh instad of pcolorfast (fixes #73) --- pyhsmm/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyhsmm/models.py b/pyhsmm/models.py index 3a19ef4..63c8aad 100644 --- a/pyhsmm/models.py +++ b/pyhsmm/models.py @@ -387,7 +387,6 @@ class _HMMBase(Model): def _plot_stateseq_pcolor(self,s,ax=None,state_colors=None, plot_slice=slice(None),update=False,color_method=None): - # TODO pcolormesh instead of pcolorfast? from pyhsmm.util.general import rle s = self.states_list[s] if isinstance(s,int) else s @@ -407,7 +406,7 @@ class _HMMBase(Model): x, y = np.hstack((0,durations.cumsum())), np.array([datamin,datamax]) C = np.atleast_2d([state_colors[state] for state in stateseq_norep]) - s._pcolor_im = ax.pcolorfast(x,y,C,vmin=0,vmax=1,alpha=0.3) + s._pcolor_im = ax.pcolormesh(x,y,C,vmin=0,vmax=1,alpha=0.3) ax.set_ylim((datamin,datamax)) ax.set_xlim((0,len(stateseq))) ax.set_yticks([]) -- GitLab