Add correct formatting of x- and y-labels for EC-plots

This commit is contained in:
rasmusvt 2022-04-22 15:49:02 +02:00
parent 514a20604b
commit 5735d011aa
2 changed files with 34 additions and 1 deletions

View file

@ -135,7 +135,10 @@ def adjust_plot(fig, ax, options):
ax.set_ylabel('')
if not options['hide_x_labels']:
ax.set_xlabel(f'{options["xlabel"]}')
if not options['xunit']:
ax.set_xlabel(f'{options["xlabel"]}')
else:
ax.set_xlabel(f'{options["xlabel"]} [{options["xunit"]}]')
else:
ax.set_xlabel('')