我可以在地图上画出经纬度的点,但是不能根据产量该变这些点的形状,提前谢谢大佬
library(ggmap)
library(sp)
library(maptools)
library(sp)
library(maps)
library(ggplot2)
library(mapdata)
setwd("D:\\rzuotu")
mydata<-read.table("1.txt",header=T)
df<-read.table("1.txt",header=T)
map("worldHires",ylim=c(40,42),xlim=c(149,153),fill=T,col="gray")
box()
degAxis(1,cex.axis=1,tck=0.01)
degAxis(2,cex.axis=1,tck=0.01)
grid(8,8,lty=3)
points(mydata[,1],mydata[,2],pch=1,col="black",cex=1) 这是我的代码pch值我不知道怎么根据数据变
latitude longitude product
150.24 41.31 620
151.01 41.32 1640
151.1 41.2 1000
151.09 41.23 1000
这是我的一部分数据,我数据量很大,无法手动改,想根据product值改变点形状,比如500吨以下是pch=1,500-1000吨pch=2这种