I want to change values across the x- & y-axes in a plot.
import numpy as np
import pandas as pd
from pandas import Series,DataFrame
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['figure.figsize'] = 7,6
x = range(1,20)
y = list(np.random.rand(19) * 100)
fig = plt.figure()
ax = fig.add_axes([0.01,0.1,1,1])
ax.plot(x,y,marker = 'o')
I want to change x-axis values that are appearing as decimals. Instead, I want to customize it and show values like 2,4,6 .. 18.
Any suggestions will be a kind help. Thank you