Pie Shapes

A pie shape can represent data as angle, height or radius of the corresponding slice. It is possible to define an inner radius (-> donut) and to explode the slices.

Class Hierarchy

Inheritance diagram of tangible.shapes.pie.AnglePie1D, tangible.shapes.pie.RadiusPie1D, tangible.shapes.pie.HeightPie1D, tangible.shapes.pie.AngleRadiusPie2D, tangible.shapes.pie.AngleHeightPie2D, tangible.shapes.pie.RadiusHeightPie2D, tangible.shapes.pie.AngleRadiusHeightPie3D

Base Class

class tangible.shapes.pie.PieShape(data, height=2, outer_radius=10, inner_radius=0, explode=0)[source]

Base class for pie shapes.

Parameters:
  • data (sequence type) – The data.
  • height (int or float) – The height of the model (default 2).
  • outer_radius (int or float) – The outer radius of the model (default 10).
  • inner_radius (int or float) – The inner radius of the model (default 0).
  • explode (int or float) – By how much to explode the sectors (default 0).

Shape Classes

class tangible.shapes.pie.AnglePie1D(data, height=2, outer_radius=10, inner_radius=0, explode=0)[source]

A classical pie chart. The datapoints are mapped to the angles of the slices.

Note that you won’t be able to differentiate the slices without setting a positive explode value.

Parameters:
  • data (sequence type) – The data.
  • height (int or float) – The height of the model (default 2).
  • outer_radius (int or float) – The outer radius of the model (default 10).
  • inner_radius (int or float) – The inner radius of the model (default 0).
  • explode (int or float) – By how much to explode the sectors (default 0).
../_images/angle_pie_1d.png
class tangible.shapes.pie.RadiusPie1D(data, height=2, inner_radius=0, explode=0)[source]

A flat pie chart where the datapoints are mapped to the radius of the slices.

Parameters:
  • data (sequence type) – The data.
  • height (int or float) – The height of the model (default 2).
  • inner_radius (int or float) – The inner radius of the model (default 0).
  • explode (int or float) – By how much to explode the sectors (default 0).
../_images/radius_pie_1d.png
class tangible.shapes.pie.HeightPie1D(data, outer_radius=10, inner_radius=0, explode=0)[source]

A pie chart where the datapoints are mapped to the height of the slices.

Parameters:
  • data (sequence type) – The data.
  • outer_radius (int or float) – The outer radius of the model (default 10).
  • inner_radius (int or float) – The inner radius of the model (default 0).
  • explode (int or float) – By how much to explode the sectors (default 0).
../_images/height_pie_1d.png
class tangible.shapes.pie.AngleRadiusPie2D(data, height, angle_index=0, radius_index=1, inner_radius=0, explode=0)[source]

A flat pie chart where the two datasets correspond to the angle and the radius of the slices.

Parameters:
  • data (sequence type) – The data.
  • height (int or float) – The height of the model (default 2).
  • angle_index (int) – The index of the angle dataset (default 0).
  • radius_index (int) – The index of the radius dataset (default 1).
  • inner_radius (int or float) – The inner radius of the model (default 0).
  • explode (int or float) – By how much to explode the sectors (default 0).
../_images/angle_radius_pie_2d.png
class tangible.shapes.pie.AngleHeightPie2D(data, angle_index=0, height_index=1, outer_radius=10, inner_radius=0, explode=0)[source]

A pie chart where the two datasets correspond to the angle and the height of the slices.

Parameters:
  • data (sequence type) – The data.
  • angle_index (int) – The index of the angle dataset (default 0).
  • height_index (int) – The index of the height dataset (default 1).
  • outer_radius (int or float) – The outer radius of the model (default 10).
  • inner_radius (int or float) – The inner radius of the model (default 0).
  • explode (int or float) – By how much to explode the sectors (default 0).
../_images/angle_height_pie_2d.png
class tangible.shapes.pie.RadiusHeightPie2D(data, radius_index=0, height_index=1, inner_radius=0, explode=0)[source]

A pie chart where the two datasets correspond to the radius and the height of the slices.

Parameters:
  • data (sequence type) – The data.
  • radius_index (int) – The index of the radius dataset (default 0).
  • height_index (int) – The index of the height dataset (default 1).
  • inner_radius (int or float) – The inner radius of the model (default 0).
  • explode (int or float) – By how much to explode the sectors (default 0).
../_images/radius_height_pie_2d.png
class tangible.shapes.pie.AngleRadiusHeightPie3D(data, angle_index=0, radius_index=1, height_index=2, inner_radius=0, explode=0)[source]

A pie chart where the three datasets correspond to the angle, the radius and the height of the slices.

Parameters:
  • data (sequence type) – The data.
  • angle_index (int) – The index of the angle dataset (default 0).
  • radius_index (int) – The index of the radius dataset (default 1).
  • height_index (int) – The index of the height dataset (default 2).
  • inner_radius (int or float) – The inner radius of the model (default 0).
  • explode (int or float) – By how much to explode the sectors (default 0).
../_images/angle_radius_height_pie_3d.png