def _add_vertical_lines_groups(self, position, render_figure=True, **kwargs): """ Add vertical markers for each group that shares the color. Parameters ---------- position: 2D array of float The position on the signal axis. Each row corresponds to a group. kwargs keywords argument for markers.vertical_line """ per_xray = len(position[0]) colors = itertools.cycle( np.sort(plt.rcParams['axes.prop_cycle'].by_key()["color"] * per_xray)) for x, color in zip(np.ravel(position), colors): line = markers.vertical_line(x=x, color=color, **kwargs) self.add_marker(line, render_figure=False) if render_figure: self._render_figure(plot=['signal_plot'])
def _add_vertical_lines_groups(self, position, **kwargs): """ Add vertical markers for each group that shares the color. Parameters ---------- position: 2D array of float The position on the signal axis. Each row corresponds to a group. kwargs keywords argument for markers.vertical_line """ per_xray = len(position[0]) colors = itertools.cycle(np.sort( plt.rcParams['axes.color_cycle'] * per_xray)) for x, color in zip(np.ravel(position), colors): line = markers.vertical_line(x=x, color=color, **kwargs) self.add_marker(line)
def _add_vertical_lines_groups(self, position, **kwargs): """ Add vertical markers for each group that shares the color. Parameters ---------- position: 2D array of float The position on the signal axis. Each row corresponds to a group. kwargs keywords argument for markers.vertical_line """ per_xray = len(position[0]) colors = itertools.cycle(np.sort( plt.rcParams['axes.color_cycle'] * per_xray)) for x, color in zip(np.ravel(position), colors): line = markers.vertical_line(x=x, color=color, **kwargs) self.add_marker(line)
def _add_vertical_lines_groups(self, position, **kwargs): """ Add vertical markers for each group that shares the color. Parameters ---------- position: 2D array of float The position on the signal axis. Each row corresponds to a group. kwargs keywords argument for markers.vertical_line """ per_xray = len(position[0]) if LooseVersion(matplotlib.__version__) >= "1.5.3": colors = itertools.cycle(np.sort( plt.rcParams['axes.prop_cycle'].by_key()["color"] * per_xray)) else: colors = itertools.cycle(np.sort( plt.rcParams['axes.color_cycle'] * per_xray)) for x, color in zip(np.ravel(position), colors): line = markers.vertical_line(x=x, color=color, **kwargs) self.add_marker(line, render_figure=False) self._render_figure(plot=['signal_plot'])