79701446

Date: 2025-07-15 00:50:29
Score: 3
Natty:
Report link

As @JohanC answered with base=2 there are no logical positions to place these minor ticks, so my solution was to use `basex=8` for `x` axis and `basey=4` for `y` axis.


basex = 8 # Base for logarithmic scale

basey = 4 # Base for logarithmic scale

fig, ax = plt.subplots(figsize=(8,6))

ax.plot(x, y, 'o--')

ax.set_xscale('log',base = basex)

ax.set_yscale('log', base = basey)

ax.set(title='loglog')

ax.grid()

ax.grid(which="minor", color="0.9")

enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • User mentioned (1): @JohanC
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Igor Soares