简体   繁体   English

如何更改基数 r 中直方图上的 x 轴比例

[英]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 ?我有一个直方图,其 x 尺度显示 0, 1, 2, 3, 4, 5, 6。如何更改它,使其仅显示 0, 2, 4, 6 ? In base r please.请在基地 r。

It works for me as expected without specifying xlim它按预期对我xlim无需指定xlim

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

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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