fortplot_figure_pie Module

Pie chart creation functionality for figure_t

Single Responsibility: Handle creation of pie chart plots Extracted from fortplot_figure_plots to keep modules under 500 lines.



Variables

Type Visibility Attributes Name Initial
real(kind=wp), public, parameter :: PI = acos(-1.0_wp)

Derived Types

type, public ::  pie_prepared_t

Components

Type Visibility Attributes Name Initial
integer, public :: slice_count = 0
real(kind=wp), public :: total = 0.0_wp
integer, public, allocatable :: indices(:)
real(kind=wp), public, allocatable :: explode(:)
logical, public :: valid = .false.

Subroutines

public subroutine figure_add_pie(plots, state, values, labels, startangle, color_strings, explode, autopct)

Store pie chart slices using polar wedges with optional explode & colors

Arguments

Type IntentOptional Attributes Name
type(plot_data_t), intent(inout) :: plots(:)
type(figure_state_t), intent(inout) :: state
real(kind=wp), intent(in), contiguous :: values(:)
character(len=*), intent(in), optional :: labels(:)
real(kind=wp), intent(in), optional :: startangle
character(len=*), intent(in), optional :: color_strings(:)
real(kind=wp), intent(in), optional :: explode(:)
character(len=*), intent(in), optional :: autopct