This guide is not geom based

        Return self if colorbar will be drawn and None if not.
339771
def create_geoms(self, plot):
        
        for l in plot.layers:
            exclude = set()
            if isinstance(l.show_legend, dict):
                l.show_legend = rename_aesthetics(l.show_legend)
                exclude = {ae for ae, val in l.show_legend.items()
                           if not val}
            elif l.show_legend not in (None, True):
                continue

            matched = self.legend_aesthetics(l, plot)

            # layer uses guide
            if set(matched) - exclude:
                break
        # no break, no layer uses this guide
        else:
            return None

        return self
119448
def getcolors(spec, n, cmap=None, value=None):
    
    if cmap is not None and spec is not None:
        from matplotlib.colors import LinearSegmentedColormap
        from matplotlib.cm import get_cmap
        if isinstance(cmap, LinearSegmentedColormap):
            return cmap(value)[:, 0:3]
        if isinstance(cmap, str):
            return get_cmap(cmap, n)(value)[:, 0:3]
    if isinstance(spec, str):
        return [getcolor(spec) for i in range(n)]
    elif isinstance(spec, list) and isinstance(spec[0], str):
        return [getcolor(s) for s in spec]
    elif (isinstance(spec, list) or isinstance(spec, ndarray)) and asarray(spec).shape == (3,):
        return [spec for i in range(n)]
    else:
        return spec
1192132
function(point, series) {
            if(!point || !point.graphic) {
                return;
            }
            point.graphic.attr({'fill': this.fadedElementColor, 'stroke-width': 1, 'stroke': this.fadedElementBorderColor});
        }
129432
def valid_color(x: str) -> bool:
    
    if isinstance(x, str) and re.match(COLOR_PATTERN, x):
        return True
    else:
        return False
825728
def draw_bars(out_value, features, feature_type, width_separators, width_bar):
    """"""
    rectangle_list = []
    separator_list = []
    
    pre_val = out_value
    for index, features in zip(range(len(features)), features):
        if feature_type == 'positive':
            left_bound = float(features[0])
            right_bound = pre_val
            pre_val = left_bound
            
            separator_indent = np.abs(width_separators)
            separator_pos = left_bound
            colors = ['#FF0D57', '#FFC3D5']
        else:
            left_bound = pre_val
            right_bound = float(features[0])
            pre_val = right_bound
            
            separator_indent = - np.abs(width_separators)
            separator_pos = right_bound
            colors = ['#1E88E5', '#D1E6FA']
        
        # Create rectangle
        if index == 0:
            if feature_type == 'positive':
                points_rectangle = [[left_bound, 0],
                                    [right_bound, 0],
                                    [right_bound, width_bar],
                                    [left_bound, width_bar],
                                    [left_bound + separator_indent, (width_bar / 2)]
                                    ]
            else:
                points_rectangle = [[right_bound, 0],
                                    [left_bound, 0],
                                    [left_bound, width_bar],
                                    [right_bound, width_bar],
                                    [right_bound + separator_indent, (width_bar / 2)]
                                    ]
        
        else:
            points_rectangle = [[left_bound, 0],
                                [right_bound, 0],
                                [right_bound + separator_indent * 0.90, (width_bar / 2)],
                                [right_bound, width_bar],
                                [left_bound, width_bar],
                                [left_bound + separator_indent * 0.90, (width_bar / 2)]]

        line = plt.Polygon(points_rectangle, closed=True, fill=True,
                           facecolor=colors[0], linewidth=0)
        rectangle_list += [line]

        # Create seperator
        points_separator = [[separator_pos, 0],
                            [separator_pos + separator_indent, (width_bar / 2)],
                            [separator_pos, width_bar]]
        
        line = plt.Polygon(points_separator, closed=None, fill=None,
                           edgecolor=colors[1], lw=3)
        separator_list += [line]

    return rectangle_list, separator_list
556000
private Paint getStylePaint(StyleRow style, FeatureDrawType drawType) {

		Paint paint = featurePaintCache.getPaint(style, drawType);

		if (paint == null) {

			mil.nga.geopackage.style.Color color = null;
			Float strokeWidth = null;

			switch (drawType) {
			case CIRCLE:
				color = style.getColorOrDefault();
				break;
			case STROKE:
				color = style.getColorOrDefault();
				strokeWidth = this.scale * (float) style.getWidthOrDefault();
				break;
			case FILL:
				color = style.getFillColor();
				strokeWidth = this.scale * (float) style.getWidthOrDefault();
				break;
			default:
				throw new GeoPackageException("Unsupported Draw Type: "
						+ drawType);
			}

			Paint stylePaint = new Paint();
			stylePaint.setColor(new Color(color.getColorWithAlpha(), true));
			if (strokeWidth != null) {
				stylePaint.setStrokeWidth(strokeWidth);
			}

			synchronized (featurePaintCache) {

				paint = featurePaintCache.getPaint(style, drawType);

				if (paint == null) {
					featurePaintCache.setPaint(style, drawType, stylePaint);
					paint = stylePaint;
				}

			}
		}

		return paint;
	}
