pubs_per_year | R Documentation |
Plot bar plot of the number of publications per year. I find facetting makes the plot easier to read than filling with different colors.
pubs_per_year(
pubs,
facet_by = NULL,
fill_by = NULL,
binwidth = 365,
preprints = TRUE,
n_top = Inf,
n_top_fill = Inf,
sort_by = c("first_appeared", "count", "recent_count"),
log_color = FALSE
)
pubs |
A data frame with at least these columns:
There must be one row per publication or per method or species for each title if faceting by those. If facetting, then a column whose name is the value in 'facet_by' must be present. |
facet_by |
Name of a column for facetting. |
fill_by |
Name of a column of a categorical variable with which to color the histogram. |
binwidth |
Width of bins for the histogram in days. |
preprints |
Logical, whether preprints should be included. Defaults to 'TRUE' to include preprints. |
n_top |
Number of categories with the most publications to plot in facets; the other categories are lumped into "other". |
n_top_fill |
Number of categories with the most publications to be differentiated by color. |
sort_by |
How to sort the facets. first_appeared means the category that appeared earlier will be nearer to the top. count means the category with more count (number of publications) will be nearer to the top. Ignored if not facetting. |
log_color |
If filling histograms by integer values, whether to log transform the values before mapping to colors to improve dynamic range. |
A ggplot2 object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.