File:Piecharts.svg

From Wikimedia Commons, the free media repository

Jump to: navigation, search

Piecharts.svg(SVG file, nominally 689 × 494 pixels, file size: 39 KB)

[edit] Summary

Example of a pie chart, along with a bar plot showing the same data and indicating that the pie chart is not the best possible chart for this particular dataset.

The graphic was created by User:Schutz for Wikipedia on 28 August 2007 using the R statistical project. The program that generated the graphic is given below. The graph was exported in postscript format, converted to SVG using the pstoedit command, and the layout was slightly modified using Inkscape before upload.

 
  a <- matrix(c(17, 18, 20, 22, 23,
                20, 20, 19, 21, 20,
                23, 22, 20, 18, 17), nrow=3, byrow=T)
  titles <- c("A", "B", "C")
  cols <- c("red", "blue", "green", "yellow", "black")
  
  postscript("piecharts.eps", paper="special", width=8, height=6)
  
  defaultmar <- par("mar")
  layout(matrix(c(1,3,5,
                  2,4,6), nrow=2, byrow=T), height=c(1,1))       
  par(cex=1)
  par(font=1)
  par(las=1)
  par(font.axis=1)
  par(mgp=c(1,1,0))
  
  for (i in 1:nrow(a)) {
    par(mar=c(0,0,2,0))
    pie(a[i,], init=90, clockwise=T, col=cols, radius=0.8)
    title(main=titles[i], line=0)
    par(mar=defaultmar+c(-2,-1.5,-4,-0.5))
    par(mgp=c(0,0.5,0))
    barplot(a[i,], horiz=F, xlim=c(0,10), ylim=c(0,25), col=cols, border=0,
            names.arg=1:5, space=0.8, axes=F)
    par(mgp=c(0,1,0))
  
    abline(h=5*1:5, col="white")
    axis(2)
  }
  
  dev.off()
  


Rlogo.png

This chart was created with R.

[edit] Licensing

Public domain I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide.

In case this is not legally possible:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.


Afrikaans | Alemannisch | Aragonés | العربية | Asturianu | Azərbaycan | Беларуская (тарашкевіца) | Български | Català | Cebuano | Soranî / کوردی | Česky | Cymraeg | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | Estremeñu | فارسی | Suomi | Français | Galego | עברית | हिन्दी | Hrvatski | Magyar | Հայերեն | Bahasa Indonesia | Ido | Íslenska | Italiano | 日本語 | ქართული | ភាសាខ្មែរ | 한국어 | Ripoarisch | Kurdî / كوردی | Latina | Lietuvių | Latviešu | 文言 | Македонски | Bahasa Melayu | Plattdüütsch | Nederlands | ‪Norsk (nynorsk)‬ | ‪Norsk (bokmål)‬ | Polski | Português | Română | Русский | Slovenčina | Slovenščina | Shqip | Српски / Srpski | Svenska | ไทย | Tagalog | Türkçe | Українська | Vèneto | Tiếng Việt | Walon | 吴语 | 中文 | ‪中文(简体)‬ | ‪中文(繁體)‬ | 粵語 | +/−

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current08:33, 28 August 2007Thumbnail for version as of 08:33, 28 August 2007689×494 (39 KB)Schutz (talk | contribs) (== Summary == Example of a pie chart, along with a bar plot showing the same data and indicating that the pie chart is not the best possible chart for this particular dataset. The graphic was created by User:Schutz for Wikipedia on 28 August 2007 usi)

The following 2 pages link to this file:

Global file usage

The following other wikis use this file: