File:R-US state areas-basicboxplot+colour.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 450 × 135 pixels. Other resolutions: 320 × 96 pixels | 640 × 192 pixels | 1,024 × 307 pixels | 1,280 × 384 pixels | 2,560 × 768 pixels.
Original file (SVG file, nominally 450 × 135 pixels, file size: 64 KB)
File information
Structured data
Captions
DescriptionR-US state areas-basicboxplot+colour.svg |
English: Basic horizontal boxplot example (no outlier treatment) with continuous data, coloured to match R-US_state_areas-1D+quartiles. Data = US state areas |
|||
Date | ||||
Source | Own work | |||
Author | HYanWong | |||
Permission (Reusing this file) |
|
|||
SVG development InfoField | ||||
Source code InfoField | R codesvg(file = "R-US_state_areas-basicboxplot+colour.svg", width = 5, height = 1.5, pointsize = 8)
#Basic horizontal boxplot example (no outlier treatment) with continuous data, coloured to match R-US_state_areas-1D+quartiles. Data = US state areas
par(mar=c(4,1,3,1)+0.1)
X <- state.area*2.58998811/1000
stripchart(X, pch=NA, xlab=expression(paste(italic("landArea")," (thousands of square km)")), xaxt="n") #dummy plot, to set up axes
axis(1,seq(0, 2e3, 100), cex.axis=0.8, las=2)
#roll our own boxplot, to allow different coloured whiskers etc.
#Should be equivalent to boxplot(Y, range=0, add=TRUE)
corners <- xy.coords(quantile(X, c(0.25, 0.25, 0.75, 0.75)), c(0.8,1.2,1.2,0.8))
segments(corners$x, corners$y, corners$x[c(2,3,4,1)], corners$y[c(2,3,4,1)], col=c("green", "grey30", "red", "grey30")) #box
segments(median(X), 0.8, median(X), 1.2, lwd=3) #median
arrows(quantile(X, c(0.25, 0.75)),1,range(X), 1, col=c("green", "red"), angle = 90, length=0.1) #whiskers
title("Size of US states")
dev.off()
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 22:43, 6 March 2009 | 450 × 135 (64 KB) | HYanWong (talk | contribs) | make horizontal, to match others | |
22:18, 26 February 2009 | 135 × 450 (69 KB) | HYanWong (talk | contribs) | {{Information |Description={{en|1=Example R plot: simple boxplot (outliers included in whisker) of US state areas, coloured to match R-US_state_areas-1D+quartiles}} |Source=Own work by uploader |Author=HYanWong |Date=2009-02-26 |Permissi |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikibooks.org
- Usage on lt.wikipedia.org