Draws circle and tick marks for equal area projection.
356766
def plot_net(fignum):
    

# make the perimeter
    plt.figure(num=fignum,)
    plt.clf()
    plt.axis("off")
    Dcirc = np.arange(0, 361.)
    Icirc = np.zeros(361, 'f')
    Xcirc, Ycirc = [], []
    for k in range(361):
        XY = pmag.dimap(Dcirc[k], Icirc[k])
        Xcirc.append(XY[0])
        Ycirc.append(XY[1])
    plt.plot(Xcirc, Ycirc, 'k')

# put on the tick marks
    Xsym, Ysym = [], []
    for I in range(10, 100, 10):
        XY = pmag.dimap(0., I)
        Xsym.append(XY[0])
        Ysym.append(XY[1])
    plt.plot(Xsym, Ysym, 'k+')
    Xsym, Ysym = [], []
    for I in range(10, 90, 10):
        XY = pmag.dimap(90., I)
        Xsym.append(XY[0])
        Ysym.append(XY[1])
    plt.plot(Xsym, Ysym, 'k+')
    Xsym, Ysym = [], []
    for I in range(10, 90, 10):
        XY = pmag.dimap(180., I)
        Xsym.append(XY[0])
        Ysym.append(XY[1])
    plt.plot(Xsym, Ysym, 'k+')
    Xsym, Ysym = [], []
    for I in range(10, 90, 10):
        XY = pmag.dimap(270., I)
        Xsym.append(XY[0])
        Ysym.append(XY[1])
    plt.plot(Xsym, Ysym, 'k+')
    for D in range(0, 360, 10):
        Xtick, Ytick = [], []
        for I in range(4):
            XY = pmag.dimap(D, I)
            Xtick.append(XY[0])
            Ytick.append(XY[1])
        plt.plot(Xtick, Ytick, 'k')
    plt.axis("equal")
    plt.axis((-1.05, 1.05, -1.05, 1.05))
1209793
private void drawDistribution( Graphics2D g2 , List<Point2D_F64> candidates ,
					  int offX, int offY , double scale) {
		findStatistics();

		// draw all the features, adjusting their size based on the first score
		g2.setColor(Color.RED);
		g2.setStroke(new BasicStroke(3));

		double normalizer;
		if( scorer.getScoreType().isZeroBest() )
			normalizer = best*containmentFraction;
		else
			normalizer = Math.abs(best)*(Math.exp(-1.0/containmentFraction));

		for( int i = 0; i < candidates.size(); i++ ) {
			Point2D_F64 p = candidates.get(i);

			double s = associationScore[i];

			// scale the circle based on how bad it is
			double ratio = 1-Math.abs(s-best)/normalizer;
			if( ratio < 0 )
				continue;

			int r = maxCircleRadius - (int)(maxCircleRadius*ratio);
			if( r > 0 ) {
				int x = (int)(p.x*scale+offX);
				int y = (int)(p.y*scale+offY);
				g2.drawOval(x-r,y-r,r*2+1,r*2+1);
			}
		}

		// draw the best feature
		g2.setColor(Color.GREEN);
		g2.setStroke(new BasicStroke(10));
		int w = maxCircleRadius*2+1;
		Point2D_F64 p = candidates.get(indexBest);
		int x = (int)(p.x*scale+offX);
		int y = (int)(p.y*scale+offY);
		g2.drawOval(x-maxCircleRadius,y-maxCircleRadius,w,w);
	}
1062442
function drawLoop () {
  ctx.clearRect(0, 0, canvas.width, canvas.height)

  var centerX = canvas.width / 2
  var centerY = canvas.height / 2

  // draw circle
  ctx.beginPath()
  ctx.arc(centerX, centerY, 100, 0, 2 * Math.PI, false)
  ctx.fillStyle = 'yellow'
  ctx.fill()

  // draw three oscilloscopes in different positions and colors
  ctx.strokeStyle = 'lime'
  scope.draw(ctx, 0, 0, centerX, centerY)

  ctx.strokeStyle = 'cyan'
  scope.draw(ctx, centerX, 0, centerX, centerY)

  ctx.strokeStyle = 'red'
  scope.draw(ctx, 0, centerY, null, centerY)

  window.requestAnimationFrame(drawLoop)
}
144427
def draw_circle(ctx, x, y, radius, cairo_color):
    
    ctx.new_path()
    ctx.set_source_rgb(cairo_color.red, cairo_color.green, cairo_color.blue)
    ctx.arc(x, y, radius, 0, 2 * pi)
    ctx.fill()
