Hello, I'm trying to wrangle a Volcano plot made with the EnhancedVolcano package to have all text in Arial font style. I tried to do so with this code:
a= EnhancedVolcano(data.matrix,
lab = rownames(data.matrix),
x = 'Log2.fold.change',
y = 'P.value',
xlim = c(-2,2),
ylim = c(0,6),
xlab = bquote(~Log[2] ~ "fold change"),
ylab = bquote(~-Log[10] ~ italic(P)),
axisLabSize = 12,
title = paste("NanoString -",data.name),
subtitle = '',
labFace = "bold",
pointSize = 2,
labSize = 5,
pCutoff = 10e-2,
FCcutoff = 0.4,
gridlines.major = FALSE,
gridlines.minor = FALSE,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = 'black',
legendPosition = 'none')
print(a)
EV_merge <- a + theme(text=element_text(size=8, family="sans"))
print(EV_merge)
The problem I'm having is the element_text command, which I thought would work since the plot is an object in ggplot2, seems to only work for the axis and title text, but the font of the labels for the specific genes seems to remain the same. What function should I be using in this case?
Hi, your post is a mess. Please format it better and remove placeholder text.
Placeholder text?
I already fixed it for you. When you first make a post there is some text that says something like 'put your code here' which is a placeholder for where your code is meant to go. You put your code somewhere else and left that placeholder text.
Do note that there is a box below where you type that shows what the post will look like. If it looks bad (like your original post did), then it's a good idea to fix it before posting. There is a FAQ