-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for seaborn figure-level functions (#21)
Add support for seaborn figure-level functions
- Loading branch information
1 parent
244a4f3
commit c65dd8a
Showing
5 changed files
with
116 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import seaborn as sns | ||
|
||
import pyreball as pb | ||
|
||
tips = sns.load_dataset("tips") | ||
anscombe = sns.load_dataset("anscombe") | ||
penguins = sns.load_dataset("penguins") | ||
|
||
fig_facet_grid_lmplot = sns.lmplot(data=penguins, x="bill_length_mm", y="bill_depth_mm") | ||
pb.print_figure( | ||
fig_facet_grid_lmplot, | ||
caption="Seaborn FacetGrid from lmplot.", | ||
matplotlib_format="png", | ||
embedded=False, | ||
) | ||
|
||
fig_facet_grid = sns.FacetGrid(tips, col="time", row="sex") | ||
fig_facet_grid.map(sns.scatterplot, "total_bill", "tip") | ||
pb.print_figure( | ||
fig_facet_grid, | ||
caption="Seaborn FacetGrid.", | ||
matplotlib_format="png", | ||
embedded=False, | ||
) | ||
|
||
fig_pair_grid = sns.PairGrid(penguins) | ||
fig_pair_grid.map(sns.scatterplot) | ||
pb.print_figure( | ||
fig_pair_grid, | ||
caption="Seaborn PairGrid.", | ||
matplotlib_format="png", | ||
embedded=False, | ||
) | ||
|
||
fig_joint_grid = sns.JointGrid(data=penguins, x="bill_length_mm", y="bill_depth_mm") | ||
fig_joint_grid.plot_joint(sns.scatterplot, s=100, alpha=0.5) | ||
fig_joint_grid.plot_marginals(sns.histplot, kde=True) | ||
pb.print_figure( | ||
fig_joint_grid, | ||
caption="Seaborn JointGrid.", | ||
matplotlib_format="png", | ||
embedded=False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pyreball" | ||
version = "2.1.2" | ||
version = "2.2.0" | ||
description = "Python reporting tool." | ||
authors = ["Karel Vaculik <[email protected]>"] | ||
license = "Apache-2.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters