plot_data_histogram Derived Type

type, public, extends(plot_data_colored) :: plot_data_histogram

A container for plotting data in the form of a histogram.


Contents


Type-Bound Procedures

procedure, public :: define_data => pdh_define_data

  • private subroutine pdh_define_data(this, x, err)

    Defines the data set to plot.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(inout) :: this

    The plot_data_histogram object.

    real(kind=real64), intent(in), dimension(:) :: x

    The data set to plot.

    class(errors), intent(inout), optional, target :: err

    An error handling object.

procedure, public :: get => pdh_get_bin_data

  • private subroutine pdh_get_bin_data(this, i, x, cnt)

    Gets the requested binned data.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    integer(kind=int32), intent(in) :: i

    The bin number to get.

    real(kind=real64), intent(out) :: x

    The center of the bin.

    integer(kind=int32), intent(out) :: cnt

    The number of items in the bin.

procedure, public :: get_axes_string => pdh_get_axes_cmd

  • private function pdh_get_axes_cmd(this) result(rst)

    Gets the GNUPLOT command string defining which axes the data is to be plotted against.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    Return Value character(len=:), allocatable

    The command string.

procedure, public :: get_bin_count => pdh_get_bin_count

  • private pure function pdh_get_bin_count(this) result(x)

    Gets the number of bins.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    Return Value integer(kind=int32)

    The bin count.

procedure, public :: get_color_index => pdc_get_color_index

  • private pure function pdc_get_color_index(this) result(x)

    Gets the color index.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_colored), intent(in) :: this

    The plot_data_colored object.

    Return Value integer(kind=int32)

    The index value.

procedure, public :: get_command_string => pdh_get_cmd

  • private function pdh_get_cmd(this) result(rst)

    Gets the GNUPLOT command string for this object.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    Return Value character(len=:), allocatable

    The command string.

procedure, public :: get_data_string => pdh_get_data_cmd

  • private function pdh_get_data_cmd(this) result(rst)

    Gets the GNUPLOT command string defining the data for this object.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    Return Value character(len=:), allocatable

    The command string.

procedure, public :: get_draw_against_y2 => pdh_get_use_y2

  • private pure function pdh_get_use_y2(this) result(rst)

    Gets a value determining if the data is to be plotted against the secondary y axis.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    Return Value logical

    Returns true if the data is to be plotted against the secondary y axis; else, false for the primary y axis.

procedure, public :: get_is_filled => pdh_get_is_filled

  • private pure function pdh_get_is_filled(this) result(rst)

    Gets a value determining if each box is filled.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    Return Value logical

    Returns true if the boxes are filled; else, false for an empty box.

procedure, public :: get_line_color => pdc_get_line_color

  • private pure function pdc_get_line_color(this) result(x)

    Gets the object color.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_colored), intent(in) :: this

    The plot_data_colored object.

    Return Value type(color)

    The color.

procedure, public :: get_maximum_value => pdh_get_max_x

  • private pure function pdh_get_max_x(this) result(x)

    Gets the maximum data value.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    Return Value real(kind=real64)

    The maximum data value.

procedure, public :: get_minimum_value => pdh_get_min_x

  • private pure function pdh_get_min_x(this) result(x)

    Gets the minimum data value.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(in) :: this

    The plot_data_histogram object.

    Return Value real(kind=real64)

    The minimum data value.

procedure, public :: get_name => pd_get_name

  • private pure function pd_get_name(this) result(txt)

    Gets the name to associate with this data set.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data), intent(in) :: this

    The plot_data object.

    Return Value character(len=:), allocatable

    The name.

procedure, public :: set_bin_count => pdh_set_bin_count

  • private subroutine pdh_set_bin_count(this, x)

    Sets the bin count. For this property to have an effect, call before calling the define_data subroutine or bin_data subroutine.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(inout) :: this

    The plot_data_histogram object.

    integer(kind=int32), intent(in) :: x

    The bin count.

procedure, public :: set_color_index => pdc_set_color_index

  • private subroutine pdc_set_color_index(this, x)

    Sets the color index.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_colored), intent(inout) :: this

    The plot_data_colored object.

    integer(kind=int32), intent(in) :: x

    The index value.

procedure, public :: set_draw_against_y2 => pdh_set_use_y2

  • private subroutine pdh_set_use_y2(this, x)

    Sets a value determining if the data is to be plotted against the secondary y axis.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(inout) :: this

    The plot_data_histogram object.

    logical, intent(in) :: x

    Set to true if the data is to be plotted against the secondary y axis; else, false for the primary y axis.

procedure, public :: set_is_filled => pdh_set_is_filled

  • private subroutine pdh_set_is_filled(this, x)

    Sets a value determining if each box is filled.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_histogram), intent(inout) :: this

    The plot_data_histogram object.

    logical, intent(in) :: x

    Set to true if the boxes should be filled; else, false for an empty box.

procedure, public :: set_line_color => pdc_set_line_color

  • private subroutine pdc_set_line_color(this, x)

    Sets the object color.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data_colored), intent(inout) :: this

    The plot_data_colored object.

    type(color), intent(in) :: x

    The color.

procedure, public :: set_name => pd_set_name

  • private subroutine pd_set_name(this, txt)

    Sets the name to associate with this data set.

    Arguments

    Type IntentOptional Attributes Name
    class(plot_data), intent(inout) :: this

    The plot_data object.

    character(len=*), intent(in) :: txt

    The name.