I have a shiny app that plots data that is queried from our company database. You can choose to facet the plot based on different columns in the dataframe. I am using facet_grid and two selectInputs to facet from the side, top or both. I am also building a ggplot object and then using plotly_build to make a plotly plot in shiny. I have tried to solve the problem outside of the shiny app by faceting serialnumber ~ serialnumber
.
I am expecting to see the points being plotted in the facet windows diagonal, however it is just plotting in the first column all the way down. Here is the code I amusing to plot. I have changed all of the data because it is sensitive. This is only one example of this it presents in many other phenotypes. Also sorry for the mess of axis labels i was just trying to see if i could solve the problem and not making it look pretty. Let me know if there is anymore information you need?
gg_color_hue <- function(x){
hues = seq(15,375, length = x+1)
hcl(h = hues, l = 65, c = 100)[1:x]
}
ggplot(data= queryData, aes(x = AssayName, y = Metric, colour = SerialNumber)) +
scale_colour_manual(values = gg_color_hue(length(unique(queryData$SerialNumber))),name = "SerialNumber") +
facet_grid(SerialNumber ~ SerialNumber) +
geom_point(size = 2) +
theme_set(theme_gray(base_size = 12)) +
theme(axis.text.x = element_text(angle = 90, hjust = 2)) +
labs(title = 'all assay') +
xlab(paste("assays")) +
ylab("metric") +
scale_y_continuous(limits = c(0, 32),
breaks = (seq(0,32, by = 5)))
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.