DateHistogram

DateHistogram[{date1,date2,}]

plots a histogram of the dates datei.

DateHistogram[{date1,date2,},bspec]

plots a histogram with bin width specification bspec.

DateHistogram[{date1,date2,},bspec,hspec]

plots a histogram with bin heights computed according to the specification hspec.

DateHistogram[{data1,data2,}]

plots histograms for multiple datasets datai.

Details and Options

Examples

open allclose all

Basic Examples  (5)

Generate a histogram for a list of dates:

Specify bin size in days:

Place the dates in a time series in monthly bins:

Show multiple datasets:

Generate a probability histogram for a list of dates:

Plot values over the period of a year to see seasonal behavior:

Scope  (21)

Data and Layouts  (8)

Specify the bin width in a time unit:

Specify number of bins to use:

A quantity of time unit:

Start, end, and duration:

Automatic ending date:

Automatic starting date:

Specific date ranges:

Use different time units as bin width:

Greater time scale data:

Smaller time scale data:

Delimit bins on the first date of every month with a binning function:

Use different height specifications:

Keys in Association are ignored:

Use the keys as labels:

Use the keys as legends:

Dates and times in TimeSeries, EventSeries, and TemporalData are plotted:

Use different layouts to display multiple datasets:

Use rows and columns of individual plots to show multiple sets:

Wrappers  (2)

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

Wrappers can be nested:

Override the default tooltip:

Use PopupWindow to provide additional drilldown information:

Button can be used to trigger any action:

Styling and Appearance  (4)

Use an explicit list of styles for the bars:

Use any gradient or indexed color schemes from ColorData:

ChartBaseStyle can be used to set an initial style for all chart elements:

Style can be used to override styles:

Use any graphic for pictorial bars:

Use built-in programmatically generated bars:

For detailed settings, use Palettes ChartElementSchemes:

Use a monochrome theme:

Labeling and Legending  (7)

Use Labeled to add a label to a dataset:

Use symbolic positions for label placement:

Provide value labels for bars by using LabelingFunction:

Use Placed to control placement and formatting:

Add categorical legend entries for datasets:

Used Legended to add additional legend entries:

Use Placed to affect the positioning of legends:

Options  (62)

AspectRatio  (2)

By default, DateHistogram uses a fixed height to width ratio for the plot:

Use AspectRatio1 to make the height the same as the width:

BarOrigin  (1)

ChartBaseStyle  (4)

Use ChartBaseStyle to style bars:

ChartBaseStyle combines with ChartStyle:

ChartStyle may override settings for ChartBaseStyle:

ChartBaseStyle combines with Style:

Style may override settings for ChartBaseStyle:

ChartBaseStyle combines with ColorFunction:

ColorFunction may override settings for ChartBaseStyle:

ChartElementFunction  (4)

Get a list of built-in settings for ChartElementFunction:

For detailed settings, use Palettes ChartElementSchemes:

Use the appropriate ChartElementFunction to show the global scale:

Write a custom ChartElementFunction:

Built-in element functions may have options; use Palettes ChartElementSchemes to set them:

ChartElements  (9)

Create a pictorial chart based on any Graphics object:

Graphics3D:

Image:

Use a stretched version of the graphic:

Use scaled sizes for width and height:

Using All for width or height causes that direction to stretch to the full size of the bar:

Use a different graphic for each row of data:

Graphics are used cyclically:

Styles are inherited from styles set through ChartStyle etc.:

Style can override the settings from ChartStyle:

Explicit styles set in the graphic will override other style settings:

Create true 3D shaded bars:

ChartLabels  (6)

Place dataset labels above each histogram:

Labeled wrappers around datasets will place additional labels:

Use Placed to control label placement:

Symbolic positions outside the bar:

Coordinate-based placement relative to a histogram:

Place all labels at the lower-left corner and vary the coordinates within the label:

Use the third argument to Placed to control formatting:

Use a named formatting function:

Use a hyperlink label:

Place multiple labels:

ChartLayout  (4)

Use different layouts to display multiple datasets:

Place each group of bars in a separate panel using shared axes:

Use a row instead of a column:

Use multiple columns or rows:

Prefer full columns or rows:

ChartLegends  (2)

Generate a legend based on chart style:

Use Legended to add additional legend entries:

Use Legended to specify individual legend entries:

Use Placed to control the placement of legends:

ChartStyle  (5)

Use ChartStyle to style bars:

Give a list of styles:

Use "Gradient" colors from ColorData:

Use "Indexed" colors from ColorData:

Styles are used cyclically:

Style overrides settings for ChartStyle:

ColorFunction overrides settings for ChartStyle:

ChartElements may override settings for ChartStyle:

ColorFunction  (4)

Color by bar height:

Use ColorFunctionScalingFalse to get unscaled height values:

ColorFunction overrides styles in ChartStyle:

Use ColorFunction to combine different style effects:

ColorFunctionScaling  (2)

By default, scaled height values are used:

Use ColorFunctionScaling False to get unscaled height values:

DateFunction  (2)

Remove potential ambiguity from dates:

Create dates from numbers:

DateReduction  (1)

By default, all events are placed in bins without any periodicity:

Use monthly bins with a yearly period:

Use daily bins with a monthly period:

DateTicksFormat  (2)

Specify how to format the date ticks:

Specify day names on a categorical axis:

LabelingFunction  (7)

Use automatic labeling by values through Tooltip and StatusArea:

Do no labeling:

Use symbolic positions to control label placement:

Coordinate-based placement relative to a bar:

Control the formatting of labels:

Use the dataset position index to generate the label:

Use the given chart labels as arguments to the labeling function:

PerformanceGoal  (1)

Generate a bar chart with interactive highlighting:

Emphasize performance by disabling interactive behaviors:

Typically, less memory is required for non-interactive charts:

PlotRangePadding  (3)

Specify a single plot range padding for all directions:

Specify a separate plot range padding for horizontal and vertical directions:

Specify a separate plot range padding for each direction:

PlotTheme  (2)

Use a theme with simple ticks and grid lines in a high-contrast color scheme:

Change the color scheme:

TimeZone  (1)

Plots are shown using the setting of $TimeZone:

Specify the time zone to use:

Applications  (4)

Histogram of the independence date of European countries:

The magnitude of earthquakes with magnitude at least 6:

Show the distributions of earthquakes' magnitudes:

Show the distributions of the dates of earthquakes:

Analyze the distribution of movie release dates:

Show the distribution in years:

Show how the release dates distribute in each month:

Show in each day of the week:

Analyze the distribution of emails:

Show the histogram in days:

Show the histogram in each day of the week:

Show the distribution of emails in each hour of the day:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_datehistogram, author="Wolfram Research", title="{DateHistogram}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/DateHistogram.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_datehistogram, organization={Wolfram Research}, title={DateHistogram}, year={2021}, url={https://reference.wolfram.com/language/ref/DateHistogram.html}, note=[Accessed: 22-November-2024 ]}