摘要
许可协议
| 本作品采用知识共享CC0 1.0 通用公有领域贡献许可协议授权。 |
采用本宣告发表本作品的人,已在法律允许的范围内,通过在全世界放弃其对本作品拥有的著作权法规定的所有权利(包括所有相关权利),将本作品贡献至公有领域。您可以复制、修改、传播和表演本作品,将其用于商业目的,无需要求授权。 http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
save as data.csv:
"year","tickets"1900,13409541905,8814411910,14591041919,26108881920,22060571925,20577751927,18898641929,13795931930,17214291931,15149391932,12913101933,12127061934,13699971935,14214051960,1380842
save as data_NA.csv:
"year.NA","tickets.NA"1900,13409541901,"NA"1902,"NA"1903,"NA"1904,"NA"1905,8814411906,"NA"1907,"NA"1908,"NA"1909,"NA"1910,14591041911,"NA"1912,"NA"1913,"NA"1914,"NA"1915,"NA"1916,"NA"1917,"NA"1918,"NA"1919,"NA"1919,26108881920,22060571921,"NA"1922,"NA"1923,"NA"1924,"NA"1925,20577751926,"NA"1927,18898641928,"NA"1929,13795931930,17214291931,15149391932,12913101933,12127061934,13699971935,14214051936,"NA"1937,"NA"1938,"NA"1939,"NA"1940,"NA"1941,"NA"1942,"NA"1943,"NA"1944,"NA"1945,"NA"1946,"NA"1947,"NA"1948,"NA"1949,"NA"1950,"NA"1951,"NA"1952,"NA"1953,"NA"1954,"NA"1955,"NA"1956,"NA"1957,"NA"1958,"NA"1959,"NA"1960,1380842
R-code
################# read data ################### read the original time-series: this one is needed for the dashed grey line, connecting all the dotsdata <- read.csv("data.csv", sep=",")data <- data[-15,] #remove data after 1935data[,2] <- data[,2]/1000000 #devide data by 1000000 to get "millions" on the y-Axisattach(data)## read the time-series filled up with NA's: this one is needed for the solid lines, which are connecting only# dots of cohering yearsdata.NA <- read.csv("data_NA.csv", sep=",") data.NA <- data.NA[-(38:nrow(data.NA)),] #remove data after 1935attach(data.NA)tickets.NA <- tickets.NA/1000000 #devide data by 1000000 to get "millions" on the y-Axis################ plotting ##################un-comment for pdf-output:#pdf(file="test3.pdf", width=10, height=7) par(cex=1.2)## first, plot the grey line:plot(tickets ~ year, type="l", lty=2, col="grey50", xlab="Jahr", ylab="verkaufte Fahrkarten (Mio.)", bty="l", lwd=2)## add the dots:points(tickets.NA ~ year.NA, pch=16, col="blue")## add the blue lines:lines(tickets.NA ~ year.NA, type="l", lwd=2, col="blue", lend=3)## add the legend:legend(x="bottomright", legend="keine zusammenhängenden Daten verfügbar", lty=2, col="grey50", lwd=2, bty="n")##un-comment for pdf-output:#dev.off()
The Graph was exported as PDF and imported in Inkscape for slight adjustments (e.g. Arrows) and then exported as SVG.