Keywords: R-US state areas-1D+quartiles.svg en Example R plot 1D vertical scatter plot stripplot of US state areas quartiles indicated by lines and point colours Own HYanWong 2009-02-27 Created with R using the following commands <pre> svg file R-US_state_areas-1D+quartiles svg width 1 5 height 5 pointsize 8 Example R plot 1D vertical scatter plot stripplot of US state areas quartiles indicated by lines and point colours par mar c 1 4 3 1 5 +0 1 Y <- state area 2 58998811/1000 set seed 9 set random number generator for same random jitter when replotting jitter <- runif length Y 0 8 1 2 stripchart Y vertical TRUE pch NA ylab expression paste italic landArea thousands of square km yaxt n abline h seq 0 2e3 100 lty dotted col lightgray axis 2 seq 0 2e3 100 cex axis 0 8 las 2 axis 4 quantile Y c 0 25 0 5 0 75 c Q1 Med Q3 cex axis 0 7 las 1 mgp c 1 0 1 0 tcl 0 abline h quantile Y 1 3 /4 lwd c 1 3 1 col c green black red q <- findInterval Y quantile Y 0 4 /4 TRUE points jitterq 1 Yq 1 col green points jitterq 2 Yq 2 col black points jitterq 3 Yq 3 col black points jitterq 4 Yq 4 col red title Size of US states outer TRUE line -2 centre the title on the device dev off </pre> Dot plots |