@@ -1417,7 +1417,7 @@ class BivarColorbar:
14171417 r"""
14181418 Draw a bivariate colorbar in an existing Axes.
14191419
1420- Typically, bivariate colorbars are created using `.Figure.bivar_colorbar `
1420+ Typically, bivariate colorbars are created using `.Figure.colorbar_bivar `
14211421 and associated with `.ColorizingArtist`\s (such as an
14221422 `.AxesImage` generated via `~.axes.Axes.imshow`).
14231423
@@ -1444,9 +1444,6 @@ def __init__(
14441444 mappable : `.ColorizingArtist`
14451445 The mappable whose colormap and norm will be used.
14461446
1447- To show the colors versus index instead of on a 0-1 scale, set the
1448- mappable's norm to ``colors.NoNorm()``.
1449-
14501447 alpha : float
14511448 The colorbars transparency between 0 (transparent) and 1 (opaque).
14521449
@@ -1608,36 +1605,6 @@ def xaxis(self):
16081605 def yaxis (self ):
16091606 return self .ax .yaxis
16101607
1611- """
1612- def _y_limits_changed(self, ax=None):
1613- if not self._allow_change_limits:
1614- ylim = self.ax.get_ylim()
1615- if self.colorizer.norm.norms[0].vmin != ylim[0]:
1616- self.colorizer.norm.norms[0].vmin = ylim[0]
1617- if self.colorizer.norm.norms[0].vmax != ylim[1]:
1618- self.colorizer.norm.norms[0].vmax = ylim[1]
1619-
1620- def _x_limits_changed(self, ax=None):
1621- if not self._allow_change_limits:
1622- xlim = self.ax.get_xlim()
1623- if self.colorizer.norm.norms[1].vmin != xlim[0]:
1624- self.colorizer.norm.norms[1].vmin = xlim[0]
1625- if self.colorizer.norm.norms[1].vmax != xlim[1]:
1626- self.colorizer.norm.norms[1].vmax = xlim[1]
1627- """
1628- """
1629- def _update_limits(self, ax=None):
1630- if not self._allow_change_limits:
1631- ylim = self.ax.get_ylim()
1632- xlim = self.ax.get_xlim()
1633- if (self.colorizer.norm.norms[0].vmin != ylim[0] or
1634- self.colorizer.norm.norms[0].vmax != ylim[1] or
1635- self.colorizer.norm.norms[1].vmin != xlim[0] or
1636- self.colorizer.norm.norms[1].vmax != xlim[1]):
1637- raise ValueError("Changing the limits of this axis must be done "
1638- "using the norm attached to the bivariate colorbar.")
1639- """
1640-
16411608 def update_normals (self , mappable = None ):
16421609 self .set_alpha (self .mappable .get_alpha ())
16431610 #self._draw_all()
@@ -1721,7 +1688,48 @@ def _cbar_cla(self):
17211688
17221689
17231690class MultivarColorbar (Sequence ):
1691+ r"""
1692+ Draw a multivariate colorbar in existing Axes.
1693+
1694+ Typically, multivariate colorbars are created using `.Figure.colorbar_multivar`
1695+ and associated with `.ColorizingArtist`\s (such as an
1696+ `.AxesImage` generated via `~.axes.Axes.imshow`).
1697+
1698+ MultivarColorbar is iterable, and the constituent Colorbar objects can be accessed
1699+ by index.
1700+ """
1701+
17241702 def __init__ (self , axes , mappable = None , ** kwargs ):
1703+ """
1704+ Parameters
1705+ ----------
1706+ axes : list of `~matplotlib.axes.Axes`
1707+ The `~.axes.Axes` instances in which the colorbars are drawn.
1708+
1709+ mappable : `.ColorizingArtist`
1710+ The mappable whose colormap and norm will be used.
1711+
1712+ alpha : float
1713+ The colorbars transparency between 0 (transparent) and 1 (opaque).
1714+
1715+ location : None or {'left', 'right', 'top', 'bottom'}
1716+ Set the multivariate colorbars's location
1717+
1718+ Other Parameters
1719+ ----------------
1720+ orientation : None or {'vertical', 'horizontal'}
1721+ If None, use the value determined by *location*. If both
1722+ *orientation* and *location* are None then defaults to 'vertical'.
1723+
1724+ ticklocation : {'auto', 'left', 'right', 'top', 'bottom'}
1725+ The location of the colorbar ticks. The *ticklocation* must match
1726+ *orientation*. For example, a horizontal colorbar can only have ticks
1727+ at the top or the bottom. If 'auto', the ticks will be the same as
1728+ *location*, so a colorbar to the left will have ticks to the left. If
1729+ *location* is None, the ticks will be at the bottom for a horizontal
1730+ colorbar and at the right for a vertical.
1731+ """
1732+
17251733 if isinstance (mappable , mpl .colorizer .Colorizer ):
17261734 mappable = mcolorizer .ColorizingArtist (mappable )
17271735
@@ -2167,7 +2175,7 @@ def make_axes(parents, location=None, orientation=None, fraction=0.15,
21672175def make_bivar_axes (parents , location = None , fraction = 0.15 ,
21682176 shrink = 1.0 , aspect = 1.0 , ** kwargs ):
21692177 """
2170- Create an `~.axes.Axes` suitable for a bivar_colorbar .
2178+ Create an `~.axes.Axes` suitable for a bivariate colorbar .
21712179
21722180 The Axes is placed in the figure of the *parents* Axes, by resizing and
21732181 repositioning *parents*.
0 commit comments