2017-05-31 53 views
0

我想绘制箱形图。我有超过1000行,但当我绘制它们时,它只显示几个条目。无法在R中绘制所有数据绘图

数据集: https://www.dropbox.com/s/tgaqfgm2gkl7i3r/maintenance_data_updated.csv

#Start of Box plot Temperature 
    training_data <- read.csv("C:/Users/akhan/Documents/maintenance_data_updated_2.csv", stringsAsFactors = TRUE) 
    library(dplyr) 
    dt_temperature <- select(training_data, Runtime, Defect, Machine, Temperature, Plant) 
    dt_temperature$Machine_Plant = paste(dt_temperature$Machine,dt_temperature$Plant,sep = "_") 
    attach(dt_temperature) 
    class(Temperature) 
    class(Defect) 
    class(Runtime) 
    class(Machine) 
    ?boxplot 
    boxplot(Temperature ~ Machine_Plant) 

电流输出:https://www.dropbox.com/s/7nv5n80en1vpkyt/Rplot01.png

任何人都可以请给一个提示如何解决?

+0

你确定Machine_Plant变量是一个因素吗?尝试:boxplot(温度〜as.factor(Machine_Plant)) –

回答

0

你是说'它只显示几个条目'?如果你的问题是关于有只有4注释X轴箱线,解决方案可能是这样的:

boxplot(Temperature ~ Machine_Plant, las=3) 

类型

?par 

,了解更多有关las参数。

+0

谢谢。它解决了:) –