Return a format string formatting the *x*, *y* coordinates.
(self, x, y)
| 4254 | else self.yaxis.get_major_formatter().format_data_short)(y) |
| 4255 | |
| 4256 | def format_coord(self, x, y): |
| 4257 | """Return a format string formatting the *x*, *y* coordinates.""" |
| 4258 | twins = self._twinned_axes.get_siblings(self) |
| 4259 | if len(twins) == 1: |
| 4260 | return "(x, y) = ({}, {})".format( |
| 4261 | "???" if x is None else self.format_xdata(x), |
| 4262 | "???" if y is None else self.format_ydata(y)) |
| 4263 | screen_xy = self.transData.transform((x, y)) |
| 4264 | xy_strs = [] |
| 4265 | # Retrieve twins in the order of self.figure.axes to sort tied zorders (which is |
| 4266 | # the common case) by the order in which they are added to the figure. |
| 4267 | for ax in sorted(twins, key=attrgetter("zorder")): |
| 4268 | data_x, data_y = ax.transData.inverted().transform(screen_xy) |
| 4269 | xy_strs.append( |
| 4270 | "({}, {})".format(ax.format_xdata(data_x), ax.format_ydata(data_y))) |
| 4271 | return "(x, y) = {}".format(" | ".join(xy_strs)) |
| 4272 | |
| 4273 | def minorticks_on(self): |
| 4274 | """ |