plot_utils: make post_plot_setup set different xlabels
diff --git a/cr2/plot_utils.py b/cr2/plot_utils.py
index 7287e4f..e361fa6 100644
--- a/cr2/plot_utils.py
+++ b/cr2/plot_utils.py
@@ -47,13 +47,16 @@
return ax
-def post_plot_setup(ax, title="", ylim=None):
+def post_plot_setup(ax, title="", xlabel=None, ylim=None):
"""Set xlabel, title and ylim of the plot
This has to be called after calls to .plot()
"""
- plt.xlabel("Time")
+ if xlabel is None:
+ xlabel = "Time"
+ plt.xlabel(xlabel)
+
if title:
plt.title(title)