def _get_ax_freq(ax):
ax_freq = getattr(ax, '<STR_LIT>', None)<EOL>if ax_freq is None:<EOL><INDENT>if hasattr(ax, '<STR_LIT>'):<EOL><INDENT>ax_freq = getattr(ax.left_ax, '<STR_LIT>', None)<EOL><DEDENT>elif hasattr(ax, '<STR_LIT>'):<EOL><INDENT>ax_freq = getattr(ax.right_ax, '<STR_LIT>', None)<EOL><DEDENT><DEDENT>if ax_freq is None:<EOL><INDENT>shared_axes = ax.get_shared_x_axes().get_siblings(ax)<EOL>if len(shared_axes) > <NUM_LIT:1>:<EOL><INDENT>for shared_ax in shared_axes:<EOL><INDENT>ax_freq = getattr(shared_ax, '<STR_LIT>', None)<EOL>if ax_freq is not None:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return ax_freq<EOL>
Get the freq attribute of the ax object if set.
Also checks shared axes (eg when using secondary yaxis, sharex=True
or twinx)