Draws the scoreboard for the current iteration.
10650
protected function drawScoreboard()
    {
        $size = count($this->teams);
        $this->preamble($size);

        foreach ($this->teams as $key => $team) {
            $this->write(sprintf(
                " %s%sm%s%s\n",

                self::ESC,
                $team->getColor(),
                $team->getScore(),
                self::NND
            ));
        }

        $this->postamble($size);
    }
155471
def draw_grid(self):
        """"""
        self.screen.fill((0xbb, 0xad, 0xa0), self.origin + (self.game_width, self.game_height))
        for y, row in enumerate(self.grid):
            for x, cell in enumerate(row):
                self.screen.blit(self.tiles[cell], self.get_tile_location(x, y))
840698
def draw(self):
        """"""

        self.context.set_source_rgb(*self._get_background_color())
        self.context.rectangle(*self.rect)
        self.context.fill()

        # If show frozen is active, show frozen pattern
        if self.view_frozen and self.cell_attributes[self.key]["frozen"]:
            self._draw_frozen_pattern()
473750
def draw_overlay(self, surf):
    """"""
    obs = self._obs.observation
    player = obs.player_common
    surf.write_screen(
        self._font_large, colors.green, (0.2, 0.2),
        "Minerals: %s, Vespene: %s, Food: %s / %s" % (
            player.minerals, player.vespene, player.food_used, player.food_cap))
    times, steps = zip(*self._game_times)
    sec = obs.game_loop // 22.4  # http://liquipedia.net/starcraft2/Game_Speed
    surf.write_screen(
        self._font_large, colors.green, (-0.2, 0.2),
        "Score: %s, Step: %s, %.1f/s, Time: %d:%02d" % (
            obs.score.score, obs.game_loop, sum(steps) / (sum(times) or 1),
            sec // 60, sec % 60),
        align="right")
    surf.write_screen(
        self._font_large, colors.green * 0.8, (-0.2, 1.2),
        "FPS: O:%.1f, R:%.1f" % (
            len(times) / (sum(times) or 1),
            len(self._render_times) / (sum(self._render_times) or 1)),
        align="right")
    line = 3
    for alert, ts in sorted(self._alerts.items(), key=lambda item: item[1]):
      if time.time() < ts + 3:  # Show for 3 seconds.
        surf.write_screen(self._font_large, colors.red, (20, line), alert)
        line += 1
      else:
        del self._alerts[alert]
263507
@Override
    public void draw() {
        if (googleRenderer == null)  {
            getPresenter().showError(new ClientRuntimeError("Google renderer not set"));
        }
        else if (!getPresenter().isDrawn())  {
            List<Displayer> displayerList = new ArrayList<Displayer>();
            displayerList.add(getPresenter());
            googleRenderer.draw(displayerList);
        }
    }
16981
def draw(self):
        """"""

        row_start, row_stop = self.row_tb
        col_start, col_stop = self.col_rl
        tab_start, tab_stop = self.tab_fl

        for tab in xrange(tab_start, tab_stop):
            # Scale context to page extent
            # In order to keep the aspect ration intact use the maximum
            first_key = row_start, col_start, tab
            first_rect = self.get_cell_rect(*first_key)

            # If we have a merged cell then use the top left cell rect
            if first_rect is None:
                top, left, __, __ = self._get_merge_area(first_key)
                first_rect = self.get_cell_rect(top, left, tab)

            last_key = row_stop - 1, col_stop - 1, tab
            last_rect = self.get_cell_rect(*last_key)

            # If we have a merged cell then use the top left cell rect
            if last_rect is None:
                top, left, __, __ = self._get_merge_area(last_key)
                last_rect = self.get_cell_rect(top, left, tab)

            x_extent = last_rect[0] + last_rect[2] - first_rect[0]
            y_extent = last_rect[1] + last_rect[3] - first_rect[1]

            scale_x = (self.width - 2 * self.x_offset) / float(x_extent)
            scale_y = (self.height - 2 * self.y_offset) / float(y_extent)

            self.context.save()
            # Translate offset to o
            self.context.translate(first_rect[0], first_rect[1])

            # Scale to fit page, do not change aspect ratio
            scale = min(scale_x, scale_y)
            self.context.scale(scale, scale)

            # Translate offset
            self.context.translate(-self.x_offset, -self.y_offset)

            # TODO: Center the grid on the page

            # Render cells

            for row in xrange(row_start, row_stop):
                for col in xrange(col_start, col_stop):
                    key = row, col, tab
                    rect = self.get_cell_rect(row, col, tab)  # Rect
                    if rect is not None:
                        cell_renderer = GridCellCairoRenderer(
                            self.context,
                            self.code_array,
                            key,  # (row, col, tab)
                            rect,
                            self.view_frozen
                        )

                        cell_renderer.draw()

            # Undo scaling, translation, ...
            self.context.restore()

            self.context.show_page()
397888
def draw(self):
        
        matrix = nx.to_numpy_matrix(self.graph, nodelist=self.nodes)
        self.ax.matshow(matrix, cmap=self.cmap)
108369
def draw(self):
        
        pos = np.arange(self.scores_.shape[0]) + 0.5

        self.ax.barh(pos, self.scores_)

        # Set the labels for the bars
        self.ax.set_yticks(pos)
        self.ax.set_yticklabels(self.features_)

        return self.ax
1365348
def draw(self, **kwargs):
        
        if self.orientation_ == 'h':
            # Make the plot
            self.ax.barh(np.arange(len(self.ranks_)), self.ranks_, color='b')

            # Add ticks and tick labels
            self.ax.set_yticks(np.arange(len(self.ranks_)))
            if self.show_feature_names_:
                self.ax.set_yticklabels(self.features_)
            else:
                self.ax.set_yticklabels([])

            # Order the features from top to bottom on the y axis
            self.ax.invert_yaxis()

            # Turn off y grid lines
            self.ax.yaxis.grid(False)

        elif self.orientation_ == 'v':
            # Make the plot
            self.ax.bar(np.arange(len(self.ranks_)), self.ranks_, color='b')

            # Add ticks and tick labels
            self.ax.set_xticks(np.arange(len(self.ranks_)))
            if self.show_feature_names_:
                self.ax.set_xticklabels(self.features_, rotation=90)
            else:
                self.ax.set_xticklabels([])

            # Turn off x grid lines
            self.ax.xaxis.grid(False)

        else:
            raise YellowbrickValueError(
                "Orientation must be 'h' or 'v'"
            )
893737
def draw(self):
        '''
        
        '''
        observed_arr = self.__image_true_sampler.draw()
        observed_arr = self.add_condition(observed_arr)
        return observed_arr
89609
def scoreboard
      @pending_examples ||= []
      @failed_examples ||= []
      padding = @example_count.to_s.length
      [ @current.to_s.rjust(padding),
        success_color((@current - @pending_examples.size - @failed_examples.size).to_s.rjust(padding)),
        pending_color(@pending_examples.size.to_s.rjust(padding)),
        failure_color(@failed_examples.size.to_s.rjust(padding)) ]
    end
896707
def _DrawHours(self):
    
    tmpstrs = []
    for i in range(0, self._gwidth, self._min_grid):
      if i % self._hour_grid == 0:
        tmpstrs.append('<polyline class="FullHour" points="%d,%d, %d,%d" />' \
                       % (i + .5 + 20, 20, i + .5 + 20, self._gheight))
        tmpstrs.append('<text class="Label" x="%d" y="%d">%d</text>'
                       % (i + 20, 20,
                         (i / self._hour_grid + self._offset) % 24))
      else:
        tmpstrs.append('<polyline class="SubHour" points="%d,%d,%d,%d" />' \
                       % (i + .5 + 20, 20, i + .5 + 20, self._gheight))
    return "".join(tmpstrs)
1045722
def draw(self, context):
        """"""

        context.set_line_width(self.width)
        context.set_source_rgb(*self.color)

        context.move_to(*self.start_point)
        context.line_to(*self.end_point)
        context.stroke()
720005
def draw(self):
        """"""
        if not self.visible:
            return

        # If this input text has focus, draw an outline around the text image
        if self.focus:
            pygame.draw.rect(self.window, self.focusColor, self.focusedImageRect, 1)

        # Blit in the image of text (set earlier in _updateImage)
        self.window.blit(self.textImage, self.loc)

        # If this field has focus, see if it is time to blink the cursor
        if self.focus:
            self.cursorMsCounter = self.cursorMsCounter + self.clock.get_time()
            if self.cursorMsCounter >= self.cursorSwitchMs:
                self.cursorMsCounter = self.cursorMsCounter % self.cursorSwitchMs
                self.cursorVisible = not self.cursorVisible

            if self.cursorVisible:
                cursorOffset = self.font.size(self.text[:self.cursorPosition])[0]
                if self.cursorPosition > 0: # Try to get between characters
                    cursorOffset = cursorOffset - 1
                if cursorOffset < self.width:  # if the loc is within the text area, draw it
                    self.cursorLoc[0] = self.loc[0] + cursorOffset
                    self.window.blit(self.cursorSurface, self.cursorLoc)

            self.clock.tick()
496024
def draw(self):
        """"""
        if not self.visible:
            return

        self.window.blit(self.image, self.loc)
1359358
def drawHUD(self):
        
        self.win.move(self.height - 2, self.x_pad)
        self.win.clrtoeol()
        self.win.box()
        self.addstr(2, self.x_pad + 1, "Population: %i" % len(self.grid))
        self.addstr(3, self.x_pad + 1, "Generation: %s" % self.current_gen)
        self.addstr(3, self.x_grid - 21, "s: start    p: pause")
        self.addstr(2, self.x_grid - 21, "r: restart  q: quit")
661459
def drawGrid(self):
        
        for cell in self.grid:
            y, x = cell
            y += self.y_pad
            x += self.x_pad

            if self.traditional:
                sprite = '.'
                color = curses.color_pair(4)
            else:
                sprite = self.char[self.grid[cell] - 1]
                color = curses.color_pair(self.grid[cell])

            self.addchar(y, x, sprite, color)

        self.win.refresh()