Skip to content

Commit

Permalink
Updated code to force inline, interactive plots
Browse files Browse the repository at this point in the history
  • Loading branch information
u-anurag authored and zhuminjie committed Mar 24, 2020
1 parent 5615176 commit 59fc862
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion openseespy/postprocessing/Get_Rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,23 @@
## ##
## Created By - Anurag Upadhyay ##
## Edit 1: Anurag Upadhyay, 12/31/2019, Added shell and solid elements to plot_model ##
## Edit 2: Anurag Upadhyay, 03/02/2020, Added check for Jupyter Notebook and display... ##
## ... mode period ##
## ##
## You can download more examples from https://github.com/u-anurag ##
##########################################################################################

# Check if the script is executed on Jupyter Notebook Ipython. If yes, force inline, interactive ...
# ... backend for Matplotlib.
import sys
import matplotlib

for line in range(0,len(sys.argv)):
if "ipykernel_launcher.py" in sys.argv[line]:
matplotlib.use('nbagg')
break
else:
pass

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -221,7 +234,7 @@ def plot_modeshape(modeNumber):

# Run eigen analysis and get information to print
wipeAnalysis()
eigenVal = eigen(modeNumber)
eigenVal = eigen(modeNumber+1)
Tn=4*asin(1.0)/(eigenVal[modeNumber-1])**0.5

nodeList = getNodeTags()
Expand Down

0 comments on commit 59fc862

Please sign in to comment.