简体   繁体   中英

How to change the x-axis scale on the histogram in base r

I have a histogram that has an x-scale showing 0, 1, 2, 3, 4, 5, 6. How do I change it so it only shows 0, 2, 4, 6 ? In base r please.

It works for me as expected without specifying xlim

hist(exdata1$Global_active_power, main = "Global Active Power", 
      xlab = "Global Active Power (kilowatts)", col = "red")

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM