Commit 256623a3 authored by dmattek's avatar dmattek

Added: boxplots

UI overhaul: side panel added
parent 7ea6e2c0
......@@ -41,12 +41,22 @@ myGgplotTraj = function(dt.arg,
stim.bar.width.arg = 0.5) {
p.tmp = ggplot(dt.arg,
aes_string(x = x.arg,
y = y.arg))
y = y.arg,
group = group.arg))
if (is.null(line.col.arg))
p.tmp = p.tmp + geom_line(aes_string(group = group.arg), alpha = 0.25, size = 0.25)
else
p.tmp = p.tmp + geom_line(aes_string(group = group.arg, colour = line.col.arg), alpha = 0.5, size = 0.5)
if (is.null(line.col.arg)) {
p.tmp = p.tmp +
geom_line(alpha = 0.25,
size = 0.25)
}
else {
p.tmp = p.tmp +
geom_line(aes_string(colour = line.col.arg),
alpha = 0.5,
size = 0.5) +
scale_color_manual(name = '',
values =c("FALSE" = rhg_cols[7], "TRUE" = rhg_cols[3], "SELECTED" = 'green', "NOT SEL" = rhg_cols[7]))
}
p.tmp = p.tmp +
stat_summary(
......
This diff is collapsed.
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
......@@ -10,59 +11,144 @@ library(shinyjs) #http://deanattali.com/shinyjs/
library(plotly)
shinyUI(fluidPage(
useShinyjs(), # Include shinyjs
useShinyjs(),
# Include shinyjs
# Application title
title = "Timecourse Inspector",
fluidRow(
column(3,
h4("Load data files"),
#Selector for file upload
fileInput(
'inFileLoadNuc',
'Select file (e.g. tCoursesSelected.csv) and press "Load Data"',
accept = c('text/csv', 'text/comma-separated-values,text/plain')
),
actionButton("inButLoadNuc", "Load Data"),
actionButton("butReset", "Reset file input"),
actionButton('inDataGen1', 'Generate artificial dataset'),
# fileInput(
# 'inFileStimLoad',
# 'Choose CSV file with stimulation times, e.g. stimT.csv',
# accept = c('text/csv', 'text/comma-separated-values,text/plain')
# ),
h4("Plot format"),
fluidRow(
column(4,
numericInput('inFacetNcol', '#Columns:', value = 4, min = 1, width = '100px', step = 1)),
column(4,
numericInput('inPlotHeight', 'Height [px]:', value = 800, min = 100, width = '100px', step = 50)),
column(4,
numericInput('inPlotWidth', 'Width [%]:', value = 100, min = 10, max = 100, width = '100px', step = 10))
),
actionButton('butGo', 'Plot!')),
column(3, offset = 1,
uiOutput('varSelSite'),
uiOutput('varSelTrackLabel'),
uiOutput('varSelTime'),
uiOutput('varSelMeas1'),
radioButtons('inSelMath', 'Math operation 1st and 2nd meas.:', c('None' = '',
'Divide' = " / ",
'Sum' = " + ",
'Multiply' = " * ",
'Subtract' = ' - ',
'1 / X' = '1 / ')),
uiOutput('varSelMeas2')),
column(3, offset = 1,
uiOutput('varSelGroup'))
sidebarLayout(
sidebarPanel(
h4("Load data files"),
#Selector for file upload
fileInput(
'inFileLoadNuc',
'Select file (e.g. tCoursesSelected.csv) and press "Load Data"',
accept = c('text/csv', 'text/comma-separated-values,text/plain')
),
actionButton("inButLoadNuc", "Load Data"),
actionButton("butReset", "Reset file input"),
actionButton('inDataGen1', 'Generate artificial dataset'),
tags$hr(),
uiOutput('varSelSite'),
uiOutput('varSelTrackLabel'),
uiOutput('varSelGroup'),
uiOutput('varSelTime'),
uiOutput('varSelMeas1'),
radioButtons(
'inSelMath',
'Math operation 1st and 2nd meas.:',
c(
'None' = '',
'Divide' = " / ",
'Sum' = " + ",
'Multiply' = " * ",
'Subtract' = ' - ',
'1 / X' = '1 / '
)
),
uiOutput('varSelMeas2')
),
br(),
uiOutput('uiPlot')
))
mainPanel(tabsetPanel(
tabPanel(
"Time courses",
br(),
fluidRow(
column(
4,
numericInput(
'inPlotTrajFacetNcol',
'#Columns:',
value = 4,
min = 1,
width = '100px',
step = 1
)
),
column(
4,
numericInput(
'inPlotTrajHeight',
'Height [px]:',
value = 800,
min = 100,
width = '100px',
step = 50
)
),
column(
4,
numericInput(
'inPlotTrajWidth',
'Width [%]:',
value = 100,
min = 10,
max = 100,
width = '100px',
step = 10
)
)
),
checkboxInput('chBhighlightTraj', 'Highlight trajectories?', FALSE),
uiOutput('varSelHighlight'),
br(),
actionButton('butPlotTraj', 'Plot!'),
uiOutput('uiPlotTraj')
),
tabPanel("Box-plots",
br(),
fluidRow(
column(
6,
checkboxInput('inPlotBoxNotches', 'Box plot notches?', FALSE),
checkboxInput('inPlotBoxOutliers', 'Box plot outliers?', TRUE)
),
column(
6,
selectInput('selPlotBoxLegendPos',
label = 'Select legend position',
choices = list(
"Top" = 'top',
"Right" = 'right',
"Bottom" = 'bottom'
),
selected = 'top')
)
),
uiOutput('varSelTpts'),
actionButton('butPlotBox', 'Plot!'),
plotOutput('outPlotBox', height = 800),
h4('Download plot'),
fluidRow(
column(
3,
numericInput(
'inPlotBoxWidth',
"Width",
10,
min = 1,
width = 100
)
),
column(
3,
numericInput(
'inPlotBoxHeight',
"Height",
7,
min = 1,
width = 100
)
),
column(6,
downloadButton('downPlotBox', 'PDF'))
)
#uiOutput('uiPlotBox')
)
))
)
))
\ No newline at end of file
Markdown is supported
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