Skip to content

Commit

Permalink
Early return on plotting code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rowan Cockett committed Oct 30, 2015
1 parent 465087b commit cd01f07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SimPEG/Examples/DCfwd.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def DCfun(mesh, pts):
AinvrM = SolverLU(ArM)
phirM = AinvrM*rhsrM

if not plotIt: return
#Step4: Making Figure
fig, axes = plt.subplots(1,2,figsize=(12*1.2,4*1.2))
label = ["(a)", "(b)"]
Expand Down Expand Up @@ -69,7 +70,6 @@ def DCfun(mesh, pts):
axes[i].set_ylabel(" ")
axes[i].set_xlabel("x")

if plotIt: plt.show()

if __name__ == '__main__':
run()
2 changes: 1 addition & 1 deletion SimPEG/FLOW/Examples/Celia1990.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def getFields(timeStep,method):
Hs_H30 = getFields(30., 'head')
Hs_H120= getFields(120.,'head')

if not plotIt:return
plt.figure(figsize=(13,5))
plt.subplot(121)
plt.plot(40-M.gridCC, Hs_M10[-1],'b-')
Expand All @@ -46,7 +47,6 @@ def getFields(timeStep,method):
plt.xlabel('Depth, cm')
plt.ylabel('Pressure Head, cm')
plt.legend(('$\Delta t$ = 10 sec','$\Delta t$ = 30 sec','$\Delta t$ = 120 sec'))
if plotIt:plt.show()

if __name__ == '__main__':
run()

0 comments on commit cd01f07

Please sign in to comment.