Good day to you all, I have lightning data containing date, time, latitude and longitude. I hope that distribution of latitude and longitude will give number of lightning occurrence in a region. I have used factor function to sum up the number of events on latitude and longitude axis and saved as x and y. But when I tried to plot the two, I had and error message ( Error in image.default(x, y, z) : increasing 'x' and 'y' values expected). Every other effort I made failed to be successful - please I am a new user of R. Part of the data I am using is: lat lon -5.1821 147.4462 -5.1826 147.3733 -5.1680 147.3855 31.4489 -63.2175 28.3199 -62.1831 -18.2495 -44.6471 -11.3654 -42.8249 -2.6652 -73.2344 -13.3543 -56.5338 27.9594 -157.9413 29.4454 -62.0620 -5.1953 116.0678 31.7057 -62.7211 -15.6194 124.6710 -7.1434 -72.2230 -19.1066 -45.6655 I would be extremely grateful should anyone be king enough as to guide me on how to handle this plot. Thank you for any help. Ogbos [[alternative HTML version deleted]]
Hi there, How about you send a minimum reproducible code as suggested on posting guide :-) bests milton On Tue, Aug 25, 2009 at 5:48 AM, ogbos okike <ogbos.okike@gmail.com> wrote:> Good day to you all, > I have lightning data containing date, time, latitude and longitude. I hope > that distribution of latitude and longitude will give number of lightning > occurrence in a region. I have used factor function to sum up the number of > events on latitude and longitude axis and saved as x and y. But when I > tried > to plot the two, I had and error message ( Error in image.default(x, y, z) > : > increasing 'x' and 'y' values expected). Every other effort I made failed > to > be successful - please I am a new user of R. Part of the data I am using > is: > > lat lon > -5.1821 147.4462 > -5.1826 147.3733 > -5.1680 147.3855 > 31.4489 -63.2175 > 28.3199 -62.1831 > -18.2495 -44.6471 > -11.3654 -42.8249 > -2.6652 -73.2344 > -13.3543 -56.5338 > 27.9594 -157.9413 > 29.4454 -62.0620 > -5.1953 116.0678 > 31.7057 -62.7211 > -15.6194 124.6710 > -7.1434 -72.2230 > -19.1066 -45.6655 > I would be extremely grateful should anyone be king enough as to guide me > on > how to handle this plot. > Thank you for any help. > Ogbos > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
ogbos okike wrote:> Good day to you all, > I have lightning data containing date, time, latitude and longitude. I hope > that distribution of latitude and longitude will give number of lightning > occurrence in a region. I have used factor function to sum up the number of > events on latitude and longitude axis and saved as x and y. But when I tried > to plot the two, I had and error message ( Error in image.default(x, y, z) : > increasing 'x' and 'y' values expected). Every other effort I made failed to > be successful - please I am a new user of R. Part of the data I am using is: >Hi Ogbos, That's better. What may be more to your liking is this: library(maps) data(worldMapEnv) map("world") points(lightning$lon,lightning$lat,col="red") Jim