Commit ed130153 authored by Frederik Zahle's avatar Frederik Zahle
Browse files

try except around plot

parent 4c8010d4
......@@ -25,6 +25,7 @@ class SEAMTower(Component):
PMtarget = Float(1., iotype='in', desc='')
WohlerExpTower = Float(4., iotype='in', desc='')
height = Array(iotype='out', desc='Tower discretization')
t = Array(iotype='out', desc='Wall thickness')
mass = Float(iotype='out', desc='Tower mass')
......@@ -64,7 +65,7 @@ class SEAMTower(Component):
self.mass = self.rho_steel * vol
self.tfat = tfat
self.text = text
self.h = h
self.height = h
def _solve(self, t, D, Meq):
......@@ -89,25 +90,27 @@ class SEAMTower(Component):
fig: object
Bokeh bokeh.plotting.figure object
"""
# formatting
fig.title = 'Tower wall thickness'
fig.xaxis[0].axis_label = 'Height [m]'
fig.yaxis[0].axis_label = 'Thickness [m]'
# fatigue, ultimate and final thickness line plots
fig.line(self.h, self.tfat, line_color='orange',
line_width=2,
line_dash=[4, 4],
legend='Fatigue')
fig.line(self.h, self.text, line_color='green',
line_width=2,
line_dash=[4, 4],
legend='Ultimate')
fig.line(self.h, self.t, line_color='blue',
line_width=2,
legend='Final thickness')
fig.legend[0].orientation = 'bottom_left'
try:
# formatting
fig.title = 'Tower wall thickness'
fig.xaxis[0].axis_label = 'Height [m]'
fig.yaxis[0].axis_label = 'Thickness [m]'
# fatigue, ultimate and final thickness line plots
fig.line(self.height, self.tfat, line_color='orange',
line_width=2,
line_dash=[4, 4],
legend='Fatigue')
fig.line(self.height, self.text, line_color='green',
line_width=2,
line_dash=[4, 4],
legend='Ultimate')
fig.line(self.height, self.t, line_color='blue',
line_width=2,
legend='Final thickness')
fig.legend[0].orientation = 'bottom_left'
except:
pass
return fig
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment