Skip to content
Snippets Groups Projects
Commit 71b892db authored by Arnaud HEMMERLE's avatar Arnaud HEMMERLE
Browse files

Quick fix : add colors to axis in data_1d_twinx

parent 09440295
No related branches found
No related tags found
No related merge requests found
......@@ -279,7 +279,9 @@ def plot_data_1d(
fig = plt.figure(1, figsize=(12,5))
ax1 = fig.add_subplot(111)
ax1.plot(x, y, 'o-')
ax1.plot(x, y, 'bo-')
ax1.yaxis.label.set_color('blue')
ax1.tick_params(axis='y', colors='blue')
ax1.set_xlabel(x_label, fontsize=16)
ax1.set_ylabel(y_label, fontsize=16)
ax1.tick_params(labelsize=16)
......@@ -296,8 +298,11 @@ def plot_data_1d(
ax2 = ax1.twinx()
ax2.plot(x, y2, 'rx-')
ax2.yaxis.label.set_color('red')
ax2.tick_params(axis='y', colors='red')
ax2.set_ylabel(y2_label, fontsize=16)
ax2.tick_params(labelsize=16)
ax2.yaxis.offsetText.set_fontsize(16)
# Avoid strange offsets on the number range
ax2.get_yaxis().get_major_formatter().set_useOffset(False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment