Skip to content

Commit

Permalink
Several improvements
Browse files Browse the repository at this point in the history
-Updated dark theme
-Improved reproducible GUI through URL
  • Loading branch information
JoachimGoedhart committed Sep 7, 2020
1 parent f75ddd4 commit 8160a88
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 53 deletions.
72 changes: 36 additions & 36 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
runApp('surfdrive/Shiny-project/VolcaNoseR')
shiny::runApp('surfdrive/Shiny-project/VolcaNoseR')
install.packages("bitops")
install.packages("bitops")
shiny::runApp('surfdrive/Shiny-project/PlotsOfData')
runApp('surfdrive/Shiny-project/VolcaNoseR')
runApp('surfdrive/Shiny-project/VolcaNoseR')
runApp('surfdrive/Shiny-project/VolcaNoseR')
runApp('Desktop/VolcaNoseR-master')
Expand Down Expand Up @@ -468,7 +463,8 @@ theme legend
?legend
runApp('surfdrive/Shiny-project/PlotXpress')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
shiny::runApp('surfdrive/Shiny-project/Dark_Theme')
shiny::runApp('surfdrive/Shiny-project/PlotXpress')
runApp('~/surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
Expand All @@ -479,34 +475,38 @@ runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/PlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
shiny::runApp('surfdrive/Shiny-project/SuperPlotsOfData')
?t.test
shiny::runApp('surfdrive/Shiny-project/SuperPlotsOfData')
shiny::runGitHub('VolcaNoseR', 'JoachimGoedhart')
runApp('surfdrive/Shiny-project/VolcaNoseR')
runApp('surfdrive/Shiny-project/VolcaNoseR')
runApp('surfdrive/Shiny-project/PlotsOfData')
runApp('surfdrive/Shiny-project/VolcaNoseR')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
shiny::runApp('surfdrive/Shiny-project/VolcaNoseR')
runApp('surfdrive/Shiny-project/VolcaNoseR')
shiny::runApp('surfdrive/Shiny-project/VolcaNoseR')
shiny::runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/PlotTwist')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/PlotTwist')
runApp('surfdrive/Shiny-project/PlotTwist')
runApp('surfdrive/Shiny-project/PlotTwist')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
shiny::runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
1:4
50/(1:3)
50/2
runApp('surfdrive/Shiny-project/SuperPlotsOfData')
source("themes.R")
setwd("~/surfdrive/Shiny-project/SuperPlotsOfData")
source("themes.R")
runApp()
theme_debruine <- theme(
plot.background = element_rect(fill = bgcolor, colour = bgcolor),
panel.background = element_rect(fill = NA),
legend.background = element_rect(fill = NA),
legend.position="none",
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
text = element_text(family='Fira Code', colour = textcolor, size=20),
axis.text = element_text(family='Fira Code', colour = textcolor, size=15)
)
source("themes.R")
runApp()
runApp()
runApp()
runApp()
runApp()
runApp('~/surfdrive/Shiny-project/PlotXpress')
?xlim
?coord_flip
runApp('~/surfdrive/Shiny-project/PlotXpress')
runApp('~/surfdrive/Shiny-project/PlotXpress')
runApp('~/surfdrive/Shiny-project/PlotXpress')
runApp('~/surfdrive/Shiny-project/PlotXpress')
runApp('~/surfdrive/Shiny-project/PlotXpress')
runApp('~/surfdrive/Shiny-project/PlotXpress')
runApp()
25 changes: 12 additions & 13 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Summary statistics are displayed with user-defined visibility (alpha)
# A plot and a table with stats are generated
# Several colorblind safe palettes are available
# Ordering of the categorial data is 'as is, based on median or alphabetical
# Ordering of the conditions is 'as is', based on median or alphabetical
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Copyright (C) 2020 Joachim Goedhart
# electronic mail address: j #dot# goedhart #at# uva #dot# nl
Expand Down Expand Up @@ -256,8 +256,8 @@ ui <- fluidPage(


checkboxInput(inputId = "dark", label = "Dark Theme", value = FALSE),
conditionalPanel(
condition = "input.dark == true",checkboxInput(inputId = "dark_classic", label = "Classic Dark Theme", value = FALSE)),
# conditionalPanel(
# condition = "input.dark == true",checkboxInput(inputId = "dark_classic", label = "Classic Dark Theme", value = FALSE)),

numericInput("plot_height", "Height (# pixels): ", value = 480),
numericInput("plot_width", "Width (# pixels):", value = 480),
Expand Down Expand Up @@ -362,7 +362,7 @@ conditionalPanel(condition = "input.show_table == true", h3("Difference with the

server <- function(input, output, session) {
observe({
showNotification("This is version 1.0.1 - beta. Feedback or suggestions to improve the app are appreciated. For contact information, see the 'About' tab", duration = 10, type = "warning")
showNotification("This is version 1.0.1. Feedback or suggestions to improve the app are appreciated. For contact information, see the 'About' tab", duration = 10, type = "warning")
})


Expand Down Expand Up @@ -554,11 +554,12 @@ observe({
updateRadioButtons(session, "summaryInput", selected = presets_vis[4])
updateCheckboxInput(session, "connect", value = presets_vis[5])
updateCheckboxInput(session, "show_table", value = presets_vis[6])

#select zero
updateCheckboxInput(session, "add_shape", value = presets_vis[7])

updateSliderInput(session, "alphaInput_summ", value = presets_vis[8])
updateRadioButtons(session, "ordered", selected = presets_vis[9])
#select zero

# updateTabsetPanel(session, "tabs", selected = "Plot")
}

Expand All @@ -579,7 +580,7 @@ observe({
updateCheckboxInput(session, "scale_log_10", value = presets_layout[5])
updateTextInput(session, "range", value= presets_layout[6])
# updateCheckboxInput(session, "color_data", value = presets_layout[6])
# updateCheckboxInput(session, "color_stats", value = presets_layout[7])
updateCheckboxInput(session, "dark", value = presets_layout[7])
updateRadioButtons(session, "adjustcolors", selected = presets_layout[8])
updateCheckboxInput(session, "add_legend", value = presets_layout[9])
if (length(presets_layout)>10) {
Expand Down Expand Up @@ -650,8 +651,8 @@ url <- reactive({
data <- c(input$data_input, "", input$x_var, input$y_var, input$g_var)


vis <- c(input$jitter_type, input$show_distribution, input$alphaInput, input$summaryInput, input$connect, input$show_table, input$zero, input$alphaInput_summ, input$ordered)
layout <- c(input$split_direction, input$rotate_plot, input$no_grid, input$change_scale, input$scale_log_10, input$range, "7",
vis <- c(input$jitter_type, input$show_distribution, input$alphaInput, input$summaryInput, input$connect, input$show_table, input$add_shape, input$alphaInput_summ, input$ordered)
layout <- c(input$split_direction, input$rotate_plot, input$no_grid, input$change_scale, input$scale_log_10, input$range, input$dark,
input$adjustcolors, input$add_legend, input$plot_height, input$plot_width)

#Hide the standard list of colors if it is'nt used
Expand All @@ -661,7 +662,7 @@ url <- reactive({
color <- c(input$colour_list, input$user_color_list)
}

label <- c(input$add_title, input$title, input$label_axes, input$lab_x, input$lab_y, input$adj_fnt_sz, input$fnt_sz_ttl, input$fnt_sz_ax, input$add_legend)
# label <- c(input$add_title, input$title, input$label_axes, input$lab_x, input$lab_y, input$adj_fnt_sz, input$fnt_sz_ttl, input$fnt_sz_ax, input$add_legend)

label <- c(input$add_title, input$title, input$label_axes, input$lab_x, input$lab_y, input$adj_fnt_sz, input$fnt_sz_title, input$fnt_sz_labs, input$fnt_sz_ax, "", input$add_legend)

Expand Down Expand Up @@ -973,9 +974,7 @@ plotdata <- reactive({
########### Do some formatting of the lay-out ###########

p <- p+ theme_light(base_size = 16)
if (input$dark) {p <- p+ theme_darker(base_size = 16)}

if (input$dark_classic) {p <- p+ theme_dark_classic(base_size = 16)}
if (input$dark) {p <- p+ theme_dark_basic(base_size = 16)}


# if log-scale checked specified
Expand Down
8 changes: 4 additions & 4 deletions themes.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ theme_darker <- function(base_size = 11, base_family = "", base_line_size = bas

}

theme_dark_classic <- function(base_size = 11, base_family = "", base_line_size = base_size/22, base_rect_size = base_size/22)
theme_dark_basic <- function(base_size = 11, base_family = "", base_line_size = base_size/22, base_rect_size = base_size/22)
{
half_line <- base_size/2
theme_light() %+replace%
Expand Down Expand Up @@ -98,10 +98,10 @@ theme_dark_classic <- function(base_size = 11, base_family = "", base_line_size
# legend.justification = "center",
# legend.box = NULL,

panel.background = element_rect(fill = "grey0", colour = NA),
panel.background = element_rect(fill = "grey5", colour = NA),
panel.border = element_rect(fill = NA, colour = "grey80"),
panel.grid.major = element_line(colour = "grey40"),
panel.grid.minor = element_line(colour = "grey40", size = 0.25),
panel.grid.major = element_line(colour = "grey30"),
panel.grid.minor = element_line(colour = "grey30", size = 0.25),
# panel.margin = unit(half_line, "pt"),
# panel.margin.x = NULL,
# panel.margin.y = NULL,
Expand Down

0 comments on commit 8160a88

Please sign in to comment.