Represent time-series data in much compact form I have time series data of one month plotted day-wise as

Notice every day follows a different pattern. Now, I want to show this &quot;diversity in pattern&quot; of each day in much compact form in a research paper. What are the different ways/options of representing this in compact form using R.
Simulate some data:

library(ggplot2)
library(purrr)
library(ggthemes)

days &lt;- seq(as.Date("2015-08-01"), as.Date("2015-08-31"), by="1 day")
hours &lt;- sprintf("%02d", 0:23)

map_df(days, function(x) {
  map_df(hours, function(y) {
    data.frame(day=x, hour=y, val=sample(2500, 1), stringsAsFactors=FALSE)
  })
}) -&gt; df


Check it:

ggplot(df, aes(x=hour, y=val, group=day)) +
  geom_line() +
  facet_wrap(~day) +
  theme_tufte(base_family="Helvetica") +
  labs(x=NULL, y=NULL)




Since you're only trying to convey the scope of the variation, perhaps use a boxplot of the values of hours across days?

ggplot(df, aes(x=hour, y=val)) +
  geom_boxplot(fill="#2b2b2b", alpha=0.25, width=0.75, size=0.25) +
  scale_x_discrete(expand=c(0,0)) +
  scale_y_continuous(expand=c(0,0)) +
  coord_flip() +
  theme_tufte(base_family="Helvetica") +
  theme(axis.ticks=element_blank()) +
  labs(x=NULL, y=NULL)




That can be tweaked to fit into most publication graphics slots and the boxplot shows just how varied each day's readings are.

You could also use boxplot.stats to get the summary data and plot it on a line chart:

library(dplyr)
library(tidyr)

bps &lt;- function(x) {
  cnf &lt;- boxplot.stats(x)$conf
  data.frame(as.list(set_names(cnf, c("lwr", "upr"))), mean=mean(x))
}

group_by(df, hour) %&gt;% 
  do(bps(.$val)) %&gt;% 
  ggplot(aes(x=hour, y=mean, ymin=lwr, ymax=upr, group=1)) +
  geom_ribbon(fill="#2b2b2b", alpha=0.25) +
  geom_line(size=0.25) +
  theme_tufte(base_family="Helvetica") +
  theme(axis.ticks=element_blank()) +
  labs(x=NULL, y=NULL)