Skip to content
Snippets Groups Projects
Commit f82071fe authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

plot_utils: postpone_show now as kwargs

parent a1247751
No related branches found
No related tags found
No related merge requests found
......@@ -161,9 +161,7 @@ def plot_colormap(result, units=ba.Axes.DEFAULT, **kwargs):
plot_array(result.array(), axes_limits=axes_limits, **kwargs)
def plot_specular_simulation_result(result,
units=ba.Axes.DEFAULT,
**kwargs):
def plot_specular_simulation_result(result, units=ba.Axes.DEFAULT, **kwargs):
"""
Plots intensity data for specular simulation result
:param result: SimulationResult from SpecularSimulation
......@@ -195,10 +193,7 @@ def plot_specular_simulation_result(result,
plt.title(title)
def plot_simulation_result(result,
units=ba.Axes.DEFAULT,
postpone_show=False,
**kwargs):
def plot_simulation_result(result, units=ba.Axes.DEFAULT, **kwargs):
"""
Draws simulation result and (optionally) shows the plot.
:param result_: SimulationResult object obtained from GISAS/OffSpec/SpecularSimulation
......@@ -207,6 +202,8 @@ def plot_simulation_result(result,
:param units: units for plot axes
:param postpone_show: postpone showing the plot for later tuning (False by default)
"""
postpone_show = kwargs.pop('postpone_show', False)
if len(result.array().shape) == 1: # 1D data, specular simulation assumed
plot_specular_simulation_result(result, units, **kwargs)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment