Plot bei RGui beginnt nicht auf der X-Achse

Bernini

Cadet 4th Year
Registriert
Aug. 2010
Beiträge
127
Hallo Leute.

Ich hoffe mir kann wer helfen. Ich habe einen Plot in RGui gebastelt.
Leider beginnt dieser nicht auf der X-Achse und ich weiß nicht warum.

Vielleicht kann mir ja wer einen Tipp geben.
Code:
# Source: http://www.heise.de/newsticker/meldung/Google-scheffelt-weiter-Geld-1647890.html
data.names = c("Umsatz", "Gewinn")

data.years = c(
 2003.75, 
 2004, 2004.25, 2004.5, 2004.75, 
 2005, 2005.25, 2005.5, 2005.75, 
 2006, 2006.25, 2006.5, 2006.75, 
 2007, 2007.25, 2007.5, 2007.75, 
 2008, 2008.25, 2008.5, 2008.75, 
 2009, 2009.25, 2009.5, 2009.75, 
 2010, 2010.25, 2010.5, 2010.75, 
 2011, 2011.25, 2011.5, 2011.75, 
 2012, 2012.25, 2012.5)


data.umsatz = c(
515.200000, 
653.000000, 700.200000, 805.890000, 1031.500000, 
1256.000000, 1384.000000, 1578.000000, 1919.000000, 
2253.000000, 2456.000000, 2689.000000, 3206.000000, 
3663.000000, 3782.000000, 4231.300000, 4826.600000, 
5186.000000, 5367.000000, 5541.000000, 5701.000000, 
5508.000000, 5523.000000, 5944.000000, 6673.000000, 
6775.000000, 6820.000000, 7286.000000, 8440.000000, 
8575.000000, 9026.000000, 9720.000000, 10584.000000, 
10645.000000, 12140.000000, 12214.000000)

data.gewinn = c(
27.200000, 
63.000000, 79.100000, 51.980000, 204.100000, 
369.000000, 343.000000, 381.200000, 372.200000, 
592.300000, 721.100000, 733.400000, 1030.700000, 
1002.200000, 925.100000, 1069.000000, 1206.400000, 
1307.000000, 1247.000000, 1346.000000, 382.000000, 
1422.000000, 1485.000000, 1638.000000, 1974.000000, 
1955.000000, 1840.000000, 2167.000000, 2543.000000, 
1789.000000, 2505.000000, 2730.000000, 2705.000000, 
2890.000000, 2785.000000, 2785.000000)

data.title = "Umsatz- und Gewinnentwicklung von Google Inc."
data.sub = "Source: heise online"
data.file = "Umsatz- und Gewinnentwicklung von Google Inc.svg"
data.file = "Umsatz- und Gewinnentwicklung von Google Inc.png"

svg(file=data.file)
par(lwd=2)
plot(data.years, data.umsatz, type="l", ylim=c(0.0, 12500.000000), main=data.title, sub=data.sub, xlab="Year", ylab="Mio. US $", col=1)
lines(data.years, data.gewinn, col=2)


legend("topleft",inset=0.04,col=1:6,lwd=3,legend=data.names)

dev.off()

umsatzundgewxv9nksoja5.png


Danke,
Bernhard
 
Zurück
Oben