Plot sample postage stamps for the target with the aperture
        outline marked, as well as a high-res target image (if available).

        :param bool show: Show the plot or return the `(fig, ax)` instance? \
               Default :py:obj:`True`
166405
def plot_aperture(self, show=True):
        '''
        

        '''

        # Set up the axes
        fig, ax = pl.subplots(2, 2, figsize=(6, 8))
        fig.subplots_adjust(top=0.975, bottom=0.025, left=0.05,
                            right=0.95, hspace=0.05, wspace=0.05)
        ax = ax.flatten()
        fig.canvas.set_window_title(
            '%s %d' % (self._mission.IDSTRING, self.ID))
        super(Everest, self).plot_aperture(ax, labelsize=12)

        if show:
            pl.show()
            pl.close()
        else:
            return fig, ax
15326
def plot_or_print(example_farm, example_cluster):
    

    """

    # plot or print power output
    if plt:
        example_cluster.power_output.plot(legend=True, label='example cluster')
        example_farm.power_output.plot(legend=True, label='example farm')
        plt.show()
    else:
        print(example_cluster.power_output)
        print(example_farm.power_output)
828791
def view_predictions(imgs, y_pred, y_true, start, end):
        '''
        

        '''
        fig, ax = plt.subplots(16, 4, sharex='col', sharey='row', figsize=(25, 100))
        for i, img in enumerate(imgs[start:end]):
            pred_label = y_pred[start:end][i]
            actual_label = y_true[i]
            ax[i//4][i%4].imshow(img)
            ax[i//4][i%4].annotate(pred_label[0],
                          (0,0), (0, -32), xycoords='axes fraction', 
                           textcoords='offset points', va='top', size=20)
            ax[i//4][i%4].annotate(actual_label,
                          (0,0), (200, -32), xycoords='axes fraction', 
                           textcoords='offset points', va='top', size=20)
            ax[i//4][i%4].axis('off')
        return ax
758364
def show(self, m_a):
        
        bytecode.PrettyShow(m_a, m_a.basic_blocks.gets(), self.notes)
        bytecode.PrettyShowEx(m_a.exceptions.gets())
368016
def plot(self, vertices, show=False):
        
        if vertices.shape[1] != 2:
            raise ValueError('only for 2D points!')

        import matplotlib.pyplot as plt

        # get rotation angle in degrees
        angle = np.degrees(self.angle(vertices))

        plt.text(*vertices[self.origin],
                 s=self.text,
                 rotation=angle,
                 ha=self.align[0],
                 va=self.align[1],
                 size=18)

        if show:
            plt.show()
1091395
def plot(self, flip=False, ax_channels=None, ax=None, *args, **kwargs):
        
        if ax == None:
            ax = pl.gca()

        if ax_channels is not None:
            flip = self._find_orientation(ax_channels)
        if flip:
            vert = [v[::-1] for v in self.vert]
        else:
            vert = self.vert
        kwargs.setdefault('fill', False)
        kwargs.setdefault('color', 'black')
        poly = pl.Polygon(vert, *args, **kwargs)
        return ax.add_artist(poly)
1342967
def draw(self):
        '''
        
        '''
        if self.__conditional_flag is True:
            return np.concatenate((self.__create_samples(), self.__create_samples()), axis=1)
        else:
            return self.__create_samples()
911110
def plot(self, tag, mpl_plt, step=None, close_plot=True):
    
    if step is None:
      step = self._step
    else:
      self._step = step
    fig = mpl_plt.get_current_fig_manager()
    img_w, img_h = fig.canvas.get_width_height()
    image_buf = io.BytesIO()
    mpl_plt.savefig(image_buf, format='png')
    image_summary = Summary.Image(
        encoded_image_string=image_buf.getvalue(),
        colorspace=4,  # RGBA
        height=img_h,
        width=img_w)
    summary = Summary(value=[Summary.Value(tag=tag, image=image_summary)])
    self.add_summary(summary, step)
    if close_plot:
      mpl_plt.close()
1104019
def plot(x, y, z, color=default_color, **kwargs):
    
    fig = gcf()
    _grow_limits(x, y, z)
    defaults = dict(
        visible_lines=True, color_selected=None, size_selected=1, size=1, connected=True, visible_markers=False
    )
    kwargs = dict(defaults, **kwargs)
    s = ipv.Scatter(x=x, y=y, z=z, color=color, **kwargs)
    s.material.visible = False
    fig.scatters = fig.scatters + [s]
    return s
304012
def plot_target(target, ax):
    """"""
    ax.scatter(target[0], target[1], target[2], c="red", s=80)
891990
def show(self):
        """"""

        # noinspection PyPackageRequirements
        from IPython.display import Image, display

        fname = self.render()
        display(Image(filename=fname))
1357494
def plot_discrete(self, show=False):
        
        import matplotlib.pyplot as plt
        from mpl_toolkits.mplot3d import Axes3D  # NOQA
        fig = plt.figure()
        axis = fig.add_subplot(111, projection='3d')
        for discrete in self.discrete:
            axis.plot(*discrete.T)
        if show:
            plt.show()
537602
def _showPDFpage(self, fz_srcpage, overlay=1, matrix=None, xref=0, clip=None, graftmap=None, _imgname=None):
        """"""
        return _fitz.Page__showPDFpage(self, fz_srcpage, overlay, matrix, xref, clip, graftmap, _imgname)
1172849
def plot_outline(self, annotate_late_targets=False, annotate_channels=False):
        """"""
        fov = getKeplerFov(9)
        # Plot the superstamp
        superstamp_patches = []
        for ch in SUPERSTAMP["channels"]:
            v_col = SUPERSTAMP["channels"][ch]["vertices_col"]
            v_row = SUPERSTAMP["channels"][ch]["vertices_row"]
            radec = np.array([
                                fov.getRaDecForChannelColRow(int(ch),
                                                             v_col[idx],
                                                             v_row[idx])
                                for idx in range(len(v_col))
                              ])
            patch = self.ax.fill(radec[:, 0], radec[:, 1],
                                 lw=0, facecolor="#27ae60", zorder=100)
            superstamp_patches.append(patch)

        # Plot the late target masks
        late_target_patches = []
        for mask in LATE_TARGETS["masks"]:
            ch = mask["channel"]
            v_col = mask["vertices_col"]
            v_row = mask["vertices_row"]
            radec = np.array([
                                fov.getRaDecForChannelColRow(int(ch),
                                                             v_col[idx],
                                                             v_row[idx])
                                for idx in range(len(v_col))
                              ])
            patch = self.ax.fill(radec[:, 0], radec[:, 1],
                                 lw=0, facecolor="#27ae60", zorder=201)
            late_target_patches.append(patch)
            if annotate_late_targets and 'context' not in mask["name"]:
                self.ax.text(np.mean(radec[:, 0]), np.mean(radec[:, 1]), '  ' + mask["name"],
                             ha="left", va="center",
                             zorder=950, fontsize=10,
                             color="#c0392b", clip_on=True)

        # Plot all channel outlines
        channel_patches = []
        corners = fov.getCoordsOfChannelCorners()
        for ch in np.arange(1, 85, dtype=int):
            if ch in fov.brokenChannels:
                continue  # certain channel are no longer used
            idx = np.where(corners[::, 2] == ch)
            mdl = int(corners[idx, 0][0][0])
            out = int(corners[idx, 1][0][0])
            ra = corners[idx, 3][0]
            dec = corners[idx, 4][0]
            patch = self.ax.fill(np.concatenate((ra, ra[:1])),
                                 np.concatenate((dec, dec[:1])),
                                 lw=0, facecolor="#cccccc", zorder=50)
            channel_patches.append(patch)
            if annotate_channels:
                txt = "{}.{}\n#{}".format(mdl, out, ch)
                self.ax.text(np.mean(ra), np.mean(dec), txt,
                             ha="center", va="center",
                             zorder=900, fontsize=14,
                             color="#000000", clip_on=True)
        return superstamp_patches, channel_patches
186501
def show(self):
        """"""
        with_matplotlib = True
        try:
            import matplotlib.pyplot as plt
        except RuntimeError:
            import skimage.io as io
            with_matplotlib = False
            
        if with_matplotlib:
            equalised_img = self.equalise()
            
            _, ax = plt.subplots()
            
            ax.imshow(equalised_img, cmap='gray')
    
            import random
            
            for contour_set in self.as_contours.itervalues():
                r, g, b = random.random(), random.random(), random.random()
                [ax.plot(contour[:,1], contour[:,0], linewidth=2, color=(r,g,b,1)) for contour in contour_set]
            
            ax.axis('image')
            ax.set_xticks([])
            ax.set_yticks([])
            
            plt.show()
        else:
            io.imshow(self.equalise())
            io.show()
569327
def show(self):
        
        import matplotlib.pyplot as plt
        nx.draw(self.transforms, with_labels=True)
        plt.show()
998460
def plot(self, figsize=None, ax=None, **kwargs):
        '''
        
        '''
        if ax is None:
            fig, ax = plt.subplots(figsize=figsize)
        ax.set_aspect('equal')
        ax.matshow(self.raster, **kwargs)
        plt.draw()
        return ax