ladybug.hourlyplot module

Module for visualization of hourly data collections.

class ladybug.hourlyplot.HourlyPlot(data_collection, legend_parameters=None, base_point=Point3D(0.00, 0.00, 0.00), x_dim=1, y_dim=4, z_dim=0, reverse_y=False)[source]

Bases: object

Object for visualization of hourly data collections.

Parameters:
  • data_collection – A HourlyContinuousCollection or HourlyDiscontinuousCollection which will be used to generate the hourly plot.

  • legend_parameters – An optional LegendParameter object to change the display of the HourlyPlot (Default: None).

  • base_point – An optional Point3D to be used as a starting point to generate the geometry of the plot (Default: (0, 0, 0)).

  • x_dim – An optional number to set the X dimension of the mesh cells (Default: 1).

  • y_dim – An optional number to set the Y dimension of the mesh cells (Default: 4).

  • z_dim – An optional number to set the Z dimension of the entire chart. This will be used to make the colored_mesh3d of the chart vary in the Z dimension according to the data. The value input here should usually be several times larger than the x_dim or y_dim in order to be noticeable (e.g. 100). If 0, the colored_mesh3d will simply be flat. (Default: 0).

  • reverse_y – Boolean to note whether the Y-axis of the chart is reversed such that time flows from the top of the chart to the bottom instead of the bottom to the top. (Default: False).

Properties:
  • data_collection

  • legend_parameters

  • base_point

  • x_dim

  • y_dim

  • z_dim

  • reverse_y

  • colored_mesh2d

  • colored_mesh3d

  • legend

  • chart_border2d

  • chart_border3d

  • hour_lines2d

  • hour_lines3d

  • hour_label_points2d

  • hour_label_points3d

  • hour_labels

  • month_lines2d

  • month_lines3d

  • month_label_points2d

  • month_label_points3d

  • month_labels

  • title_text

  • lower_title_location

  • upper_title_location

  • analysis_period

  • values

  • colors

custom_hour_label_points2d(hour_labels)[source]

Get a list of Point2Ds for the 6-hour text labels for the chart.

Parameters:

hour_labels – An array of numbers from 0 to 24 representing the hours to display. (eg. [0, 3, 6, 9, 12, 15, 18, 21, 24])

custom_hour_label_points3d(hour_labels)[source]

Get a list of Point3Ds for the 6-hour text labels for the chart.

Parameters:

hour_labels – An array of numbers from 0 to 24 representing the hours to display. (eg. [0, 3, 6, 9, 12, 15, 18, 21, 24])

custom_hour_labels(hour_labels, clock_24=False)[source]

Get a list of text strings for the 6-hour labels for the chart.

Parameters:
  • hour_labels – An array of numbers from 0 to 24 representing the hours to display. (eg. [0, 3, 6, 9, 12, 15, 18, 21, 24])

  • clock_24 – Boolean for whether a 24-hour clock should be used instead of the 12-hour clock.

custom_hour_lines2d(hour_labels)[source]

Get a list of LineSegment2D for a list of numbers representing hour labels.

Parameters:

hour_labels – An array of numbers from 0 to 24 representing the hours to display. (eg. [0, 3, 6, 9, 12, 15, 18, 21, 24])

custom_hour_lines3d(hour_labels)[source]

Get a list of LineSegment3D for the 6-hour intervals of the chart.

Parameters:

hour_labels – An array of numbers from 0 to 24 representing the hours to display. (eg. [0, 3, 6, 9, 12, 15, 18, 21, 24])

classmethod from_z_dim_per_unit(data_collection, legend_parameters=None, base_point=Point3D(0.00, 0.00, 0.00), x_dim=1, y_dim=4, z_dim_per_unit=0)[source]

Create HourlyPlot with an option to set the Z dimension on a per-unit basis.

This is useful in cases of wanting to compare the Z dimensions of two plots to each other.

Parameters:
  • data_collection – A Hourly Collection, which will be used to generate the hourly plot.

  • legend_parameters – An optional LegendParameter object to change the display of the HourlyPlot (Default: None).

  • base_point – An optional Point3D to be used as a starting point to generate the geometry of the plot (Default: (0, 0, 0)).

  • x_dim – Optional number to set the X dimension of the mesh cells (Default: 1).

  • y_dim – Optional number to set the Y dimension of the mesh cells (Default: 4).

  • z_dim – Optional number to set the Z dimension per unit of value in the input data_collection. If 0, the colored_mesh3d will be flat. (Default: 0).

HOUR_LABELS = (0, 6, 12, 18, 24)
property analysis_period

The AnalysisPeriod assigned to the hourly plot’s data collection.

property base_point

Point3D for the base point of this hourly plot.

property chart_border2d

Get a Polyline2D for the border of the plot.

property chart_border3d

Get a Polyline3D for the border of the plot.

property colored_mesh2d

Get a colored Mesh2D for this graphic.

property colored_mesh3d

Get a colored Mesh3D for this graphic.

Note that this will be the same as the colored_mesh2d if the z_dim value is 0.

property colors

A list of colors assigned to the mesh faces of this hourly plot.

These will align correctly with the mesh faces, even when reverse_y is True.

property data_collection

The data collection assigned to this hourly plot.

property hour_label_points2d

Get a list of Point2Ds for the 6-hour text labels for the chart.

property hour_label_points3d

Get a list of Point3Ds for the 6-hour text labels for the chart.

property hour_labels

Get a list of text strings for the hour labels for the chart.

These will be in 12-hour clock format.

property hour_labels_24

Get a list of text strings for the hour labels for the chart.

These will be in 24-hour clock format.

property hour_lines2d

Get a list of LineSegment2D for the 6-hour intervals of the chart.

property hour_lines3d

Get a list of LineSegment3D for the 6-hour intervals of the chart.

property legend

The legend assigned to this graphic.

property legend_parameters

The legend parameters customizing this hourly plot.

property lower_title_location

A Plane for the lower location of title text.

property month_label_points2d

Get a list of Point2Ds for the month text labels for the chart.

property month_label_points3d

Get a list of Point3Ds for the month text labels for the chart.

property month_labels

Get a list of text strings for the month labels for the chart.

property month_lines2d

Get a list of LineSegment2D for the month intervals of the chart.

property month_lines3d

Get a list of LineSegment3D for the month intervals of the chart.

property reverse_y

Boolean to note whether the Y-axis of the chart is reversed.

If True, time over the day flows from the top of the chart to the bottom instead of the bottom to the top.

property title_text

Text string for the title of the hourly plot.

property upper_title_location

A Plane for the upper location of title text.

property values

A list of values assigned to this hourly plot.

These will align correctly with the mesh faces, even when reverse_y is True.

property x_dim

A number for the X dimension of each cell of the hourly plot.

property y_dim

A number for the Y dimension of each cell of the hourly plot.

property z_dim

A number for the Z dimension of the entire hourly plot.