Skip to content

Commit e664560

Browse files
authored
create
1 parent 8ecb9ed commit e664560

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

scatter3D.R

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
set.seed(1234)
2+
3+
library(ggplot2)
4+
library(tidyverse)
5+
library(data.table)
6+
library(scatterplot3d)
7+
8+
9+
# ....plotting ---------------------------------------
10+
final.merged$group <- as.factor(final.merged$group)
11+
12+
colors <- c("#E69F00", "#56B4E9")
13+
colors <- colors[as.numeric(final.merged$group)]
14+
15+
16+
scatterplot3d(final.merged$rank, y=final.merged$p.value, z=final.merged$slope,
17+
angle = 55,
18+
color = colors,
19+
grid=TRUE,
20+
box=T,
21+
main="3D Plot for PDX models",
22+
xlab = "Rank",
23+
ylab = "P-value",
24+
zlab = "Slope")
25+
26+
legend("bottom", legend = levels(final.merged$group),
27+
col = c("#E69F00", "#56B4E9"),
28+
inset = -0.55,
29+
xpd = T,
30+
par(mar=c(5, 4, 4, 2) + 0.1),
31+
horiz = TRUE,
32+
bty = "n",
33+
pt.cex = 1,
34+
lty = 1,
35+
pch=1, cex = 0.75,
36+
x.intersp = 0.1,
37+
text.width = 0.75)
38+
39+
40+
dev.copy(pdf,'scatter3DPlot_top10K_binarySlope_invivo_PDX.pdf')
41+
dev.off()

0 commit comments

Comments
 (0)