code: def yday2date(x):
      """Return a matplotlib datenum for *x* days after 2018-01-01."""
      y = x + mdates.date2num(datetime.datetime(2018, 1, 1))
      return y
  
file_path: matplotlib/galleries/examples/subplots_axes_and_figures/secondary_axis.py
imports: import datetime
  import matplotlib.pyplot
  import numpy
  import matplotlib.dates
  from matplotlib.ticker import AutoMinorLocator
label_desc: Use image node_id 7 for calling a global function with example usage: yday2date(x) and returns: y