Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simon CHEVOLLEAU
Embryo functions
Commits
80e614bd
Commit
80e614bd
authored
Mar 11, 2022
by
simon.chevolleau
Browse files
Update
parent
8b35dd96
Changes
1
Hide whitespace changes
Inline
Side-by-side
functions.R
View file @
80e614bd
...
...
@@ -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
(),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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