Skip to content

Commit b914203

Browse files
committed
update readme
1 parent 4ef810b commit b914203

3 files changed

Lines changed: 50 additions & 13 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ PyComplexHeatmap is a Python package to plot complex heatmap (clustermap). Pleas
1717

1818
## Dependencies:
1919
----------------------
20-
- matplotlib<=3.7.5
20+
- matplotlib
2121
- numpy
2222
- pandas
2323
- scipy
24-
- fastcluster
24+
- fastcluster (optional)
2525
```
2626
pip install --ignore-install matplotlib numpy pandas fastcluster
2727
```

notebooks/clustermap.ipynb

Lines changed: 12 additions & 11 deletions
Large diffs are not rendered by default.

notebooks/dev.ipynb

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,42 @@
15411541
"source": [
15421542
"mcolors.to_hex((0.0, 0.0, 0.0))"
15431543
]
1544+
},
1545+
{
1546+
"cell_type": "markdown",
1547+
"id": "34d06c38-6746-4aa8-9959-29aca7e14f82",
1548+
"metadata": {},
1549+
"source": [
1550+
"## Plot legends only"
1551+
]
1552+
},
1553+
{
1554+
"cell_type": "markdown",
1555+
"id": "f04ea315-1034-4073-80a7-12beb91b2bc1",
1556+
"metadata": {},
1557+
"source": [
1558+
"### plot color dict legend"
1559+
]
1560+
},
1561+
{
1562+
"cell_type": "code",
1563+
"execution_count": null,
1564+
"id": "50269268-a257-473d-afc9-5018b41e5f72",
1565+
"metadata": {},
1566+
"outputs": [],
1567+
"source": [
1568+
"from PyComplexHeatmap.utils import plot_color_dict_legend\n",
1569+
"D=dict(mCG=\"green\",mCH='blue',ATAC=\"orange\")\n",
1570+
"plt.figure(figsize=(2,3))\n",
1571+
"ax=plt.gca()\n",
1572+
"plot_color_dict_legend(\n",
1573+
"\tD=D, ax=ax, title=\"Modality\", color_text=True, kws=dict(loc='upper left',bbox_to_anchor=(0.3,0.8),labelspacing=0.2,handleheight=1,\n",
1574+
" fontsize=12,bbox_transform = ax.transAxes,title_fontsize=14)\n",
1575+
")\n",
1576+
"ax.set_axis_off()\n",
1577+
"plt.savefig(\"legend.pdf\",bbox_inches='tight',dpi=300,transparent=True)\n",
1578+
"plt.show()"
1579+
]
15441580
}
15451581
],
15461582
"metadata": {

0 commit comments

Comments
 (0)