Oops, my bad.
That script was just a quick sample I rigged up. The zeros weren't
actually causing the problem. It did make me look elsewhere though.
The problem was caused by me assuming I need to pass in the xticks
already logarithmically scaled, which was incorrect.
Thanks for the help Darren.