i have dataset has multiple longitude , latitude of different places in uk. trying use figured create multiple pie charts on map. whats essential making pie chart on map. note: can make single pie chart if hardcode latitude , longitude.
code:
floating.pie(xpos = area$longditude, ypos = area$latitude,x=1, radius=0.2, col="orange") area:
area <- sqlquery(con, "select top 3 geo.latitude, geo.longditude dbo.[geography]") the dataset is:
55.9500, 3.1833 54.8659, -2.3522 54.0167, 2.6333 53.5667, 1.2000 52.8311, 1.3278 52.5000, 1.8333 52.3555, -1.1743 51.5000, 51.5000 51.4833, 3.1833 51.3167, 0.5000 50.9600, -3.2200 the error getting is:
warning messages: 1: in cos(t2p) * radius + xpos : longer object length not multiple of shorter object length 2: in sin(t2p) * yradius + ypos : longer object length not multiple of shorter object length note: using of above code, dont seperate piecharts @ all. not sure how this, please. example view plotting pie graphs on map in ggplot
what see in webpaghe want ve got working nearly, need know how tell r differentiate values provide using area , plot them correctly single pie chart.
i able plot multiple float pie charts, had use infamous for loop.
area1<-data.frame(longitude = c(10,30, 50), latitude = c(5, 25, 50)) plot(0:100,type="n",main="floating pie test",xlab="",ylab="",axes=false) for(i in 1:length(area1$longitude)){ floating.pie(xpos = area1$longitude[i], ypos = area1$latitude[i],edges = 200, x=1, radius=10, col="orange") } 
Comments
Post a Comment