multiplot Derived Type

type, public, extends(plot_object) :: multiplot

Defines a multi-plot layout.


Contents


Components

Type Visibility Attributes Name Initial
class(terminal), public, pointer :: m_terminal => null()

The GNUPLOT terminal object to target.


Finalization Procedures

final :: mp_clean

  • private subroutine mp_clean(this)

    Cleans up resources held by the multiplot object.

    Arguments

    Type IntentOptional Attributes Name
    type(multiplot), intent(inout) :: this

    The multiplot object.


Type-Bound Procedures

procedure, public :: draw => mp_draw

  • private subroutine mp_draw(this, persist, err)

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

    Arguments

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

    The multiplot 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 => mp_get

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

    Gets the requested plot object.

    Arguments

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

    The multiplot 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 => mp_get_cols

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

    Gets the number of columns of plots.

    Arguments

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

    The multiplot object.

    Return Value integer(kind=int32)

    The column count.

procedure, public :: get_command_string => mp_get_command

  • private function mp_get_command(this) result(x)

    Gets the GNUPLOT commands for this object.

    Arguments

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

    The multiplot object.

    Return Value character(len=:), allocatable

    The command string.

procedure, public :: get_font_name => mp_get_font

  • private function mp_get_font(this) result(x)

    Gets the name of the font used for plot text.

    Arguments

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

    The multiplot object.

    Return Value character(len=:), allocatable

    The font name.

procedure, public :: get_font_size => mp_get_font_size

  • private function mp_get_font_size(this) result(x)

    Gets the size of the font used by the plot.

    Arguments

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

    The multiplot object.

    Return Value integer(kind=int32)

    The font size.

procedure, public :: get_plot_count => mp_get_count

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

    Gets the total number of plots.

    Arguments

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

    The multiplot object.

    Return Value integer(kind=int32)

    The plot count.

procedure, public :: get_row_count => mp_get_rows

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

    Gets the number of rows of plots.

    Arguments

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

    The multiplot object.

    Return Value integer(kind=int32)

    The row count.

procedure, public :: get_terminal => mp_get_term

  • private function mp_get_term(this) result(x)

    Gets the GNUPLOT terminal object.

    Arguments

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

    The multiplot object.

    Return Value class(terminal), pointer

    A pointer to the terminal object.

procedure, public :: get_title => mp_get_title

  • private function mp_get_title(this) result(x)

    Gets the multiplot's title.

    Arguments

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

    The multiplot object.

    Return Value character(len=:), allocatable

    The title.

procedure, public :: initialize => mp_init

  • private subroutine mp_init(this, m, n, term, err)

    Initializes the multiplot object.

    Arguments

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

    The multiplot object.

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

    The number of rows of plots.

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

    The number of columns of plots.

    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

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

    An error handling object.

procedure, public :: is_title_defined => mp_has_title

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

    Gets a value determining if a title has been defined for the multiplot object.

    Arguments

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

    The multiplot object.

    Return Value logical

    Returns true if a title has been defined for this multiplot; else, returns false.

procedure, public :: save_file => mp_save

  • private subroutine mp_save(this, fname, err)

    Saves a GNUPLOT command file.

    Arguments

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

    The multiplot object.

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

    The filename.

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

    An error handling object.

procedure, public :: set => mp_set

  • private subroutine mp_set(this, i, j, x)

    Replaces the specified plot.

    Arguments

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

    The multiplot object.

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

    The row index of the plot to replace.

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

    The column index of the plot to replace.

    class(plot), intent(in) :: x

    The new plot.

procedure, public :: set_font_name => mp_set_font

  • private subroutine mp_set_font(this, x)

    Sets the name of the font used for plot text.

    Arguments

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

    The multiplot object.

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

    The font name.

procedure, public :: set_font_size => mp_set_font_size

  • private subroutine mp_set_font_size(this, x)

    Sets the size of the font used by the plot.

    Arguments

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

    The multiplot object.

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

    The font size.

procedure, public :: set_title => mp_set_title

  • private subroutine mp_set_title(this, x)

    Sets the multiplot's title.

    Arguments

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

    The multiplot object.

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

    The title.