0

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.

Karnivaurus
  • 22,823
  • 57
  • 147
  • 247
  • Maybe you want to read [ask] and [mcve]. Since you are for sure not the first one with this requirement, please tell us in how far other answer have not helped. Also in case you cannot find a solution, provide the code that shows the problem. – ImportanceOfBeingErnest Mar 20 '18 at 13:16
  • https://stackoverflow.com/questions/18467864/minor-ticks-with-only-major-tick-labels-are-shown – Matthew Mar 20 '18 at 13:20

0 Answers0