Displays the voxels and the control points.
12736
def render(self, **kwargs):
        
        # Calling parent function
        super(VisVoxel, self).render(**kwargs)

        # Initialize variables
        legend_proxy = []
        legend_names = []

        # Start plotting of the surface and the control points grid
        fig = plt.figure(figsize=self.vconf.figure_size, dpi=self.vconf.figure_dpi)
        ax = Axes3D(fig)

        # Start plotting
        for plot in self._plots:
            # Plot control points
            if plot['type'] == 'ctrlpts' and self.vconf.display_ctrlpts:
                pts = np.array(plot['ptsarr'], dtype=self.vconf.dtype)
                ax.scatter(pts[:, 0], pts[:, 1], pts[:, 2], color=plot['color'], marker='^', s=20, depthshade=True)
                plot_proxy = mpl.lines.Line2D([0], [0], linestyle='none', color=plot['color'], marker='^')
                legend_proxy.append(plot_proxy)
                legend_names.append(plot['name'])

            # Plot evaluated points
            if plot['type'] == 'evalpts' and self.vconf.display_evalpts:
                faces = np.array(plot['ptsarr'][1], dtype=self.vconf.dtype)
                filled = np.array(plot['ptsarr'][2], dtype=self.vconf.dtype)
                # Find filled voxels
                faces_filled = np.concatenate(faces[filled == 1.0])
                # Create a single Poly3DCollection object
                pc3d = Poly3DCollection(faces_filled, facecolors=plot['color'], edgecolors='k')
                ax.add_collection3d(pc3d)
                # Set axis limits
                gf_min = np.amin(faces_filled, axis=(0, 1))
                gf_max = np.amax(faces_filled, axis=(0, 1))
                ax.set_xlim([gf_min[0], gf_max[0]])
                ax.set_ylim([gf_min[1], gf_max[1]])
                ax.set_zlim([gf_min[2], gf_max[2]])
                # Legend
                plot_proxy = mpl.lines.Line2D([0], [0], linestyle='none', color=plot['color'], marker='o')
                legend_proxy.append(plot_proxy)
                legend_names.append(plot['name'])

            # Plot bounding box
            if plot['type'] == 'bbox' and self.vconf.display_bbox:
                ax.plot(pts[:, 0], pts[:, 1], pts[:, 2], color=plot['color'], linestyle='--')
                plot_proxy = mpl.lines.Line2D([0], [0], linestyle='--', color=plot['color'])
                legend_proxy.append(plot_proxy)
                legend_names.append(plot['name'])

            # Plot extras
            if plot['type'] == 'extras':
                ax.plot(pts[:, 0], pts[:, 1], pts[:, 2],
                        color=plot['color'][0], linestyle='-', linewidth=plot['color'][1])
                plot_proxy = mpl.lines.Line2D([0], [0], linestyle='-', color=plot['color'][0])
                legend_proxy.append(plot_proxy)
                legend_names.append(plot['name'])

        # Add legend to 3D plot, @ref: https://stackoverflow.com/a/20505720
        if self.vconf.display_legend:
            ax.legend(legend_proxy, legend_names, numpoints=1)

        # Remove axes
        if not self.vconf.display_axes:
            plt.axis('off')

        # Set axes equal
        if self.vconf.axes_equal:
            self.vconf.set_axes_equal(ax)

        # Axis labels
        if self.vconf.display_labels:
            ax.set_xlabel('x')
            ax.set_ylabel('y')
            ax.set_zlabel('z')

        # Process keyword arguments
        fig_filename = kwargs.get('fig_save_as', None)
        fig_display = kwargs.get('display_plot', True)

        # Display the plot
        if fig_display:
            plt.show()
        else:
            fig_filename = self.vconf.figure_image_filename if fig_filename is None else fig_filename

        # Save the figure
        self.vconf.save_figure_as(fig, fig_filename)

        # Return the figure object
        return fig
598743
def plotIndividual(self):
		'''
		
		'''
		pl.plot(self.x_int, self.y_int)
		pl.grid(True)
		pl.show()
840125
public void setControlPoints(List<Vertex> controlPoints)
	{
		this.controlPoints = controlPoints != null ? controlPoints : new ArrayList<>();
		dirty = true;
	}
208125
public void displayState() {
        PrintWriter xout = context.get(Log.logKey).getWriter(Log.WriterKind.STDERR);
        xout.println("File Object History : " +  fileObjectHistory);
        xout.println("Open Type Names     : " +  openTypeNames);
        xout.println("Gen. Src Names      : " +  generatedSourceNames);
        xout.println("Gen. Cls Names      : " +  generatedClasses.keySet());
        xout.println("Agg. Gen. Src Names : " +  aggregateGeneratedSourceNames);
        xout.println("Agg. Gen. Cls Names : " +  aggregateGeneratedClassNames);
    }
1260149
def render(self, **kwargs):
        
        # Calling parent function
        super(VisVoxel, self).render(**kwargs)

        # Initialize a list to store VTK actors
        vtk_actors = []

        # Start plotting
        for plot in self._plots:
            # Plot control points
            if plot['type'] == 'ctrlpts' and self.vconf.display_ctrlpts:
                # Points as spheres
                pts = np.array(plot['ptsarr'], dtype=np.float)
                vtkpts = numpy_to_vtk(pts, deep=False, array_type=VTK_FLOAT)
                vtkpts.SetName(plot['name'])
                temp_actor = vtkh.create_actor_pts(pts=vtkpts, color=vtkh.create_color(plot['color']),
                                                   name=plot['name'], index=plot['idx'])
                vtk_actors.append(temp_actor)

            # Plot evaluated points
            if plot['type'] == 'evalpts' and self.vconf.display_evalpts:
                faces = np.array(plot['ptsarr'][1], dtype=np.float)
                filled = np.array(plot['ptsarr'][2], dtype=np.int)
                grid_filled = faces[filled == 1]
                temp_actor = vtkh.create_actor_hexahedron(grid=grid_filled, color=vtkh.create_color(plot['color']),
                                                          name=plot['name'], index=plot['idx'])
                vtk_actors.append(temp_actor)

        # Render actors
        return vtkh.create_render_window(vtk_actors, dict(KeyPressEvent=(self.vconf.keypress_callback, 1.0)),
                                         figure_size=self.vconf.figure_size)
238961
def view(grid):
    ""
    p_mark, q_mark = player_marks(grid)
    return grid_format % tuple(p_mark if by_p else q_mark if by_q else '.'
                               for by_p, by_q in zip(*map(player_bits, grid)))
444800
def render(self, **kwargs):
        
        # Calling parent function
        super(VisCurve3D, self).render(**kwargs)

        # Initialize a list to store VTK actors
        vtk_actors = []

        # Start plotting
        for plot in self._plots:
            # Plot control points
            if plot['type'] == 'ctrlpts' and self.vconf.display_ctrlpts:
                # Points as spheres
                pts = np.array(plot['ptsarr'], dtype=np.float)
                # Handle 2-dimensional data
                if pts.shape[1] == 2:
                    pts = np.c_[pts, np.zeros(pts.shape[0], dtype=np.float)]
                vtkpts = numpy_to_vtk(pts, deep=False, array_type=VTK_FLOAT)
                vtkpts.SetName(plot['name'])
                actor1 = vtkh.create_actor_pts(pts=vtkpts, color=vtkh.create_color(plot['color']),
                                               name=plot['name'], idx=plot['idx'])
                vtk_actors.append(actor1)
                # Lines
                actor2 = vtkh.create_actor_polygon(pts=vtkpts, color=vtkh.create_color(plot['color']),
                                                   name=plot['name'], index=plot['idx'], size=self.vconf.line_width)
                vtk_actors.append(actor2)

            # Plot evaluated points
            if plot['type'] == 'evalpts' and self.vconf.display_evalpts:
                pts = np.array(plot['ptsarr'], dtype=np.float)
                # Handle 2-dimensional data
                if pts.shape[1] == 2:
                    pts = np.c_[pts, np.zeros(pts.shape[0], dtype=np.float)]
                vtkpts = numpy_to_vtk(pts, deep=False, array_type=VTK_FLOAT)
                vtkpts.SetName(plot['name'])
                actor1 = vtkh.create_actor_polygon(pts=vtkpts, color=vtkh.create_color(plot['color']),
                                                   name=plot['name'], index=plot['idx'], size=self.vconf.line_width * 2)
                vtk_actors.append(actor1)

        # Render actors
        return vtkh.create_render_window(vtk_actors, dict(KeyPressEvent=(self.vconf.keypress_callback, 1.0)),
                                         figure_size=self.vconf.figure_size)
642787
def _plot_labels(self):
        """"""
        # iterate simultaneously over kth row in left column and
        # kth column in bottom row:
        br = self.n_cols - 1  # bottom row
        for k in range(0, self.n_cols):
            dim_x, _ = self.grid_dim[0][k].split(',')
            _, dim_y = self.grid_dim[k][br].split(',')
            # Get the channel ids corresponding to the relative channel indices
            # specified in the dimensions. Channel 0 corresponds to the first
            # best channel for the selected cluster, and so on.
            dim_x = self._get_axis_label(dim_x)
            dim_y = self._get_axis_label(dim_y)
            # Left edge of left column of subplots.
            self[k, 0].text(pos=[-1., 0.],
                            text=dim_y,
                            anchor=[-1.03, 0.],
                            data_bounds=None,
                            )
            # Bottom edge of bottom row of subplots.
            self[br, k].text(pos=[0., -1.],
                             text=dim_x,
                             anchor=[0., -1.04],
                             data_bounds=None,
                             )
1080204
def display_map(fname):
    
    print("viewing ", fname)
    
    app = view_tk(None)
    app.show_grid_from_file(fname)
    app.title('Map View')
    #app.after(2000,vais_main_loop(app))
    
        # bind mouse and keyboard for interactivity
  #  frame = Frame(app, width=100, height=100)
   # frame.bind("<Button-1>", callback)
    app.canvas.bind("<Button-1>", callback)
    app.bind("<Key>", key)

    
    app.mainloop()
1184483
def display(self):
        """"""
        size = list(range(len(self.layers)))
        size.reverse()
        for i in size:
            layer = self.layers[i]
            if layer.active:
                print('%s layer (size %d)' % (layer.name, layer.size))
                tlabel, olabel = '', ''
                if (layer.type == 'Output'):
                    if self.countWrong:
                        tlabel = ' (%s)' % self.classify(layer.target.tolist())
                        olabel = ' (%s)' % self.classify(layer.activation.tolist())
                        if olabel == tlabel:
                            self.numRight += 1
                        else:
                            olabel += '  *** WRONG ***'
                            self.numWrong += 1
                            if self.actDisplay is not None:
                                self.actDisplay.showWrong()
                    print('Target    : %s%s' % (pretty(layer.target, max=15), tlabel))
                print('Activation: %s%s' % (pretty(layer.activation, max=15), olabel))
                if self.patterned and layer.type != 'Hidden':
                    targetWord, diff = self.getWord( layer.target, returnDiff = 1)
                    if layer.kind == 'Output':
                        if targetWord == None:
                            print("Target Pattern   = %s" % "No match")
                        else:
                            if diff == 0.0:
                                print("Target Pattern   = '%s'" % targetWord)
                            else:
                                print("Target Pattern   = '%s'; difference = %f)" % (targetWord, diff))
                    actWord, diff = self.getWord( layer.activation, returnDiff = 1 )
                    if (layer.kind == 'Input' or layer.kind == 'Output'):
                        if actWord == None:
                            print("Matching Pattern = %s" % "No match")
                        else:
                            if diff == 0.0:
                                print("Matching Pattern = '%s'" % actWord)
                            else:
                                print("Matching Pattern = '%s'; difference = %f" % (actWord, diff))
                print("------------------------------------")
356311
public void showInfoWindow(){
		if (mInfoWindow == null)
			return;
		final int markerWidth = mIcon.getIntrinsicWidth();
		final int markerHeight = mIcon.getIntrinsicHeight();
		final int offsetX = (int)(markerWidth * (mIWAnchorU - mAnchorU));
		final int offsetY = (int)(markerHeight * (mIWAnchorV - mAnchorV));
		if (mBearing == 0) {
			mInfoWindow.open(this, mPosition, offsetX, offsetY);
			return;
		}
		final int centerX = 0;
		final int centerY = 0;
		final double radians = -mBearing * Math.PI / 180.;
		final double cos = Math.cos(radians);
		final double sin = Math.sin(radians);
		final int rotatedX = (int)RectL.getRotatedX(offsetX, offsetY, centerX, centerY, cos, sin);
		final int rotatedY = (int)RectL.getRotatedY(offsetX, offsetY, centerX, centerY, cos, sin);
		mInfoWindow.open(this, mPosition, rotatedX, rotatedY);
	}
846276
def intersection_with_voxel_space
      alpha_x0 = ax(0)
      alpha_y0 = ay(0)
      alpha_z0 = az(0)
      alpha_x_last = ax(@vs.nx)
      alpha_y_last = ay(@vs.ny)
      alpha_z_last = az(@vs.nz)
      @alpha_x_min = [alpha_x0, alpha_x_last].min
      @alpha_y_min = [alpha_y0, alpha_y_last].min
      @alpha_z_min = [alpha_z0, alpha_z_last].min
      @alpha_x_max = [alpha_x0, alpha_x_last].max
      @alpha_y_max = [alpha_y0, alpha_y_last].max
      @alpha_z_max = [alpha_z0, alpha_z_last].max
      @alpha_min = [@alpha_x_min, @alpha_y_min, @alpha_z_min].max
      @alpha_max = [@alpha_x_max, @alpha_y_max, @alpha_z_max].min
    end
963821
def showBeamlines(self):
        
        cnt = 0
        blidlist = []
        for k in self.all_elements:
            try:
                if 'beamline' in self.all_elements.get(k):
                    cnt += 1
                    blidlist.append(k)
            except:
                pass
        retstr = '{total:<3d}beamlines: {allbl}'.format(total=cnt,
                                                        allbl=';'.join(blidlist))
        return retstr
569327
def show(self):
        
        import matplotlib.pyplot as plt
        nx.draw(self.transforms, with_labels=True)
        plt.show()
1337590
def show_view(self):
        
        if not self.build_info:
            def on_build_info(info):
                """ Make sure the build info is ready before we 
                display the view 
                
                """
                self.dp = info['DISPLAY_DENSITY']
                self.width = info['DISPLAY_WIDTH']
                self.height = info['DISPLAY_HEIGHT']
                self.orientation = ('square', 'portrait', 'landscape')[
                                    info['DISPLAY_ORIENTATION']]
                self.api_level = info['SDK_INT']
                self.build_info = info
                self._show_view()

            self.init_widget()
            self.widget.getBuildInfo().then(on_build_info)
        else:
            self._show_view()
411972
def show_graphs(self):
        """"""
        elements = itertools.chain.from_iterable(
            ([graph]
             for graph in self.visible_graphs.values()))
        self.graph_place_holder.original_widget = urwid.Pile(elements)
153776
def plot_points(points, show=True):
    
    import matplotlib.pyplot as plt
    from mpl_toolkits.mplot3d import Axes3D  # NOQA

    points = np.asanyarray(points, dtype=np.float64)

    if len(points.shape) != 2:
        raise ValueError('Points must be (n, 2|3)!')

    if points.shape[1] == 3:
        fig = plt.figure()
        ax = fig.add_subplot(111, projection='3d')
        ax.scatter(*points.T)
    elif points.shape[1] == 2:
        plt.scatter(*points.T)
    else:
        raise ValueError('points not 2D/3D: {}'.format(
            points.shape))

    if show:
        plt.show()