def _pad_plot_frame(ax, pad=<NUM_LIT>):
xmin, xmax = ax.get_xlim()<EOL>ymin, ymax = ax.get_ylim()<EOL>xr = xmax - xmin<EOL>yr = ymax - ymin<EOL>ax.set_xlim(xmin - xr*pad, xmax + xr*pad)<EOL>ax.set_ylim(ymin - yr*pad, ymax + yr*pad)<EOL>return ax<EOL>
Provides padding on sides of frame equal to pad fraction of plot