bar3, bar3h

bar3, bar3h is not recommended. Use bar3 or bar3h instead.

Syntax

bar3(tsobj)
bar3(tsobj,width)
bar3(..., 'style')
hbar3 = bar3(...)
bar3h(...)
hbar3h = bar3h(...)

Arguments

tsobj

Financial time series object.

width

Width of the bars and separation of bars within a group. (Default = 0.8.) If width is 1, the bars within a group touch one another. Values > 1 produce overlapping bars.

style

'detached' (default), 'grouped', or 'stacked'.

Description

bar3, bar3h draw three-dimensional vertical and horizontal bar charts.

bar3(tsobj) draws the columns of data series of the object tsobj. The number of data series dictates the number of vertical bars per group. Each group is the data for one particular date.

bar3(tsobj,width) specifies the width of the bars.

bar3(..., 'style') changes the style of the bar chart.

hbar3 = bar3(...) returns a vector of bar handles.

Use the MATLAB® command shading faceted to put edges on the bars. Use shading flat to turn edges off.

Examples

collapse all

This example shows how to create a three-dimensional bar chart for Disney stock showing high, low, opening, and closing prices.

load disney
bar3(q_dis, 'stacked')
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
title('Three-Dimensional Bar Chart of Disney Prices')

Figure contains an axes. The axes with title Three-Dimensional Bar Chart of Disney Prices contains 4 objects of type surface. These objects represent OPEN, HIGH, LOW, CLOSE.

This example shows how to create a three-dimensional, stacked bar chart for Disney stock showing high, low, opening, and closing prices.

load disney
bar3(q_dis, 'stacked')
Warning: FINTS is not recommended. Use TIMETABLE instead. For more information, see <a href="matlab:web(fullfile(docroot, 'finance/convert-from-fints-to-timetables.html'))">Convert Financial Time Series Objects (fints) to Timetables</a>.
title('Three-Dimensional Bar Chart of Disney Prices (Stacked)')

Figure contains an axes. The axes with title Three-Dimensional Bar Chart of Disney Prices (Stacked) contains 4 objects of type surface. These objects represent OPEN, HIGH, LOW, CLOSE.

Introduced before R2006a