returns a map of properties that apply either to the y-axis or to y-axis labels all axis-related keys are renamed to 'axis' and all axis-label-related keys are renamed to 'axisLabels'
510392
function(properties) {
            var key, newKey,
                remapped = {},
                axisProps = this.filterPropsByRegex(properties, /(axisY|secondaryAxis|axisLabelsY|axisTitleY|gridLinesY)/);
            for(key in axisProps) {
                if(axisProps.hasOwnProperty(key)) {
                    if(!this.yAxisKeyIsTrumped(key, properties)) {
                        newKey = key.replace(/(axisY|secondaryAxis)/, "axis");
                        newKey = newKey.replace(/axisLabelsY/, "axisLabels");
                        newKey = newKey.replace(/axisTitleY/, "axisTitle");
                        newKey = newKey.replace(/gridLinesY/, "gridLines");
                        remapped[newKey] = axisProps[key];
                    }
                }
            }
            return remapped;
        }
1195803
def index(self, axes):
        
        return None if axes is self._colormap_axes else self._axes.index(axes)
1171596
def _setup_axes(self, axes_data):
        """"""

        self.__axes.clear()

        key_setter = [
            ("title", self.__axes.set_title),
            ("xlabel", self.__axes.set_xlabel),
            ("ylabel", self.__axes.set_ylabel),
            ("xscale", self.__axes.set_xscale),
            ("yscale", self.__axes.set_yscale),
            ("xticks", self.__axes.set_xticks),
            ("xtick_labels", self.__axes.set_xticklabels),
            ("xtick_params", self.__axes.tick_params),
            ("yticks", self.__axes.set_yticks),
            ("ytick_labels", self.__axes.set_yticklabels),
            ("ytick_params", self.__axes.tick_params),
            ("xlim", self.__axes.set_xlim),
            ("ylim", self.__axes.set_ylim),
            ("xgrid", self.__axes.xaxis.grid),
            ("ygrid", self.__axes.yaxis.grid),
            ("xdate_format", self._xdate_setter),
        ]

        key2setter = OrderedDict(key_setter)

        for key in key2setter:
            if key in axes_data and axes_data[key]:
                try:
                    kwargs_key = key + "_kwargs"
                    kwargs = axes_data[kwargs_key]

                except KeyError:
                    kwargs = {}

                if key == "title":
                    # Shift title up
                    kwargs["y"] = 1.08

                key2setter[key](axes_data[key], **kwargs)
879834
def composition_to_s
      axes.map { |axis| CompositeUnit === axis ? "(#{axis.composition_to_s})" : axis.label.to_s }.join(" #{operator} ")
    end
1091449
function(properties) {
            var key, newKey,
                remapped = {},
                axisProps = this.filterPropsByRegex(properties, /(axisX|primaryAxis|axisLabelsX|axisTitleX|gridLinesX)/);
            for(key in axisProps) {
                if(axisProps.hasOwnProperty(key)) {
                    if(!this.xAxisKeyIsTrumped(key, properties)) {
                        newKey = key.replace(/(axisX|primaryAxis)/, "axis");
                        newKey = newKey.replace(/axisLabelsX/, "axisLabels");
                        newKey = newKey.replace(/axisTitleX/, "axisTitle");
                        newKey = newKey.replace(/gridLinesX/, "gridLines");
                        remapped[newKey] = axisProps[key];
                    }
                }
            }
            return remapped;
        }
695818
def labels(self, mapping):
        
        # If any labels have been expressly removed, we need to track this
        # so that a future .patch() call can do the correct thing.
        existing = set([k for k in self.labels.keys()])
        incoming = set([k for k in mapping.keys()])
        self._label_removals = self._label_removals.union(existing.difference(incoming))

        # Actually update the labels on the object.
        self._patch_property("labels", copy.deepcopy(mapping))
46708
def map_axes(dim_vars, reverse_map=False):
    
    ret_val = defaultdict(list)
    axes = ['X', 'Y', 'Z', 'T']

    for k, v in dim_vars.items():
        axis = getattr(v, 'axis', '')
        if not axis:
            continue

        axis = axis.upper()
        if axis in axes:
            if reverse_map:
                ret_val[k].append(axis)
            else:
                ret_val[axis].append(k)

    return dict(ret_val)
553828
def _y_axis(self, draw_axes=True):
        """"""
        if not self._y_labels or not self.show_y_labels:
            return

        axis = self.svg.node(self.nodes['plot'], class_="axis y web")

        for label, r in reversed(self._y_labels):
            major = r in self._y_labels_major
            if not (self.show_minor_y_labels or major):
                continue
            guides = self.svg.node(
                axis,
                class_='%sguides' %
                ('logarithmic ' if self.logarithmic else '')
            )
            if self.show_y_guides:
                self.svg.line(
                    guides, [self.view((r, theta)) for theta in self._x_pos],
                    close=True,
                    class_='%sguide line' % ('major ' if major else '')
                )
            x, y = self.view((r, self._x_pos[0]))
            x -= 5
            text = self.svg.node(
                guides, 'text', x=x, y=y, class_='major' if major else ''
            )
            text.text = label

            if self.y_label_rotation:
                text.attrib[
                    'transform'
                ] = "rotate(%d %f %f)" % (self.y_label_rotation, x, y)

            self.svg.node(
                guides,
                'title',
            ).text = self._y_format(r)
85341
function () {
            var axis = this,
              chart = axis.chart,
              renderer = chart.renderer,
              options = axis.options,
              tickPositions = axis.tickPositions,
              ticks = axis.ticks,
              horiz = axis.horiz,
              side = axis.side,
              invertedSide = chart.inverted ? [1, 0, 3, 2][side] : side,
              hasData,
              showAxis,
              titleOffset = 0,
              titleOffsetOption,
              titleMargin = 0,
              axisTitleOptions = options.title,
              labelOptions = options.labels,
              labelOffset = 0, // reset
              labelOffsetPadded,
              axisOffset = chart.axisOffset,
              clipOffset = chart.clipOffset,
              directionFactor = [-1, 1, 1, -1][side],
              n,
              i,
              autoStaggerLines = 1,
              maxStaggerLines = pick(labelOptions.maxStaggerLines, 5),
              sortedPositions,
              lastRight,
              overlap,
              pos,
              bBox,
              x,
              w,
              lineNo,
              lineHeightCorrection;

            // For reuse in Axis.render
            axis.hasData = hasData = (axis.hasVisibleSeries || (defined(axis.min) && defined(axis.max) && !!tickPositions));
            axis.showAxis = showAxis = hasData || pick(options.showEmpty, true);

            // Set/reset staggerLines
            axis.staggerLines = axis.horiz && labelOptions.staggerLines;

            // Create the axisGroup and gridGroup elements on first iteration
            if (!axis.axisGroup) {
                axis.gridGroup = renderer.g('grid')
                  .attr({ zIndex: options.gridZIndex || 1 })
                  .add();
                axis.axisGroup = renderer.g('axis')
                  .attr({ zIndex: options.zIndex || 2 })
                  .add();
                axis.labelGroup = renderer.g('axis-labels')
                  .attr({ zIndex: labelOptions.zIndex || 7 })
                  .addClass(PREFIX + axis.coll.toLowerCase() + '-labels')
                  .add();
            }

            if (hasData || axis.isLinked) {

                // Set the explicit or automatic label alignment
                axis.labelAlign = pick(labelOptions.align || axis.autoLabelAlign(labelOptions.rotation));

                // Generate ticks
                each(tickPositions, function (pos) {
                    if (!ticks[pos]) {
                        ticks[pos] = new Tick(axis, pos);
                    } else {
                        ticks[pos].addLabel(); // update labels depending on tick interval
                    }
                });

                // Handle automatic stagger lines
                if (axis.horiz && !axis.staggerLines && maxStaggerLines && !labelOptions.rotation) {
                    sortedPositions = axis.reversed ? [].concat(tickPositions).reverse() : tickPositions;
                    while (autoStaggerLines < maxStaggerLines) {
                        lastRight = [];
                        overlap = false;

                        for (i = 0; i < sortedPositions.length; i++) {
                            pos = sortedPositions[i];
                            bBox = ticks[pos].label && ticks[pos].label.getBBox();
                            w = bBox ? bBox.width : 0;
                            lineNo = i % autoStaggerLines;

                            if (w) {
                                x = axis.translate(pos); // don't handle log
                                if (lastRight[lineNo] !== UNDEFINED && x < lastRight[lineNo]) {
                                    overlap = true;
                                }
                                lastRight[lineNo] = x + w;
                            }
                        }
                        if (overlap) {
                            autoStaggerLines++;
                        } else {
                            break;
                        }
                    }

                    if (autoStaggerLines > 1) {
                        axis.staggerLines = autoStaggerLines;
                    }
                }


                each(tickPositions, function (pos) {
                    // left side must be align: right and right side must have align: left for labels
                    if (side === 0 || side === 2 || { 1: 'left', 3: 'right' }[side] === axis.labelAlign) {

                        // get the highest offset
                        labelOffset = mathMax(
                          ticks[pos].getLabelSize(),
                          labelOffset
                        );
                    }
                });

                if (axis.staggerLines) {
                    labelOffset *= axis.staggerLines;
                    axis.labelOffset = labelOffset;
                }


            } else { // doesn't have data
                for (n in ticks) {
                    ticks[n].destroy();
                    delete ticks[n];
                }
            }

            if (axisTitleOptions && axisTitleOptions.text && axisTitleOptions.enabled !== false) {
                if (!axis.axisTitle) {
                    axis.axisTitle = renderer.text(
                      axisTitleOptions.text,
                      0,
                      0,
                      axisTitleOptions.useHTML
                      )
                      .attr({
                          zIndex: 7,
                          rotation: axisTitleOptions.rotation || 0,
                          align:
                          axisTitleOptions.textAlign ||
                          { low: 'left', middle: 'center', high: 'right' }[axisTitleOptions.align]
                      })
                      .addClass(PREFIX + this.coll.toLowerCase() + '-title')
                      .css(axisTitleOptions.style)
                      .add(axis.axisGroup);
                    axis.axisTitle.isNew = true;
                }

                if (showAxis) {
                    titleOffset = axis.axisTitle.getBBox()[horiz ? 'height' : 'width'];
                    titleOffsetOption = axisTitleOptions.offset;
                    titleMargin = defined(titleOffsetOption) ? 0 : pick(axisTitleOptions.margin, horiz ? 5 : 10);
                }

                // hide or show the title depending on whether showEmpty is set
                axis.axisTitle[showAxis ? 'show' : 'hide']();
            }

            // handle automatic or user set offset
            axis.offset = directionFactor * pick(options.offset, axisOffset[side]);

            lineHeightCorrection = side === 2 ? axis.tickBaseline : 0;
            labelOffsetPadded = labelOffset + titleMargin +
              (labelOffset && (directionFactor * (horiz ? pick(labelOptions.y, axis.tickBaseline + 8) : labelOptions.x) - lineHeightCorrection));
            axis.axisTitleMargin = pick(titleOffsetOption, labelOffsetPadded);

            axisOffset[side] = mathMax(
              axisOffset[side],
              axis.axisTitleMargin + titleOffset + directionFactor * axis.offset,
              labelOffsetPadded // #3027
            );
            clipOffset[invertedSide] = mathMax(clipOffset[invertedSide], mathFloor(options.lineWidth / 2) * 2);
        }
1329922
def readAxes(self):
        
        for axisElement in self.root.findall(".axes/axis"):
            axis = {}
            axis['name'] = name = axisElement.attrib.get("name")
            axis['tag'] = axisElement.attrib.get("tag")
            axis['minimum'] = float(axisElement.attrib.get("minimum"))
            axis['maximum'] = float(axisElement.attrib.get("maximum"))
            axis['default'] = float(axisElement.attrib.get("default"))
            # we're not using the map for anything.
            axis['map'] = []
            for warpPoint in axisElement.findall(".map"):
                inputValue = float(warpPoint.attrib.get("input"))
                outputValue = float(warpPoint.attrib.get("output"))
                axis['map'].append((inputValue, outputValue))
            # there are labelnames in the element
            # but we don't need them for building the fonts.
            self.axes[name] = axis
            self.axesOrder.append(axis['name'])
585318
def common_axis_properties(self, color=None, title_size=None):
        
        if self.axes:
            for axis in self.axes:
                self._set_axis_properties(axis)
                self._set_all_axis_color(axis, color)
                if title_size:
                    ref = ValueRef(value=title_size)
                    axis.properties.title.font_size = ref
        else:
            raise ValueError('This Visualization has no axes!')
        return self
881214
def rename_axis(self, mapper, axis, copy=True, level=None):
        
        obj = self.copy(deep=copy)
        obj.set_axis(axis, _transform_index(self.axes[axis], mapper, level))
        return obj
368284
def axis(self):
        """"""
        return getattr(
            self.colorbar.ax, self.axis_locations[self.position] + 'axis')
1356615
def names(self) -> [str]:
        
        return sorted([name for name in self.axes_by_sname.keys() if name is not ''])
1160643
def _axis_properties(self, axis, title_size, title_offset, label_angle,
                         label_align, color):
        """"""
        if self.axes:
            axis = [a for a in self.axes if a.scale == axis][0]
            self._set_axis_properties(axis)
            self._set_all_axis_color(axis, color)

            if title_size:
                axis.properties.title.font_size = ValueRef(value=title_size)
            if label_angle:
                axis.properties.labels.angle = ValueRef(value=label_angle)
            if label_align:
                axis.properties.labels.align = ValueRef(value=label_align)
            if title_offset:
                axis.properties.title.dy = ValueRef(value=title_offset)
        else:
            raise ValueError('This Visualization has no axes!')
634596
function(key, properties) {
            if(!(/primaryAxis/.test(key))) {
                return false;
            }
            if(/primaryAxisTitle/.test(key)) {
                return properties[key.replace(/primaryAxisTitle/, "axisTitleX")];
            }
            return properties[key.replace(/primaryAxis/, "axisX")];
        }
994248
def _get_slice_axis(self, slice_obj, axis=None):
        
        if axis is None:
            axis = self.axis or 0

        obj = self.obj
        if not need_slice(slice_obj):
            return obj.copy(deep=False)

        labels = obj._get_axis(axis)
        indexer = labels.slice_indexer(slice_obj.start, slice_obj.stop,
                                       slice_obj.step, kind=self.name)

        if isinstance(indexer, slice):
            return self._slice(indexer, axis=axis, kind='iloc')
        else:
            return self.obj._take(indexer, axis=axis)