I have a MatPlotLib graph with a logarithmic y-axis. The range of data on the y axis is from 10^3 to 10^6. Now when I plot this graph, the y-axis has a tick at the points 10^3, 10^4, 10^5 and 10^6, with each one labelled. However, I also want to see some ticks between these. For example, I want to see ticks at 2*10^3, 3*10^3, 4*10^3 etc. However, I do not want these ticks to be labelled; the only labels should be for the "major" ticks.
How can I do this? I have played around with set_major_locator
and set_major_locator
, but these seem to just label every tick, whereas I only want the major ticks to have labels. Additionally, I'm not sure which locator class should be used to specify ticks at 2*10^3, 3*10^3, 4*10^3 etc.