Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
🚀
This server has been upgraded to GitLab release
15.7
.
🚀
Open sidebar
pertz-lab
shiny-timecourse-inspector
Commits
cfc6be30
Commit
cfc6be30
authored
Nov 26, 2018
by
dmattek
Browse files
Defined global variables for font sizes in plots
parent
eebd8a44
Changes
7
Hide whitespace changes
Inline
Side-by-side
modules/auxfunc.R
View file @
cfc6be30
...
...
@@ -12,6 +12,18 @@ require(gplots) # for heatmap.2
require
(
grid
)
# for modifying grob
require
(
Hmisc
)
# for CI calculation
# Global parameters ----
# font sizes in pts for plots
PLOTFONTBASE
=
12
PLOTFONTAXISTEXT
=
12
PLOTFONTAXISTITLE
=
12
PLOTFONTFACETSTRIP
=
14
PLOTFONTLEGEND
=
12
# default number of facets in plots
PLOTNFACETDEFAULT
=
3
# Colour definitions ----
rhg_cols
<-
c
(
"#771C19"
,
...
...
@@ -513,7 +525,11 @@ LOCplotTraj = function(dt.arg, # input data table
xlab
(
paste0
(
xlab.arg
,
"\n"
))
+
ylab
(
paste0
(
"\n"
,
ylab.arg
))
+
ggtitle
(
plotlab.arg
)
+
LOCggplotTheme
()
+
LOCggplotTheme
(
in.font.base
=
PLOTFONTBASE
,
in.font.axis.text
=
PLOTFONTAXISTEXT
,
in.font.axis.title
=
PLOTFONTAXISTITLE
,
in.font.strip
=
PLOTFONTFACETSTRIP
,
in.font.legend
=
PLOTFONTLEGEND
)
+
theme
(
legend.position
=
"top"
)
return
(
p.tmp
)
...
...
@@ -655,7 +671,11 @@ LOCggplotScat = function(dt.arg,
p.tmp
=
p.tmp
+
LOCggplotTheme
()
+
LOCggplotTheme
(
in.font.base
=
PLOTFONTBASE
,
in.font.axis.text
=
PLOTFONTAXISTEXT
,
in.font.axis.title
=
PLOTFONTAXISTITLE
,
in.font.strip
=
PLOTFONTFACETSTRIP
,
in.font.legend
=
PLOTFONTLEGEND
)
+
theme
(
legend.position
=
"none"
)
# Marginal distributions don;t work with plotly...
...
...
modules/boxPlot.R
View file @
cfc6be30
...
...
@@ -239,7 +239,11 @@ modBoxPlot = function(input, output, session,
scale_fill_discrete
(
name
=
''
)
+
xlab
(
''
)
+
ylab
(
''
)
+
LOCggplotTheme
()
+
LOCggplotTheme
(
in.font.base
=
PLOTFONTBASE
,
in.font.axis.text
=
PLOTFONTAXISTEXT
,
in.font.axis.title
=
PLOTFONTAXISTITLE
,
in.font.strip
=
PLOTFONTFACETSTRIP
,
in.font.legend
=
PLOTFONTLEGEND
)
+
theme
(
legend.position
=
input
$
selPlotBoxLegendPos
,
axis.text.x
=
LOCrotatedAxisElementText
(
as.numeric
(
input
$
rBAxisLabelsRotate
)))
...
...
modules/clDistPlot.R
View file @
cfc6be30
...
...
@@ -57,7 +57,11 @@ modClDistPlot = function(input, output, session, in.data, in.cols = NULL, in.fna
scale_y_continuous
(
labels
=
percent
)
+
ylab
(
"percentage of cells\n"
)
+
xlab
(
""
)
+
LOCggplotTheme
()
+
LOCggplotTheme
(
in.font.base
=
PLOTFONTBASE
,
in.font.axis.text
=
PLOTFONTAXISTEXT
,
in.font.axis.title
=
PLOTFONTAXISTITLE
,
in.font.strip
=
PLOTFONTFACETSTRIP
,
in.font.legend
=
PLOTFONTLEGEND
)
+
theme
(
axis.text.x
=
LOCrotatedAxisElementText
(
as.numeric
(
input
$
rBAxisLabelsRotate
))
)
...
...
modules/tabScatter.R
View file @
cfc6be30
...
...
@@ -48,7 +48,7 @@ tabScatterPlotUI <- function(id, label = "Comparing t-points") {
numericInput
(
ns
(
'inPlotNcolFacet'
),
'#columns'
,
value
=
2
,
value
=
PLOTNFACETDEFAULT
,
min
=
1
,
step
=
1
)
...
...
modules/trajPlot.R
View file @
cfc6be30
...
...
@@ -20,7 +20,7 @@ modTrajPlotUI = function(id, label = "Plot Individual Time Series") {
numericInput
(
ns
(
'inPlotTrajFacetNcol'
),
'#Columns:'
,
value
=
4
,
value
=
PLOTNFACETDEFAULT
,
min
=
1
,
width
=
'100px'
,
step
=
1
...
...
modules/trajRibbonPlot.R
View file @
cfc6be30
...
...
@@ -210,7 +210,11 @@ modTrajRibbonPlot = function(input, output, session,
y.stim.arg
=
c
(
'ystart'
,
'yend'
),
xlab.arg
=
'Time (min)'
,
ylab.arg
=
''
)
+
LOCggplotTheme
()
+
LOCggplotTheme
(
in.font.base
=
PLOTFONTBASE
,
in.font.axis.text
=
PLOTFONTAXISTEXT
,
in.font.axis.title
=
PLOTFONTAXISTITLE
,
in.font.strip
=
PLOTFONTFACETSTRIP
,
in.font.legend
=
PLOTFONTLEGEND
)
+
theme
(
legend.position
=
input
$
rBlegendPos
)
return
(
p.out
)
...
...
server.R
View file @
cfc6be30
...
...
@@ -20,6 +20,7 @@ library(scales) # for percentages on y scale
library
(
dtw
)
# for dynamic time warping
library
(
imputeTS
)
# for interpolating NAs
# Global parameters ----
# change to increase the limit of the upload file size
options
(
shiny.maxRequestSize
=
200
*
1024
^
2
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment