{"id":23035,"library":"ansys-tools-visualization-interface","title":"PyAnsys Tools Visualization Interface","description":"A Python visualization interface for PyAnsys libraries, providing a unified API for plotting mesh objects and scalar/vector fields with backends like PyVista and Plotly. Current version 0.12.1 (stable), with pre-release 1.0.0a1 available. Release cadence is monthly.","status":"active","version":"0.12.1","language":"python","source_language":"en","source_url":"https://github.com/ansys/ansys-tools-visualization-interface","tags":["ansys","visualization","mesh","pyvista","plotly"],"install":[{"cmd":"pip install ansys-tools-visualization-interface","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core backend for 3D visualization.","package":"pyvista","optional":false},{"reason":"Optional backend for interactive web-based plots.","package":"plotly","optional":true},{"reason":"Numerical computations for mesh data.","package":"numpy","optional":false}],"imports":[{"note":"Hyphens in package name must be replaced with underscores in import path.","wrong":"from ansys_tools_visualization_interface import Plotter","symbol":"Plotter","correct":"from ansys.tools.visualization_interface import Plotter"},{"note":"PyVistaBackend is not exposed from the backends package directly; must import from the submodule.","wrong":"from ansys.tools.visualization_interface.backends import PyVistaBackend","symbol":"PyVistaBackend","correct":"from ansys.tools.visualization_interface.backends.pyvista import PyVistaBackend"}],"quickstart":{"code":"from ansys.tools.visualization_interface import Plotter\nimport numpy as np\n\n# Create a simple mesh\npoints = np.array([[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]])\ncells = np.array([[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]])\ncell_types = np.array([5, 5, 5, 5])  # Triangle\n\n# Initialize plotter and add mesh\nplotter = Plotter()\nplotter.add_mesh(points, cells, cell_types)\nplotter.show()","lang":"python","description":"Basic example creating a triangular mesh and displaying it using the default backend."},"warnings":[{"fix":"Review the migration guide at https://github.com/ansys/ansys-tools-visualization-interface/blob/main/doc/source/migration_guide.rst before upgrading.","message":"The v1.0.0a1 pre-release introduces breaking changes in the API. The `Plotter` class and backend interfaces have been refactored. Existing code using v0.12.x may not work with v1.0.0a1 without migration.","severity":"breaking","affected_versions":">=1.0.0a0"},{"fix":"Replace `add_scalar_field(...)` with `add_field(scalar_data=..., ...)`.","message":"The `add_scalar_field` method in v0.12.x is deprecated and will be removed in v1.0.0. Use `add_field` instead.","severity":"deprecated","affected_versions":"0.12.0 to 0.12.1"},{"fix":"Pass backend='pyvista' or backend='plotly' to Plotter constructor.","message":"Backend selection must be done at initialization; you cannot switch backends after creating a Plotter instance.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install the package: pip install ansys-tools-visualization-interface. Then import with underscores: from ansys.tools.visualization_interface import ...","cause":"The package is not installed or the import path uses hyphens incorrectly.","error":"ModuleNotFoundError: No module named 'ansys'"},{"fix":"Use: from ansys.tools.visualization_interface import Plotter","cause":"The import statement is incorrect; the Plotter class is not a top-level attribute of the module.","error":"AttributeError: module 'ansys.tools.visualization_interface' has no attribute 'Plotter'"},{"fix":"Install with plotly support: pip install ansys-tools-visualization-interface[plotly]","cause":"Plotly backend is an optional dependency and not installed by default.","error":"ValueError: Unsupported backend 'plotly' – only 'pyvista' is supported."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}