legendbox.py 435 B

1234567891011121314151617
  1. """Customizing a legend box"""
  2. from vedo import Sphere, Cube, Ellipsoid, Hyperboloid, LegendBox, show
  3. s = Sphere()
  4. c = Cube().x(2)
  5. e = Ellipsoid().x(4)
  6. h = Hyperboloid().x(6)
  7. h.legend('The description for\nthis one is quite long')
  8. lbox = LegendBox([s,c,e,h], width=0.3, height=0.4, markers='s')
  9. lbox.font("Kanopus")
  10. show(s, c, e, h, lbox, __doc__,
  11. axes=1, bg='lightyellow', bg2='white', size=(1200,800), viewup='z'
  12. ).close()