Dear matplotlibers,
I encountered a bug (?) in fill_between when using logarithmic scales and
the last part of y and yerr arrays as set to zero: a diagonal stripe going from
the rightmost non zero value to the first value is drawn.
It's visible in the right panel of the attached figure, while is not
present if the plot is linear (left panel).
If xaxis is log and yaxis is linear the plot is correctly drawn.
I'm using mpl.__version__ = '1.1.1rc' under Kubuntu 12.04 with Python 2.7.3
The plot has been created with the script below.
Is this a bug or am I missing something?
Cheers
Francesco
##### error_fill_between.py ######
import matplotlib.pyplot as plt
import numpy as np
#values to plot
x = np.linspace( 1, 10, num=100 )
y = np.exp( -x**2 )
y[50:] = 0
yerr = y* np.random.rand(100)
#figure
fig = plt.figure()
ax1 = fig.add_subplot(121) #first axes: linear
ax1.errorbar( x,y,yerr, c='r' )
ax1.fill_between( x,y-yerr,y+yerr, color='b', alpha=0.4 )
ax2 = fig.add_subplot(122) #second axes: logarithmic
ax2.errorbar( x,y,yerr, c='r' )
ax2.fill_between( x,y-yerr,y+yerr, color='b', alpha=0.4 )
ax2.set_xscale( "log" )
ax2.set_yscale( "log" )
plt.show()
###### end script #########
error_fill_between.pdf (15.8 KB)