docstr: Return AxisInfo instance for x and unit.
docstr_tok: ["Return","AxisInfo","instance","for","x","and","unit","."]
code: def axisinfo(unit, axis):
      """Return AxisInfo instance for x and unit."""
  
      if unit == radians:
          return units.AxisInfo(
              majloc=ticker.MultipleLocator(base=np.pi / 2),
              majfmt=ticker.FuncFormatter(rad_fn),
              label=unit.fullname,
          )
      elif unit == degrees:
          return units.AxisInfo(
              majloc=ticker.AutoLocator(),
              majfmt=ticker.FormatStrFormatter(r"$%i^\circ$"),
              label=unit.fullname,
          )
      elif unit is not None:
          if hasattr(unit, "fullname"):
              return units.AxisInfo(label=unit.fullname)
          elif hasattr(unit, "unit"):
              return units.AxisInfo(label=unit.unit.fullname)
      return None
  
imports: import math
  from packaging.version import parse
  import numpy
  import matplotlib.ticker
  import matplotlib.units
label_desc: Use image node_id 1 for calling the BasicUnitConverter obj's underlying member method code with example usage: obj.axisinfo(unit, axis) and returns: None, units, units, units, units