The following simple example shows an issues with zero values when calling `loglog`: ``` import matplotlib.pyplot as plt nu = [1e2, 1e3, 1e4, 1e5, 1e6, 1e7] fnu = [1, 1e-30, 1e-45, 0., 0., 0.] fig = plt.figure() ax = fig.add_subplot(1,1,1) ax.loglog(nu, fnu, color='blue') fig.savefig('mpl.png') ``` The output is:  Of course, zero is undefined in log space, but I don't understand why it defaults to plotting a value of 0.1 instead. Doing: ``` fnu = [1, 1e-30, 1e-45, np.nan, np.nan, np.nan] ``` Does the right thing on the other hand. So maybe the best solution is to replace 0 values by np.nan inside `loglog`? I am using matplotlib 1.5.x with Python 3.4.
Activity
mdboom commentedon Jan 29, 2015
Puzzling -- the values are masked out in the log scalar and have been for years. Something else is going wrong here. Investigating.
mdboom commentedon Jan 29, 2015
First bad commit is 91725d8 (only affects master). Looking into a solution now.
tacaswell commentedon Jan 29, 2015
I thought I fixed this recently....
tacaswell commentedon Jan 29, 2015
#4008
astrofrog commentedon Jan 29, 2015
Great, thanks! That does indeed seem to be the same issue.
tacaswell commentedon Jan 29, 2015
This is a duplicate of #3998
mdboom commentedon Jan 29, 2015
Sorry I missed that duplicate. I have a few comments about the solution over at #4008...