I couldn’t find the mentioned method in matplotlib document. Instead I found boolean methods for that.
Where is ‘off’ method in matplotlib doc?
Screen Link:
https://app.dataquest.io/m/147/improving-plot-aesthetics/6/hiding-tick-marks
My Code:
ax.tick_params(bottom="off")
What I expected to happen:
ax.tick_params(bottom=False)
What actually happened:
Because probably you are looking at documentation latest version of matplotlib.
You can check which version you are using by print(matplotlib.__version__)
and refer same version doc.
if you check here in older version matplotlib 1.5.1 - tick_params()
document you can find same.
It changed in matplotlib 3.1.0
. You can see in the API change log for 3.1.0
.
The latest versions of matplotlib use bool
for tick_params.
The DataQuest Courses uses previous versions, check the version using matplotlib.__version__
1 Like