learn-python/contrib/plotting-visualization/seaborn-basics.md

20 wiersze
738 B
Markdown
Czysty Zwykły widok Historia

2024-05-31 15:17:43 +00:00
Seaborn helps you explore and understand your data. Its plotting functions operate on dataframes and arrays containing whole datasets and internally perform the necessary semantic mapping and statistical aggregation to produce informative plots. Its dataset-oriented, declarative API lets you focus on what the different elements of your plots mean, rather than on the details of how to draw them.
2024-05-31 15:00:11 +00:00
2024-05-31 15:17:43 +00:00
Heres an example of what seaborn can do:
```Python
# Import seaborn
import seaborn as sns
# Apply the default theme
sns.set_theme()
# Load an example dataset
tips = sns.load_dataset("tips")
# Create a visualization
sns.relplot(
data=tips,
x="total_bill", y="tip", col="time",
hue="smoker", style="smoker", size="size",
)