def plot(self, ax=None, color=np.random.rand(3), show_domain=True, res=(5, 5), **kwargs): try: from tulip.graphics import newax, quiver except: logger.error('failed to import graphics') warn('pyvectorized not found. No plotting.') return (x, res) = pc.grid_region(self.domain, res=res) n = self.A.shape[0] DA = self.A - np.eye(n) v = DA.dot(x) + self.K if ax is None: ax, fig = newax() if show_domain: self.domain.plot(ax, color) quiver(x, v, ax, **kwargs) return ax
def plot(self, ax=None, color=np.random.rand(3), show_domain=True): if quiver is None: warn('pyvectorized not found. No plotting.') return (x, res) = pc.grid_region(self.domain) n = self.A.shape[0] DA = self.A - np.eye(n) v = DA.dot(x) if ax is None: ax, fig = newax() if show_domain: self.domain.plot(ax, color) quiver(x, v, ax) return ax
def plot(self, ax=None, color=np.random.rand(3), show_domain=True, res=(5, 5), **kwargs): try: from tulip.graphics import newax, quiver except: logger.error("failed to import graphics") warn("pyvectorized not found. No plotting.") return (x, res) = pc.grid_region(self.domain, res=res) n = self.A.shape[0] DA = self.A - np.eye(n) v = DA.dot(x) + self.K if ax is None: ax, fig = newax() if show_domain: self.domain.plot(ax, color) quiver(x, v, ax, **kwargs) return ax