File: plot_multi.py

package info (click to toggle)
vedo 2025.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,404 kB
  • sloc: python: 64,792; javascript: 1,932; xml: 437; sh: 139; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 537 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Use of plot() function analogous to matplotlib"""
from vedo import *
from vedo.pyplot import plot

x = np.linspace(0, 5, 10)

fig1 = plot(x, x*x,    'sg-',  title='Plot1: y=x*x')
fig2 = plot(x, cos(x), '*r--', title='Plot2: y=cos(x)')
fig3 = plot(x, sqrt(x),'Db-',  title='Plot3: y=sqrt(x)')
fig4 = plot(x, sin(x), '*t--', title='Plot4: y=sin(x)')

# window shape can be expressed as "n/m" or "n|m"
plt = show(
     fig1, fig2, fig3, fig4,
     shape="3|1", sharecam=False, size=(1300,900), zoom='tight',
)
plt.interactive().close()