[R] Three plots with logged X-axis in the same plot

Duncan Mackay mackay at northnet.com.au
Fri May 17 03:47:03 CEST 2013

Hi Patrik,

Using plot you could give the panel extra height 
by changing the cex of the labels etc and mai of the top expecially.
Otherwise you could use xyplot and split the data 
into 3 - lattice with panels can be space saving

dat <- data.frame(max = hr_max, min=hr_min, med = med_names)
dat$gp <- c(rep(1:3, each = 17),3)
dat$N <- c(1:17,1:17,1:18)

xyplot(N ~ max |gp, data = dat,
        xlim = c(-10,160),
        layout = c(3,1),
        strip = F,
        subscripts = T,
        panel = function(x,y,subscripts,...){
cod = 3, angle=90,length=0.05)

cex = 0.6)

some tweaking needs to be done to suit



Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au

At 10:57 17/05/2013, you wrote:
>On 05/16/2013 11:07 PM, Öhagen Patrik wrote:
>>Hi Jim,Thank you for your input! I am working 
>>with the text and arrow command in each of the 
>>graphs. I think it would be far to messy to 
>>plot them all in one graph (50+ point estimates and confidence intervals).
>>par(mfrow=c(1,3)) is a step in the proper 
>>direction but I fail to see how I can reduce 
>>the amount of unused printing area around the three graphs.
>Hi Patrik,
>Perhaps you could simply change the aspect ratio of the plot. Try this:
>med_names<-c("Alcohol Amnestic Disorder",
>"Alcoholic Cirrhosis",
>"Korsakoff Syndrome",
>"Alcoholic Seizure",
>"Alcoholic Polyneuropathy",
>"Alexander Disease",
>"Allergic Angiitis",
>"Allergy, Food",
>"Alphavirus Infection",
>"Alstrom Syndrome",
>"Altitude Sickness",
>"Alzheimer Dementia",
>"Bladder Stones",
>"Nasal Bleeding",
>"River Blindness",
>"Sinoatrial block",
>"Bundle Branch blocks",
>"Blood Borne Pathogens",
>"Blood Coagulation Disorder",
>"Blood Group Incompatibility",
>"Surgical Blood Loss",
>"Blood Poisoning",
>"Bluecomb Virus",
>"Blue-Eared Pig Disease",
>"Blunt Injury",
>"Charcot Marie Tooth Disease",
>"Chest Pain",
>"Chiari's Syndrome",
>"Chigoe Flea",
>"Childbirth, Home",
>"Chlamydia Infection",
>"Choanal Atresia",
>"Cholera Morbus",
>"Chondromalacia Patellae",
>"Choreic Movement",
>"Christmas Disease",
>"Chromosomal Inversion",
>"Chromosome Disorder",
>"Chronic Fatigue Disorder",
>"Chronic Wasting Disease",
>"Churg-Strauss Syndrome")
>R-help at r-project.org mailing list
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list