Reputation: 664
I have a trellis
object generated by a 3rd-party package. With that being said, I cannot change the attributes by re-creating another trellis
object. I have to change its attributes after it has been created.
I have figured out which attributes control the axes' label font sizes, they are:
my_trellis$x.scales$cex[1]
and my_trellis$y.scales$cex[1]
But what about the axes' title font sizes? It took me some searches and still could not figure it out...
Thanks!
Upvotes: -2
Views: 960
Reputation: 3414
You can change trellis
object of lattice
package by using trellis.par.get
and trellis.par.set
function as below:
library(lattice)
# simulation
data("quakes")
Depth <- equal.count(quakes$depth, number=8, overlap=.1)
trellis <- xyplot(lat ~ long | Depth, data = quakes, main = "Large Font Title")
# change title font size
mt = trellis.par.get("par.main.text")
mt$cex = 2
trellis.par.set("par.main.text",mt)
trellis
class(trellis)
Upvotes: 1