Getting Started
Getting started in OpenSeesPy and opsvis is straightforward especially if you are already using OpenSeesPy
Under Windows do the following steps:
download and install Anaconda distribution from https://www.anaconda.com/download
Please check the current Python (e.g. 3.12) version required for OpenSeesPy (e. g. 3.7.0.4). More details can be found in OpenSeesPy documentation
After installing Anaconda, run its Powershell Prompt and type
pip install openseespy pip install opsvis
Launch Spyder from Anaconda
Download Python example files from this opsvis website
Open an example .py file in Spyder editor
Note that opsvis commands begins with ‘opsv.’ as it is specified in the ‘import opsvis as opsv’ at the beginning of each example file.
Run the example: (1) throught Menu - Run or (2) green triangle button in the toolbar or (3) pressing F1 shortcut key.
After running the example the plots should appear in the Plots tab of Spyder.
Alternatively (recommended), the plots can be displayed outside the Spyder window. To achieve this, change the following settings. Go to Menu - Preferences - Ipython Console - Graphics tab and here change the ‘Inline’ option to ‘Automatic’. Click Apply and Ok.
Check other opsvis examples and read the opsvis commands (e.g. plot_model, plot_defo, plot_load, plot_stress documentation.
Basic usage
To use Opsvis in your OpenSeesPy scripts, begin your .py file with the
following import:
import openseespy.opensees as ops
import opsvis as opsv
import matplotlib.pyplot as plt
# ... your OpenSeesPy model and analysis commands ...
opsv.plot_model()
opsv.plot_load()
opsv.plot_reactions()
sfac = opsv.plot_defo()
Commands
The main commands for visualizing various aspects of an OpenSees model are as follows:
You can also make use of the following helper functions:
Check out the Examples page for usage demonstrations.