import k3d
plot = k3d.plot()
plot += k3d.text2d('\\int_{-\\infty}^\\infty \\hat f(\\xi)\\,e^{2 \\pi i \\xi x} \\,d\\xi',
[0.75,0.5], color=0, size=1.5, reference_point='lt')
plot += k3d.text2d('{(1,1,\\frac{5}{\\pi})}', [0.25, 0.5],
color=0, size=1.5, reference_point='rb')
plot += k3d.text2d('<h1 style="color: red;">Important!</h1>Hello<strong>World</strong>', [0.5, 0.5],
color=0, size=1.5, is_html=True, reference_point='rb')
plot.display()
plot.objects[0].label_box = False
# Multipile texts in single object
import numpy as np
N = 20
positions = np.random.randn(N,2).astype(np.float32)
plot2 = k3d.plot()
obj = k3d.text2d(["lorem ipsum"] * N, positions, is_html=True)
plot2 += obj
plot2.display()
obj.text= list(map(lambda a: str(a), list(range(N))))
obj.position = np.random.randn(N,2).astype(np.float32)