correlation_plot Derived Type

type, public, extends(plot_object) :: correlation_plot

Defines a multiplot arrangement designed to illustrate correlation between data sets.


Contents


Type-Bound Procedures

procedure, public :: draw => cp_draw

  • private subroutine cp_draw(this, persist, err)

    Launches GNUPLOT and draws the correlation_plot per the current state of the command list.

    Arguments

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

    The correlation_plot object.

    logical, intent(in), optional :: persist

    An optional parameter that can be used to keep GNUPLOT open.
    Set to true to force GNUPLOT to remain open; else, set to false to allow GNUPLOT to close after drawing. The default is true.

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

    An error handling object.

procedure, public :: get => cp_get

  • private function cp_get(this, i, j) result(x)

    Gets the requested plot object.

    Arguments

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

    The correlation_plot object.

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

    The row index of the plot to retrieve.

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

    The column index of the plot to retrieve.

    Return Value class(plot), pointer

    A pointer to the plot object.

procedure, public :: get_column_count => cp_get_cols

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

    Gets the number of columns of plots.

    Arguments

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

    The correlation_plot object.

    Return Value integer(kind=int32)

    The column count.

procedure, public :: get_command_string => cp_get_command

  • private function cp_get_command(this) result(x)

    Gets the GNUPLOT commands for this object.

    Arguments

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

    The correlation_plot object.

    Return Value character(len=:), allocatable

    The command string.

procedure, public :: get_font_name => cp_get_font

  • private function cp_get_font(this) result(x)

    Gets the name of the font used for plot text.

    Arguments

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

    The correlation_plot object.

    Return Value character(len=:), allocatable

    The font name.

procedure, public :: get_font_size => cp_get_font_size

  • private function cp_get_font_size(this) result(x)

    Gets the size of the font used by the plot.

    Arguments

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

    The correlation_plot object.

    Return Value integer(kind=int32)

    The font size.

procedure, public :: get_plot_count => cp_get_count

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

    Gets the total number of plots.

    Arguments

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

    The correlation_plot object.

    Return Value integer(kind=int32)

    The plot count.

procedure, public :: get_row_count => cp_get_rows

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

    Gets the number of rows of plots.

    Arguments

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

    The correlation_plot object.

    Return Value integer(kind=int32)

    The row count.

procedure, public :: get_terminal => cp_get_term

  • private function cp_get_term(this) result(x)

    Gets the GNUPLOT terminal object.

    Arguments

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

    The correlation_plot object.

    Return Value class(terminal), pointer

    A pointer to the terminal object.

procedure, public :: initialize => cp_init

  • private subroutine cp_init(this, x, labels, term, width, height, err)

    Initializes the correlation_plot object.

    Arguments

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

    The correlation_plot object.

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

    The data to plot with each column representing a data set.

    type(string), intent(in), optional, dimension(:) :: labels

    An optional array containing a label to associate with each data set in x. If supplied, this array must have the same length as x has columns.

    integer(kind=int32), intent(in), optional :: term

    An optional input that is used to define the terminal. The default terminal is a WXT terminal. The acceptable inputs are:

    • GNUPLOT_TERMINAL_PNG

    • GNUPLOT_TERMINAL_QT

    • GNUPLOT_TERMINAL_WIN32

    • GNUPLOT_TERMINAL_WXT

    • GNUPLOT_TERMINAL_LATEX

    integer(kind=int32), intent(in), optional :: width

    Optionally, the width of the plot window.

    integer(kind=int32), intent(in), optional :: height

    Optionally, the height of the plot window.

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

    An error handling object.

procedure, public :: save_file => cp_save

  • private subroutine cp_save(this, fname, err)

    Saves a GNUPLOT command file.

    Arguments

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

    The correlation_plot object.

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

    The filename.

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

    An error handling object.

procedure, public :: set_font_name => cp_set_font

  • private subroutine cp_set_font(this, x)

    Sets the name of the font used for plot text.

    Arguments

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

    The correlation_plot object.

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

    The font name.

procedure, public :: set_font_size => cp_set_font_size

  • private subroutine cp_set_font_size(this, x)

    Sets the size of the font used by the plot.

    Arguments

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

    The correlation_plot object.

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

    The font size.