mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-17 11:26:45 +08:00
Early return on plotting code.
This commit is contained in:
@@ -38,6 +38,7 @@ def run(plotIt=True):
|
|||||||
AinvrM = SolverLU(ArM)
|
AinvrM = SolverLU(ArM)
|
||||||
phirM = AinvrM*rhsrM
|
phirM = AinvrM*rhsrM
|
||||||
|
|
||||||
|
if not plotIt: return
|
||||||
#Step4: Making Figure
|
#Step4: Making Figure
|
||||||
fig, axes = plt.subplots(1,2,figsize=(12*1.2,4*1.2))
|
fig, axes = plt.subplots(1,2,figsize=(12*1.2,4*1.2))
|
||||||
label = ["(a)", "(b)"]
|
label = ["(a)", "(b)"]
|
||||||
@@ -69,7 +70,6 @@ def run(plotIt=True):
|
|||||||
axes[i].set_ylabel(" ")
|
axes[i].set_ylabel(" ")
|
||||||
axes[i].set_xlabel("x")
|
axes[i].set_xlabel("x")
|
||||||
|
|
||||||
if plotIt: plt.show()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
run()
|
run()
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ def run(plotIt=True):
|
|||||||
Hs_H30 = getFields(30., 'head')
|
Hs_H30 = getFields(30., 'head')
|
||||||
Hs_H120= getFields(120.,'head')
|
Hs_H120= getFields(120.,'head')
|
||||||
|
|
||||||
|
if not plotIt:return
|
||||||
plt.figure(figsize=(13,5))
|
plt.figure(figsize=(13,5))
|
||||||
plt.subplot(121)
|
plt.subplot(121)
|
||||||
plt.plot(40-M.gridCC, Hs_M10[-1],'b-')
|
plt.plot(40-M.gridCC, Hs_M10[-1],'b-')
|
||||||
@@ -46,7 +47,6 @@ def run(plotIt=True):
|
|||||||
plt.xlabel('Depth, cm')
|
plt.xlabel('Depth, cm')
|
||||||
plt.ylabel('Pressure Head, cm')
|
plt.ylabel('Pressure Head, cm')
|
||||||
plt.legend(('$\Delta t$ = 10 sec','$\Delta t$ = 30 sec','$\Delta t$ = 120 sec'))
|
plt.legend(('$\Delta t$ = 10 sec','$\Delta t$ = 30 sec','$\Delta t$ = 120 sec'))
|
||||||
if plotIt:plt.show()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
run()
|
run()
|
||||||
|
|||||||
Reference in New Issue
Block a user