Skip to content

Commit cfaccda

Browse files
committed
update HeatmapAnnotation
1 parent eec6368 commit cfaccda

File tree

2 files changed

+136
-128
lines changed

2 files changed

+136
-128
lines changed

PyComplexHeatmap/annotations.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def __init__(
7070
legend_kws=None,
7171
ylim=None,
7272
label=None,
73+
invert_x=False,
74+
invert_y=False,
7375
**plot_kws
7476
):
7577
self._check_df(df)
@@ -81,6 +83,8 @@ def __init__(
8183
self.height = self._height(height)
8284
self._type_specific_params()
8385
self.legend = legend
86+
self.invert_x=invert_x
87+
self.invert_y=invert_y
8488
self.legend_kws = legend_kws if not legend_kws is None else {}
8589
self._set_default_plot_kws(plot_kws)
8690

@@ -2177,6 +2181,10 @@ def plot_annotations(
21772181
self.axes[j, i] = ax1
21782182
if self.orientation == "left":
21792183
ax1.invert_xaxis()
2184+
if ann.invert_x:
2185+
ax1.invert_xaxis()
2186+
if ann.invert_y:
2187+
ax1.invert_yaxis()
21802188

21812189
self.set_axes_kws()
21822190
self.legend_list = None

notebooks/advanced_usage.ipynb

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

0 commit comments

Comments
 (0)