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

Function get_text_style

plotly/matplotlylib/mplexporter/utils.py:184–197  ·  view source on GitHub ↗

Return the text style dict for a text instance

(text)

Source from the content-addressed store, hash-verified

182
183
184def get_text_style(text):
185 """Return the text style dict for a text instance"""
186 style = {}
187 style["alpha"] = text.get_alpha()
188 if style["alpha"] is None:
189 style["alpha"] = 1
190 style["fontsize"] = text.get_size()
191 style["color"] = export_color(text.get_color())
192 style["halign"] = text.get_horizontalalignment() # left, center, right
193 style["valign"] = text.get_verticalalignment() # baseline, center, top
194 style["malign"] = text._multialignment # text alignment when '\n' in text
195 style["rotation"] = text.get_rotation()
196 style["zorder"] = text.get_zorder()
197 return style
198
199
200def get_axis_properties(axis):

Callers

nothing calls this directly

Calls 1

export_colorFunction · 0.85

Tested by

no test coverage detected