plot_multi.py 537 B

123456789101112131415161718
  1. """Use of plot() function analogous to matplotlib"""
  2. from vedo import *
  3. from vedo.pyplot import plot
  4. x = np.linspace(0, 5, 10)
  5. fig1 = plot(x, x*x, 'sg-', title='Plot1: y=x*x')
  6. fig2 = plot(x, cos(x), '*r--', title='Plot2: y=cos(x)')
  7. fig3 = plot(x, sqrt(x),'Db-', title='Plot3: y=sqrt(x)')
  8. fig4 = plot(x, sin(x), '*t--', title='Plot4: y=sin(x)')
  9. # window shape can be expressed as "n/m" or "n|m"
  10. plt = show(
  11. fig1, fig2, fig3, fig4,
  12. shape="3|1", sharecam=False, size=(1300,900), zoom='tight',
  13. )
  14. plt.interactive().close()