TimelinePlot

TimelinePlot[{date1,date2,}]

makes a timeline plot with dates date1, date2, .

TimelinePlot[{event1,event2,}]

makes a timeline plot with events event1, event2, .

TimelinePlot[{data1,data2,}]

makes a timeline plot from multiple event datasets datai.

Details and Options

  • TimelinePlot shows when events occur relative to each other.
  • Possible forms of datei include:
  • DateObject[],TimeObject[]date or time object
    "string"DateString specification
    {y,m,d,h,m,s}DateList specification
    {y}, {y,m}, {y,m,d}, shortened date list
    tabsolute time given as a single number
  • In shortened date lists, omitted elements are taken to have default values {y,1,1,0,0,0}.
  • The eventi can have the forms:
  • date1a single date or time
    DateInterval[{date1,date2}]a start date date1 and end date date2
    Entity[]an entity with dates according to the property "Date"
    Entity[]propan entity with dates according to the property prop
  • Datasets datai can be given in the following forms:
  • {event1,event2,}dates, times, intervals, entities, etc.
    TimeSeries[]interval with start and end dates
    EventSeries[]treat each time as an event
    {Entity[],}propentities with dates according to the property prop
    EntityClass[]entities with dates according to the property "Date"
    EntityClass[]propentities with dates according to the property prop
    <|k1event1,k2event2,|>association of keys and events
    wi[formi,]a date or event with value formi and wrapper wi
  • Possible symbolic wrappers are the same as for BarChart, and include Style, Labeled, Legended, etc.
  • TimelinePlot has the same options as Graphics with the following additions and changes:
  • AspectRatio Automaticoverall ratio of width to height
    AxesTruewhether to draw a time axis
    AxesOrigin Automaticwhere to draw a time axis
    DateFunction Automatichow to convert dates to standard form
    DateTicksFormatAutomaticformat for date tick labels
    Filling Automaticfilling to insert under each event
    FillingStyle Automaticstyle for filling
    LabelingFunction Automatichow to label elements
    LegendAppearanceAutomaticoverall appearance of legends
    PerformanceGoal $PerformanceGoalaspects of performance to try to optimize
    PlotLayout Automaticoverall layout to use
    PlotLegends Nonelegends for datasets
    PlotMarkers Nonemarkers to use to indicate each event
    PlotStyle Automaticstyle for events
    PlotTheme $PlotThemeoverall theme for the plot
    Spacings Automaticspacing between datasets and axis
    TimeZone $TimeZonetime zone to use for the plot
  • Possible settings for AxesOrigin include: Left, Right, Bottom, Top, and Center.
  • Possible settings for Filling include:
  • Axisfill to the axis
    Noneno filling
    Bottomfill to the bottom of the plot
    Topfill to the top of the plot
    Abovefill to the row above
    Belowfill to the row below
  • TimelinePlot will place events in different rows. The overall placement in different rows can be affected using PlotLayout and the spacing between rows can controlled using Spacings.
  • Possible settings for PlotLayout include:
  • "Grouped"each dataset uses a minimum number of rows
    "Overlapped"each dataset uses a single row
    "Packed"use minimum number of rows for all events
    "Stacked"each event has a separate row
    "Vertical","VerticalGrouped",vertical forms of layouts
    "Reverse","ReverseVertical",reversed forms of layouts
  • Possible settings for Spacings include:
  • Automaticspace rows evenly apart
    Noneno space between rows, but space to axis
    {s1,s2,}use space s1 from axis to first row, then space s2, etc.
  • Style and other specifications from options and other constructs in TimelinePlot are effectively applied in the order PlotStyle, then Style and other wrappers, with later specifications overriding earlier ones.

Examples

open allclose all

Basic Examples  (4)

Plot several dates on a timeline:

Plot date intervals:

Plot historical events:

Plot multiple sets of dates and intervals:

Scope  (33)

Data  (14)

Plot a timeline using DateObject:

Using TimeObject:

Using DateString specifications:

Plot the "Date" property from a list of entities:

Use a specific property for a list of entities:

Use a specific property for a class of entities:

Using DateList specifications:

Use DateFunction to prepend a year to {month,day} lists:

Using AbsoluteTime specifications:

Plot time intervals:

TimeSeries shows the overall range of dates:

