The first question I asked on the stack, and I'm pretty new to R, so please apologize for any etiquette violations. I draw 2 folded area diagrams using ggplot2. The data represents wait events from an Oracle database. This is a performance tuning graph. I have a few questions.

- The two graphs below do not match correctly, most likely due to the width of the text in the legend. Is there a simple solution?
- , , "CPU" "User I/O", . , , , , . , . . 12, , , .
- X, , , (6 8 ) , .
- 12 , ? , . , , .
:
library(ggplot2)
library(RColorBrewer)
library(gridExtra)
DF_AAS <- read.csv('http://dl.dropbox.com/u/4131944/Permanent/R-Questions/AAS-Plot/DATA_FRAME_AAS.csv', head=TRUE,sep=",",stringsAsFactors=TRUE)
DF_AAS <- within(DF_AAS, snap_time <- as.POSIXlt(snap_times2,
format = "%Y-%m-%d %H:%M:%S"))
DF_AAS[c('snap_times2')] <- NULL
DF_AAS_EVENT <- read.csv('http://dl.dropbox.com/u/4131944/Permanent/R-Questions/AAS-Plot/DF_AAS_EVENT.csv', head=TRUE,sep=",",stringsAsFactors=TRUE)
DF_AAS_EVENT <- within(DF_AAS_EVENT, snap_time <- as.POSIXlt(snap_times2,
format = "%Y-%m-%d %H:%M:%S"))
DF_AAS_EVENT[c('snap_times2')] <- NULL
plot_aas_wait_class <- ggplot()+
geom_area(data=DF_AAS, aes(x = snap_time, y = aas,
fill = wait_class),stat = "identity", position = "stack",alpha=.9)+
scale_fill_brewer(palette="Paired",breaks = sort(levels(DF_AAS$wait_class)))+
scale_y_continuous(breaks = seq(0, max(DF_AAS$aas)+(max(DF_AAS$aas)*.2), 5))+
opts(panel.background = theme_rect(colour = "#aaaaaa"))
plot_aas_event <- ggplot()+
geom_area(data=DF_AAS_EVENT, aes(x = snap_time, y = aas,
fill = wait_class_event),stat = "identity", position = "stack")+
scale_fill_brewer(palette="Paired",breaks = DF_AAS_EVENT$wait_class_event)+
scale_y_continuous(breaks = seq(0, max(DF_AAS_EVENT$aas)+(max(DF_AAS_EVENT$aas)*.2), 5))+
opts( panel.background = theme_rect(colour = "#aaaaaa"))
grid.arrange(arrangeGrob(plot_aas_wait_class, plot_aas_event),heights=c(1/2,1/2),ncol=1)