*style* may be any line style understood by ROOT or matplotlib.

        For full documentation of accepted *style* arguments, see
        :class:`rootpy.plotting.style.LineStyle`.
439938
def SetLineStyle(self, style):
        
        self._linestyle = LineStyle(style)
        if isinstance(self, ROOT.TAttLine):
            ROOT.TAttLine.SetLineStyle(self, self._linestyle('root'))
964618
function _setStyle(canvas, ctx, params, styleName) {
	if (params[styleName]) {
		if (isFunction(params[styleName])) {
			// Handle functions
			ctx[styleName] = params[styleName].call(canvas, params);
		} else {
			// Handle string values
			ctx[styleName] = params[styleName];
		}
	}
}
1196986
def mpl_linestyle2pgfplots_linestyle(line_style, line=None):
    
    # linestyle is a string or dash tuple. Legal string values are
    # solid|dashed|dashdot|dotted.  The dash tuple is (offset, onoffseq) where onoffseq
    # is an even length tuple of on and off ink in points.
    #
    # solid: [(None, None), (None, None), ..., (None, None)]
    # dashed: (0, (6.0, 6.0))
    # dotted: (0, (1.0, 3.0))
    # dashdot: (0, (3.0, 5.0, 1.0, 5.0))
    if isinstance(line_style, tuple):
        if line_style[0] is None:
            return None

        if len(line_style[1]) == 2:
            return "dash pattern=on {}pt off {}pt".format(*line_style[1])

        assert len(line_style[1]) == 4
        return "dash pattern=on {}pt off {}pt on {}pt off {}pt".format(*line_style[1])

    if isinstance(line, mpl.lines.Line2D) and line.is_dashed():
        # see matplotlib.lines.Line2D.set_dashes

        # get defaults
        default_dashOffset, default_dashSeq = mpl.lines._get_dash_pattern(line_style)

        # get dash format of line under test
        dashSeq = line._us_dashSeq
        dashOffset = line._us_dashOffset

        lst = list()
        if dashSeq != default_dashSeq:
            # generate own dash sequence
            format_string = " ".join(len(dashSeq) // 2 * ["on {}pt off {}pt"])
            lst.append("dash pattern=" + format_string.format(*dashSeq))

        if dashOffset != default_dashOffset:
            lst.append("dash phase={}pt".format(dashOffset))

        if len(lst) > 0:
            return ", ".join(lst)

    return {
        "": None,
        "None": None,
        "none": None,  # happens when using plt.boxplot()
        "-": "solid",
        "solid": "solid",
        ":": "dotted",
        "--": "dashed",
        "-.": "dash pattern=on 1pt off 3pt on 3pt off 3pt",
    }[line_style]
681977
def style(self):
        """"""
        style = mapnik.Style()
        rule = mapnik.Rule()
        self._symbolizer = self.symbolizer()
        rule.symbols.append(self._symbolizer)
        style.rules.append(rule)
        return style
12597
def line_join_type(self):
        """"""
        key = self._data.get(b'strokeStyleLineJoinType').enum
        return self.STROKE_STYLE_LINE_JOIN_TYPES.get(key, str(key))
677773
def get_style(self, style):
        
        style_key = tuple(style.items())
        s = self.STYLE_FACTORY.get(style_key, None)
        if s is None:
            s = xlwt.XFStyle()
            for key, values in style.items():
                if key == "background":
                    p = xlwt.Pattern()
                    for attr, value in values:
                        p.__setattr__(attr, value)
                    s.pattern = p
                elif key == "format":
                    s.num_format_str = values
                elif key == "alignment":
                    a = xlwt.Alignment()
                    for attr, value in values:
                        a.__setattr__(attr, value)
                    s.alignment = a
                elif key == "border":
                    b = xlwt.Formatting.Borders()
                    for attr, value in values:
                        b.__setattr__(attr, value)
                    s.borders = b
                elif key == "font":
                    f = self.get_font(values)
                    s.font = f
            self.STYLE_FACTORY[style_key] = s
        return s
254563
def load_mplstyle():
    """"""
    plt = importlib.import_module('matplotlib.pyplot')
    if conf.plot.mplstyle:
        for style in conf.plot.mplstyle.split():
            stfile = config.CONFIG_DIR / (style + '.mplstyle')
            if stfile.is_file():
                style = str(stfile)
            try:
                plt.style.use(style)
            except OSError:
                print('Cannot import style {}.'.format(style),
                      file=sys.stderr)
                conf.plot.mplstyle = ''
    if conf.plot.xkcd:
        plt.xkcd()
136217
def set_default_style(style):
    
    global default_style
    if style == 'dark':
        style = default_dark_style
    elif style == 'light':
        style = default_light_style

    if not issubclass(style, Style):
        raise TypeError(
            "style must be a subclass of pygments.styles.Style or "
            "one of 'dark', 'light'. Got {}".format(repr(style))
        )
    default_style = style
1317198
def list_style(item)
      if item.type != :li
        raise "list_style called with non-list element"
      end
      line = element_line(item).strip
      if line.start_with?('*')
        :asterisk
      elsif line.start_with?('+')
        :plus
      elsif line.start_with?('-')
        :dash
      elsif line.match('[0-9]+\.')
        :ordered
      elsif line.match('[0-9]+\)')
        :ordered_paren
      else
        :unknown
      end
    end
530896
def _plt_handle_figure(plot):
    """

    # Preserve documentation of plot.
    @functools.wraps(plot)

    def inner(obj, **kwargs):

        # Create a figure and an axis if none were passed.
        if kwargs['ax'] is None:
            _, plt, _ = _import_plt()
            fig = plt.figure()
            global _plt_figures
            _plt_figures.append(fig)

            if (hasattr(obj, 'coords') and obj.coords.ndim == 2 and
                    obj.coords.shape[1] == 3):
                kwargs['ax'] = fig.add_subplot(111, projection='3d')
            else:
                kwargs['ax'] = fig.add_subplot(111)

        title = kwargs.pop('title')

        plot(obj, **kwargs)

        kwargs['ax'].set_title(title)

        try:
            fig.show(warn=False)
        except NameError:
            # No figure created, an axis was passed.
            pass

        return kwargs['ax'].figure, kwargs['ax']

    return inner
517477
def _init_glyph(self, plot, mapping, properties):
        
        properties.pop('legend', None)
        for prop in ['color', 'alpha']:
            if prop not in properties:
                continue
            pval = properties.pop(prop)
            line_prop = 'line_%s' % prop
            fill_prop = 'fill_%s' % prop
            if line_prop not in properties:
                properties[line_prop] = pval
            if fill_prop not in properties and fill_prop in self.style_opts:
                properties[fill_prop] = pval
        properties = mpl_to_bokeh(properties)
        plot_method = self._plot_methods['single']
        glyph = plot_method(**dict(properties, **mapping))
        plot.add_layout(glyph)
        return None, glyph
813216
public LinePlot line(double[] y, Line.Style style) {
        return line(null, y, style);
    }
1145777
def _getStyle(node):
    """
    if node.nodeType == Node.ELEMENT_NODE and len(node.getAttribute('style')) > 0:
        styleMap = {}
        rawStyles = node.getAttribute('style').split(';')
        for style in rawStyles:
            propval = style.split(':')
            if len(propval) == 2:
                styleMap[propval[0].strip()] = propval[1].strip()
        return styleMap
    else:
        return {}
381864
def on_linecolor(self, *args):
        
        if hasattr(self, 'color'):
            self.color.rgba = self.linecolor
            return

        def upd_box_translate(*args):
            self.box_translate.xy = self.pos

        def upd_box_points(*args):
            self.box.points = [0, 0, self.width, 0, self.width, self.height, 0, self.height, 0, 0]

        self.boxgrp = boxgrp = InstructionGroup()
        self.color = Color(*self.linecolor)
        self.box_translate = Translate(*self.pos)
        boxgrp.add(PushMatrix())
        boxgrp.add(self.box_translate)
        boxgrp.add(self.color)
        self.box = Line()
        upd_box_points()
        self.bind(
            size=upd_box_points,
            pos=upd_box_translate
        )
        boxgrp.add(self.box)
        boxgrp.add(Color(1., 1., 1.))
        boxgrp.add(PopMatrix())
1308961
def use(style):
        
        def valid(value):  # checks if json'able
            return isinstance(value, six.string_types)

        def translate(mplstyle):
            style = {}
            mapping = [
                ['figure.facecolor', 'background-color'],
                ['xtick.color', 'axes.x.color'],  # TODO: is this the right thing?
                ['xtick.color', 'axes.z.color'],  # map x to z as well
                ['ytick.color', 'axes.y.color'],
                ['axes.labelcolor', 'axes.label.color'],
                ['text.color', 'color'],
                ['axes.edgecolor', 'axes.color'],
            ]
            for from_name, to_name in mapping:
                if from_name in mplstyle:
                    value = mplstyle[from_name]
                    if "color" in from_name:
                        try:  # threejs doesn't like a color like '.13', so try to convert to proper format
                            value = float(value) * 255
                            value = "rgb(%d, %d, %d)" % (value, value, value)
                        except:
                            pass

                    utils.nested_setitem(style, to_name, value)
            return style

        if isinstance(style, six.string_types + (dict,)):
            styles = [style]
        else:
            styles = style
        fig = gcf()
        totalstyle = utils.dict_deep_update({}, fig.style)
        for style in styles:
            if isinstance(style, six.string_types):
                if hasattr(ipyvolume.styles, style):
                    style = getattr(ipyvolume.styles, style)
                else:
                    # lets see if we can copy matplotlib's style
                    # we assume now it's a matplotlib style, get all properties that we understand
                    cleaned_style = {
                        key: value for key, value in dict(matplotlib.style.library[style]).items() if valid(value)
                    }
                    style = translate(cleaned_style)
                    # totalstyle.update(cleaned_style)
            else:
                # otherwise assume it's a dict
                pass
            totalstyle = utils.dict_deep_update(totalstyle, style)

        fig = gcf()
        fig.style = totalstyle
721422
public static PlotCanvas plot(double[] y, Line.Style style) {
        return plot(null, y, style);
    }
200459
def add_to_line_plot(ax, x, y, color = '0.' , label = ''):
    '''  '''
    plt.sca(ax)
    plt.plot(x,y, color = color, label = label)
    return ax