matplotlib / matplotlib/ipympl

My heatmap is blank

Open
#509 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
1.7k
Forks
234
PR merge metrics
No merged PRs in 30d

Description

I am trying to create a heatmap with the follow data: It is a lot of data points, this is just a preview. Any ideas on why it is blank?

       TF         target   importance
0     ZIC5     ZIC2  244.284998
1     DLX6     DLX5  146.211550
2  FOXD4L6  FOXD4L3  139.951544
3    DDX43     OOEP  133.502314
4  FOXD4L3  FOXD4L6  132.367859
5     DLX5     DLX6  131.638314
6    FOXD4  FOXD4L1  128.395748
7   HOXA11   HOXA10  112.056258
8    HOXA2    HOXA3  110.962698
9     ZIC2     ZIC5  109.077028

CODE BELOW:

import os
import glob
import pickle
import pandas as pd
import numpy as np
import scanpy as sc
import loompy as lp

from dask.diagnostics import ProgressBar

from MulticoreTSNE import MulticoreTSNE as TSNE

import seaborn as sns
import matplotlib.pyplot as plt

df = pd.read_csv("adj.tsv", sep='\t')
print(df.head(10))
df = df.pivot("TF", "target", "importance")
hm = sns.heatmap(df, linewidth = 0.5, cmap = 'coolwarm')
Screenshot 2023-01-12 at 9 02 00 PM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Python snippet, especially the adj.tsv read, DataFrame pivot, and seaborn heatmap call, and reproduce it in the reported Jupyter setup. The input file and environment details are not provided, so first establish whether the blank output is specific to ipympl. Done means a reproducible diagnosis or a clarified report with the missing setup and data details.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, jupyter-notebook, numpy, pandas, python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.