From 3514ff3e5184ebcc2ef2b47cb835e1e88962e8fd Mon Sep 17 00:00:00 2001 From: Mauro Rovezzi Date: Fri, 30 Sep 2016 10:37:10 +0200 Subject: [PATCH] minor: added xshift option --- sloth/specfile_with_edf_stack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sloth/specfile_with_edf_stack.py b/sloth/specfile_with_edf_stack.py index d82d9b9..94bbad5 100644 --- a/sloth/specfile_with_edf_stack.py +++ b/sloth/specfile_with_edf_stack.py @@ -347,7 +347,7 @@ def plot_set_limits(self, xmin, xmax, ymin, ymax): self.miw.imageView.setLimits(xmin, xmax, ymin, ymax) self.miw.imageView.replot() - def make_animation(self, cmap_min=0, cmap_max=10, cmap=cm.Blues, xscale=1.): + def make_animation(self, cmap_min=0, cmap_max=10, cmap=cm.Blues, xscale=1., xshift=0): """animation with matplotlib""" h, w = self.imgs[0].shape[0:2] xmin = self.origin[0] @@ -361,10 +361,10 @@ def make_animation(self, cmap_min=0, cmap_max=10, cmap=cm.Blues, xscale=1.): impl = self.anim_img.imshow(img, norm=norm, cmap=cmap, origin='lower', extent=extent, aspect=self.img_aspect) - iint_ln, = self.anim_int.plot(self.x*xscale, self.imgs_int,\ + iint_ln, = self.anim_int.plot(self.x*xscale+xshift, self.imgs_int,\ linestyle='-', linewidth=1.5,\ color='gray') - iint_mk, = self.anim_int.plot(_x*xscale, _int, linestyle='',\ + iint_mk, = self.anim_int.plot(_x*xscale+xshift, _int, linestyle='',\ marker='o', markersize=5,\ color='black') iint_txt = self.anim_int.text(0.05, 0.8, 'Img: {0}'.format(idx),