DATA VISUALIZATION CONCEPTS (MATPLOTLIB, SEABORN, PANDAS)
------------------------------------------------------------
1. fig_dims
- Meaning: A tuple (width, height) that controls figure size.
- Example: fig_dims = (10, 6)
2. fig = plt.subplots(figsize=fig_dims)
- Creates a figure and axes with given size.
3. sns.boxplot
- Shows distribution, median, quartiles, outliers.
- Example: sns.boxplot(x='gender', y='income', data=df)
4. g = sns.FacetGrid
- Creates grid of small plots for subgroups.
5. col=
- Defines which column to facet on.
6. hue=
- Colors data points by category.
7. col_wrap=
- Number of facet plots per row.
8. height=
- Height of each facet plot.
9. g = g.map(plt.scatter)
- Applies scatterplot to FacetGrid.
10. g.add_legend()
- Adds a legend to FacetGrid.
11. sns.histplot
- Creates histogram.
12. sns.countplot
- Bar plot for category counts.
13. sns.pairplot
- Scatterplots for pairs of numeric columns.
14. plt.figure(figsize=)
- Sets plot size.
15. sns.heatmap
- Creates colored matrix plot.
16. .corr()
- Correlation matrix.
17. annot=True
- Show values on heatmap.
18. fmt=".2f"
- Format numbers (2 decimal places).
19. plt.show()
- Display the plot.
20. pd.crosstab
- Frequency table.
21. margins=True
- Add totals to crosstab.
22. normalize=True
- Show % instead of count.
23. kde=
- Add smooth curve to histogram.
24. sns.scatterplot
- Draws scatter plot.
25. fig, axes = plt.subplots
- Multiple plots layout.
26. nrows=, ncols=
- Grid size for subplots.
27. ax=axes
- Plot in specific subplot.
------------------------------------------------------------
SUMMARY:
These tools help us visualize data relationships, distributions, counts, and patterns for better
analysis.