Instead of estimating the PDF and drawing contours with plt.contour, we could directly use credible intervals (fastCI) in y-direction to compute the contours. This avoids typical KDE/PDF-estimation problems like many of the fluctuations due to sample density. It would also allow drawing lines corresponding to lower and upper bounds.
I plan to make a PR for this eventually, just wanted to mention this here already; if anyone is interested in having this right now send me an email and I'll be happy to help!
I will finish my PR in anesthetic first, but in principle this method also works very well for fgivenx. I have just implemented fgivenx with credibility intervals for a project here (will add examples later).