Skip to content

clustermap: tight_layout hardocoded parameters #3321

Answered by dmaziec
dmaziec asked this question in Q&A
Discussion options

You must be logged in to vote

I am running my analysis for 40 different datasets so I would prefer a more generic, automated way instead of using cbar_pos.

Here is my code example:
Please download this dataset and run the Python script posted below from the same folder where the file is placed: Stomach-AdenoCA.csv

The output heat map should be saved in Stomach-AdenoCA.pdf.


import pandas
import matplotlib.pyplot as plt
import seaborn as sns

cluster_data = pandas.read_csv(
        "Stomach-AdenoCA.csv",
        index_col=False,
    )
his="Stomach-AdenoCA"
uuids = cluster_data["UUID"]
cluster_map = sns.clustermap(
                cluster_data.drop("UUID", axis=1),
                cmap=sns.color_palette("crest", as_cmap…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mwaskom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3313 on April 15, 2023 13:56.