MCPcopy Index your code
hub / github.com/plotly/plotly.py / draw_text

Method draw_text

plotly/matplotlylib/mplexporter/exporter.py:215–232  ·  view source on GitHub ↗

Process a matplotlib text object and call renderer.draw_text

(self, ax, text, force_trans=None, text_type=None)

Source from the content-addressed store, hash-verified

213 )
214
215 def draw_text(self, ax, text, force_trans=None, text_type=None):
216 """Process a matplotlib text object and call renderer.draw_text"""
217 content = text.get_text()
218 if content:
219 transform = text.get_transform()
220 position = text.get_position()
221 coords, position = self.process_transform(
222 transform, ax, position, force_trans=force_trans
223 )
224 style = utils.get_text_style(text)
225 self.renderer.draw_text(
226 text=content,
227 position=position,
228 coordinates=coords,
229 text_type=text_type,
230 style=style,
231 mplobj=text,
232 )
233
234 def draw_patch(self, ax, patch, force_trans=None):
235 """Process a matplotlib patch object and call renderer.draw_path"""

Callers 2

crawl_axMethod · 0.95
crawl_legendMethod · 0.95

Calls 1

process_transformMethod · 0.95

Tested by

no test coverage detected