Skip to content
Snippets Groups Projects
Commit 5c747381 authored by Matthew Johnson's avatar Matthew Johnson
Browse files

use pcolormesh instad of pcolorfast (fixes #73)

parent 8afe6723
No related branches found
No related tags found
No related merge requests found
...@@ -387,7 +387,6 @@ class _HMMBase(Model): ...@@ -387,7 +387,6 @@ class _HMMBase(Model):
def _plot_stateseq_pcolor(self,s,ax=None,state_colors=None, def _plot_stateseq_pcolor(self,s,ax=None,state_colors=None,
plot_slice=slice(None),update=False,color_method=None): plot_slice=slice(None),update=False,color_method=None):
# TODO pcolormesh instead of pcolorfast?
from pyhsmm.util.general import rle from pyhsmm.util.general import rle
s = self.states_list[s] if isinstance(s,int) else s s = self.states_list[s] if isinstance(s,int) else s
...@@ -407,7 +406,7 @@ class _HMMBase(Model): ...@@ -407,7 +406,7 @@ class _HMMBase(Model):
x, y = np.hstack((0,durations.cumsum())), np.array([datamin,datamax]) x, y = np.hstack((0,durations.cumsum())), np.array([datamin,datamax])
C = np.atleast_2d([state_colors[state] for state in stateseq_norep]) 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_ylim((datamin,datamax))
ax.set_xlim((0,len(stateseq))) ax.set_xlim((0,len(stateseq)))
ax.set_yticks([]) ax.set_yticks([])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment