tests/11-vacuum: use exp notation on colorbar

This commit is contained in:
Michele Guerini Rocco 2024-09-11 11:56:58 +02:00 committed by rnhmjoj
parent d5c81268de
commit 52693be83e
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -140,7 +140,8 @@ class Test(GrayTest, TestCase):
plt.tricontourf(data['x'], data['y'],
abs(S_true.real - S_gray.real),
levels=8, cmap='summer')
plt.colorbar()
cbar = plt.colorbar()
cbar.ax.ticklabel_format(scilimits=[0, 0], useMathText=True)
plt.scatter(data['x'], data['y'], c='k', s=5)
plt.subplot(122, aspect='equal')
@ -151,7 +152,8 @@ class Test(GrayTest, TestCase):
plt.tricontourf(data['x'], data['y'],
abs(S_true.imag - S_gray.imag),
levels=8, cmap='summer')
plt.colorbar()
cbar = plt.colorbar()
cbar.ax.ticklabel_format(scilimits=[0, 0], useMathText=True)
plt.scatter(data['x'], data['y'], c='k', s=5)
plt.show()