Skip to content

Commit

Permalink
simplify hello
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Oct 15, 2023
1 parent 90328a7 commit ee3eeac
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions docs/prerelease/1.4/dashboard/_examples/hello.qmd
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
---
title: "Penguin Bills"
format:
dashboard: default
dashboard:
fill: true
---

```{python}
import seaborn as sns
import matplotlib.pyplot as plt
penguins = sns.load_dataset("penguins")
penguins["bill_ratio"] = (penguins["bill_length_mm"] / penguins["bill_depth_mm"])
```

## Row

```{python}
#| title: Ratio of Bill Length to Depth
sns.displot(
penguins, x = "bill_ratio",
hue = "species", kind = "kde",
legend = True, fill = True,
aspect = 2.5, height = 4
#| title: Bill Length vs. Bill Depth
fig, ax = plt.subplots(figsize=(12, 6))
sns.scatterplot(
x="bill_length_mm", y="bill_depth_mm",
data=penguins, hue="species",
ax=ax
)
```

## Row

```{python}
#| title: Bill Depth
sns.displot(
penguins, x = "bill_depth_mm",
hue = "species", kind = "kde",
legend = False, fill = True,
aspect = 1.67, height = 4
)
sns.histplot(x ="bill_depth_mm", data=penguins, hue="species")
```

```{python}
#| title: Bill Length
sns.displot(
penguins, x = "bill_length_mm",
hue = "species", kind = "kde",
legend=False, fill = True,
aspect = 1.67, height = 4
)
sns.histplot(x ="bill_length_mm", data=penguins, hue="species")
```

0 comments on commit ee3eeac

Please sign in to comment.