Try to search your question here, if you can't find : Ask Any Question Now ?

Change sub-titles in lattice/densityplot

HomeCategory: stackoverflowChange sub-titles in lattice/densityplot
Avatarkundan asked 4 weeks ago

I was working in lattice/densityplot and want to change the “in”, “out” sub-titles to “inpatinet”, “outpatient”.
Thank you. The image and code below:

colors = c("black", "blue")
lines = c(1,2) #1
points = c(16,17)
key.trans <- list(title="Gender",
                  corner = c(0.90, 0.90),
                  #space="bottom", columns=2, #2
                  text=list(c("Female","Male")),
                  #points=list(pch=points, col=colors),
                  lines=list(col=colors, lty=lines),
                  cex.title=1, cex=.9) 

densityplot(~ Age_yrs|Location_type, groups=Sex,  
            data = subset(all_isolates_inc_ATCC, Age_yrs<100 & 
                   Institution=="P06" 
                   & Organism=="eco" 
                   & Location_type!="unk"), 
            xlab = "Age, years",
            lty=lines, col=colors,
            lwd=2, 
            plot.points = FALSE,
            #jitter=.00005,
            key=key.trans)

enter image description here

1 Answers
Best Answer
AvatarMikhail answered 4 weeks ago
Your Answer

5 + 20 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com