Comments (13)
Hi,
This error generally occurs when non-standard fonts like Arial or Times New Roman are not available in your R session. (This has been mentioned before #29 (comment))
I was able to fix this as follows (Ubuntu):
- Download TTF files for font Arial and Times New Roman, e.g. from here.
- Unzip the files and put them into a reasonable directory, e.g.
/home/USERNAME/fonts
. - Install the R extrafont package, and add the following code to the header of your script:
library(extrafont)
font_import(paths="/home/USERNAME/fonts", prompt=F)
loadfonts(device = "pdf", quiet = F)
- Run the code to generate PDF figures, for example:
pdf("/home/USERNAME/CellChat_results/network.pdf", width=7, height=7)
netVisual_aggregate(cellchat, signaling = pathways.show, vertex.receiver = vertex.receiver, vertex.size = groupSize)
dev.off()
Worked like a charm for me.
Cheers.
from cellchat.
@chuiqin Try install.packages("extrafont")
from cellchat.
Thank you very much for your help!
from cellchat.
@chuiqin Try
install.packages("extrafont")
I'm sorry but I still get the same error after installing packages("extrafont").
Error in text.default(x, y, labels = labels, col = label.color, family = label.family, : invalid font type
Can you help me with this problem again? Thank you!
from cellchat.
@chuiqin It looks like your R does not support 'Arial' font style when doing plotting. Can you google such issue based on your system of the computer as I did not hear of such issue from other users? The extrafont package is available here. In addition, please try save the plot using svglite(file ="a.pdf")...dev.off()
from cellchat.
@chuiqin It looks like your R does not support 'Arial' font style when doing plotting. Can you google such issue based on your system of the computer as I did not hear of such issue from other users? The extrafont package is available here. In addition, please try save the plot using
svglite(file ="a.pdf")...dev.off()
Thank you very much!
You're right!
When I change my code:
`library(svglite)
svglite(file = "pathway.svg", width=10, height=10)
netVisual_aggregate(cellchat, signaling = pathways.show, vertex.receiver = c(1,2,3,5), vertex.size = groupSize)
dev.off()`
It‘s surperised that the picture can created correctly!
Thank you very much for your help again!
from cellchat.
Well, I got this error again .I have no idea about that how can I save the picture with the pdf format. who can help me ?
from cellchat.
@wuzhigui Have you tried svglite(file ="a.pdf")...dev.off()
or saving as .svg file?
from cellchat.
Hi @Xethic , thank you so much for sharing this!
from cellchat.
I can't use netVisual_aggregate to get the graphics I want。I hope to get the following figure:
However, I always get such a circle
Can you help me, thank you~
from cellchat.
@Aby-GGG You should set 'layout = "hierarchy"'.
from cellchat.
from cellchat.
from cellchat.
Related Issues (20)
- Error netVisual_heatmap() on a merged object from Seurat
- netAnalysis_signalingRole_network cluster.cols and cluster.rows not working HOT 1
- error with identifyOverExpressedGenes(cellchat) HOT 1
- Error in if (dim(prob)[3] <= 25) { : argument is of length zero HOT 2
- NetP empty after running computeCommunProb HOT 1
- Missing Column `annotation` in LRsig after merge cellchat and celltalk L-R pair
- parameter "group.by" in subsetCellChat doesn't work
- Issue with installing CellChat package in R studio HOT 1
- Why haven't we utilized single-cell proteomics for cell communication recognition and prediction? HOT 1
- Error in createCellChat object
- [email protected] 0 x 12257 sparse Matrix of class "dgCMatrix" HOT 2
- rankingsimilarity - back to issue #160 HOT 1
- unused arguments (min.dist = 0.3, n.neighbors = k) HOT 1
- Using a two-species sample HOT 1
- Error in base::colSums(x, na.rm = na.rm, dims = dims, ...) : 'x' must be an array of at least two dimensions HOT 5
- could not find function "findEnrichedSignaling" HOT 1
- mergeCellChat
- explanation of the df from subsetCommunication HOT 4
- error in netVisual_bubble plotting HOT 4
- Incorrect documentation / use of thresh.pc argument HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cellchat.