Skip to content

tight_layout.get_renderer() breaks plotHeatmap with matplotlib 3.6 #1172

@pauldrinn

Description

@pauldrinn

tight_layout.get_renderer() was removed starting from matplotlib 3.6 so plotHeatmap doesn't plot with matplotlib 3.6 installed.

(base) [etekoglu@linuxsrv006 manualqc]$ plotHeatmap -m neg_investigation.mat.gz -o neg_investigation.pdf \
>     --colorList "white,#043565" "white,#043565" "white,red" "white,red" "white,red" \
>     --missingDataColor "white" \
>     --samplesLabel "1" "2" "3" "4" "5" \
>     --regionsLabel "R1" "R2" "R3" "R4" \
>     --sortUsingSamples 1 \
>     --heatmapHeight 15 \
>     --heatmapWidth 5 \
>     --zMin 0 0 0 0 0 --zMax 3 3 1.5 1.5 100 \
>     --yMin -0.5 -0.5 0 0 0 --yMax 3 3 1.5 1.5 150

Samples used for ordering within each group:  [0]
Traceback (most recent call last):
  File "/home/etekoglu/miniconda3/bin/plotHeatmap", line 12, in <module>
    main(args)
  File "/home/etekoglu/miniconda3/lib/python3.8/site-packages/deeptools/plotHeatmap.py", line 874, in main
    plotMatrix(hm,
  File "/home/etekoglu/miniconda3/lib/python3.8/site-packages/deeptools/plotHeatmap.py", line 587, in plotMatrix
    renderer = tl.get_renderer(fig)
AttributeError: module 'matplotlib.tight_layout' has no attribute 'get_renderer'

Downgrading back to matplotlib 3.5.3 fixes the issue.

My versions are:

  • deepTools 3.5.1
  • Python 3.8.13
  • matplotlib 3.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions