Is it possible to plot the connecting line to points whose y value is zero on a log scale in matplotlib?
I have some data that I want to plot with a log scale on the y-axis. The y values for some of the data lie at zero. I realize it’s not possible for matplotlib to plot these points on a log scale, but I really wish it would draw the connecting line from the previous point or to the next point (if either are non-zero).
One solution would be to simply replace all zeros with some TINY number. I’d rather not do this.
What matplotlib draws:

What I’d like it to draw:

I’d be looking to solve this by using the ‘
symlog‘ option on the y axis instead of ‘log‘. There’s then alinthreshyarg which lets you specifyIn fact it’s exactly this sort of issue the option seems designed to deal with. It can look a bit goofy having this weird linear zone along the bottom of your log scale plot, but you can make it pretty small.