# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

import custom_annotations
import matplotlib.pyplot as plt

plt.figure()
ax = plt.subplot(111)
length = 20.0
head_length = 7.0
#Convert the head length from mm into points (1/72")
head_length_pts = head_length * 72.0/25.4
#Calculate the head width
head_aspect_ratio = 2.5
head_width_pts = head_length_pts / head_aspect_ratio
#Define arrow style
style_str = '-)>'
arrowstyle_str = style_str + ', head_width = ' + str(head_width_pts) + \
    ', head_length = ' + str(head_length_pts) + ', length = ' + str(length * 72/25.4)
#Sets arrow orientation
x_1 = [0.25, 0.5]
#Sets arrowhead tip position
x_2 = [0.5, 0.5]
ax.annotate('', xytext = x_1, textcoords = 'axes fraction', \
    xy = x_2, xycoords = 'axes fraction', clip_on = False, \
    arrowprops = dict(arrowstyle = arrowstyle_str, mutation_scale = 1.0, \
    linewidth = 1, facecolor = [0,0,0], connectionstyle = 'arc3', \
    shrinkA = 0, shrinkB = 0))