<jupyter_start><jupyter_text>Matrix Plots<jupyter_code>import seaborn as sns
%matplotlib inline
# Using the tips dataset:
tips = sns.load_dataset('tips')
tips.head()
corr1= tips.corr()
corr1
# Plot the correlation matrix using heatmap
sns.heatmap(corr1)
flights = sns.load_dataset("flights")
flights.head()
# Another example:
pivot1 = flights.pivot("month", "year", "passengers")
pivot1

sns.heatmap(pivot1)
# Playing with the color:
sns.heatmap(pivot1  , cmap="YlGnBu")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13, 'fraction_numerical': 0.014, 'mean_word_length': 7.35, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '135062', 'license': 'MIT', 'n_tokens_mistral': 205, 'n_tokens_neox': 196, 'n_words': 41, 'path': 'Section 5/04 Using Matrix Plots .ipynb', 'repo_name': 'PacktPublishing/Migrating-from-R-to-Python-for-Data-Analysis', 'size': '500'}