calculate_legend_box Function

public function calculate_legend_box(labels, data_width, data_height, num_entries, position) result(box)

Calculate optimal legend box dimensions and position DRY: Centralized legend box calculation logic

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: labels(:)
real(kind=wp), intent(in) :: data_width
real(kind=wp), intent(in) :: data_height
integer, intent(in) :: num_entries
integer, intent(in) :: position

Return Value type(legend_box_t)