1

I'm using blogdown to build a site. In one post I have a plot created with the following code chunk:

```{r, scatter-plot, echo = F}
library(ggplot2)

ggplot(df, aes(x = x, y = y, color = group)) +
  geom_point()
```

This generates an image named "scatter-plot" inside my static directory, so everything works as expected.

However, if I run a python chunk, the name of the resulting image is "unnamed-chunk", despite I've also added a chunk label:

```{python, scatter-plot-sns, echo = F}
import seaborn as sns

sns.scatterplot(x = x, y = y)
```

I also tried explicitly setting the label argument of the chunk, but it didn't work.

Why the chunk names doesn't work when using Python?

Phil
  • 7,287
  • 3
  • 36
  • 66
User 6683331
  • 692
  • 1
  • 13
  • 31
  • I've created a new Rmd with two Python plots named "plot" and "plt" and for any reason the figures are now named "plot-1" and "plot-3". This is really weird :( – User 6683331 Oct 09 '21 at 17:26
  • `options(knitr.duplicate.label = "allow")` is a global knitr option that allows you to have multiple chunks with the same, not sure if that will translate to python chunks, but check it out, used [This link](https://bookdown.org/yihui/rmarkdown-cookbook/duplicate-label.html) – Daniel_j_iii Oct 09 '21 at 17:30

1 Answers1

0

The issue was solved updating reticulate and rmarkdown packages

Phil
  • 7,287
  • 3
  • 36
  • 66
User 6683331
  • 692
  • 1
  • 13
  • 31