BelwarDissengulp
BelwarDissengulp

Reputation: 156

Quarto: Images not rendering

I'm writing a Beamer presentation using Quarto so I may add some Python outputs here and there, however my external images aren't being rendered when I generate a PDF through Quarto. Here's my preamble:

title: "domba2023"
format: 
  beamer:
    pdf-engine: pdflatex
    include-in-header:
      - text: |
          \usepackage[T1]{fontenc}
          \usepackage[utf8]{inputenc} 
lang: pt
editor: visual
jupyter: python3

Here's what I get when I run quarto check at the console:

[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.3.361
      Path: C:\Program Files\Quarto\bin
      CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.11.3
      Path: C:/Users/Asus/AppData/Local/Programs/Python/Python311/python.exe
      Jupyter: 5.3.0
      Kernels: python3

(\) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[>] Checking Jupyter engine render....OK

[>] Checking R installation...........OK
      Version: 4.1.3
      Path: C:/R/R-4.1.3
      LibPaths:
        - C:/R/R-4.1.3/library
      knitr: 1.42
      rmarkdown: 2.21

[>] Checking Knitr engine render......OK

Upvotes: 1

Views: 637

Answers (1)

krise
krise

Reputation: 1

I had a similar issue with rendering figures in HTML output and resolved it by explicitly calling the .draw() method. Here is an example:

from plotnine import ggplot, geom_point, aes, stat_smooth, facet_wrap
from plotnine.data import mtcars

figure = (ggplot(mtcars, aes("wt", "mpg", color="factor(gear)"))
 + geom_point()
 + stat_smooth(method="lm")
 + facet_wrap("~gear"))
figure.draw()

Upvotes: 0

Related Questions