[NARCCAP-discuss] 答复: epsg value for CRCM-cgcm3 model

Oleksandr Huziy guziy.sasha at gmail.com
Fri Nov 15 09:31:05 MST 2013


Thanks Jianhua:

Now I will be calm and stop looking for a magical way to tell R about the
geographical positions of the matrix elements...
Probably it is OK if you are already plotting in native coordinates....
But concerning the shape I suppose you have to project it also to the data
projection, otherwise it won't match....

Anyways thanks for the examples.


2013/11/14 Jianhua Huang <jh.eco.cas at gmail.com>

> Hi Oleksandr:
>
> If you have the shape file for states or country, I think you can add it
> to the plot by using geom_polygon() function.
>
> library(maptools)
> shp <- readShapePoly('shape.file.shp')
>
>  ggplot(data = grid, aes(lon.proj, lat.proj, colour = sub_ac_ctr_col), asp
> = 1) +
> geom_point(shape = 15, size = 3) +
> scale_colour_manual(name = 'Legend', values = sapply(6:0/18, hsv)) +
> theme_set(theme_gray(base_size = 18)) +
>  guides(col = guide_legend(reverse=TRUE)) +
> ggtitle('Title') +
> geom_polygon(data = shp, aes(x = lat, y= lon))
>
> I don't have a shape file in hand, so I can't test it. But I think it will
> work.
>
> Jianhua
>
>
>
> -----邮件原件-----
> 发件人: narccap-discuss-bounces at mailman.ucar.edu [mailto:
> narccap-discuss-bounces at mailman.ucar.edu] 代表 Oleksandr Huziy
> 发送时间: Wednesday, November 13, 2013 2:59 PM
> 收件人: Discussion of NARCCAP data - uses and questions
> 主题: Re: [NARCCAP-discuss] epsg value for CRCM-cgcm3 model
>
> Hi Jianhua:
>
> Thank you for the script. Is there an easy way to make it plot coastlines,
> state and country borders?
> Is csv file obligatory?
>
> Cheers
>
>
> Sasha


More information about the narccap-discuss mailing list