1%feature("docstring") OT::BarPlot
2"BarPlot.
3
4Available constructors:
5    BarPlot(*data, origin, legend=' '*)
6
7    BarPlot(*data, origin, color, fillStyle, lineStyle, legend=' '*)
8
9    BarPlot(*data, origin, color, fillStyle, lineStyle, lineWidth, legend=' '*)
10
11Parameters
12----------
13data : 2-d sequence of float
14    Data from which the BarPlot is built, must be of dimension 2: the
15    discontinuous points and their corresponding height.
16origin : float
17    Scalar defining where the BarPlot begins.
18legend : str
19    Legend of the BarPlot.
20color : str
21    Color of the curve. If not specified, by default it is 'blue'.
22fillStyle : str
23    Fill style of the surfaces. If not specified, by default it is 'solid'.
24lineStyle : str
25    Style of the curve. If not specified, by default it is 'solid'.
26lineWidth : float
27    Width of the curve. If not specified, by default it is 1.
28
29Examples
30--------
31>>> import openturns as ot
32>>> from math import floor
33>>> # Create data
34>>> myDistribution = ot.Normal(0.5, 2.0)
35>>> sample = myDistribution.getSample(10)
36>>> minSample = sample.getMin()[0]
37>>> maxSample = sample.getMax()[0] + 0.1
38>>> nBars = 4
39>>> data = ot.Sample(nBars, [(maxSample - minSample) / nBars, 0])
40>>> for i in range(10):
41...     index = int(floor((sample[i, 0] - minSample) / (maxSample - minSample) * nBars))
42...     data[index, 1] += 1
43>>> # Create an empty graph
44>>> myGraph = ot.Graph('A barplot', 'Realizations', 'Frequency', True, 'topright')
45>>> # Create the barplot
46>>> myBarPlot = ot.BarPlot(data, data.getMin()[0], 'red', 'shaded', 'dashed', 'Normal histogram')
47>>> myGraph.add(myBarPlot)"
48