Thanks Kevin,
trying your example

>df<-data.frame(type,lon,lat)

>points<-df

>names(points) <- c('lat', 'lon')> al1 = get_map(location = c(19.817955, 41.33071), zoom = 14, maptype = 'roadmap')

ggmap(al1) + geom_point(data=points, aes(size = 4, fill=type))


I get error :

Warning message:Removed 41 rows containing missing values (geom_point).

and no points printed except some scale with different blue colors

What I am doing wrong?

Help







On Mon, Apr 15, 2013 at 12:52 PM, <kevin.morelle@ulg.ac.be> wrote:

> Hi,
> This worked for me but I only tried with ggplot:
>
> 1°) add a colum "$type" to your differents dataset to discriminate them
> 2°) join then your datasets in one dataframe (rbind)
> 3°) then in ggmap use "fill=type", so as: ggmap(al1) +
> geom_point(data=points, aes(size = 4, fill=type))
>
> Hope it works,
>
> Kevin
>
> ----- Mail original -----
> De: "Endri Raco" <endri81@gmail.com>
> À: r-sig-geo@r-project.org
> Envoyé: Lundi 15 Avril 2013 12:36:10
> Objet: [R-sig-Geo] Multiple datasets with coordinates
>
> Hi group,
> Trying to plot with ggplot2 different datasets of coordinats inside the
> same chart.
>
> Till now I can plot
>
> ggmap(al1) + geom_point(data=points,colour="red", size = 4)
>
> where points are tables
>
>
>
> lon    lat
>
> 41.00   19.02
>
>
> but I need to add other sets of points(tables of coordinates)
>
>
> lon    lat
>
> 41.00   19.02
>
> ...     .....
> *
> *
>
> with other colors in the same chart.Is that possible?
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
MSc. Endri Raço
_________________________________________________
Polytechnic University of Tirana
Faculty of Mathematical Engineering and Physics Engineering
Department of Mathematical Engineering
Address:  Sheshi Nene Tereza, Nr. 4, Tirana - ALBANIA
Mobile: ++ 355 682061988

	[[alternative HTML version deleted]]

