[Python] Changing the tick frequency on the x or y axis

Discussão em 'Python' iniciado por Stack, Abril 26, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to fix how python plots my data. Say:

    x = [0, 5, 9, 10, 15]
    y = [0, 1, 2, 3, 4]

    matplotlib.pyplot.plot(x, y)
    matplotlib.pyplot.show()


    The x axis' ticks are plotted in intervals of 5. Is there a way to make it show intervals of 1?

    Continue reading...

Compartilhe esta Página