I am trying to plot an xy-graph whose x-axis is logarithmic. I did that using this command:
import matplotlib as plt
plt.plot(X,Y)
plt.xscale('log')
The x-axis is logarithmic, but only values which are multiples of 10 are displayed in the graph, but I need values for all gridlines to be shown in the graph.

As can be seen in the picture, only 10^6 is displayed on the x-axis, but I need values for other points to also be displayed.
python 3.11.4,matplotlib 3.7.1subs(e.g.subs=[.2, .4, .6, .8])..set_minor_formatter.set_major_formatterxandy, setting the minor tick label format, and the font size, can make for an improved visual experience.