tempo_plot | R Documentation |
A statistical graphic designed for the archaeological study of rhythms of the long term that embodies a theory of archaeological evidence for the occurrence of events
tempo_plot( data, position = 1:ncol(data), name = list("All"), level = 0.95, count = TRUE, Gauss = FALSE, title = NULL, subtitle = NULL, caption = NULL, legend_title = NULL, legend_position = "bottom", legend_labels = c("Bayes estimate", "Credible interval high", "Credible interval low"), x_label = "Calendar year", y_label = "Cumulative events", line_types = c("solid", "dotted", "dotted"), line_sizes = c(1.2, 0.8, 0.8), line_colors = c("black", "grey50", "grey50"), width = 7, height = 7, unit = "in", x_min = NULL, x_max = NULL, color_palette = NULL, file = NULL, x_scale = "calendar", elapsed_origin_position = NULL, columns = 1, new_window = TRUE, plot_result = TRUE )
data |
Data frame or |
position |
A list, each member of which is either a numeric vector containing the positions of the columns corresponding to the MCMC chains of interest, or a vector of column names. For convenience, a vector can be substituted for the singleton list. |
name |
A list, each member of which is a string that names the kind of
event in the corresponding element of |
level |
Probability corresponding to the level of confidence. |
count |
If |
Gauss |
If |
title |
Title of the plot. |
subtitle |
Subtitle of the plot. |
caption |
Caption of the plot. |
legend_title |
Title of the plot legend. |
legend_position |
One of "top", "bottom" (default), "left", "right". |
legend_labels |
Vector of three strings to label legend entries. The strings must be unique. The first string labels the central tendency and the second and third strings label the high and low spreads. |
x_label |
Label of the x-axis. |
y_label |
Label of the y-axis. |
line_types |
Type of the lines drawn on the plot in the order
of |
line_sizes |
Width of the lines drawn on the plot in the
order of |
line_colors |
Color names for the lines drawn on the plot
in the order of |
width |
Width of the plot in |
height |
Height of the plot in |
unit |
String recognized by the |
x_min |
Minimum value for x-axis. |
x_max |
Maximum value for x-axis. |
color_palette |
A palette that supplies the colors used in the plot. |
file |
Name of the file that will be saved if specified.
If |
x_scale |
One of "calendar" for calendar years, "BP" for years before present, or "elapsed" for time elapsed from a specified origin. |
elapsed_origin_position |
If |
columns |
Number of columns for facet. |
new_window |
Whether or not the plot is drawn within a new window. |
plot_result |
If |
The tempo plot is one way to measure change over time: it estimates the cumulative occurrence of archaeological events in a Bayesian calibration. The tempo plot yields a graphic where the slope of the plot directly reflects the pace of change: a period of rapid change yields a steep slope and a period of slow change yields a gentle slope. When there is no change, the plot is horizontal. When change is instantaneous, the plot is vertical.
An archaeophases_plot
object with the data and metadata
needed to reproduce the plot.
Anne Philippe, Anne.Philippe@univ-nantes.fr,
Thomas S. Dye, tsd@tsdye.online, and
Marie-Anne Vibet, Marie-Anne.Vibet@univ-nantes.fr
Dye, T.S. (2016) Long-term rhythms in the development of Hawaiian social stratification. Journal of Archaeological Science, 71, 1–9
TempoPlot
new_archaeophases_plot
data(Events); tempo_plot(Events[1:1000, ], c(2:5)) tempo_plot(Events[1:1000, ], c(2:5), count = TRUE) ## Not run: # Read from connection ox <- read_oxcal("http://tsdye.online/AP/ox.csv") # Plot all the columns tp <- tempo_plot(ox) # Reproduce the tempo plot plot(tp) # View metadata str(tp) # Check that the MCMC data file hasn't changed original_file(tp) # Use a custom palette library(khroma) light <- colours("light") tp <- tempo_plot(ox, color_palette = light(2), line_colors = c("light blue", "pale grey", "pale grey")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.