I am trying to plot a simple lineplot using matplotlib, but it automatically changes the range of my plot.
My code:
y2=[49973731579774.89, 49973731579774.82, 49973731579774.76, 49973731579774.71, 49973731579774.66, 49973731579774.62, 49973731579774.59, 49973731579774.57, 49973731579774.555, 49973731579774.55, 49973731579774.52, 49973731579774.516, 49973731579774.51, 49973731579774.51, 49973731579774.5, 49973731579774.5, 49973731579774.49, 49973731579774.49, 49973731579774.49, 49973731579774.484, 49973731579774.48, 49973731579774.48, 49973731579774.47, 49973731579774.47, 49973731579774.47, 49973731579774.47, 49973731579774.46, 49973731579774.46, 49973731579774.45, 49973731579774.45, 49973731579774.45, 49973731579774.45, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.44, 49973731579774.44, 49973731579774.44, 49973731579774.44, 49973731579774.44, 49973731579774.43, 49973731579774.43, 49973731579774.42, 49973731579774.42, 49973731579774.42, 49973731579774.42, 49973731579774.414, 49973731579774.414, 49973731579774.414, 49973731579774.414, 49973731579774.414, 49973731579774.414, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39,49973731579774.39]
x=np.arange(len(y2))
plt.ylim(np.min(y2),np.max(y2))
plt.plot(x,y2,label='Validation MSE',color="orange")
This is what I get:
I want to remove what I've enclosed in the red square of the image above and keep the original range, how can I do it?
Thanks in advance.
Edit:
I have tried changing the tick parameters like here: prevent scientific notation in matplotlib.pyplot
Using the following commands:
fig, ax = plt.subplots()
y2=[49973731579774.89, 49973731579774.82, 49973731579774.76, 49973731579774.71, 49973731579774.66, 49973731579774.62, 49973731579774.59, 49973731579774.57, 49973731579774.555, 49973731579774.55, 49973731579774.52, 49973731579774.516, 49973731579774.51, 49973731579774.51, 49973731579774.5, 49973731579774.5, 49973731579774.49, 49973731579774.49, 49973731579774.49, 49973731579774.484, 49973731579774.48, 49973731579774.48, 49973731579774.47, 49973731579774.47, 49973731579774.47, 49973731579774.47, 49973731579774.46, 49973731579774.46, 49973731579774.45, 49973731579774.45, 49973731579774.45, 49973731579774.45, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.445, 49973731579774.44, 49973731579774.44, 49973731579774.44, 49973731579774.44, 49973731579774.44, 49973731579774.43, 49973731579774.43, 49973731579774.42, 49973731579774.42, 49973731579774.42, 49973731579774.42, 49973731579774.414, 49973731579774.414, 49973731579774.414, 49973731579774.414, 49973731579774.414, 49973731579774.414, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.41, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.4, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39, 49973731579774.39,49973731579774.39]
x=np.arange(len(y2))
plt.ylim(np.min(y2),np.max(y2))
ax.ticklabel_format(useOffset=False, style='plain')
plt.plot(x,y2,label='Validation MSE',color="orange")
plt.show()
But what just the range is changed, I want to keep the decimals.