How Can We Help?
Content deleted Content added
create |
Grendelkhan (talk | contribs) rescale axes, zero Y axis, reenter data from UN's POP/DB/WPP/Rev.2015/POP/F01-1. |
||
Line 6: | Line 6: | ||
| Description = All values are scaled by 1000. This is necessary to keep the lines from turning into ribbons. |
| Description = All values are scaled by 1000. This is necessary to keep the lines from turning into ribbons. |
||
| XMin = |
| XMin = 1950 |
||
| XMax = |
| XMax = 2015 |
||
| YMin = |
| YMin = 0 |
||
| YMax = |
| YMax = 35 |
||
| GraphStretchHeight = 500 |
| GraphStretchHeight = 500 |
||
Line 20: | Line 20: | ||
| XAxisText = |
| XAxisText = |
||
| XAxisMarkStep = |
| XAxisMarkStep = 10 |
||
| XAxisMark2Step = 1 |
| XAxisMark2Step = 1 |
||
| XAxisValueStart = |
| XAxisValueStart = 1950 |
||
| XAxisValueStep = |
| XAxisValueStep = 10 |
||
| YAxisText = |
| YAxisText = |
||
| YAxisMarkStep = 5 |
| YAxisMarkStep = 5 |
||
| YAxisMark2Step = 1 |
| YAxisMark2Step = 1 |
||
| YAxisValueStart = |
| YAxisValueStart = 0 |
||
| YAxisValueStep = 5000 <!-- this makes the displayed values right --> |
| YAxisValueStep = 5000 <!-- this makes the displayed values right --> |
||
Line 37: | Line 37: | ||
| Graph1Color = #FF00FF <!-- pink --> |
| Graph1Color = #FF00FF <!-- pink --> |
||
| Graph1Values = |
| Graph1Values = |
||
1950 7.752 |
|||
1951 7.839 |
|||
1952 7.935 |
|||
1953 8.038 |
|||
1954 8.150 |
|||
1955 8.270 |
|||
1956 8.398 |
|||
1957 8.535 |
|||
1958 8.680 |
|||
1959 8.833 |
|||
1960 8.995 |
|||
1961 9.165 |
|||
1962 9.344 |
|||
1963 9.532 |
|||
1964 9.729 |
|||
1965 9.935 |
|||
1966 10.149 |
|||
1967 10.369 |
|||
1968 10.600 |
|||
1969 10.850 |
|||
1970 11.121 |
|||
1971 11.413 |
|||
1972 11.717 |
|||
1973 12.023 |
|||
1974 12.316 |
|||
1975 12.583 |
|||
1976 12.831 |
|||
1977 13.056 |
|||
1978 13.223 |
|||
1979 13.283 |
|||
1980 13.211 |
|||
1981 12.997 |
|||
1982 12.667 |
|||
1983 12.279 |
|||
1984 11.913 |
|||
1985 11.630 |
|||
1986 11.439 |
|||
1987 11.338 |
|||
1988 11.376 |
|||
1989 11.608 |
|||
1990 12.068 |
|||
1991 12.789 |
|||
1992 13.746 |
|||
1993 14.824 |
|||
1994 15.870 |
|||
1995 16.773 |
|||
1996 17.482 |
|||
1997 18.034 |
|||
1998 18.511 |
|||
1999 19.038 |
|||
2000 19.702 |
|||
2001 20.531 |
|||
2002 21.487 |
|||
2003 22.507 |
|||
2004 23.500 |
|||
2005 24.400 |
|||
2006 25.184 |
|||
2007 25.878 |
|||
2008 26.529 |
|||
2009 27.207 |
|||
2010 27.962 |
|||
2011 28.809 |
|||
2012 29.727 |
|||
2013 30.683 |
|||
2014 31.628 |
|||
2015 32.527 |
|||
}} |
}} |
Revision as of 19:28, 2 November 2016
Source
Mark and copy the following text. Paste it into a plain text file. The text file should have an svg extension, for example mychart.svg.
You can check the result with Toolforge tool SVGCheck (upload file temporarily), in W3Schools Tryit Editor (insert source code) or in Commons with File:Test.svg (upload as new file revision).
<?xml version="1.0" encoding="UTF-8" ?> <!-- Generator: wikimedia.svg.chart, 2013-08-28 --> <!-- modify viewBox (x,y,dx,dy) for position (x,y) and size (dx,dy) --> <svg id="head" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-29.7375,-181.8,303.7375,208.1" width="750" height="510" font-family="Helvetica, Arial, Liberation Sans" > <!-- also a workaround for librsvg: a <rect> must be placed somewhere before text for a good display of text --> <rect id="imagebackground" x="-29.738" y="-181.8" width="303.74" height="208.1" stroke-width="0.2" stroke="none" fill="white"/> <title>plain text svg graphic</title> <desc> This svg graphic is to edit with an text editor. Please do not overwrite this file by saving with an image editor. ---------------- All values are scaled by 1000. This is necessary to keep the lines from turning into ribbons. </desc> <style id="styles" type="text/css"> <![CDATA[ .graphgeneral { /*-- general look of graphs and markers, e.g. in legend --*/ stroke-width: 1.37; fill: none; stroke-linejoin: round; stroke-linecap: round; } .graphgeneralstretch { /*-- general look of graphs and markers on a stretched chart --*/ stroke-width: 0.82; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.graph1lineblank { /*-- look of graph 1 --*/ stroke: #FF00FF; } .graph1line { stroke: #FF00FF;
marker-start:url(#graph1markerstretch); marker-mid:url(#graph1markerstretch); marker-end:url(#graph1markerstretch); }
.graph1marker { /*-- look of marker 1 --*/ stroke: #FF00FF; fill: #FF00FF; }
.graph2lineblank { /*-- look of graph 2 --*/ stroke: rgb(75%, 10%, 10%); } .graph2line { stroke: rgb(75%, 10%, 10%); }
.graph3lineblank { /*-- look of graph 3 --*/ stroke: rgb(00%, 60%, 00%); } .graph3line { stroke: rgb(00%, 60%, 00%); }
.graph4lineblank { /*-- look of graph 4 --*/ stroke: rgb(00%, 60%, 60%); } .graph4line { stroke: rgb(00%, 60%, 60%); }
.graph5lineblank { /*-- look of graph 5 --*/ stroke: rgb(60%, 00%, 60%); } .graph5line { stroke: rgb(60%, 00%, 60%); }
.graph6lineblank { /*-- look of graph 6 --*/ stroke: rgb(60%, 60%, 00%); } .graph6line { stroke: rgb(60%, 60%, 00%); }
.graph7lineblank { /*-- look of graph 7 --*/ stroke: rgb(00%, 00%, 30%); } .graph7line { stroke: rgb(00%, 00%, 30%); }
.graph8lineblank { /*-- look of graph 8 --*/ stroke: rgb(00%, 30%, 00%); } .graph8line { stroke: rgb(00%, 30%, 00%); } .axisline { stroke: black; stroke-width: 0.68; stroke-linecap: round; } .titletext { font-size: 9.65px; } .axistext-x { font-size: 8.775px; } .axistext-x-number { font-size: 8.775px; } .axistext-y { font-size: 8.775px; } .axismark-main { stroke: black; stroke-width: 0.48; } .axismark-second { stroke: black; stroke-width: 0.48; } .legendtext { font-size: 8.775px; text-anchor: start; }
.graphmarker { stroke-width: 0.68; fill: white; stroke-linejoin: round; } ]]></style> <defs> <!--== axis dashes definitions ==--> <!-- x-axis mark, modify "height" --> <pattern id="x-axismark-main" x="0" width="10" height="4" patternUnits="userSpaceOnUse"> <line x1="0" y1="-1" x2="0" y2="4" class="axismark-main"/> </pattern> <!-- y-axis mark, modify "width" --> <pattern id="y-axismark-main" width="4" height="10" patternUnits="userSpaceOnUse"> <line x1="-1" y1="0" x2="4" y2="0" class="axismark-main"/> </pattern> <!-- y-axis2 mark, modify "width" --> <pattern id="y-axis2mark-main" width="2" height="10" patternUnits="userSpaceOnUse"> <line x1="-1" y1="0" x2="11" y2="0" class="axismark-main"/> </pattern>
<!--== graph marker ==--> <g class="graphmarker">
<g id="graph1markershape" transform="translate(4.1,4.1)"><rect x="-2.048" y="-2.048" width="4.095" height="4.095" fill="x"/></g> <!-- regular square --> <marker id="graph1marker" class="graph1marker" refX="4.1" refY="4.1" viewBox="0 0 8.19 8.19" markerUnits="userSpaceOnUse" markerWidth="8.19" markerHeight="8.19"> <use xlink:href="#graph1markershape"/> </marker> <marker id="graph1markerstretch" class="graph1marker" refX="4.1" refY="2.457" viewBox="0 0 8.19 8.19" markerUnits="userSpaceOnUse" markerWidth="8.19" markerHeight="8.19"> <use transform="scale(1, 0.6)" xlink:href="#graph1markershape"/> </marker> </g> </defs> <g transform="scale(1, -1)"> <!-- x axis, modify "x2" and "width" --> <rect id="x-axismark" x="-1" y="-3.5" width="198.9" height="3.5" fill="url(#x-axismark-main)"/> <line id="x-axis" x1="0" y1="0" x2="195" y2="0" class="axisline"/> <!-- y axis, modify "height" --> <rect id="y-axismark" x="-3.5" y="-1" width="3.5" height="176" fill="url(#y-axismark-main)"/> <line id="y-axis" x1="0" y1="0" x2="0" y2="175" class="axisline"/> </g> <!-- x axis text, modify each value --> <g id="axistext-x" class="axistext-x-number" transform="translate(0, 11.4)" text-anchor="middle"> <text id="title-x" class="axistext-x" x="97.5" y="11.4" ></text> </g> <!-- y axis text, modify each value --> <g id="axistext-y" class="axistext-y" text-anchor="end" transform="translate(-5.9, 2.9)"> <text y= "-0">0</text> <text y= "-25">5</text> <text y= "-50">10</text> <text y= "-75">15</text> <text y="-100">20</text> <text y="-125">25</text> <text y="-150">30</text> <text y="-175">35</text> <text y="-200">40</text> <text y="-225">45</text> <text y="-250">50</text> <text id="title-y" x="87.5" y="-16" transform="rotate(-90)" text-anchor="middle" ></text> </g>
<!-- legend --> <g id="legend" class="legendtext" transform="translate(204.8, -157.5)">
<g id="legend-background" class="axismark-main"> <rect x="0" y="0" fill="white" width="63.4" height="23.7"/> </g>
<g class="graphgeneral"><g class="graph1line"> <polyline id="legend-line1" points="3.9 6.76 13.65 6.76" marker-start="none" marker-end="none"/>
<path id="legend-marker1" transform="scale(1 -1)" stroke-width="0.00001" d="M 8.78 -6.76 h 0" marker-start="url(#graph1marker)" marker-end="none"/> </g></g> <text id="legend-text1" x="17.6" y="9.36">1st W </text>
<g class="graphgeneral"><g class="graph2line"> <polyline id="legend-line2" points="3.9 16.41 13.65 16.41" marker-start="none" marker-end="none"/> </g></g> <text id="legend-text2" x="17.6" y="19.02">2nd W </text> </g> <!--====== graph data with origin values, you can manually copy or attach the values here ======--> <!-- modify displacement "translate" --> <defs> <g id="graphs">
<!-- graph 2 -->
<polyline id="graph2" points=" 25 40 40 10 55 35 70 10 85 40 "/> </g> <g id="graph1"> <!-- graph 1 --> <polyline id="graph1-line" stroke-width="0.82" points=" 15 40 30 10 45 35 60 10 75 40 "/> </g> </defs> <g class="graphgeneralstretch" transform="scale(3, -5) translate(-1950, -0)">
<!-- graph 2 --> <use id="graphuse2p2" transform="translate(0.269, 0)" class="graph2lineblank" xlink:href="#graph2"/> <use id="graphuse2m2" transform="translate(-0.269, 0)" class="graph2lineblank" xlink:href="#graph2"/> <use id="graphuse2-1" transform="translate(0, 0)" class="graph2line" xlink:href="#graph2"/>
<!-- graph 1 --> <use id="graphuse1p2" transform="translate(0.269, 0)" class="graph1lineblank" xlink:href="#graph1"/> <use id="graphuse1m2" transform="translate(-0.269, 0)" class="graph1lineblank" xlink:href="#graph1"/> <use id="graphuse1-1" transform="translate(0, 0)" class="graph1line" xlink:href="#graph1"/> </g> </svg>
Recent Comments