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

Function test_text_3d

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py:2382–2392  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

2380
2381@check_figures_equal()
2382def test_text_3d(fig_test, fig_ref):
2383 ax = fig_ref.add_subplot(projection="3d")
2384 txt = Text(0.5, 0.5, r'Foo bar $\int$')
2385 art3d.text_2d_to_3d(txt, z=1)
2386 ax.add_artist(txt)
2387 assert txt.get_position_3d() == (0.5, 0.5, 1)
2388
2389 ax = fig_test.add_subplot(projection="3d")
2390 t3d = art3d.Text3D(0.5, 0.5, 1, r'Foo bar $\int$')
2391 ax.add_artist(t3d)
2392 assert t3d.get_position_3d() == (0.5, 0.5, 1)
2393
2394
2395def test_draw_single_lines_from_Nx1():

Callers

nothing calls this directly

Calls 4

get_position_3dMethod · 0.95
TextClass · 0.90
add_subplotMethod · 0.80
add_artistMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…