zktuong / ktplots

Some tools for plotting single-cell data
https://zktuong.github.io/ktplots/
MIT License
157 stars 30 forks source link

could not find function "scale_linewidth" in scale_linewidth(range = c(0, max_highlight_size)) #87

Closed honghh2018 closed 8 months ago

honghh2018 commented 8 months ago

Hi developer, It very weird for package ktplots,
when i loading the latest package : the package version was Version: 2.0.0 library(argparse) library(ggplot2) library(ktplots)
library(Seurat) and the invoke the function p1 <- plot_cpdb( scdata=sce, cell_type1=args$celltype1, cell_type2=args$celltype2, # this means all cell-types celltype_key="ident", means=means, pvals=pvals, title="interacting interactions!", gene_family = c('chemokines', 'Th1', 'Th2', 'Th17', 'Treg', 'costimulatory', 'coinhibitory') ) it show me error lying below: Calls: plot_cpdb Execution halted Error in scale_linewidth(range = c(0, max_highlight_size)) : could not find function "scale_linewidth" Calls: plot_cpdb Execution halted

how to fix this issue ? Best, hanhuihong

zktuong commented 8 months ago

hi @honghh2018 , your ggplot2 might be too old? try reinstalling that first

honghh2018 commented 8 months ago

Thanks the urgent reply, i re-install gglot2 and try it again. Best,

honghh2018 commented 8 months ago

I install the ggplot2 version 3.4.4, it work for me Best, hanhuihong