Commit 1a154eb5 authored by Stefan Mauerberger's avatar Stefan Mauerberger
Browse files

Use non-blocking draw()

parent ce249be1
......@@ -32,6 +32,7 @@ import argparse
from . import commands
from pymagglobal import models
from pymagglobal import __version__
from matplotlib import pyplot as plt
class ListModelsAction(argparse.Action):
......@@ -202,6 +203,8 @@ def main():
# call the respective function, specified using .set_defaults(func=...)
args.func(args)
if not args.no_show:
plt.show()
if __name__ == '__main__':
......
......@@ -174,7 +174,7 @@ def master_curve(args):
else:
axs[it].set_xlabel(utils.nicelabel(args.t_label))
fig.tight_layout(rect=[0, 0.03, 1, 0.95])
plt.show()
plt.draw()
def dipole_series(args):
......@@ -220,7 +220,7 @@ def dipole_series(args):
else:
ax.set_xlabel(utils.nicelabel(args.t_label))
fig.tight_layout()
plt.show()
plt.draw()
def coefficients(args):
......@@ -353,4 +353,4 @@ def maps(args):
fig.colorbar(cm.ScalarMappable(norm=norm, cmap=cmaps[it]),
cax=colax,
orientation='horizontal')
plt.show()
plt.draw()
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