When you enter a dictonary var.name in sc.pl.dotplot, it converts the size of the text to the right of the plot.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
What kind of feature would you like to request?
Additional function parameters / changed functionality / changed defaults?
Please describe your wishes
Hello.
As the title suggests, sc.pl .dotplot var dictionary.I'm very curious about how to change the size of the text on the right side of the picture when using the name.
Below is the code I'm using. Even if I look for the source code, I can't find the part where I draw by receiving the dictionary as input, and I can't find the part that is saved.
Thank you.
dp18 = sc.pl.dotplot(total_adata[total_adata.obs['author_cell_type'] == 'CD14+_Monocyte'], cd14_p_monocyte, groupby='age_group',
dendrogram=False,title = "CD14+_Monocyte",swap_axes=True,gene_symbols="feature_name",cmap="RdBu_r",
standard_scale = "var",figsize=(7,15),return_fig=True)
#dp18.legend(show_size_legend = False,width = 1.5)
axes_dict18 = dp18.get_axes()
for tick18 in axes_dict18['mainplot_ax'].get_yticklabels():
tick18.set_rotation(0)
for lab in axes_dict18['mainplot_ax'].get_yticklabels():
lab.set_fontstyle('italic')
#lab.set_fontsize(14)
for lab in axes_dict18['mainplot_ax'].get_yticklabels():
lab.set_fontweight('bold')
#lab.set_fontsize(14)
for lab in axes_dict18['mainplot_ax'].get_xticklabels():
lab.set_fontweight('bold')
#lab.set_fontsize(14)
axes_dict18['mainplot_ax'].set_title("CD14+_Monocyte MT gene", fontsize=16, fontweight='bold', zorder=10)
plt.tight_layout()
plt.savefig('savefig_CD14_monocyte_mt_dotplot.png',dpi=600)
@falexwolf
@ivirshup
@flying-sheep
@fidelram
@gokceneraslan
@Koncopd
@giovp
@awnimo
@adamgayoso
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sc.pl.dotplot example with a dictionary var.name and inspect the axes returned by dp18.get_axes(), especially mainplot_ax and its tick labels. Trace how the right-side text is sized and determine how a caller could control it. Done means the requested text size can be changed without disturbing the rest of the plot, and the example still saves correctly with plt.savefig.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100