Skip to content

Commit

Permalink
Merge pull request #753 from boutproject/test-fci-slab
Browse files Browse the repository at this point in the history
disable plotting in test-fci-slab
  • Loading branch information
bendudson authored Nov 28, 2017
2 parents ec82f22 + ebf9d49 commit 9dfd83e
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions tests/integrated/test-fci-slab/runtest
Original file line number Diff line number Diff line change
Expand Up @@ -122,34 +122,37 @@ for var,mark,label in zip(varlist, markers, labels):
print("............ FAIL")
success = False

try:
# Plot using matplotlib if available
import matplotlib.pyplot as plt

plt.figure()
if False:
try:
# Plot using matplotlib if available
import matplotlib.pyplot as plt

for var,mark,label in zip(varlist, markers, labels):
plt.plot(dx, error_2[var], '-'+mark, label=label)
plt.plot(dx, error_inf[var], '--'+mark)

plt.legend(loc="upper left")
plt.grid()
plt.figure()

for var,mark,label in zip(varlist, markers, labels):
plt.plot(dx, error_2[var], '-'+mark, label=label)
plt.plot(dx, error_inf[var], '--'+mark)

plt.yscale('log')
plt.xscale('log')
plt.legend(loc="upper left")
plt.grid()

plt.xlabel(r'Mesh spacing $\delta x$')
plt.ylabel("Error norm")
plt.yscale('log')
plt.xscale('log')

plt.savefig("fci-norm.pdf")
plt.xlabel(r'Mesh spacing $\delta x$')
plt.ylabel("Error norm")

print("Plot saved to fci-norm.pdf")
plt.savefig("fci-norm.pdf")

if showPlot:
plt.show()
plt.close()
except ImportError:
print("No matplotlib")
print("Plot saved to fci-norm.pdf")

if showPlot:
plt.show()
plt.close()
except ImportError:
print("No matplotlib")
else:
print("Pltting disabled")

if success:
exit(0)
Expand Down

0 comments on commit 9dfd83e

Please sign in to comment.