[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-geo
Subject:    Re: [R-sig-Geo] Increasing font size in a levelplot graphic
From:       "Thiago V. dos Santos" <thi_veloso () yahoo ! com ! br>
Date:       2013-03-26 18:39:46
Message-ID: 1364323186.51874.YahooMailNeo () web121904 ! mail ! ne1 ! yahoo ! com
[Download RAW message or body]

Oscar and Pascal,

Thank you for the suggestions. Both of them solved my problem.

Best,
Thiago.


----- Original Message -----
From: Oscar Perpiñán Lamigueiro <oscar.perpinan@gmail.com>
To: Pascal Oettli <kridox@ymail.com>
Cc: Thiago V. dos Santos <thi_veloso@yahoo.com.br>; R-SIG list \
                <r-sig-geo@r-project.org>
Sent: Tuesday, March 26, 2013 4:40 AM
Subject: Re: [R-sig-Geo] Increasing font size in a levelplot graphic

Hi,

On the other hand, perhaps your problem arises when you export the
graphic using large values for width and height without modifying the
resolution.

Try this:

library(raster)
library(rasterVis)

r <- raster()
r <- init(r, runif)

## res=72 if none is provided
png('smallFontSize.png', width=4000, height=4000)
levelplot(r)
dev.off()

png('correctFontSize.png', width=4000, height=4000, res=600)
levelplot(r)
dev.off()


Best,

Oscar.
Pascal Oettli <kridox@ymail.com> writes:

> Hi,
> 
> For example:
> 
> p.strip <- list(cex=1.5, lines=2, fontface='bold')
> ckey <- list(labels=list(cex=1.5, col='magenta'), height=0.5)
> x.scale <- list(cex=1, alternating=1, col='red')
> y.scale <- list(cex=1, alternating=1, col='blue')
> 
> levelplot(s, colorkey=ckey, par.strip.text=p.strip, 
> scales=list(x=x.scale, y=y.scale))
> 
> HTH,
> Pascal
> 
> 
> On 26/03/13 12:16, Thiago V. dos Santos wrote:
> > Dear R-SIGgers,
> > 
> > This question is related to the rasterVis package. Please reproduce the following \
> > plot: 
> > library(raster)
> > library(rasterVis)
> > 
> > r1=r2=r3=raster(nr=100, nc=100)
> > r1[]<-r2[]<-r3[]<-1:ncell(r1)
> > s<-stack(r1,r2,r3)
> > levelplot(s)
> > 
> > On my Mac, I think the text size is too small. Increasing picture dimensions \
> > won't work - graph size will increase but text still looks small. 
> > So my question arises: how can I increase axis, scale and title font size in a \
> > levelplot graphic? I've skimmed over both rasterVis and lattice documentation and \
> > haven't found any clues. 
> > 
> > Any help appreciated.
> > 
> > Best regards,
> > Thiago.
> > 
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> > 
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo


-- 
Oscar Perpiñán Lamigueiro
Grupo de Sistemas Fotovoltaicos (IES-UPM)
Dpto. Ingeniería Eléctrica (EUITI-UPM)
URL: http://procomun.wordpress.com
Twitter: @oscarperpinan


_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic