I have a very simple dataframe
> samplePiece
time memory pid
1 1597323990 79872 11369
2 1597323990 51088 11157
3 1597324320 87435 11369
4 1597324320 63542 11157
and I'm trying to draw a stacked lines graph
> ggplot(samplePiece, aes(x=time, y=memory, fill=pid)) +
geom_area(stat = "identity", position = "stack")
I tried different combination of geom_area
parameters. But in every case result was the same.
but when I do, I get this error:
Error: Aesthetics can not vary with a ribbon
It works only if the pid
is the same. But when I add another process to observations, I get this error.
How can I fix this? Or... what do I do wrong?
I'm asking this question because there