Description Usage Arguments Value Examples
View source: R/podlove_baseplot.R
Creates the basic line plot to display Podlove download data over time, using
ggplot2()
. Includes an optional grouping variable and a switcher between
cumulative/non-cumulative data.
1 2 3 4 5 6 7 8 |
df_tidy_data |
A tidy data frame with download data, as constructed
by |
gvar |
Optional grouping parameter string (e.g. "title"), handed over
to |
cumulative |
Boolean switch to show either cumulative data (TRUE, default), or non-comulative data (FALSE) |
limit |
Boolean switch to fix axis limtis (relevant when adding smoothers) |
legend |
Boolean switch to add a legend |
... |
Additional parameters to be handed over to |
A ggplot2 plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
#prepare data
gdata <- podlove_prepare_stats_for_graph(podcast_example_data, gvar = title)
# line graph with cumulative data (grouped by title)
podlove_baseplot(plot_data, gvar = "title", cumulative = TRUE)
# line graph with non-cumulative data
podlove_baseplot(plot_data, gvar = "title", cumulative = FALSE)
# line graph with non-cumulative data and additional display parameters
podlove_baseplot(plot_data, gvar = "title", cumulative = FALSE,
alpha = 0.3, size = 5)
# line graph with ungrouped cumulative data
gdata <- podlove_prepare_stats_for_graph(podcast_example_data)
podlove_baseplot(plot_data, cumulative = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.