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

Method draw_line

plotly/matplotlylib/mplexporter/exporter.py:190–213  ·  view source on GitHub ↗

Process a matplotlib line and call renderer.draw_line

(self, ax, line, force_trans=None)

Source from the content-addressed store, hash-verified

188 warnings.warn("Legend element %s not impemented" % child)
189
190 def draw_line(self, ax, line, force_trans=None):
191 """Process a matplotlib line and call renderer.draw_line"""
192 coordinates, data = self.process_transform(
193 line.get_transform(), ax, line.get_xydata(), force_trans=force_trans
194 )
195 linestyle = utils.get_line_style(line)
196 if linestyle["dasharray"] is None and linestyle["drawstyle"] == "default":
197 linestyle = None
198 markerstyle = utils.get_marker_style(line)
199 if (
200 markerstyle["marker"] in ["None", "none", None]
201 or markerstyle["markerpath"][0].size == 0
202 ):
203 markerstyle = None
204 label = line.get_label()
205 if markerstyle or linestyle:
206 self.renderer.draw_marked_line(
207 data=data,
208 coordinates=coordinates,
209 linestyle=linestyle,
210 markerstyle=markerstyle,
211 label=label,
212 mplobj=line,
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"""

Callers 2

crawl_axMethod · 0.95
crawl_legendMethod · 0.95

Calls 2

process_transformMethod · 0.95
draw_marked_lineMethod · 0.45

Tested by

no test coverage detected