Neil G
Neil G

Reputation: 33202

Matplotlib axis labels

How do I reduce the number of ticks on the axes with matplotlib (without using pyplot)?

    self.figure = Figure((2.0, 2.0))
    self.canvas = FigureCanvas(self.figure)
    self.canvas.setParent(self)
    self.axes = self.figure.add_subplot(111)
    self.figure.subplots_adjust(left=0.18)
    self.axes.fill(x, y, 'b')

now....?

Upvotes: 4

Views: 1177

Answers (1)

Neil G
Neil G

Reputation: 33202

In pyplot it was xticks(...), but I couldn't find that in matplotlib.

It turns out, you have to use set_xticks

Upvotes: 3

Related Questions