[R] Stacked barplot of timeseries data

From: Demetri S. Mouratis <demetri_at_mouratis.org>
Date: Tue, 03 Jun 2008 18:34:10 -0500


Hi,

I'm trying to plot time-series data where each sample breaks down the percentage of CPU time spent in each of four states (usr, nice, sys, idle)

19:08:15  %usr  %nice   %sys   %idle
19:08:16    5      0     10     86
19:08:17   17      0     14     69
19:08:18    5      0      8     87
19:08:19   10      0     10     81
19:08:20    3      0      7     90
19:08:21    4      0      8     88

[on and on for many samples]

The plot I'm aiming for would stack the first three states in a colored barplot, so you get a visual sense of how busy the system is over the course of the day, and which state the CPU is spending its time in. (I've done this as area charts as well).

barplot() looked promising, but it wants to stack the columns instead of the rows.

Anybody have a good solution for this?

Thanks!
...Demetri



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 04 Jun 2008 - 00:17:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 04 Jun 2008 - 00:30:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive