2

When I generate an lmplot in Seaborn in Jupyter lab environment, it shows me the following plot:

enter image description here

However, by saving the plot as an eps file using plt.savefig("test.eps") command, and loading it in a LaTeX document, this image is displayed in which the regression lines are not transparent anymore. How can I fix this to get the exact same output as the one rendered in the Jupyter environment earlier?

enter image description here

P.S. I should also mention that, before rendering the image, Jupyter shows me a warning type message saying The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.

JohanC
  • 71,591
  • 8
  • 33
  • 66
amiref
  • 3,181
  • 7
  • 38
  • 62
  • 3
    probably related: https://stackoverflow.com/questions/19638773/matplotlib-plots-lose-transparency-when-saving-as-ps-eps - short answer it seems is: use PDF instead of EPS when creating vector graphics with transparency for latex. – cel Dec 23 '21 at 10:05
  • 3
    As @cel said the postscript spec does not allow alpha (transparency) to be saved. – Jody Klymak Dec 23 '21 at 11:01

0 Answers0