File: seaborn-example.Rmd

package info (click to toggle)
r-cran-reticulate 1.41.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,088 kB
  • sloc: cpp: 5,154; python: 620; sh: 13; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
title: "Seaborn Example"
output:
  html_document:
    df_print: paged
  pdf_document: default
---

```{r}
library(reticulate)
python <- "~/.virtualenvs/python-3.7.7-venv/bin/python"
if (file.exists(python))
  use_python(python, required = TRUE)
```

```{python}
import numpy as np
import pandas as pd
import seaborn as sns

df = pd.DataFrame(np.random.rand(5, 2), columns=["x", "y"])
sns.scatterplot(data=df, x="x", y="y")
```