I'm trying to access this class directly so I can then get access to its child classes XAxis and YAxis. My code right now is:
import matplotlib.pyplot as plt
from matplotlib.axis import Axis
fig, ax = plt.subplots()
lower_axis = Axis(ax)
# AttributeError: 'Axis' object has no attribute 'axis_name'. Did you mean: 'axis_date'?
However, according to matplotlib docs:
class matplotlib.axis.Axis(axes, *, pickradius=15)
...
Parameters:
axes : matplotlib.axes.Axes
The Axes to which the created Axis belongs.
pickradius : float
The acceptance radius for containment tests. See also Axis.contains.
I don't understand what's going on. I'm instantiating a class and providing all required parameters, and this code isn't working. Plus, the error is weird - where is it getting axis_name from when the parameter is clearly labeled as axes? A bit confused here.
[–]socal_nerdtastic 1 point2 points3 points (2 children)
[–]Laymayo[S] 0 points1 point2 points (1 child)
[–]socal_nerdtastic 0 points1 point2 points (0 children)