Commit 80e614bd authored by simon.chevolleau's avatar simon.chevolleau
Browse files

Update

parent 8b35dd96
......@@ -329,14 +329,17 @@ one_dimension <- function(x, annot, text_annot, name_annot, size_point = 2, fact
df <- data.frame(x = unlist(x), y = y, annot = unlist(annot))
df$y <- jitter(df$y, amount = jitter_amount)
limits <- scale_x_continuous(c(limits = ifelse(min(df$x) <= 0, min(df$x) * factor_limit, mind(df$x) - min(df$x) * factor_limit),
scale_x_continuous(c(limits = ifelse(min(df$x) <= 0, min(df$x) * factor_limit, mind(df$x) - min(df$x) * factor_limit),
ifelse(max(df$x) <= 0, max(df$x) * factor_limit, max(df$x) - max(df$x) * factor_limit))) +
scale_x_continuous(c(limits = ifelse(min(df$y) <= 0, min(df$y) * factor_limit, mind(df$y) - min(df$y) * factor_limit),
ifelse(max(df$y) <= 0, max(df$y) * factor_limit, max(df$y) - max(df$y) * factor_limit))) +
if (!(is.null(colors))){
plot <- ggplot(df, aes(x=x, y=y, colour = annot)) +
unlist(plot_annot) + limits +
unlist(plot_annot) + scale_x_continuous(c(limits = ifelse(min(df$x) <= 0, min(df$x) * factor_limit, mind(df$x) - min(df$x) * factor_limit),
ifelse(max(df$x) <= 0, max(df$x) * factor_limit, max(df$x) - max(df$x) * factor_limit))) +
scale_x_continuous(c(limits = ifelse(min(df$y) <= 0, min(df$y) * factor_limit, mind(df$y) - min(df$y) * factor_limit),
ifelse(max(df$y) <= 0, max(df$y) * factor_limit, max(df$y) - max(df$y) * factor_limit))) +
theme(panel.background = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
......@@ -351,7 +354,10 @@ one_dimension <- function(x, annot, text_annot, name_annot, size_point = 2, fact
}else{
plot <- ggplot(df, aes(x=x, y=y)) +
unlist(plot_annot) + limits +
unlist(plot_annot) + scale_x_continuous(c(limits = ifelse(min(df$x) <= 0, min(df$x) * factor_limit, mind(df$x) - min(df$x) * factor_limit),
ifelse(max(df$x) <= 0, max(df$x) * factor_limit, max(df$x) - max(df$x) * factor_limit))) +
scale_x_continuous(c(limits = ifelse(min(df$y) <= 0, min(df$y) * factor_limit, mind(df$y) - min(df$y) * factor_limit),
ifelse(max(df$y) <= 0, max(df$y) * factor_limit, max(df$y) - max(df$y) * factor_limit))) +
theme(panel.background = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment