如何只为一个直方图指定bin宽度?
library(GGally)
data(tips, package="reshape")
library(ggplot2)
ggpairs(data=tips, # data.frame with variables
columns=1:3, # columns to plot, default to all.
title="tips data", # title of the plot
mapping=aes(color=sex)) # aesthetics, ggplot2 style
答案 0 :(得分:1)
library(GGally)
data(tips, package="reshape")
library(ggplot2)
gg <- ggpairs(data=tips, # data.frame with variables
columns=1:3, # columns to plot, default to all.
title="tips data", # title of the plot
mapping=aes(color=sex)) # aesthetics, ggplot2 style
gg[3,1] <- gg[3,1] + geom_histogram( binwidth = 50)
gg