from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.size'] = 16
t = np.linspace(-1.1, 1.1)
x = t**3
y = t**5
fig = plt.figure(figsize=(10, 10))
ax = fig.add_subplot(1, 1, 1)
plt.plot(x, y, 'r', lw=2, )
plt.plot([0.4, 1], [0.4**1.667, 1**1.667], 'k', lw=2)
plt.plot([0.4, 1], [0.4**1.667, 0.4**1.667], 'k', lw=2)
plt.plot([1, 1], [0.4**1.667, 1**1.667], 'k', lw=2)
plt.annotate(r'$d x$', xy=(0.7, 0.1))
plt.annotate(r'$d y$', xy=(1.05, 0.5))
plt.annotate(r'$d s$', xy=(0.5, 0.5))
ax.spines['left'].set_position('zero')
ax.spines['right'].set_color('none')
ax.spines['bottom'].set_position('zero')
ax.spines['top'].set_color('none')
ax.spines['left'].set_smart_bounds(True)
ax.spines['bottom'].set_smart_bounds(True)
plt.axis([-1.5, 1.5, -1.5, 1.5])
plt.xticks([-1, -0.5, 0.5, 1], [-1, -0.5, 0.5, 1])
plt.yticks([-1, -0.5, 0.5, 1], [-1, -0.5, 0.5, 1])
plt.savefig('ArclengthSegment.svg', bbox_inches='tight')
plt.show()