0

I wonder why my graph is not showing any xticks at all?
my code:

    ax = df.plot(x='A', y='B', marker = 'D', markersize=4)
    ax.set_xbound(lower=-40, upper=40)
    plt.xticks(np.arange(40, -40, 4), rotation=90)
    
chen abien
  • 257
  • 1
  • 6

1 Answers1

0

You are actually doing wrong in

np.arange(40, -40, 4)

It is not giving any result.

If you are trying to get number from -40 to 40 with gap of 4 number then you may try this:

import numpy as np

np.arange(-40,40,4)

Or from 40 to -40 with gap of 4 number then this:

np.arange(40,-40,-4))

Take a look at documentation how to use arange.

imxitiz
  • 3,920
  • 3
  • 9
  • 33