248122
private void paintBorder(Graphics2D g, JComponent c, int x, int y, int width, int height) {
        boolean useToolBarColors = isInToolBar(c);
        Shape   s;

        if (focused) {
            s = shapeGenerator.createRoundRectangle(x - 2, y - 2, width + 3, height + 3, CornerSize.OUTER_FOCUS);
            g.setPaint(getFocusPaint(s, FocusType.OUTER_FOCUS, useToolBarColors));
            g.draw(s);
            s = shapeGenerator.createRoundRectangle(x - 1, y - 1, width + 1, height + 1, CornerSize.INNER_FOCUS);
            g.setPaint(getFocusPaint(s, FocusType.INNER_FOCUS, useToolBarColors));
            g.draw(s);
        }

        if (type != CommonControlState.DISABLED) {
            s = shapeGenerator.createRoundRectangle(x + 1, x + 1, width - 2, height - 2, CornerSize.BORDER);
            internalShadow.fill(g, s, false, true);
        }

        s = shapeGenerator.createRoundRectangle(x, y, width - 1, height - 1, CornerSize.BORDER);
        g.setPaint(getTextBorderPaint(type, !focused && useToolBarColors));
        g.draw(s);
    }
1015248
public static boolean isNonStandard(GeometryType geometryType) {
		return GeometryCodes.getCode(geometryType) > GeometryCodes
				.getCode(GeometryType.SURFACE);
	}
1272797
def _prepare_draw(self, view=None):
        

        if self._changed['pos']:
            self.pos_buf.set_data(self._pos)
            self._changed['pos'] = False

        if self._changed['color']:
            self.color_buf.set_data(self._color)
            self._program.vert['color'] = self.color_buf
            self._changed['color'] = False

        return True
777522
def check_color(c):
    

    c = asarray(c)
    if c.ndim == 1:
        c = c.flatten()
        c = c[newaxis, :]
        if c.shape[1] != 3:
            raise Exception("Color must have three values per point")
    elif c.ndim == 2:
        if c.shape[1] != 3:
            raise Exception("Color array must have three values per point")
    return c
21504
function DrawYErrorBar($x_world,$y_world,$error_height,$error_bar_type,$color) {
    $x1 = $this->xtr($x_world);
    $y1 = $this->ytr($y_world);
    $y2 = $this->ytr($y_world+$error_height) ;

    for ($width = 0; $width < $this->error_bar_line_width; $width++) {
      ImageLine($this->img, $x1+$width, $y1 , $x1+$width, $y2, $color);
      ImageLine($this->img, $x1-$width, $y1 , $x1-$width, $y2, $color);
    }
    switch ($error_bar_type) {
      case "line":
        break;
      case "tee":
        ImageLine($this->img, $x1-$this->error_bar_size, $y2, $x1+$this->error_bar_size, $y2, $color);
        break;
      default:
        ImageLine($this->img, $x1-$this->error_bar_size, $y2, $x1+$this->error_bar_size, $y2, $color);
        break;
    }
    return true;
  }
890559
def color_map_data(self, data: numpy.ndarray) -> None:
        
        self.__color_map_data = data
        self.update()
345691
private void HelperRGB(float red, float green, float blue) {
    	PdfXConformanceImp.checkPDFXConformance(writer, PdfXConformanceImp.PDFXKEY_RGB, null);
        if (red < 0)
            red = 0.0f;
        else if (red > 1.0f)
            red = 1.0f;
        if (green < 0)
            green = 0.0f;
        else if (green > 1.0f)
            green = 1.0f;
        if (blue < 0)
            blue = 0.0f;
        else if (blue > 1.0f)
            blue = 1.0f;
        content.append(red).append(' ').append(green).append(' ').append(blue);
    }
1229793
def draw(self, **kwargs):
        
        # Quick validation
        for param in ('feature_importances_', 'features_'):
            if not hasattr(self, param):
                raise NotFitted("missing required param '{}'".format(param))

        # Find the positions for each bar
        pos = np.arange(self.features_.shape[0]) + 0.5

        # Plot the bar chart
        if self.stack:
            colors = color_palette(kwargs.pop('colors', None),
                                   len(self.classes_))
            zeros = np.zeros(self.feature_importances_.shape[1])
            left_arr = np.zeros((self.feature_importances_.shape[1], 2))

            for idx in range(len(self.feature_importances_)):
                left = [
                    left_arr[j, int(self.feature_importances_[idx][j] > 0)]
                    for j in range(len(self.feature_importances_[idx]))
                ]

                self.ax.barh(pos, self.feature_importances_[idx], left=left,
                             color=colors[idx], label=self.classes_[idx])

                left_arr[:, 0] += np.minimum(self.feature_importances_[idx],
                                             zeros)
                left_arr[:, 1] += np.maximum(self.feature_importances_[idx],
                                             zeros)
        else:
            self.ax.barh(pos, self.feature_importances_, align='center')

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

        return self.ax
186743
def paint(self, p, *args):
        '''
          
        '''
        if self.picturenotgened:
            self.generatePicture(self.getBoundingParents()[0].rect())
            self.picturenotgened = False
        pg.ImageItem.paint(self, p, *args)
        self.generatePicture(self.getBoundingParents()[0].rect())
823451
def calculate_colorbar(self):
        
        self._base._process_values()
        self._base._find_range()
        X, Y = self._base._mesh()
        C = self._base._values[:, np.newaxis]
        return X, Y, C
225641
def _get_brush(self, color):
        
        result = self._brushes.get(color)
        if result is None:
            qcolor = self._get_color(color)
            result = QtGui.QBrush(qcolor)
            self._brushes[color] = result
        return result