Get the transformation used for drawing y-axis labels, ticks and gridlines. The x-direction is in axis coordinates and the y-direction is in data coordinates. .. note:: This transformation is primarily used by the `~matplotlib.axis.Axis` cl
(self, which='grid')
| 1051 | "bottom", labels_align) |
| 1052 | |
| 1053 | def get_yaxis_transform(self, which='grid'): |
| 1054 | """ |
| 1055 | Get the transformation used for drawing y-axis labels, ticks |
| 1056 | and gridlines. The x-direction is in axis coordinates and the |
| 1057 | y-direction is in data coordinates. |
| 1058 | |
| 1059 | .. note:: |
| 1060 | |
| 1061 | This transformation is primarily used by the |
| 1062 | `~matplotlib.axis.Axis` class, and is meant to be |
| 1063 | overridden by new kinds of projections that may need to |
| 1064 | place axis elements in different locations. |
| 1065 | |
| 1066 | Parameters |
| 1067 | ---------- |
| 1068 | which : {'grid', 'tick1', 'tick2'} |
| 1069 | """ |
| 1070 | if which == 'grid': |
| 1071 | return self._yaxis_transform |
| 1072 | elif which == 'tick1': |
| 1073 | # for cartesian projection, this is bottom spine |
| 1074 | return self.spines.left.get_spine_transform() |
| 1075 | elif which == 'tick2': |
| 1076 | # for cartesian projection, this is top spine |
| 1077 | return self.spines.right.get_spine_transform() |
| 1078 | else: |
| 1079 | raise ValueError(f'unknown value for which: {which!r}') |
| 1080 | |
| 1081 | def get_yaxis_text1_transform(self, pad_points): |
| 1082 | """ |