1%feature("docstring") OT::Pie 2"Pie. 3 4Available constructors: 5 Pie(*data*) 6 7 Pie(*data, labels*) 8 9 Pie(*data, labels, center, radius, palette*) 10 11Parameters 12---------- 13data : sequence of float 14 Sequence giving the percentiles of the pie. 15labels : sequence of str 16 Names of each group. If not specified, by default equal to the description 17 of the probabilistic input vector. 18center : sequence of float 19 Center of the pie inside the bounding box. If not specified, by default it 20 is (0,0). 21radius : positive float 22 Radius of the pie. If not specified, by default it is 1. 23palette : sequence of str 24 Names of the colors. If not specified, colors are successively taken from 25 the list given by :meth:`buildDefaultPalette`, in the same order. 26 27Examples 28-------- 29>>> import openturns as ot 30>>> # Create the Pie 31>>> myPie = ot.Pie([0.4, 0.3, 0.2, 0.1], ['a0', 'a1', 'a2', 'a3']) 32>>> # Create an empty graph 33>>> myGraph = ot.Graph('A Pie', ' ', ' ', True, '') 34>>> myGraph.add(myPie)" 35 36// --------------------------------------------------------------------- 37 38%feature("docstring") OT::Pie::buildDefaultLabels 39"Build default labels by taking the percentiles." 40 41// --------------------------------------------------------------------- 42 43%feature("docstring") OT::Pie::buildDefaultPalette 44"Build default palette. 45 46Call :meth:`BuildDefaultPalette` with :math:`n` the size of *data* as argument." 47 48// --------------------------------------------------------------------- 49 50%feature("docstring") OT::Pie::IsValidColorPalette 51"Test the validity of a color palette. 52 53Parameters 54---------- 55palette : sequence of str 56 Names of the colors. 57 58Returns 59------- 60validity : bool 61 *True* if *palette* is valid or *False* otherwise. 62 63Examples 64-------- 65>>> import openturns as ot 66>>> pie = ot.Pie([0.5,0.2,0.3]) 67>>> print(pie.IsValidColorPalette(['#ff0000','#ccff00','#00ff66'])) 68True 69>>> print(pie.IsValidColorPalette(['green','red','darkorange'])) 70True 71>>> print(pie.IsValidColorPalette(['green','red','darkpink'])) 72False" 73