Entering edit mode
3.9 years ago
prithvi.mastermind
▴
50
I have added the command for increasing my font size, but I'm not able to see the bigger fonts. Please help
My Code:
library(plotly)
t <- list(family = "sans serif", size = 100, color = 'black')
fig <- plot_ly()
fig <- fig %>%
add_trace(
type = "funnel",
y = c("Glycolysis and Gluconeogenesis", "Ethanol metabolism", "Glycerophospholipid metabolism", "Phosphoinositide Signalling", "Purine metabolism", "Cyclic nucleotides metabolism", "Pyrimidine metabolism", "Fatty acid metabolism", "Sphingolipid metabolism", "Xenobiotics metabolism", "Oxidative phosphorylation", "Urea cycle", "GABA shunt", "Alanine & aspartate metabolism", "Methionine metabolism", "CYP metabolism", "Creatine metabolism", "Multidrug resistance", "Inositol phosphate metabolism", "Glycogen degradation"),
x = c(0.455493708, 0.429998123, 0.421699867, 0.391815903, 0.39031344, 0.383469071, 0.382263162, 0.382037554, 0.372782697, 0.370505068, 0.074283149, 0.071113599, 0.064161197, 0.051047812, 0.043906864, 0.0422388, 0.036210043, 0.033779583, 0.032612222, 0.015359933),
textinfo = "text",
textposition = "inside",
marker = list(color = c("#680000", "#7C0000", "#990000", "#B80000", "#CC0000", "#E00000", "#F40000", "#FF1919", "#FF3333", "#FF3F3F", "#FF4F4F", "#FF6161", "#FF6D6D", "#FF7D7D", "#FF8B8B", "#FF9B9B", "#FFA7A7", "#FFB7B7", "#FFCDCD", "#FFE5E5"),
line = list(width = c(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2), color = c("#680000", "#7C0000", "#990000", "#B80000", "#CC0000", "#E00000", "#F40000", "#FF1919", "#FF3333", "#FF3F3F", "#FF4F4F", "#FF6161", "#FF6D6D", "#FF7D7D", "#FF8B8B", "#FF9B9B", "#FFA7A7", "#FFB7B7", "#FFCDCD", "#FFE5E5"),
connector = list(line = list(color = c("#680000", "#7C0000", "#990000", "#B80000", "#CC0000", "#E00000", "#F40000", "#FF1919", "#FF3333", "#FF3F3F", "#FF4F4F", "#FF6161", "#FF6D6D", "#FF7D7D", "#FF8B8B", "#FF9B9B", "#FFA7A7", "#FFB7B7", "#FFCDCD", "#FFE5E5", dash = "solid", width = 3))
))))
fig <- fig %>%
layout(
yaxis = list(
categoryarray = c("Glycolysis and Gluconeogenesis", "Ethanol metabolism", "Glycerophospholipid metabolism", "Phosphoinositide Signalling", "Purine metabolism", "Cyclic nucleotides metabolism", "Pyrimidine metabolism", "Fatty acid metabolism", "Sphingolipid metabolism", "Xenobiotics metabolism", "Oxidative phosphorylation", "Urea cycle", "GABA shunt", "Alanine & aspartate metabolism", "Methionine metabolism", "CYP metabolism", "Creatine metabolism", "Multidrug resistance", "Inositol phosphate metabolism", "Glycogen degradation"),
font = t))
fig
Don't forget to follow up on your previous post: How to draw a funnel plot in R using Plot_ly function?
Edit: It looks like none of your posts with an answer have an accepted answer. Either accept answers or provide feedback on why the answer does not work for you. The forum is a community effort and this is one of the ways you can contribute.
Sure sir. Thanks for your helpful suggestions sir..
Please use the formatting bar (especially the
code
option) to present your post better. You can use backticks for inline code (`text` becomestext
), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.