Based on your description I can't pinpoint the problem. Generally, I would
ask you about your ggplot version and the offending image.

Cheers,
Roman





On Tue, Mar 20, 2012 at 10:57 PM, Manuel Spínola <mspinola10@gmail.com>wrote:

> Thank you Roman,
>
> I used ggsave, but the quality of the plot is not good. I got a "grid" all
> over the map and some of the background.
>
> Best,
>
> Manuel
>
> 2012/3/20 Roman Luštrik <roman.lustrik@gmail.com>
>
>> For lattice and ggplot2 graphics, you need to wrap the ggplot/qplot into
>> a print call. Or, you can use ggsave.
>>
>> Cheers,
>> Roman
>>
>>
>>
>> On Tue, Mar 20, 2012 at 10:41 PM, Manuel Spínola <mspinola10@gmail.com>wrote:
>>
>>> Dear list members,
>>>
>>> How can I save a map on pdf plotted with the functions levelplot or gplot
>>> from the rasterVis package without loosing quality of the map.
>>>
>>> > class(maparaster)
>>> [1] "RasterLayer"
>>> attr(,"package")
>>> [1] "raster"
>>>
>>>
>>> pdf("mp.pdf")
>>> levelplot(maparaster)
>>> dev.off()
>>>
>>> and
>>>
>>> pdf("mpgplot.pdf")
>>> gplot(maparaster) + geom_tile(aes(fill = value))
>>> dev.off()
>>>
>>>
>>> Best,
>>>
>>> Manuel
>>>
>>> --
>>> *Manuel Spínola, Ph.D.*
>>>
>>> Instituto Internacional en Conservación y Manejo de Vida Silvestre
>>> Universidad Nacional
>>> Apartado 1350-3000
>>> Heredia
>>> COSTA RICA
>>> mspinola@una.ac.cr
>>> mspinola10@gmail.com
>>> Teléfono: (506) 2277-3598
>>> Fax: (506) 2237-7036
>>> Personal website: Lobito de río <
>>> https://sites.google.com/site/lobitoderio/>
>>> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
>>>
>>>        [[alternative HTML version deleted]]
>>>
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo@r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>>
>>
>>
>> --
>> In God we trust, all others bring data.
>>
>
>
>
> --
> *Manuel Spínola, Ph.D.*
> Instituto Internacional en Conservación y Manejo de Vida Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> mspinola@una.ac.cr
> mspinola10@gmail.com
> Teléfono: (506) 2277-3598
> Fax: (506) 2237-7036
> Personal website: Lobito de río<https://sites.google.com/site/lobitoderio/>
> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
>



-- 
In God we trust, all others bring data.

	[[alternative HTML version deleted]]

