custom_axes2.py 951 B

12345678910111213141516171819202122232425262728293031323334
  1. from vedo import Points, Axes, show
  2. import numpy as np
  3. pts = np.random.randn(2000,3)*[3,2,4]-[1,2,3]
  4. vpts1 = Points(pts).alpha(0.2).c('blue2')
  5. vpts2 = vpts1.clone().shift(5,6,7).c('green2')
  6. axs = Axes(
  7. [vpts1, vpts2], # build axes for this set of objects
  8. xtitle="X-axis in :mum",
  9. ytitle="Variable Y in :mum",
  10. ztitle="Inverted Z in :mum",
  11. htitle='My :Gamma^2_ijk plot',
  12. htitle_font='Kanopus',
  13. htitle_color='red2',
  14. htitle_size=0.035,
  15. htitle_offset=(0,0.075,0),
  16. htitle_rotation=45,
  17. zhighlight_zero=True,
  18. xyframe_line=2, yzframe_line=1, zxframe_line=1,
  19. xyframe_color='red3',
  20. xyshift=1.05, # move xy 5% above the top of z-range
  21. yzgrid=True,
  22. zxgrid=True,
  23. zxshift=1.0,
  24. xtitle_justify='bottom-right',
  25. xtitle_offset=-1.175,
  26. xlabel_offset=-1.75,
  27. ylabel_rotation=90,
  28. z_inverted=True,
  29. tip_size=0.25,
  30. )
  31. show(vpts1, vpts2, axs, "Customizing Axes", viewup='z').close()