r - Expand spacing between tick marks on x axis -


i want expand spacing between tick marks on x axis in r.

i have years on x axis c(2005:2012) , 1 value per year on y axis. say:

a <- c(5,4,6,7,3,8,4,2) b <- c(2005:2012) plot(b, a, type="l") 

i need expand spacing between each tick mark in order "stretch" plot horizontally better overview. @ end of r knowledge , haven't found in internet, please help. use standard graphic packages of r.

it's not plot function determines aspect ratio of interactive plotting device. each of 3 major branches of r has own default interactive device: macs has quartz(), windows have (i thought window() checking page wrong, , checking ?dev.interactive revealed correct function windows()), , linux, x11() or x11(). if want open device different dimension default, need issue command different height , width values default (or can stretch existing window if gui supports action):

  quartz(height = 5, width = 10)   <- c(5,4,6,7,3,8,4,2)   b <- c(2005:2012)   plot(b, a, type="l") 

enter image description here

if learn more r graphics model should read: ?devices.

after failing remember windows interactive device name see might cross-platform hack using fact options function can provide access default device:

options()$device(height=5, width=10) 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -