#### Generating two sets of Poisson samples

set.seed(100)
data1 <- c(rpois(100, lambda = 2), rpois(100, lambda = 6))
set.seed(100)
data2 <- c(rpois(100, lambda = 10), rpois(100, lambda = 26))
# generating the data frame 
df    <- data.frame(case1 = data1,
                    case2 = data2)
# normalizing the data
dfNor    <- apply(df, 2, function(x){x/sum(x) * 1000})
head(dfNor)
##         case1    case2
## [1,] 1.248439 2.234637
## [2,] 1.248439 2.793296
## [3,] 2.496879 2.513966
## [4,] 0.000000 3.351955
## [5,] 2.496879 2.793296
## [6,] 2.496879 3.072626


### Drawing the scatter plot

plot(dfNor[,1], dfNor[,2])

#Adding the color, changing the direction of coordination
plot(dfNor[,1], dfNor[,2], las = 1,
     col = 'red')

#Changing the point type, size 
plot(dfNor[,1], dfNor[,2], las = 1,
     col = 'red', pch = 19, cex = 1.5)

#Or changing another type, adding the label
plot(dfNor[,1], dfNor[,2], las = 1,
     bg = 'red', pch = 21, cex = 1.5,
     xlab = 'counts_1', ylab = 'counts_2',
     cex.axis = 1.5, # increasing the size of the coordinate
     cex.lab = 1.5   # increasing the size of the lable
     )
#Checking correlation and and adding the line
correlation <- cor(dfNor[,1], dfNor[,2])
correlation
## [1] 0.6365044
abline(lm(dfNor[,2] ~ dfNor[,1]))