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

Function get_marker_style

plotly/matplotlylib/mplexporter/utils.py:161–181  ·  view source on GitHub ↗

Get the style dictionary for matplotlib marker objects

(line)

Source from the content-addressed store, hash-verified

159
160
161def get_marker_style(line):
162 """Get the style dictionary for matplotlib marker objects"""
163 style = {}
164 style["alpha"] = line.get_alpha()
165 if style["alpha"] is None:
166 style["alpha"] = 1
167
168 style["facecolor"] = export_color(line.get_markerfacecolor())
169 style["edgecolor"] = export_color(line.get_markeredgecolor())
170 style["edgewidth"] = line.get_markeredgewidth()
171
172 style["marker"] = line.get_marker()
173 markerstyle = MarkerStyle(line.get_marker())
174 markersize = line.get_markersize()
175 markertransform = markerstyle.get_transform() + Affine2D().scale(
176 markersize, -markersize
177 )
178 style["markerpath"] = SVG_path(markerstyle.get_path(), markertransform)
179 style["markersize"] = markersize
180 style["zorder"] = line.get_zorder()
181 return style
182
183
184def get_text_style(text):

Callers

nothing calls this directly

Calls 3

export_colorFunction · 0.85
SVG_pathFunction · 0.85
scaleMethod · 0.45

Tested by

no test coverage detected