0

I have this plot with scientific notation on the top of the left axis. Is there a way to use scientific notation at each ticklabel for this plot? Such as 5.1 *10^9, 5.0 * 10 ^ 9 etc?

enter image description here

This is my code

import numpy as np
import matplotlib.pyplot as plt

plt.figure(figsize=(8,4))
plt.plot(pos_dih_array, n, '-', color = 'b')
plt.xlabel('mirror offset [m]')
plt.ylabel('Total intensity for all frequencies [W]')
plt.title('Total intensity measured between 0 and 10 GHz \n on the detector against the  position of the dihedral mirror')
plt.ticklabel_format(useMathText=True)
plt.grid()
# plt.savefig('Plot_intensity_position_0_10_GHz.png', bbox_inches='tight')
plt.show()
Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
Apinorr
  • 166
  • 3
  • 14

0 Answers0