Commit 48b89094 authored by Matthijs's avatar Matthijs
Browse files

improved graphics

parent f513c327
......@@ -80,8 +80,9 @@ def Phase_graphics_3d(config, output):
:return: physical constraint plot, fourier constraint plot, convergence plots
"""
phys_constraint_plot = XYZStackViewer(output['u1'])
fourier_constraint_plot = XYZStackViewer(output['u2'])
phys_constraint_plot = XYZStackViewer(output['u1'],
name='Physical constraint satisfied (%s)' % config['constraint'])
fourier_constraint_plot = XYZStackViewer(output['u2'], name='Fourier constraint satisfied')
convergence_plots, ax = subplots(1, 2, figsize=(7, 3))
ax[0].semilogy(output['change'])
......@@ -93,6 +94,7 @@ def Phase_graphics_3d(config, output):
ax[1].set_xlabel('iteration')
ax[1].set_title('Gap')
ax[1].set_ylabel('$||x^{2k+1}-x^{2k}||$')
convergence_plots.tight_layout()
show()
return phys_constraint_plot, fourier_constraint_plot, convergence_plots
......@@ -64,6 +64,7 @@ class XYZStackViewer:
defaults to abs() for complex data
:param name: Set the name of the figure to a string.
"""
# TODO: add toggles to set the data transformation, to None, Abs, Complex -> RGB
if get_backend() not in good_backends:
warn(Warning('Current matplotlib backend may not allow for optimal funcionality! Use, e.g., Qt'))
......
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