R語言
plot.table
位於 graphics
包(package)。 說明
這是用於(意外情況)table
對象的通用 plot
函數的方法。對於二維及更多維表,繪製mosaicplot
,而一維表則繪製為條形。
用法
## S3 method for class 'table'
plot(x, type = "h", ylim = c(0, max(x)), lwd = 2,
xlab = NULL, ylab = NULL, frame.plot = is.num, ...)
## S3 method for class 'table'
points(x, y = NULL, type = "h", lwd = 2, ...)
## S3 method for class 'table'
lines(x, y = NULL, type = "h", lwd = 2, ...)
參數
x |
一個 |
y |
必須是 |
type |
繪圖類型。 |
ylim |
y 軸範圍。 |
lwd |
在 1D 情況下使用 |
xlab, ylab |
x 軸和 y 軸標簽。 |
frame.plot |
邏輯指示是否應在一維情況下繪製框架( |
... |
更多圖形參數,請參閱 |
例子
## 1-d tables
(Poiss.tab <- table(N = stats::rpois(200, lambda = 5)))
plot(Poiss.tab, main = "plot(table(rpois(200, lambda = 5)))")
plot(table(state.division))
## 4-D :
plot(Titanic, main ="plot(Titanic, main= *)")
也可以看看
plot.factor
,因子的 plot
方法。
相關用法
- R plot.histogram 繪製直方圖
- R plot.raster 繪製光柵圖像
- R plot.factor 繪製因子變量
- R plot.default 默認散點圖函數
- R plot.window 設置圖形窗口的世界坐標
- R plot.xy 基本內部繪圖函數
- R plot.design 繪製設計或模型的單變量效應
- R plot.formula 散點圖的公式表示法
- R plot.data.frame DataFrame 的繪圖方法
- R points 向繪圖添加點
- R pairs 散點圖矩陣
- R polygon 多邊形繪製
- R persp 透視圖
- R pie 餅狀圖
- R par 設置或查詢圖形參數
- R polypath 路徑繪製
- R panel.smooth 簡單麵板圖
- R legend 將圖例添加到繪圖中
- R barplot 條形圖
- R stem 莖葉圖
- R mtext 將文本寫入繪圖的邊距
- R arrows 將箭頭添加到繪圖中
- R contour 顯示輪廓
- R stars 星圖(蜘蛛圖/雷達圖)和線段圖
- R box 在地塊周圍畫一個方框
注:本文由純淨天空篩選整理自R-devel大神的英文原創作品 Plot Methods for table Objects。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。