mew=0,
              mec='w',
              label=label)

#    if label == 'Snake':
#        ax.loglog(mass[idx], np.sqrt(eps_snake[idx]), marker)

ax.legend(loc='upper right', frameon=True, framealpha=.2, ncol=2)
ax.set_xlabel('mass (g)', fontsize=16)
ax.set_ylabel(r'$\epsilon$    ', fontsize=16, rotation=0)
#ax.set_aspect('equal', adjustable='box')
[ttl.set_size(16) for ttl in ax.get_xticklabels()]
[ttl.set_size(16) for ttl in ax.get_yticklabels()]

# https://stackoverflow.com/questions/21920233/matplotlib-log-scale-tick-label-number-formatting
#from matplotlib.ticker import ScalarFormatter
#for axis in [ax.xaxis, ax.yaxis]:
#    axis.set_major_formatter(ScalarFormatter())
from matplotlib import ticker
ax.xaxis.set_major_formatter(
    ticker.FuncFormatter(lambda y, pos: ('{{:.{:1d}f}}'.format(
        int(np.maximum(-np.log10(y), 0)))).format(y)))
ax.yaxis.set_major_formatter(
    ticker.FuncFormatter(lambda y, pos: ('{{:.{:1d}f}}'.format(
        int(np.maximum(-np.log10(y), 0)))).format(y)))

rcj(ax)
tl(fig)

fig.savefig('Figures/figure8_epsilon.pdf', transparent=True)
ax2.axhline(0, color='gray', alpha=.4)
ax62.axhline(0, color='gray', linestyle='-', linewidth=.75)
ax61.axhline(0, color='gray', linestyle='-', linewidth=.75)

ax4.text(.9, 7.5, 'horizontal', color=bmap[0])
ax4.text(.9, -4.1, 'vertical', color=bmap[1])
ax5.text(.325, 5, 'horizontal', color=bmap[0])
ax5.text(1.3, -3.4, 'vertical', color=bmap[1])

ax2.axis('equal')
rcj(ax2)

axes = [ax1, ax12, ax13, ax3, ax4, ax5, ax61, ax62]
figs = [fig1, fig11, fig2, fig3, fig4, fig5, fig6]
[rcj(aa) for aa in axes]
[tl(f) for f in figs]

# concat all the DataFrames
dfpx = pd.concat(dfpx, axis=1)
dfpz = pd.concat(dfpz, axis=1)
dfvx = pd.concat(dfvx, axis=1)
dfvz = pd.concat(dfvz, axis=1)
dfax = pd.concat(dfax, axis=1)
dfaz = pd.concat(dfaz, axis=1)
dfgm = pd.concat(dfgam, axis=1)
dfvm = pd.concat(dfmag, axis=1)

#fig1.savefig('figs/squirrel/fit_position.pdf')
#fig11.savefig('figs/squirrel/fit_errors.pdf')
#fig2.savefig('figs/squirrel/fit_glide_polar.pdf')
#fig3.savefig('figs/squirrel/fit_cart_coords.pdf')