Closed milospjanic closed 1 year ago
@KangchengHou could you help? Thanks!
@milospjanic looks like it is a version mismatch issue.
Can you type
scdrs.__version__
??scdrs.util.plot_group_stats
to provide us some information on the scdrs version you are using?
To have a quick fix, I suggest installing scdrs=1.0.3 or remove plot_kws when calling plot_group_stats
scdrs.version '1.0.2'
Removing plot_kws works but then i cant adjust vmax for the coloring, and the graph ends up with no color (as the FDR proportions are lower)
and also the legend cover the top part of the graph
can you try reinstalling scdrs=1.0.3 so you can have more control on the figure aesthetics via plot_kws
How do i get 1.0.3, pip install scdrs==1.0.3 doesnt work
Also via cloning the repository doesnt work
pip install git+https://github.com/martinjzhang/scDRS.git
Thanks with 1.0.3 it looks good as the bar is above the graph, but still I cant change vmax to 0.05 to get some color on the graph, changing vmax in plot_kws doesnt change it
can you try setting cb_vmax
? the full option is available at
https://github.com/martinjzhang/scDRS/blob/6ee2161820fc9141eb1f85512659eef1c05d0d66/scdrs/util.py#L492
works now, thanks!
Hello everyone, I would like to ask how to view the complete heatmap results. When I use the code below to create a heatmap, no matter how I set the canvas size for saving, I can't see the entire image. Could you please give me some advice? Thank you very much. Just to let you know, I am using the latest version, v1.03.
` fig, ax = scdrs.util.plot_group_stats( dict_df_stats={ trait: df_stats.rename(index=dict_celltype_display_name) for trait, df_stats in dict_df_stats.items() },
plot_kws={
"cb_vmax": 0.2,
"cb_fraction":0.1,
}
)
fig.set_size_inches(8, 10) plt.savefig("Figure2.png") plt.close(fig) `
When I do not set the image size, the result is as shown in Figure 1. However, when I set the image size, the result is as shown in Figure 2.
Could you try plt.savefig("Figure2.png", bbox_inches='tight')
Could you try
plt.savefig("Figure2.png", bbox_inches='tight')
Thanks a lot! The image turned out great, nothing got cut off.
Hi,
I am getting this error when trying to plot. Using both scdrs 1.0.1 and 1.0.2
TypeError Traceback (most recent call last) Input In [23], in <cell line: 23>()
---> 23 fig, ax = scdrs.util.plot_group_stats( 24 dict_df_stats={ 25 trait: df_stats.rename(index=dict_celltype_display_name) 26 for trait, df_stats in dict_df_stats.items() 27 }, 28 plot_kws={ 29 "vmax": 0.2, 30 "cb_fraction":0.12 31 } 32 )
TypeError: plot_group_stats() got an unexpected keyword argument 'plot_kws'