def plot_psf_contours(ref, est, grd, title='PSF Comparison'): """Plot PSF contour comparison. Parameters ---------- ref : ndarray Reference PSF est : ndarray Estimated PSF grd : ndarray Sampling grid of PSF title : str, optional Plot title Returns ------- :class:`matplotlib.figure.Figure` object Figure object for this figure list of :class:`matplotlib.axes.Axes` object List of axes objects for this plot """ fig, ax = plot.subplots(nrows=1, ncols=2, figsize=(12.1, 5)) fig.suptitle(title, fontsize=14) plot.contour(ref, grd, grd, title='Reference', fig=fig, ax=ax[0]) plot.contour(est, grd, grd, title='Estimate', fig=fig, ax=ax[1]) fig.show() return fig, ax
def test_06(self): fig = plot.figure() plot.contour(self.z, title='Contour Test', xlbl='x', ylbl='y', fgrf=fig) plot.close()
def test_05(self): plot.contour(self.z, x=self.x, y=self.y, title='Contour Test', xlbl='x', ylbl='y') plot.close()
def plot_psf_contours(ref, rca, cdl, grd, v=5, xrng=None, yrng=None, title=None): fig, ax = plot.subplots(nrows=1, ncols=3, figsize=(18.15, 5)) if title is not None: fig.suptitle(title, fontsize=14) plot.contour(ref, grd, grd, v=v, title='Reference', fig=fig, ax=ax[0]) plot.contour(rca, grd, grd, v=v, title='RCA', fig=fig, ax=ax[1]) plot.contour(cdl, grd, grd, v=v, title='CDL', fig=fig, ax=ax[2]) if xrng is not None or yrng is not None: for x in ax: if xrng is not None: x.set_xlim(xrng) if yrng is not None: x.set_ylim(yrng) fig.show() return fig, ax
elev=25, azim=-25, xlbl='x', ylbl='y', zlbl='z', title='Surface Plot Example', cntr=5, fgsz=(7, 6)) """ Plot a contour plot of the same surface. """ plot.contour(z, x, y, xlbl='x', ylbl='y', title='Contour Plot Example', fgsz=(6, 5)) """ We can also plot within subplots of the same figure. """ fig, ax = plot.subplots(nrows=1, ncols=2, figsize=(12.1, 5)) fig.suptitle('Figure Title', fontsize=14) plot.surf(z, x, y, xlbl='x', ylbl='y', zlbl='z',
z = np.sin(y) * np.cos(2*x*y) """ Plot a surface plot of the surface, including contour lines at the bottom of the `z` axis. """ plot.surf(z, x, y, elev=25, azim=-25, xlbl='x', ylbl='y', zlbl='z', title='Surface Plot Example', cntr=5, fgsz=(7, 6)) """ Plot a contour plot of the same surface. """ plot.contour(z, x, y, xlbl='x', ylbl='y', title='Contour Plot Example', fgsz=(6, 5)) """ We can also plot within subplots of the same figure. """ fig, ax = plot.subplots(nrows=1, ncols=2, figsize=(12.1, 5)) fig.suptitle('Figure Title', fontsize=14) plot.surf(z, x, y, xlbl='x', ylbl='y', zlbl='z', title='Surface Plot Example', fig=fig, ax=ax[0]) plot.contour(z, x, y, xlbl='x', ylbl='y', title='Contour Plot Example', fig=fig, ax=ax[1]) fig.show()