I apologize for not pasting a complete example, but the data-set is too large,
so I hope someone can help me just by description of symptoms.
I define a generic plot object name (note the missing y=.. in aes()) to
plot different y-values against the same set of x-values.
p.b4.generic.wg <-
ggplot(subset(b4.all.medians, ncpus==8, TRUE), aes(x=wg)) +
geom_line(aes(linetype=graph, group=interaction(graph,nwrk,ncpus))) +
geom_point(aes(shape=nwrk)) +
scale_shape(name="# of workers") +
scale_linetype(name="Workload") +
xlab("Work division") + ylab("N/A")
Now,
p.b4.stealspins <- p.b4.generic.wg + aes(y=v.stealspins / v.realtime) +
ylab("Steal rate")
draws the correct graph EXCEPT that the y-axis label is wrong. The ylab() is
ignored and the y-label is set to "v.stealspins / v.realtime". What
am I
doing wrong here?