745068
private void drawXValues(Graphics2D chartGraphics) {
    if (!showXAxisValues) {
      return;
    }

    chartGraphics.setColor(axisValuesColour);

    for (int i = 0; i < xValues.length; i++) {
      if (i % xAxisValuesFrequency != 0) {
        continue;
      }

      String xValueStr = xValues[i].toString();

      chartGraphics.setFont(axisValuesFont);
      FontMetrics metrics = chartGraphics.getFontMetrics();

      int valueWidth = metrics.stringWidth(xValueStr);

      if (xValuesHorizontal) {
        // Draw the value with whatever font is now set.
        int valueXPos = (i * cellSize.width) + ((cellSize.width / 2) - (valueWidth / 2));
        valueXPos += heatMapTL.x;
        int valueYPos = heatMapBR.y + metrics.getAscent() + 1;

        chartGraphics.drawString(xValueStr, valueXPos, valueYPos);
      }
      else {
        int valueXPos = heatMapTL.x + (i * cellSize.width)
            + ((cellSize.width / 2) + (xAxisValuesHeight / 2));
        int valueYPos = heatMapBR.y + axisThickness + valueWidth;

        // Create 270 degree rotated transform.
        AffineTransform transform = chartGraphics.getTransform();
        AffineTransform originalTransform = (AffineTransform) transform.clone();
        transform.rotate(Math.toRadians(270), valueXPos, valueYPos);
        chartGraphics.setTransform(transform);

        // Draw the string.
        chartGraphics.drawString(xValueStr, valueXPos, valueYPos);

        // Revert to original transform before rotation.
        chartGraphics.setTransform(originalTransform);
      }
    }
  }
476296
function () {
		var series = this,
			pointAttr,
			data = series.data,
			chart = series.chart,
			plotX,
			plotY,
			i,
			point,
			radius,
			graphic;

		if (series.options.marker.enabled) {
			i = data.length;
			while (i--) {
				point = data[i];
				plotX = point.plotX;
				plotY = point.plotY;
				graphic = point.graphic;

				// only draw the point if y is defined
				if (plotY !== UNDEFINED && !isNaN(plotY)) {

					/* && removed this code because points stayed after zoom
						point.plotX >= 0 && point.plotX <= chart.plotSizeX &&
						point.plotY >= 0 && point.plotY <= chart.plotSizeY*/

					// shortcuts
					pointAttr = point.pointAttr[point.selected ? SELECT_STATE : NORMAL_STATE];
					radius = pointAttr.r;

					if (graphic) { // update
						graphic.animate({
							x: plotX,
							y: plotY,
							r: radius
						});
					} else {
						point.graphic = chart.renderer.symbol(
							pick(point.marker && point.marker.symbol, series.symbol),
							plotX,
							plotY,
							radius
						)
						.attr(pointAttr)
						.add(series.group);
					}
				}
			}
		}

	}
459288
private void generatePatternBitmap() {
    if (getBounds().width() <= 0 || getBounds().height() <= 0) {
      return;
    }

    bitmap = Bitmap.createBitmap(getBounds().width(), getBounds().height(), Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);

    Rect r = new Rect();
    boolean verticalStartWhite = true;
    for (int i = 0; i <= numRectanglesVertical; i++) {
      boolean isWhite = verticalStartWhite;
      for (int j = 0; j <= numRectanglesHorizontal; j++) {
        r.top = i * rectangleSize;
        r.left = j * rectangleSize;
        r.bottom = r.top + rectangleSize;
        r.right = r.left + rectangleSize;
        canvas.drawRect(r, isWhite ? paintWhite : paintGray);
        isWhite = !isWhite;
      }
      verticalStartWhite = !verticalStartWhite;
    }
  }
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()
1248547
def draw_oval(x, y, width, height)
      @context.drawOval(x, y, width, height)
    end
1315423
function drawLinearUnits(context, options) {
    if (!options.units) return ;

    let {isVertical, width, length, baseX, baseY, unitsMargin} =
        context.barDimensions;
    let textHeight = options.fontUnitsSize * width / 200;
    //noinspection JSUnresolvedFunction
    let textX = round(baseX + (isVertical ? width : length) / 2);
    //noinspection JSUnresolvedFunction
    let textY = round(baseY + (isVertical ? length : width) +
        unitsMargin / 2 - textHeight / 2);

    context.save();
    context.textAlign = 'center';
    context.fillStyle = options.colorUnits;
    context.font = drawings.font(options, 'Units', width / 200);
    context.lineWidth = 0;
    context.fillText(options.units, textX, textY, isVertical ? width : length);
}
1292436
def draw_ticks(self):
        """"""
        self._canvas_ticks.create_line((0, 10, self.pixel_width, 10), fill="black")
        self._ticks = list(TimeLine.range(self._start, self._finish, self._tick_resolution / self._zoom_factor))
        for tick in self._ticks:
            string = TimeLine.get_time_string(tick, self._unit)
            x = self.get_time_position(tick)
            x_tick = x + 1 if x == 0 else (x - 1 if x == self.pixel_width else x)
            x_text = x + 15 if x - 15 <= 0 else (x - 15 if x + 15 >= self.pixel_width else x)
            self._canvas_ticks.create_text((x_text, 20), text=string, fill="black", font=("default", 10))
            self._canvas_ticks.create_line((x_tick, 5, x_tick, 15), fill="black")
        self._canvas_ticks.config(scrollregion="0 0 {0} {1}".format(self.pixel_width, 30))
