ladybug.graphic module

class ladybug.graphic.GraphicContainer(values, min_point, max_point, legend_parameters=None, data_type=None, unit=None)[source]

Bases: object

Graphic container used to get legends, title locations, and colors for a graphic.

Parameters:
  • values – A List or Tuple of numerical values that will be used to generate the legend and colors.

  • min_point – A Point3D object for the minimum of the bounding box around the graphic geometry.

  • max_point – A Point3D object for the maximum of the bounding box around the graphic geometry.

  • legend_parameters – An Optional LegendParameter object to override default parameters of the legend. None indicates that default legend parameters will be used. (Default: None).

  • data_type – Optional DataType from the ladybug datatype subpackage (ie. Temperature()) , which will be used to assign default legend properties. If None, the legend associated with this object will contain no units unless a unit below is specified. (Default: None).

  • unit – Optional text string for the units of the values. (ie. ‘C’). If None, the default units of the data_type will be used. (Default: None).

Properties:
  • values

  • min_point

  • max_point

  • legend_parameters

  • data_type

  • unit

  • legend

  • value_colors

  • lower_title_location

  • upper_title_location

ToString()[source]

Overwrite .NET ToString.

classmethod from_dict(data)[source]

Create a graphic container from a dictionary.

Parameters:

data – A python dictionary in the following format

{
"values": [0, 10],
"min_point": {"x": 0, "y": 0, "z": 0},
"max_point": {"x": 10, "y": 10, "z": 0},
"legend_parameters": {},  # optional LegendParameter specification
"data_type": {},  # optional DataType object
"unit": "C"  # optional text for the units
}
to_dict()[source]

Get graphic container as a dictionary.

property data_type

The data_type input to this object (if it exists).

property legend

The legend assigned to this graphic.

property legend_parameters

The legend parameters assigned to this graphic.

property lower_title_location

A Plane for the lower location of title text.

property max_point

Point3D for the maximum of the bounding box around referenced geometry.

property min_point

Point3D for the minimum of the bounding box around referenced geometry.

property unit

The unit input to this object (if it exists).

property upper_title_location

A Plane for the upper location of title text.

property value_colors

A List of colors associated with the assigned values.

property values

The assigned data set of values.