MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_nanscatter

Function test_nanscatter

lib/matplotlib/tests/test_legend.py:555–572  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

553
554
555def test_nanscatter():
556 fig, ax = plt.subplots()
557
558 h = ax.scatter([np.nan], [np.nan], marker="o",
559 facecolor="r", edgecolor="r", s=3)
560
561 ax.legend([h], ["scatter"])
562
563 fig, ax = plt.subplots()
564 for color in ['red', 'green', 'blue']:
565 n = 750
566 x, y = np.random.rand(2, n)
567 scale = 200.0 * np.random.rand(n)
568 ax.scatter(x, y, c=color, s=scale, label=color,
569 alpha=0.3, edgecolors='none')
570
571 ax.legend()
572 ax.grid(True)
573
574
575def test_legend_repeatcheckok():

Callers

nothing calls this directly

Calls 4

subplotsMethod · 0.45
scatterMethod · 0.45
legendMethod · 0.45
gridMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…