Skip to content

Commit

Permalink
Fix the "expand_text" error caused by the latest adjust_text update
Browse files Browse the repository at this point in the history
  • Loading branch information
huidongchen committed Apr 19, 2024
1 parent 2896348 commit 9a7d5fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions simba/plotting/_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,7 @@ def _scatterplot2d(df,
'size': text_size})
for t in texts]
adjust_text(plt_texts,
expand_text=text_expand,
expand_points=text_expand,
expand_objects=text_expand,
expand=text_expand,
arrowprops=dict(arrowstyle='->', color='black'))
ax_i.set_xlabel(x)
ax_i.set_ylabel(y)
Expand Down
8 changes: 2 additions & 6 deletions simba/plotting/_post_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,7 @@ def entity_metrics(adata_cmp,
'size': text_size})
for i in ids]
adjust_text(plt_texts,
expand_text=text_expand,
expand_points=text_expand,
expand_objects=text_expand,
expand=text_expand,
arrowprops=dict(arrowstyle='-', color='black'))
if show_cutoff:
ax.axvline(x=cutoff_x, linestyle='--', color='#CE3746')
Expand Down Expand Up @@ -693,9 +691,7 @@ def query(adata,
for t in texts]
adjust_text(plt_texts,
ax=ax,
expand_text=text_expand,
expand_points=text_expand,
expand_objects=text_expand,
expand=text_expand,
arrowprops=dict(arrowstyle='->', color='black'))
if save_fig:
fig = plt.gcf()
Expand Down

0 comments on commit 9a7d5fe

Please sign in to comment.