Matplotlib: Draw a vertical arrow in a log-log plot

Viewed 7798

I am not able to draw a simple, vertical arrow in the following log-log plot:

#!/usr/bin/python2

import matplotlib.pyplot as plt
import matplotlib as mpl

plt.yscale('log')
plt.xscale('log')
plt.ylim((1e-20,1e-10))
plt.xlim((1e-12,1))

plt.arrow(0.00006666, 1e-20, 0, 1e-8 - 1e-20, length_includes_head=True)

plt.savefig('test.pdf')

It just doesn't show. From the documentation it appears as if all the arguments, like width, height and so on relate to the scale of the axis. This is very counter-intuitive. I tried using twin() of the axisartist package to define an axis on top of mine with limits (0,1), (0,1) to have more control over the arrow's parameters, but I couldn't figure out how to have a completely independent axis on top of the primary one.

Any ideas?

3 Answers
Related