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

Function test_legend_dots

plotly/matplotlylib/mplexporter/tests/test_basic.py:228–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

226
227
228def test_legend_dots():
229 fig, ax = plt.subplots()
230 ax.plot([1, 2, 3], label="label")
231 ax.plot([2, 2, 2], "o", label="dots")
232 ax.legend().set_visible(True)
233 # legend draws 1 line and 1 marker
234 # path around legend now has 13 vertices??
235 _assert_output_equal(
236 fake_renderer_output(fig, FullFakeRenderer),
237 """
238 opening figure
239 opening axes
240 draw line with 3 points
241 draw 3 markers
242 opening legend
243 draw line with 2 points
244 draw text 'label' None
245 draw 1 markers
246 draw text 'dots' None
247 draw path with 13 vertices
248 closing legend
249 closing axes
250 closing figure
251 """,
252 )
253
254
255def test_blended():

Callers

nothing calls this directly

Calls 4

_assert_output_equalFunction · 0.85
fake_renderer_outputFunction · 0.85
subplotsMethod · 0.80
legendMethod · 0.45

Tested by

no test coverage detected