I am currently producing a plot which on the x-axis ranges from 0 to 1.3e7. I am plotting this as follows:
plt.errorbar(num_vertices,sampled_ave_path_average,yerr=sampled_ave_path_stdev,fmt='.',markersize='1',capsize=2,capthick=2)
plt.xlabel('Number of vertices')
plt.ylabel('Average shortest path length')
plt.xlim(0,1.3*10**7)
plt.savefig('path_length_vs_N.eps', bbox_inches='tight')
plt.savefig('path_length_vs_N.png', bbox_inches='tight')
plt.close()
This produces a plot where the x-axis tick labels are in scientific notation which is what I would like. I was however wondering whether it is possible to move the 1e7
(circled in red below) onto the same line as the other labels? (I realise this could cause confusion about the exponents of the other values.)