trestletech/shinyRGL

Enormous font size 3d-plots in shiny

Berecht opened this issue · 2 comments

I have a problem with the font size of the, axes, point names, labels of the 3dplots im running in Shiny. The plots are behaving well. Only the font size of all the names are huge.

In all the 3d plot functions this problem is appearing.(scatter3d,plot3d,points3d, scatterplot3d)

Tried of lot of codes like cex.... and size...., anyone?

Im using the following code

UI:

shinyUI(navbarPage("Name",

tabPanel("|",
mainPanel( ))),

navbarMenu("Name",
tabPanel("Name",
sidebarLayout(
sidebarPanel(
tags$head(
tags$style(type="text/css", "select { width: 310px; }"),
tags$style(type="text/css", "textarea { max-width: 300px; }"),
tags$style(type="text/css", ".jslider { max-width: 300px; }"),
tags$style(type='text/css', ".well { max-width: 300px; }"),
tags$style(type='text/css', ".span4 { max-width: 300px; }")
),

 selectInput('dataset', 'Choose dataset', "Dataset1"),
 actionButton("goButton_data", "Scores!"),
 actionButton("goButton_Plot", "Plot!")
 ),
mainPanel(webGLOutput(outputId = "PCA_plot")
 )
)

)
)
)
)

Server:

shinyServer(function(input, output, session) {

output$PCA_plot <- renderWebGL({
points3d(data[,1], data[,2], data[,3])
axes3d()
text3d(data, texts=rownames(data))

})
})

image

I had a similar problem not too long ago. I ended up adding the statement par3d(cex=.6) before any other graphing statements to fix this issue.

Thanks, alot!

Still the font/font-size is really ugly, but it worked.

Please react on my stackoverflow issue: (if u are on stackoverflow)
http://stackoverflow.com/questions/28495718/changing-text-size-of-3d-plot-r