Advertisement
jck373

Untitled

Apr 23rd, 2024
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import seaborn as sns
  2. import pandas as pd
  3. import matplotlib.pyplot as plt
  4.  
  5. data = {
  6.     'A': [1, 2, 3],
  7.     'B': [4, 5, 6],
  8.     'C': [7, 8, 9]
  9. }
  10. df = pd.DataFrame(data, index=['X', 'Y', 'Z'])
  11.  
  12. plt.figure(figsize=(10, 8))
  13. sns.heatmap(df, annot=True, cmap='coolwarm', linewidths=.5)
  14. plt.show()
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement