The problem of errorbar's transform option

I found an errorbar with transform option does not work properly.

When you use transform option, only X-Y trace shifts, but not errorbar.

See my sample program below.

The matlotlib version is 0.90.1, though it seems the latest 0.91.1 ends up same.

I want to plot some overlay traces with errorbar.

Can anybody help me?

Noriko Minakawa

···

import pylab as P
from matplotlib.transforms import offset_copy

x = [0.1, 1, 5, 6, 9, 11, 12, 13, 14, 15, 16, 21, 22, 23, 24, 40]
y = [0.1,0.1, 0.1, 1.5, 0.2, 1.2, 100, 250, 180, 90, 0.1, 0.1 ,1.2, 13.5,0.1, 0.1]
er = [1, 2, -1, 2, -5, 3, 6, -1, 3, 1, -2, 5, 2, -3, 2, 1]

fig = P.figure(figsize=(6,6))
ax = P.subplot(1,1,1)

transOffset = offset_copy(ax.transData, fig=fig, x = 0.2, y=0.2, units=‘inches’)

ax.errorbar(x,y, yerr=er, transform=transOffset)

P.show()