ladybug.monthlychart module

Module for visualization of data collections in monthly intervals.

class ladybug.monthlychart.MonthlyChart(data_collections, legend_parameters=None, base_point=Point2D(0.00, 0.00), x_dim=10, y_dim=40, stack=False, percentile=34)[source]

Bases: object

Object for visualization of data collections in monthly intervals.

Parameters:
  • data_collections – An array of data collections, which will be plotted on the monthly chart.

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

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

  • x_dim – An optional number to set the X dimension of each month of the chart. (Default: 10).

  • y_dim – An optional number to set the Y dimension of the chart (Default: 40).

  • stack – Boolean to note whether multiple connected data collections with the same cumulative data type should be stacked on top of each other. Otherwise, all bars for cumulative monthly/daily data will be placed next to each other and all meshes for cumulative hourly data will be overlapped on top of one another. Note that this input has no effect on data collections that do not have a cumulative data type or do not have a time aggregated data type that is cumulative. (Default: False).

  • percentile – An optional number between 0 and 50 to be used for the percentile difference from the mean that hourly data meshes display at. For example, using 34 will generate hourly data meshes with a range of one standard deviation from the mean. Note that this input only has significance when the input data collections are hourly. (Default: 34)

Properties:
  • data_collections

  • legend_parameters

  • base_point

  • x_dim

  • y_dim

  • stack

  • percentile

  • data_meshes

  • data_polylines

  • data_polylines_with_colors

  • legend

  • chart_border

  • y_axis_lines

  • y_axis_label_points1

  • y_axis_label_points2

  • y_axis_labels1

  • y_axis_labels2

  • month_lines

  • month_label_points

  • month_labels

  • time_ticks

  • time_label_points

  • time_labels

  • y_axis_title_text1

  • y_axis_title_location1

  • y_axis_title_text2

  • y_axis_title_location2

  • title_text

  • lower_title_location

  • upper_title_location

  • time_interval

  • analysis_period

  • colors

  • data_types

set_maximum_by_index(maximum_value, data_type_index=0)[source]

Set the maximum value of the Y-axis given the index of a data_type.

Parameters:
  • maximum_value – The value to be set as the maximum of the Y-axis.

  • data_type_index – An integer for the index of the data type to set the maximum_value for. This corresponds to one of the data types in the data_types property of this class. Using 0 indicates the left-side axis maximum and using 1 indicated the right-side axis maximum. (Default: 0).

set_minimum_by_index(minimum_value, data_type_index=0)[source]

Set the minimum value of the Y-axis given the index of a data_type.

Parameters:
  • minimum_value – The value to be set as the minimum of the Y-axis.

  • data_type_index – An integer for the index of the data type to set the minimum_value for. This corresponds to one of the data types in the data_types property of this class. Using 0 indicates the left-side axis minimum and using 1 indicated the right-side axis minimum. (Default: 0).

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

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

property base_point

Get a Point2D for the base point of this monthly chart.

property chart_border

Get a Polyline2D for the border of the plot.

property colors

An array of colors in the legend with one color per input data collection.

property data_collections

Get the data collections assigned to this monthly chart.

property data_meshes

Get a list of colored Mesh2D for the data of this graphic.

These meshes will resemble a bar chart in the case of monthly or daily data and will resemble a band between two ranges for hourly and sub-hourly data.

property data_polylines

Get a list of Polyline2D for the data of this graphic.

These polylines will display the percentile borders of the data (and the mean in the case of hourly data). In the case of monthly-per-hour data, it will display a single line.

property data_polylines_with_colors

Get a tuple with a list of Polyline2D first and list of colors second.

The first item of the tuple is equivalent to the data_polylines property and the second item relates each polyline to a color.

property data_types

A array of all the unique data types among the input collections.

property legend

The legend assigned to this graphic.

property legend_parameters

Get the legend parameters customizing this monthly chart.

property lower_title_location

A Plane for the lower location of title text.

property month_label_points

Get a list of Point2Ds 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_lines

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

property percentile

Get a number for the percentile difference from the mean for hourly data.

property stack

Boolean for whether cumulative data should be stacked on top of each other.

property time_interval

Text for the time interval of the input data collections.

This determines how the data displays on the chart.

property time_label_points

Get a list of Point2Ds for the time-of-day text labels for the chart.

property time_labels

Get a list of text strings for the time-of-day labels for the chart.

property time_ticks

Get a list of LineSegment2D for the time-of-day labels of the chart.

property title_text

Text string for the suggested title of the monthly chart.

property upper_title_location

A Plane for the upper location of title text.

property x_dim

Get a number for the X dimension of each month of the chart.

property y_axis_label_points1

Get a list of Point2Ds for the left-side labels of the Y-axis.

property y_axis_label_points2

Get a list of Point2Ds for the right-side labels of the Y-axis.

This will be None if all of the input data collections are of the same data type.

property y_axis_labels1

Get a list of text strings for the left-side labels of the Y-axis.

property y_axis_labels2

Get a list of text strings for the right-side labels of the Y-axis.

This will be None if all of the input data collections are of the same data type.

property y_axis_lines

Get a list of LineSegment2D for the Y-axis values of the chart.

property y_axis_title_location1

A Plane for the location of left Y-axis title text.

property y_axis_title_location2

A Plane for the location of right Y-axis title text.

This will be None if all of the input data collections are of the same data type.

property y_axis_title_text1

Text string for the suggested title of the left-side Y-axis.

property y_axis_title_text2

Text string for the suggested title of the right-side Y-axis.

This will be None if all of the input data collections are of the same data type.

property y_dim

Get a number for the Y dimension of the chart.