Exporting to PDF with matplotlib PDF images bug

I have PDF images in my presentation generated via matplotlib.
When I export my presentation to a PDF file, these images encounter problems.

  • colorbars are white.
  • An overall grid with ticks (0 to 1) is added to my figures with subplots, which of course gets mixed up with my original ticks.