Skip to content

Visualization with Shear Center #56

Discussion options

You must be logged in to vote

You can try the SGIO python package: https://pypi.org/project/sgio/. To install: pip install -U sgio.

Then use the following script to create a plot:

import matplotlib.pyplot as plt
import sgio
from sgio.utils.plot import plot_sg_2d

fn = 'cs.dat'  # Your VABS input file name, relative path to this script or absolute path

cs = sgio.read(fn, 'vabs')  # Read VABS input
model = sgio.readOutputModel(f'{fn}.k', 'vabs', sg=cs)  # Read VABS output

fig, ax = plt.subplots()
plot_sg_2d(cs, model, ax)
plt.show()

This should show a plot like this:

This is the default plot. You can add more model elements manually (using the ax object and properties stored in model).

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by rhig2000
Comment options

You must be logged in to vote
1 reply
@rhig2000
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants