@@ -1344,14 +1344,10 @@ def heatmap( # noqa: PLR0912, PLR0913, PLR0915
13441344
13451345 if categorical :
13461346 groupby_ax = fig .add_subplot (axs [1 , 0 ])
1347- (
1348- label2code ,
1349- ticks ,
1350- labels ,
1351- groupby_cmap ,
1352- norm ,
1353- ) = _plot_categories_as_colorblocks (
1354- groupby_ax , obs_tidy , colors = groupby_colors , orientation = "left"
1347+ label2code , ticks , _labels , groupby_cmap , norm = (
1348+ _plot_categories_as_colorblocks (
1349+ groupby_ax , obs_tidy , colors = groupby_colors , orientation = "left"
1350+ )
13551351 )
13561352
13571353 # add lines to main heatmap
@@ -1437,14 +1433,10 @@ def heatmap( # noqa: PLR0912, PLR0913, PLR0915
14371433
14381434 if categorical :
14391435 groupby_ax = fig .add_subplot (axs [2 , 0 ])
1440- (
1441- label2code ,
1442- ticks ,
1443- labels ,
1444- groupby_cmap ,
1445- norm ,
1446- ) = _plot_categories_as_colorblocks (
1447- groupby_ax , obs_tidy , colors = groupby_colors , orientation = "bottom"
1436+ label2code , ticks , _labels , groupby_cmap , norm = (
1437+ _plot_categories_as_colorblocks (
1438+ groupby_ax , obs_tidy , colors = groupby_colors , orientation = "bottom"
1439+ )
14481440 )
14491441 # add lines to main heatmap
14501442 line_positions = (
@@ -1701,7 +1693,7 @@ def tracksplot( # noqa: PLR0912, PLR0913, PLR0915
17011693 ax .spines ["top" ].set_visible (False )
17021694 ax .spines ["bottom" ].set_visible (False )
17031695 ax .grid (visible = False )
1704- ymin , ymax = ax .get_ylim ()
1696+ _ymin , ymax = ax .get_ylim ()
17051697 ymax = int (ymax )
17061698 ax .set_yticks ([ymax ])
17071699 ax .set_yticklabels ([str (ymax )], ha = "left" , va = "top" )
@@ -1730,7 +1722,7 @@ def tracksplot( # noqa: PLR0912, PLR0913, PLR0915
17301722
17311723 groupby_ax = fig .add_subplot (axs2 [1 ])
17321724
1733- label2code , ticks , labels , groupby_cmap , norm = _plot_categories_as_colorblocks (
1725+ _label2code , ticks , _labels , groupby_cmap , norm = _plot_categories_as_colorblocks (
17341726 groupby_ax , obs_tidy .T , colors = groupby_colors , orientation = "bottom"
17351727 )
17361728 # add lines to plot
@@ -2326,9 +2318,10 @@ def _reorder_categories_after_dendrogram(
23262318 position = var_groups .positions [idx ]
23272319 _var_names = var_names [position [0 ] : position [1 ] + 1 ]
23282320 var_names_idx_ordered .extend (range (position [0 ], position [1 ] + 1 ))
2329- positions_ordered .append (
2330- (position_start , position_start + len (_var_names ) - 1 )
2331- )
2321+ positions_ordered .append ((
2322+ position_start ,
2323+ position_start + len (_var_names ) - 1 ,
2324+ ))
23322325 position_start += len (_var_names )
23332326 labels_ordered .append (var_groups .labels [idx ])
23342327 var_groups = VarGroups (labels_ordered , positions_ordered )
@@ -2662,7 +2655,7 @@ def _plot_colorbar(mappable, fig, subplot_spec, max_cbar_height: float = 4.0):
26622655 color bar ax
26632656
26642657 """
2665- width , height = fig .get_size_inches ()
2658+ _width , height = fig .get_size_inches ()
26662659 if height > max_cbar_height :
26672660 # to make the colorbar shorter, the
26682661 # ax is split and the lower portion is used.
0 commit comments