File:Q tails (sans-serif) pie chart.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(SVG file, nominally 650 × 350 pixels, file size: 62 KB)

Data

From Identifont.[1] See also w:en:User:Psiĥedelisto/Q_tails.

type    serif   sans
Meets bowl      3363    4521
Bisecting       1461    2719
“2” shape       304     428
Outside bowl    271     397
Inside bowl only        129     220

Summary

Description
English: The code that generated this image is based on only lightly modified code from this StackOverflow answer by user "vagoberto". The code is licensed under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported license.
Date
Source Own work
Author Psiĥedelisto
SVG development
InfoField
 
The SVG code is valid.
 
This chart was created with Gnuplot.
Source code
InfoField

Gnuplot code

set terminal svg size 650,350 enhanced font 'Liberation Sans, Helvetica, Arial, sans-serif,10'
set output 'qtails-sans.svg'
set title 'Q tails (sans-serif)' font "Liberation Sans Bold,16"

filename = 'qtails.csv'

rowi = 1
rowf = 7

# obtain sum(column(2)) from rows `rowi` to `rowf`
set datafile separator '\t'
stats filename u 3 every ::rowi::rowf noout prefix "A"

# rowf should not be greater than length of file
rowf = (rowf-rowi > A_records - 1 ? A_records + rowi - 1 : rowf)

angle(x)=x*360/A_sum
percentage(x)=x*100/A_sum

# circumference dimensions for pie-chart
centerX=0
centerY=0
radius=1

# label positions
yposmin = 0.0
yposmax = 0.95*radius
xpos = 1.5*radius
ypos(i) = yposmax - i*(yposmax-yposmin)/(1.0*rowf-rowi)

#-------------------------------------------------------------------
# now we can configure the canvas
set style fill solid 1     # filled pie-chart
unset key                  # no automatic labels
unset tics                 # remove tics
unset border               # remove borders; if some label is missing, comment to see what is happening

set size ratio -1              # equal scale length
set xrange [-radius:2*radius]  # [-1:2] leaves space for labels
set yrange [-radius:radius]    # [-1:1]

#-------------------------------------------------------------------
pos = 0             # init angle
colour = 0          # init colour

# 1st line: plot pie-chart
# 2nd line: draw colored boxes at (xpos):(ypos)
# 3rd line: place labels at (xpos+offset):(ypos)
plot filename u (centerX):(centerY):(radius):(pos):(pos=pos+angle($3)):(colour=colour+1) every ::rowi::rowf w circle lc var,\
     for [i=0:rowf-rowi] '+' u (xpos):(ypos(i)) w p pt 5 ps 4 lc i+1,\
     for [i=0:rowf-rowi] filename u (xpos):(ypos(i)):(sprintf('%.2f%% %s', percentage($3), stringcolumn(1))) every ::i+rowi::i+rowi w labels left offset 3

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

  1. 3: $ style. Identifont. Retrieved on 2017-02-02. To get the numbers in the table, click Question 1 (serif or sans-serif?) or Question 2 (Q shape) and change the value. They appear under X possible fonts.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

3 February 2017

File history

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

Date/TimeThumbnailDimensionsUserComment
current02:33, 3 February 2017Thumbnail for version as of 02:33, 3 February 2017650 × 350 (62 KB)PsiĥedelistoUser created page with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file:

Metadata