File:R-US state areas-boxplot sqrt+extras.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: 97 KB)
File information
Structured data
Captions
DescriptionR-US state areas-boxplot sqrt+extras.svg |
English: Horizontal boxplot example with square-root-transformed continuous data, outliers identified by name and both log & linear axes plotted. 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-boxplot_sqrt+extras.svg", width = 5, height = 1.5, pointsize = 8)
#Horizontal boxplot example with square-root-transformed continuous data, outliers identified by name and both log & linear axes plotted. Data = US state areas
par(mar=c(3,4,4,1)+0.1)
X <- sqrt(state.area*2.58998811)
stripchart(X, pch=NA, xlim=c(0,max(X)), xlab=expression(sqrt(italic("landArea"))), mgp=c(2,0.5,0))
bp <- boxplot(X, horizontal=TRUE, add=TRUE, xaxt="n")
axis(3,sqrt(10^5*0:20),10^2*0:20, cex.axis=0.8, mgp=c(2.5,0.4,0), las=3, tcl=-0.2)
mtext(expression(italic("LandArea")), 3, line=2, adj=-0.11, cex=0.8)
mtext(expression(paste("(1000s of km"^2, ")", sep="")), 3, line=1.2, adj=-0.15, cex=0.8)
abline(v=sqrt(10^5*0:20), lty="dotted", col="lightgray")
title(main="Size of US states", line=2.5)
###Label outliers
outliers <- order(match(X, sort(boxplot.stats(X)$out)), na.last=NA)
odd <- c(TRUE, FALSE)
text(X[outliers[odd]], 1, labels=state.name[outliers[odd]], adj=-0.2, cex=0.65, srt=45, xpd=NA, col="grey40")
text(X[outliers[!odd]], 1, labels=state.name[outliers[!odd]], adj=1.2, cex=0.65, srt=45, xpd=NA, col="grey40")
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:53, 6 March 2009 | 450 × 135 (97 KB) | HYanWong (talk | contribs) | {{Information |Description={{en|1=Horizontal boxplot example with square-root-transformed continuous data, outliers identified by name and both log & linear axes plotted. Data {{=}} US state areas}} |Source=Own work by uploader |Author=[[User:HYanWong|HY |
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