SFEPY-VIEW(1)

πŸ“¦
version 2026.1 Β· 3 versions
, in ubuntu stonking

✨ NAME ✨

sfepy-view β€” okay so bestie, this lil icon views SfePy meshes or the results of SfePy calculations. That's the whole job. And yes, you're in the SfePy manual rn, welcome πŸ’–


🌈 SYNOPSIS 🌈

sfepy-view [-h] [-f field_spec [field_spec …]]
       [--fields-map map [map …]] [-s step] [-l] [-i ISOSURFACES] [-e]
       [-w field] [--factor factor] [--opacity opacity] [--color-map cmap]
       [--axes-options options [options …]] [--no-axes] [--grid-vector1
       grid_vector1] [--grid-vector2 grid_vector2] [--max-plots MAX_PLOTS]
       [--no-labels] [--label-position position] [--no-scalar-bars]
       [--scalar-bar-size size] [--scalar-bar-position position] [-v
       position] [--camera-position camera_position] [--window-size
       window_size] [-a output_file] [-r rate] [-o output_file]
       [--off-screen] [-2] filenames [filenames …]

πŸ¦‹ DESCRIPTION πŸ¦‹

It's a script that gives you quick VTK-based visualizations of your finite element computations results. No cap, that's the vibe: you computed the thing, now you get to look at the thing. πŸ‘‘

In the examples below it is supposed that sfepy is installed. When using the in-place build, replace sfepy-view by python3 sfepy/scripts/resview.py. (iykyk 🫢)

πŸŽ€ Examples πŸŽ€

The examples assume that python -c "import sfepy; sfepy.test('--output-dir=output-tests')" has been run successfully and the resulting data files are present. Do that first, bestie, otherwise it's giving file not found energy 😭

  • View data in output-tests/test_navier_stokes.vtk:
sfepy-view output-tests/navier_stokes-navier_stokes.vtk
  • Customize the above output: plot0: field p, switch on edges, plot1: field u, surface with opacity 0.4, glyphs scaled by factor 2e-2:
sfepy-view output-tests/navier_stokes-navier_stokes.vtk -f p:e:p0 u:o.4:p1 u:g:f2e-2:p1
  • As above, but glyphs are scaled by the factor determined automatically as 20% of the minimum bounding box size:
sfepy-view output-tests/navier_stokes-navier_stokes.vtk -f p:e:p0 u:o.4:p1 u:g:f10%:p1
  • View data and take a screenshot:
sfepy-view output-tests/diffusion-poisson.vtk -o image.png
  • Take a screenshot without a window popping up (stealth mode ✨):
sfepy-view output-tests/diffusion-poisson.vtk -o image.png --off-screen
  • Create animation from output-tests/diffusion-time_poisson.*.vtk:
sfepy-view output-tests/diffusion-time_poisson.*.vtk -a mov.mp4
  • Create animation from output-tests/test_hyperelastic.*.vtk, set frame rate to 3, plot displacements and mooney_rivlin_stress:
sfepy-view output-tests/test_hyperelastic_TL.*.vtk -f u:wu:e:p0 mooney_rivlin_stress:p1 -a mov.mp4 -r 3

πŸ“ POSITIONAL ARGUMENTS πŸ“

  • filenames β€” your results/mesh files. Feed her the goods. 🌸

πŸ’… OPTIONAL ARGUMENTS πŸ’…

  • -h, --help β€” show this help message and exit. Classic. The girlies love a help flag.
  • -f field_spec [field_spec …], --fields field_spec [field_spec …] β€” the fields to plot, bestie, and the options get separated by ":". Here's the whole menu, no skips:
    • "cX" - plot only Xth field component
    • "e" - print edges
    • "fX" - scale factor for warp/glyphs, see --factor option
    • "g" - glyphs (for vector fields only), scale by factor
    • "iX" - plot X isosurfaces
    • "tX" - plot X streamlines, gradient employed for scalar fields
    • "mX" - plot cells with mat_id=X
    • "oX" - set opacity to X
    • "pX" - plot in slot X
    • "r" - recalculate cell data to point data
    • "sX" - plot data in step X
    • "vX" - plotting style: s=surface, w=wireframe, p=points
    • "wX" - warp mesh by vector field X, scale by factor
  • --fields-map map [map …] β€” map fields and cell groups, e.g. 1:u1,p1 2:u2,p2. Matchmaking, but for fields πŸ’˜
  • -s step, --step step β€” select data in a given time step.
  • -l, --outline β€” plot mesh outline. Just the silhouette, the contour, the lewk.
  • -i ISOSURFACES, --isosurfaces ISOSURFACES β€” plot isosurfaces [default: 0]
  • -e, --edges β€” plot cell edges.
  • -w field, --warp field β€” warp mesh by vector field.
  • --factor factor β€” scaling factor for mesh warp and glyphs. Append "%" to scale relatively to the minimum bounding box size. (That's the f10% flex from the examples above πŸ‘†)
  • --opacity opacity β€” set opacity [default: 1.0]
  • --color-map cmap β€” set color_map, e.g. hot, cool, bone, etc. [default: viridis]
  • --axes-options options [options …] β€” options for directional axes, e.g. xlabel="z1" ylabel="z2", zlabel="z3"
  • --no-axes β€” hide orientation axes. Gone. Poof. πŸ™ˆ
  • --grid-vector1 grid_vector1 β€” define positions of plots along grid axis 1 [default: "0, 0, 1.6"]
  • --grid-vector2 grid_vector2 β€” define positions of plots along grid axis 2 [default: "0, 1.6, 0"]
  • --max-plots MAX_PLOTS β€” maximum number of plots along grid axis 1 [default: 4]
  • --no-labels β€” hide plot labels.
  • --label-position position β€” define position of plot labels [default: "-1, -1, 0, 0.2"]
  • --no-scalar-bars β€” hide scalar bars.
  • --scalar-bar-size size β€” define size of scalar bars [default: "0.15, 0.05"]
  • --scalar-bar-position position β€” define position of scalar bars [default: "0.8, 0.02, 0, 1.5"]
  • -v position, --view position β€” camera azimuth, elevation angles, and optionally zoom factor [default: "225,75,0.9"]
  • --camera-position camera_position β€” define camera position.
  • --window-size window_size β€” define size of plotting window.
  • -a output_file, --animation output_file β€” create animation, mp4 file type supported. Main character gets a movie deal 🎬
  • -r rate, --frame-rate rate β€” set framerate for animation.
  • -o output_file, --screenshot output_file β€” save screenshot to file.
  • --off-screen β€” off screen plots, e.g. when screenshotting.
  • -2, --2d-view β€” 2d view of XY plane.

πŸ’œ Author πŸ’œ

SfePy developers β€” the collective, the crew, the founding mothers and fathers of this whole operation 🫢

2020, Robert Cimrman and SfePy developers


And that's the whole page, bestie. Go visualize something gorgeous. πŸ’…βœ¨

version: 2026.1 β€” dated Apr 26, 2026 β€” from the SfePy girlies at SFEPY-VIEW(1). Slay, bye! πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from