Re: [R] Overlapping x axes using Lattice

From: Breheny, Patrick <>
Date: Tue, 03 May 2011 17:44:39 -0400

I'm not clear on what you're looking for here. Your x-axis is numeric, why are you converting it to a factor? If you keep it numeric, the labels don't overlap. Or perhaps you don't want it to be numeric, in which case why not just change the aspect ratio of the plot until they no longer overlap? Or change the axis font size? Or put fewer labels on the axis? There is a finite amount of space on the axis, so you have to either make more space, shrink the labels, or draw fewer of them.

-----Original Message-----
From: [] On Behalf Of Andrew McFadden Sent: Tuesday, May 03, 2011 5:05 PM
Subject: [R] Overlapping x axes using Lattice

Hi R users

I apologise in advance for this question as I suspect it is simple and perhaps others have had this problem.
I am struggling to sort out how to fix the x axes so that the labels don't overlap.

I have put the following example together to show my problem.


titre <- as.factor(rep(c(10999,20999,30999,40999,50999,60999,



histogram(~pesti[,1]|pesti[,2]+ pesti[,3] ,alternating=TRUE,tick.number=1,
stack=TRUE,type = "count", xlab="VNT",rot=c(180,180),draw=FALSE)

Thank you in advance.


Andrew McFadden MVS BVSc
Incursion Investigator

Investigation & Diagnostic Centres - Wallaceville Biosecurity New Zealand Ministry of Agriculture and Forestry

Phone 04 894 5600 Fax 04 894 4973 Mobile 029 894 5611 Postal address: Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St Upper Hutt

This email message and any attachment(s) is intended solely for the addressee(s) named above. The information it contains is confidential and may be legally privileged. Unauthorised use of the message, or the information it contains, may be unlawful. If you have received this message by mistake please call the sender immediately on 64 4 8940100 or notify us by return email and erase the original message and attachments. Thank you.

The Ministry of Agriculture and Forestry accepts no responsibility for changes made to this email or to any attachments after transmission from the office.

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 05 May 2011 - 06:25:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 05 May 2011 - 07:00:05 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive