格子直方图 [英] Histogram on Lattice

查看:93
本文介绍了格子直方图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于基数R的hist()不报告百分比(并且freq = FALSE)也无济于事,因此我转向了lattice.

Since hist() of the base R does not report percentages (and the freq=FALSE) does not help either, I turned to lattice.

histogram(rnorm(10000))

请为我提供以下帮助:

  1. 如何摆脱剧情周围的盒子?
  2. 如何分别定义x/y标签和x/y轴的cex?
  3. 如何为x和y轴提供自定义名称?

推荐答案

这应该使您入门:

library(lattice)
histogram(rnorm(10000),     
    main=list(
        label="Main plot title",
        cex=1.5),
    xlab=list(
        label="Custom x-axis label",
        cex=0.75),
    ylab=list(
        label="My very own y-axis label",
        cex=1.2),
    scales=list(cex=0.5),
    par.settings = list(axis.line = list(col = 0))
)

这篇关于格子直方图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