Skip to content

Commit

Permalink
docs: add box plot example to documentation with note on visual highl…
Browse files Browse the repository at this point in the history
…ight feature
  • Loading branch information
jooyoungseo committed Dec 21, 2024
1 parent 7940ce6 commit 4ad7362
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/examples.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,33 @@ plt.title("Model Scores by Task")
maidr.show(heatmap) #<<
```

### Box Plot

* **Note**: Visual highlight feature has not been implemented in the box plot yet.

```{python}
#| fig-alt: Box plot of petal length by species from the Iris dataset
import matplotlib.pyplot as plt
import seaborn as sns
from seaborn import load_dataset
import maidr #<<
# Load the iris dataset
iris = load_dataset("iris")
# Create the horizontal boxplot
horz_box_plot = sns.boxplot(x="petal_length", y="species", data=iris, orient="h") #<<
plt.ylabel("Species")
plt.xlabel("Petal Length")
plt.title("Petal Length by Species from Iris Dataset")
# plt.show()
# Show the plot
maidr.show(horz_box_plot) #<<
```

### Scatter Plot

Expand Down

0 comments on commit 4ad7362

Please sign in to comment.