Add the text *s* to the 3D Axes at location *x*, *y*, *z* in data coordinates. Parameters ---------- x, y, z : float The position to place the text. s : str The text. zdir : {'x', 'y', 'z', 3-tuple}, optional The d
(self, x, y, z, s, zdir=None, *, axlim_clip=False, **kwargs)
| 2156 | return upper, lower |
| 2157 | |
| 2158 | def text(self, x, y, z, s, zdir=None, *, axlim_clip=False, **kwargs): |
| 2159 | """ |
| 2160 | Add the text *s* to the 3D Axes at location *x*, *y*, *z* in data coordinates. |
| 2161 | |
| 2162 | Parameters |
| 2163 | ---------- |
| 2164 | x, y, z : float |
| 2165 | The position to place the text. |
| 2166 | s : str |
| 2167 | The text. |
| 2168 | zdir : {'x', 'y', 'z', 3-tuple}, optional |
| 2169 | The direction to be used as the z-direction. Default: 'z'. |
| 2170 | See `.get_dir_vector` for a description of the values. |
| 2171 | axlim_clip : bool, default: False |
| 2172 | Whether to hide text that is outside the axes view limits. |
| 2173 | |
| 2174 | .. versionadded:: 3.10 |
| 2175 | **kwargs |
| 2176 | Other arguments are forwarded to `matplotlib.axes.Axes.text`. |
| 2177 | |
| 2178 | Returns |
| 2179 | ------- |
| 2180 | `.Text3D` |
| 2181 | The created `.Text3D` instance. |
| 2182 | """ |
| 2183 | if 'rotation' in kwargs: |
| 2184 | _api.warn_external( |
| 2185 | "The `rotation` parameter has not yet been implemented " |
| 2186 | "and is currently ignored." |
| 2187 | ) |
| 2188 | if 'rotation_mode' in kwargs: |
| 2189 | _api.warn_external( |
| 2190 | "The `rotation_mode` parameter has not yet been implemented " |
| 2191 | "and is currently ignored." |
| 2192 | ) |
| 2193 | text = super().text(x, y, s, **kwargs) |
| 2194 | art3d.text_2d_to_3d(text, z, zdir, axlim_clip) |
| 2195 | return text |
| 2196 | |
| 2197 | text3D = text |
| 2198 | text2D = Axes.text |
no outgoing calls