Python Forum
How to increase the size of a png picture for the heatmap of the correlation?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to increase the size of a png picture for the heatmap of the correlation?
#6
(Oct-05-2021, 07:06 PM)deanhystad Wrote: Did you try it? If I capture a 3x3 plot at 100dpy the image is 300x300 pixels. At the 1000dpi the same image is 3000x3000 pixels

With a DPI of 1000, you can see that it doesn't change. I can't see the labels.

from pandas import read_csv
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import numpy.ma as ma
import pandas as pd
 
dataset = pd.read_csv('Santé3.csv', sep= ';', encoding='latin-1', index_col=0)
dataset.drop(['Dynaverage'], axis=1, inplace=True)
corr = dataset.corr()
plt.figure(figsize=(200,30))
plt.subplots(figsize=(15,8))
sns.heatmap(corr, cmap='coolwarm', vmin=-1, vmax=1, annot=True, mask=mask)
plt.savefig("correlation.png", dpi=1000)

Attached Files

Thumbnail(s)
   
Reply


Messages In This Thread
RE: How to increase the size of a png picture for the heatmap of the correlation? - by lulu43366 - Oct-05-2021, 07:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I am getting a valueError. And not sure why? My goal is to visualize the correlation ReadytoCode 0 582 Dec-11-2023, 05:33 AM
Last Post: ReadytoCode
  openpyxl insert picture problem cools0607 2 1,830 May-03-2023, 06:48 AM
Last Post: cools0607
  How to plot seaborn heatmap on top of a background circle SriRajesh 0 1,497 Jul-09-2022, 04:00 AM
Last Post: SriRajesh
  Error in find pearson correlation function erneelgupta 1 1,966 Mar-01-2022, 03:41 PM
Last Post: stevendaprano
  Increase the speed of a python loop over a pandas dataframe mcva 0 1,389 Jan-21-2022, 06:24 PM
Last Post: mcva
  How to remove a column or two columns in a correlation heatmap? lulu43366 3 5,431 Sep-30-2021, 03:47 PM
Last Post: lulu43366
  Using SoX in Python to Increase mp3 Bitrate DRT 1 1,836 Jul-10-2021, 08:41 PM
Last Post: DRT
  Clicker count increase by 1 each time blakefindlay 1 5,904 Feb-03-2021, 03:50 PM
Last Post: deanhystad
  Picture changing triggered by GPIO q_nerk 2 2,690 Dec-14-2020, 03:32 PM
Last Post: DeaD_EyE
  increase and decrease a slice value? KEYS 2 2,174 Nov-10-2020, 11:35 PM
Last Post: KEYS

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020