set_vector()
Configures vector glyphs (arrows/cones/spheres) for a 3-component vector array.
set_vector() is part of the visualization pipeline. Like the other pipeline methods, calling it only stores the configuration — glyphs are not computed or added to the scene until show() or export() triggers a rebuild.
Glyphs are generated per-block for pyvista.MultiBlock datasets.
Parameters
name(Literal[...]) — Vector array name (must exist and be 3-component)."B-Mag (T)""B-Vec (T)""Flux (A/m)""J-Mag (A/m^2)""J-Vec (A/m^2)""Loss (W/m^3)""F Nodal-Mag (N/m^3)""F Nodal-Vec (N/m^3)""F Lorents-Mag (N/m^3)""F Lorents-Vec (N/m^3)""Heat Density (W/m^3)""Heat (W)"
scale(str | bool | None, default:None) — Controls glyph scaling:None: scale by vector magnitude (internally usesname)str: scale by a separate scalar arrayFalse: uniform glyph size
glyph_type("arrow" | "cone" | "sphere", default:"arrow") — Glyph geometry.factor(float, default:1.0) — Global size multiplier.tolerance(float | None, default:None) — Reduce glyph density (fraction of bounding box).Noneshows all glyphs.color_mode(str, default:"scale") — Passed to PyVista’s glyph coloring (typically"scale","scalar", or"vector").**kwargs— Forwarded toadd_mesh()for the glyph actor(s) (examples:cmap,clim,opacity).
Returns
Plotter— returnsselfto enable chaining.
Examples
from pyemsi import Plotter, examples
file_path = examples.transient_path()
plt = Plotter(file_path)
plt.set_vector("B-Vec (T)", scale="B-Mag (T)", factor=5e-1, show_scalar_bar=False)
plt.set_feature_edges(color="red", line_width=3)
plt.set_block_visibility("4", False)
plt.show()
See also
set_scalar()— configure scalar field coloringset_contour()— add contour linesset_feature_edges()— configure edge overlayset_block_visibility()— hide/show individual mesh blocksshow()— trigger rendering and apply the full pipelineexport()— render and save a screenshot