latexipy icon indicating copy to clipboard operation
latexipy copied to clipboard

Use in Google Colab - RuntimeError: No suitable pdf to png renderer found.

Open fc0712 opened this issue 3 years ago • 1 comments

  • LaTeXiPy version:1.0.1
  • Python version: 3.7.10
  • Operating System: Linux (Google Colab)

Description

Trying to use the base function of creating layout that matches Latex

What I Did

import latexipy as lp
lp.latexify()

figure = shap.plots.bar(shap_values=shap_values,max_display=20,show=False) (figure element from the Shap package)
figure.

**Error**: 

RuntimeError: No suitable pdf to png renderer found.

fc0712 avatar Mar 28 '21 13:03 fc0712

It looks like shap.plots.bar() doesn't return anything?

Some questions:

  1. Can you give me a minimally working example?
  2. Does your code work without latexipy?
  3. What does the expected figure look like?
  4. Does Google Colab have LaTeX? (I've never used it.)
  5. Are you able to use the PGF backend on its own on Google Colab?
  6. What is the output of:
import matplotlib.pyplot as plt


fig = plt.figure()
print(fig.canvas.get_supported_filetypes())

masasin avatar Mar 28 '21 19:03 masasin