47457
protected void paintTick(Graphics g, ValueDimension dim, Number tickValue, int tickLength) {
		String str = String.format(getTickInfo(dim).getFormat(), tickValue.doubleValue());
		int xPosition;
		int yPosition;
		Point descPos;
		switch (dim) {
		case X:
			xPosition = getXFor(tickValue);
			yPosition = getPaintingRegion().getBottomLeft().y;
			g.drawLine(xPosition, yPosition, xPosition, yPosition+tickLength);
			descPos = getPaintingRegion().getDescriptionPos(dim, str, xPosition);
			g.drawString(str, descPos.x, descPos.y+tickLength);
			break;
		case Y:
			xPosition = getPaintingRegion().getBottomLeft().x;
			yPosition = getYFor(tickValue);
			g.drawLine(xPosition, yPosition, xPosition-tickLength, yPosition);
			descPos = getPaintingRegion().getDescriptionPos(dim, str, yPosition);
			g.drawString(str, descPos.x-tickLength, descPos.y+tickLength);
			break;
		}
	}
837814
def draw_dot(self, pos, color):
        
        if 0 <= pos[0] < self.width and 0 <= pos[1] < self.height:
            self.matrix[pos[0]][pos[1]] = color
707146
function DrawVerticalTick($which_ylab,$which_ypos) {  //ylab in world coord.
    //Draw Just one Tick, called from DrawVerticalTicks
    //Ticks and datalables can be left of plot only, right of plot only,
    //  both on the left and right of plot, or crossing a user defined Y-axis
    //
    //Its faster to draw both left and right ticks at same time
    //  than first left and then right.

    if ($this->y_axis_position != "") {
      //Ticks and lables are drawn on the left border of yaxis
      $yaxis_x = $this->xtr($this->y_axis_position);
    } else {
      //Ticks and lables are drawn on the left border of PlotArea.
      $yaxis_x = $this->plot_area[0];
    }

    $y_pixels = $this->ytr($which_ypos);

    //Lines Across the Plot Area
    if ($this->draw_y_grid == 1) {
      ImageLine($this->img,$this->plot_area[0]+1,$y_pixels,
        $this->plot_area[2]-1,$y_pixels,$this->ndx_light_grid_color);
    }

    //Ticks to the Left of the Plot Area
    if (($this->vert_tick_position == "plotleft") || ($this->vert_tick_position == "both") ) {
      ImageLine($this->img,(-$this->tick_length+$yaxis_x),
      $y_pixels,$yaxis_x,
      $y_pixels, $this->ndx_tick_color);
    }

    //Ticks to the Right of the Plot Area
    if (($this->vert_tick_position == "plotright") || ($this->vert_tick_position == "both") ) {
      ImageLine($this->img,($this->plot_area[2]+$this->tick_length),
      $y_pixels,$this->plot_area[2],
      $y_pixels,$this->ndx_tick_color);
    }

    //Ticks on the Y Axis
    if (($this->vert_tick_position == "yaxis") ) {
      ImageLine($this->img,($yaxis_x - $this->tick_length),
      $y_pixels,$yaxis_x,$y_pixels,$this->ndx_tick_color);
    }

    //DataLabel
//ajo working
    //$this->DrawText($this->y_label_ttffont, 0,($yaxis_x - $this->y_label_width - $this->tick_length/2),
    //		$y_pixels, $this->ndx_text_color, $this->axis_ttffont_size, $which_ylab);
    ImageString($this->img, $this->small_font, ($yaxis_x - $this->y_label_width - $this->tick_length/2),
      ( -($this->small_font_height/2.0) + $y_pixels),$which_ylab, $this->ndx_text_color);
  }
587121
def drawAxis( self, painter ):
        
        # draw the axis lines
        pen = QPen(self.axisColor())
        pen.setWidth(4)
        painter.setPen(pen)
        painter.drawLines(self._buildData['axis_lines'])
        
        # draw the notches
        for rect, text in self._buildData['grid_h_notches']:
            painter.drawText(rect, Qt.AlignTop | Qt.AlignRight, text)
        
        for rect, text in self._buildData['grid_v_notches']:
            painter.drawText(rect, Qt.AlignCenter, text)
1238694
function drawAxis() {
            svg.select('.x-axis-group .axis.x')
                .attr('transform', `translate(0, ${chartHeight})`)
                .call(xAxis);

            svg.select('.y-axis-group .axis.y')
                .call(yAxis);

            drawAxisLabels();
        }
1186998
def lambert_xticks(ax, ticks):
    """"""
    te = lambda xy: xy[0]
    lc = lambda t, n, b: np.vstack((np.zeros(n) + t, np.linspace(b[2], b[3], n))).T
    xticks, xticklabels = _lambert_ticks(ax, ticks, 'bottom', lc, te)
    ax.xaxis.tick_bottom()
    ax.set_xticks(xticks)
    ax.set_xticklabels([ax.xaxis.get_major_formatter()(xtick) for xtick in xticklabels])