EventSeries shows the discrete event dates:

Keys in an Association are used as labels:

Plot dates from a variety of sources:

Wrappers  (4)

Use wrappers on individual data, datasets, or collections of datasets:

Wrappers can be nested:

Use PopupWindow to provide additional drilldown information:

Use Legended to add an additional legend:

Layouts  (4)

Pack the events in each dataset:

Use a single row for all events in each dataset:

Pack all of the events:

Use a single row for each event:

Plot events vertically:

Plot time increasing from the right:

Plot time increasing from the bottom:

Place all events in the same row:

Place all events along the axis:

Draw the first row of events along the axis:

Increase the spacing between successive rows of events:

Presentation  (5)

Use a theme with a bold color scheme:

Use unique markers for each dataset:

Use PlotStyle to change styles of events:

Use Filling to fill the events:

Change the FillingStyle:

Labeling and Legending  (6)

Use Labeled to add bubble labels:

Specify locations for the labels:

Entity and EntityClass automatically create bubble labels when possible:

Create automatic placeholder legends for each dataset:

Use Legended to highlight a specific event:

PlotLegends->"Expressions" automatically picks up labels:

Options  (41)

AspectRatio  (1)

Choose the ratio of height to width from the actual plot values:

Set the ratio to 1/2:

AxesOrigin  (2)

The axis is below the events by default:

Put the axis in the middle:

Put the time axis on top:

Change the axis position along with PlotLayout:

DateFunction  (2)

Remove potential ambiguity from dates:

Create dates from numbers:

Filling  (1)

Filling is turned off by default:

Fill to the row below:

Fill to the axis:

FillingStyle  (4)

FillingStyle follows PlotStyle by default:

Fill with the opaque plot style:

Specify the filling color:

Fill with transparent green:

GridLines  (2)

Use automatically placed time grid lines:

Use dates to specify grid lines:

LabelingFunction  (4)

Events automatically get a tooltip with the date or date range:

Entities are automatically labeled with a bubble:

Do not add tooltips or any other labels:

Write a custom label format to put in a Tooltip:

PerformanceGoal  (3)

Generate a plot with interactive highlighting:

Emphasize performance by disabling interactive behaviors:

Typically, less memory is required for noninteractive plots:

PlotLayout  (3)

Pack the events in each dataset:

Use a single row for all events in each dataset:

Pack all of the events:

Use a single row for each event:

Plot events vertically:

Plot time increasing from the right:

Plot time increasing from the bottom:

PlotLegends  (2)

Create a legend based on distinguishable colors:

Use Placed to position legends:

PlotMarkers  (3)

Use unique PlotMarkers to distinguish sets of events:

Change size of the markers:

Use filled markers:

PlotRange  (2)

PlotRange is automatically calculated:

Use date format to specify plot range:

PlotStyle  (4)

Use thick, black lines for the plot:

By default, different styles are chosen for multiple datasets:

Explicitly specify the style for different datasets:

Use built-in named and indexed color schemes:

PlotTheme  (2)

Use a bold color scheme:

Add filling to the plot:

Spacings  (4)

Place all events in the same row:

Place all events along the axis:

Place the first set of events along the axis and evenly space the rest:

Use different spacings between events:

TimeZone  (2)

Plots are shown using the setting of $TimeZone:

Specify the time zone to use:

Applications  (3)

Show the holidays in a year for several countries:

Plot Mathematica release dates:

Create a timeline of the wives of Henry VIII:

Wolfram Research (2015), TimelinePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/TimelinePlot.html (updated 2020).

Text

Wolfram Research (2015), TimelinePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/TimelinePlot.html (updated 2020).

CMS

Wolfram Language. 2015. "TimelinePlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/TimelinePlot.html.

APA

Wolfram Language. (2015). TimelinePlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TimelinePlot.html

BibTeX

@misc{reference.wolfram_2022_timelineplot, author="Wolfram Research", title="{TimelinePlot}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/TimelinePlot.html}", note=[Accessed: 31-May-2023 ]}

BibLaTeX

@online{reference.wolfram_2022_timelineplot, organization={Wolfram Research}, title={TimelinePlot}, year={2020}, url={https://reference.wolfram.com/language/ref/TimelinePlot.html}, note=[Accessed: 31-May-2023 ]}