def make_axis(self, ax, location, props):
        "Given a mpl axes instance, returns a Bokeh LinearAxis object."
        # TODO:
        #  * handle log scaling
        #  * map `labelpad` to `major_label_standoff`
        #  * deal with minor ticks once BokehJS supports them
        #  * handle custom tick locations once that is added to bokehJS
        tf = props['tickformat']
        tv = props['tickvalues']
        if tf and any(isinstance(x, string_types) for x in tf):
            laxis = CategoricalAxis(axis_label=ax.get_label_text())
            assert np.min(tv) >= 0, "Assuming categorical axis have positive-integer dump tick values"
            # Seaborn position its categories on dump tick values indented to zero;
            # Matplotlib does from 1. We need then different offset given the assumed identation.
            offset = np.min(tv) - 1
            rng = FactorRange(factors=[str(x) for x in tf], offset=offset)
            if location in ["above", "below"]:
                self.plot.x_range = rng
            else:
                self.plot.y_range = rng

        else:
            if props['scale'] == "linear":
                laxis = LinearAxis(axis_label=ax.get_label_text())
            elif props['scale'] == "date":
                laxis = DatetimeAxis(axis_label=ax.get_label_text())

        self.plot.add_layout(laxis, location)

        # First get the label properties by getting an mpl.Text object
        label = ax.get_label()
        self.text_props(label, laxis, prefix="axis_label_")


        # Set the tick properties (for now just turn off if necessary)
        #  TODO: mirror tick properties
        if props['nticks'] == 0:
            laxis.major_tick_line_color = None
            laxis.minor_tick_line_color = None
            laxis.major_label_text_color = None

        # To get the tick label format, we look at the first of the tick labels
        # and assume the rest are formatted similarly.
        ticklabels = ax.get_ticklabels()
        if ticklabels:
            self.text_props(ticklabels[0], laxis, prefix="major_label_")

        #newaxis.bounds = axis.get_data_interval()  # I think this is the right func...

        if self.xkcd:
            laxis.axis_line_width = 3
            laxis.axis_label_text_font = "Comic Sans MS, Textile, cursive"
            laxis.axis_label_text_font_style = "bold"
            laxis.axis_label_text_color = "black"
            laxis.major_label_text_font = "Comic Sans MS, Textile, cursive"
            laxis.major_label_text_font_style = "bold"
            laxis.major_label_text_color = "black"

        return laxis
dataset/ETHPy150Open bokeh/bokeh/bokeh/core/compat/bokeh_renderer.py/BokehRenderer.make_axis/original