diff --git a/CMakeLists.txt b/CMakeLists.txt index c09e220..157e2ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.24) project( fplot LANGUAGES Fortran - VERSION 1.7.2 + VERSION 1.8.0 ) # Get helper macros and functions diff --git a/doc/index.html b/doc/index.html index f5598c4..32ba9ff 100644 --- a/doc/index.html +++ b/doc/index.html @@ -143,7 +143,7 @@

Procedures

Derived Types

- +

diff --git a/doc/interface/cm_get_string_result.html b/doc/interface/cm_get_string_result.html index 636c497..12ffa76 100644 --- a/doc/interface/cm_get_string_result.html +++ b/doc/interface/cm_get_string_result.html @@ -208,7 +208,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/get_string_result.html b/doc/interface/get_string_result.html index 58b23b8..ca5cbbc 100644 --- a/doc/interface/get_string_result.html +++ b/doc/interface/get_string_result.html @@ -171,7 +171,7 @@

Arguments

- + class(plot_object), intent(in) @@ -187,7 +187,7 @@

Arguments

-

Return Value character(len=:),allocatable

+

Return Value character(len=:),allocatable

The result string.

Description

Returns a string from a plot_object.

@@ -208,7 +208,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/operator(==).html b/doc/interface/operator(==).html index 0cf2dd2..a6179b0 100644 --- a/doc/interface/operator(==).html +++ b/doc/interface/operator(==).html @@ -279,7 +279,7 @@

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/operator(SLASH=).html b/doc/interface/operator(SLASH=).html index 5d67f08..97ed585 100644 --- a/doc/interface/operator(SLASH=).html +++ b/doc/interface/operator(SLASH=).html @@ -279,7 +279,7 @@

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/pa_get_string_result.html b/doc/interface/pa_get_string_result.html index c20bc9c..a69e761 100644 --- a/doc/interface/pa_get_string_result.html +++ b/doc/interface/pa_get_string_result.html @@ -171,7 +171,7 @@

Arguments

- + class(plot_axis), intent(in) @@ -187,7 +187,7 @@

Arguments

-

Return Value character(len=:),allocatable

+

Return Value character(len=:),allocatable

The string.

Description

Retrieves a string from a plot_axis.

@@ -208,7 +208,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/pd_get_string_result.html b/doc/interface/pd_get_string_result.html index 02e7b23..91d208d 100644 --- a/doc/interface/pd_get_string_result.html +++ b/doc/interface/pd_get_string_result.html @@ -171,7 +171,7 @@

Arguments

- + class(plot_data), intent(in) @@ -187,7 +187,7 @@

Arguments

-

Return Value character(len=:),allocatable

+

Return Value character(len=:),allocatable

The string.

Description

Retrieves a string from a plot_data object.

@@ -208,7 +208,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/simplify_polyline.html b/doc/interface/simplify_polyline.html index 433ec55..096ecba 100644 --- a/doc/interface/simplify_polyline.html +++ b/doc/interface/simplify_polyline.html @@ -510,7 +510,7 @@

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/spd_get_int_value.html b/doc/interface/spd_get_int_value.html index 4c728fe..a5d43f1 100644 --- a/doc/interface/spd_get_int_value.html +++ b/doc/interface/spd_get_int_value.html @@ -171,7 +171,7 @@

Arguments

- + class(scatter_plot_data), intent(in) @@ -187,7 +187,7 @@

Arguments

-

Return Value integer(kind=int32)

+

Return Value integer(kind=int32)

The value.

Description

Gets an integer value from the scatter_plot_data object.

@@ -208,7 +208,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/spd_get_string_result.html b/doc/interface/spd_get_string_result.html index 62f5df9..eb53da5 100644 --- a/doc/interface/spd_get_string_result.html +++ b/doc/interface/spd_get_string_result.html @@ -171,7 +171,7 @@

Arguments

- + class(scatter_plot_data), intent(in) @@ -187,7 +187,7 @@

Arguments

-

Return Value character(len=:),allocatable

+

Return Value character(len=:),allocatable

The string.

Description

Gets a string value from the scatter_plot_data object.

@@ -208,7 +208,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/spd_get_value.html b/doc/interface/spd_get_value.html index c09d747..aa37200 100644 --- a/doc/interface/spd_get_value.html +++ b/doc/interface/spd_get_value.html @@ -171,7 +171,7 @@

Arguments

- + class(scatter_plot_data), intent(in) @@ -202,7 +202,7 @@

Arguments

-

Return Value real(kind=real64)

+

Return Value real(kind=real64)

The value.

Description

Gets an indexed value from the scatter_plot_data object.

@@ -223,7 +223,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/spd_set_value.html b/doc/interface/spd_set_value.html index 1bf64fb..ef14e97 100644 --- a/doc/interface/spd_set_value.html +++ b/doc/interface/spd_set_value.html @@ -171,7 +171,7 @@

Arguments

- + class(scatter_plot_data), intent(inout) @@ -201,7 +201,7 @@

Arguments

- + real(kind=real64), intent(in) @@ -236,7 +236,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/interface/term_get_string_result.html b/doc/interface/term_get_string_result.html index ad74a88..81ce3ed 100644 --- a/doc/interface/term_get_string_result.html +++ b/doc/interface/term_get_string_result.html @@ -171,7 +171,7 @@

Arguments

- + class(terminal), intent(in) @@ -187,7 +187,7 @@

Arguments

-

Return Value character(len=:),allocatable

+

Return Value character(len=:),allocatable

The string.

Description

Retrieves a string from a terminal.

@@ -208,7 +208,7 @@

Description

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/lists/files.html b/doc/lists/files.html index cfa0e2b..dc8b422 100644 --- a/doc/lists/files.html +++ b/doc/lists/files.html @@ -120,6 +120,7 @@

Source Files

fplot_png_terminal.f90 fplot_qt_terminal.f90 fplot_simplify.f90 + fplot_stats_plots.f90 fplot_surface_plot.f90 fplot_surface_plot_data.f90 fplot_terminal.f90 @@ -144,7 +145,7 @@

Source Files

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/lists/modules.html b/doc/lists/modules.html index 15f4680..1324098 100644 --- a/doc/lists/modules.html +++ b/doc/lists/modules.html @@ -125,15 +125,16 @@

Modules

fplot_png_terminalfplot_png_terminal.f90 fplot_qt_terminalfplot_qt_terminal.f90 fplot_simplifyfplot_simplify.f90 - fplot_surface_plotfplot_surface_plot.f90 - fplot_surface_plot_datafplot_surface_plot_data.f90 - fplot_terminalfplot_terminal.f90 - fplot_tri_surface_plot_datafplot_tri_surface_plot_data.f90 - fplot_triangulations_delaunay_2dfplot_triangulations_delaunay_2d.f90 - fplot_vector_field_plot_datafplot_vector_field_plot_data.f90 - fplot_windows_terminalfplot_windows_terminal.f90 - fplot_wxt_terminalfplot_wxt_terminal.f90 - + fplot_stats_plotsfplot_stats_plots.f90 + fplot_surface_plotfplot_surface_plot.f90 + fplot_surface_plot_datafplot_surface_plot_data.f90 + fplot_terminalfplot_terminal.f90 + fplot_tri_surface_plot_datafplot_tri_surface_plot_data.f90 + fplot_triangulations_delaunay_2dfplot_triangulations_delaunay_2d.f90 + fplot_vector_field_plot_datafplot_vector_field_plot_data.f90 + fplot_windows_terminalfplot_windows_terminal.f90 + fplot_wxt_terminalfplot_wxt_terminal.f90 + @@ -149,7 +150,7 @@

Modules

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/lists/procedures.html b/doc/lists/procedures.html index 4d73c55..a612eba 100644 --- a/doc/lists/procedures.html +++ b/doc/lists/procedures.html @@ -125,7 +125,7 @@

Procedures

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/lists/types.html b/doc/lists/types.html index a18a055..2abb2e9 100644 --- a/doc/lists/types.html +++ b/doc/lists/types.html @@ -94,6 +94,8 @@

Derived Types

colorfplot_colorsNone

Describes an RGB color.

colormapfplot_colormapplot_object

A colormap object for a surface plot.

cool_colormapfplot_colormapcolormap

Defines a colormap consisting of "cool" colors.

+ correlation_plotfplot_stats_plotsplot_object

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

custom_colormapfplot_colormapcolormap

Defines a custom colormap that utilizes the FORCOLORMAP library to provide the map.

delaunay_tri_2dfplot_triangulations_delaunay_2dNone

Provides a container for a 2D Delaunay triangulation.

@@ -110,7 +112,7 @@

Derived Types

plot_2dfplot_plot_2dplot

A plot object defining a 2D plot.

plot_3dfplot_plot_3dplot

A plot object defining a 3D plot.

plot_arrowfplot_arrowplot_object

Defines an arrow that can be drawn on a plot.

- plot_axisfplot_plot_axisplot_object + plot_axisfplot_plot_axisplot_object

Defines a plot axis object.

plot_barfplot_plot_barplot_2d

Defines a 2D plot tailored towards bar plotting.

plot_datafplot_plot_dataplot_object

A container for plot data.

plot_data_2dfplot_plot_data_2dscatter_plot_data

Defines a two-dimensional plot data set.

@@ -118,7 +120,7 @@

Derived Types

plot_data_barfplot_plot_data_barplot_data_colored

Defines a data set tailored to bar charts.

plot_data_coloredfplot_plot_dataplot_data

Defines a colored plot data set.

plot_data_error_barsfplot_plot_data_error_barsplot_data_colored

Defines a 2D error-bar based data set.

- plot_data_histogramfplot_plot_data_histogramplot_data_bar

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

+ plot_data_histogramfplot_plot_data_histogramplot_data_colored

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

plot_data_tri_2dfplot_plot_data_tri_2dplot_data_colored

Defines a 2D triangulated data set.

plot_labelfplot_labelplot_object

Defines a plot label.

plot_objectfplot_plot_objectNone

The base type for all plot objects.

@@ -155,7 +157,7 @@

Derived Types

Documentation generated by FORD - on 2025-03-28 05:45

+ on 2025-04-10 13:38


diff --git a/doc/module/fplot_arrow.html b/doc/module/fplot_arrow.html index 67096a7..297325c 100644 --- a/doc/module/fplot_arrow.html +++ b/doc/module/fplot_arrow.html @@ -96,7 +96,7 @@

fplot_arrow
  • 296 statements + title=" 4.0% of total for modules and submodules.">296 statements
  • @@ -169,11 +169,11 @@

    Uses

    @@ -542,7 +542,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_colormap.html b/doc/module/fplot_colormap.html index 3738eb3..3e32969 100644 --- a/doc/module/fplot_colormap.html +++ b/doc/module/fplot_colormap.html @@ -96,7 +96,7 @@

    fplot_colormap
  • 282 statements + title=" 3.9% of total for modules and submodules.">284 statements
  • @@ -189,12 +189,12 @@

    Uses

  • @@ -1358,7 +1358,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_colors.html b/doc/module/fplot_colors.html index a67b89b..f5b515b 100644 --- a/doc/module/fplot_colors.html +++ b/doc/module/fplot_colors.html @@ -96,7 +96,7 @@

    fplot_colors
  • 107 statements + title=" 1.6% of total for modules and submodules.">115 statements
  • @@ -325,7 +325,7 @@

    Variables

    :: CLR_BLACK = - color(0, 0, 0) + color(0, 0, 0, 0)

    Black.

    @@ -342,7 +342,7 @@

    Variables

    :: CLR_BLUE = - color(0, 0, 255) + color(0, 0, 255, 0)

    Blue.

    @@ -359,7 +359,7 @@

    Variables

    :: CLR_CYAN = - color(0, 255, 255) + color(0, 255, 255, 0)

    Cyan.

    @@ -376,7 +376,7 @@

    Variables

    :: CLR_GRAY = - color(128, 128, 128) + color(128, 128, 128, 0)

    Gray.

    @@ -393,7 +393,7 @@

    Variables

    :: CLR_GREEN = - color(0, 128, 0) + color(0, 128, 0, 0)

    Green.

    @@ -410,7 +410,7 @@

    Variables

    :: CLR_LIME = - color(0, 255, 0) + color(0, 255, 0, 0)

    Lime.

    @@ -427,7 +427,7 @@

    Variables

    :: CLR_MAGENTA = - color(255, 0, 255) + color(255, 0, 255, 0)

    Magenta.

    @@ -444,7 +444,7 @@

    Variables

    :: CLR_MAROON = - color(128, 0, 0) + color(128, 0, 0, 0)

    Maroon.

    @@ -461,7 +461,7 @@

    Variables

    :: CLR_NAVY = - color(0, 0, 128) + color(0, 0, 128, 0)

    Navy.

    @@ -478,7 +478,7 @@

    Variables

    :: CLR_OLIVE = - color(128, 128, 0) + color(128, 128, 0, 0)

    Olive.

    @@ -495,7 +495,7 @@

    Variables

    :: CLR_ORANGE = - color(255, 165, 0) + color(255, 165, 0, 0)

    Orange.

    @@ -512,7 +512,7 @@

    Variables

    :: CLR_PURPLE = - color(128, 0, 128) + color(128, 0, 128, 0)

    Purple.

    @@ -529,7 +529,7 @@

    Variables

    :: CLR_RED = - color(255, 0, 0) + color(255, 0, 0, 0)

    Red.

    @@ -546,7 +546,7 @@

    Variables

    :: CLR_SILVER = - color(192, 192, 192) + color(192, 192, 192, 0)

    Silver.

    @@ -563,7 +563,7 @@

    Variables

    :: CLR_TEAL = - color(0, 128, 128) + color(0, 128, 128, 0)

    Teal.

    @@ -580,7 +580,7 @@

    Variables

    :: CLR_WHITE = - color(255, 255, 255) + color(255, 255, 255, 0)

    White.

    @@ -597,7 +597,7 @@

    Variables

    :: CLR_YELLOW = - color(255, 255, 0) + color(255, 255, 0, 0)

    Yellow.

    @@ -614,7 +614,7 @@

    Variables

    :: color_list = - [color(0, int(0.447*255), int(0.741*255)), color(int(0.85*255), int(0.325*255), int(0.098*255)), color(int(0.929*255), int(0.694*255), int(0.125*255)), color(int(0.494*255), int(0.184*255), int(0.556*255)), color(int(0.466*255), int(0.674*255), int(0.188*255)), color(int(0.301*255), int(0.745*255), int(0.933*255)), color(int(0.635*255), int(0.078*255), int(0.184*255))] + [color(0, int(0.447*255), int(0.741*255), 0), color(int(0.85*255), int(0.325*255), int(0.098*255), 0), color(int(0.929*255), int(0.694*255), int(0.125*255), 0), color(int(0.494*255), int(0.184*255), int(0.556*255), 0), color(int(0.466*255), int(0.674*255), int(0.188*255), 0), color(int(0.301*255), int(0.745*255), int(0.933*255), 0), color(int(0.635*255), int(0.078*255), int(0.184*255), 0)] @@ -793,6 +793,24 @@

    Components

    Initial + + + + integer(kind=int32), + + public + + + + :: + alpha + = + 0 + +

    The alpha component of the color (must be between 0 and 255). +Notice, 0 is fully opaque and 255 is fully transparent.

    + + @@ -900,7 +918,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_constants.html b/doc/module/fplot_constants.html index a1571fa..ba36d10 100644 --- a/doc/module/fplot_constants.html +++ b/doc/module/fplot_constants.html @@ -96,7 +96,7 @@

    fplot_constants
  • 58 statements + title=" 0.9% of total for modules and submodules.">64 statements
  • @@ -147,8 +147,14 @@

    GNUPLOT_DEFAULT_FONT_SIZE GNUPLOT_DEFAULT_WINDOW_HEIGHT GNUPLOT_DEFAULT_WINDOW_WIDTH + GNUPLOT_HORIZONTAL_ALIGN_CENTER + GNUPLOT_HORIZONTAL_ALIGN_LEFT + GNUPLOT_HORIZONTAL_ALIGN_RIGHT GNUPLOT_MAX_LABEL_LENGTH GNUPLOT_MAX_PATH_LENGTH + GNUPLOT_ROTATION_ORIGIN_CENTER + GNUPLOT_ROTATION_ORIGIN_LEFT + GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_TERMINAL_LATEX GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT @@ -257,8 +263,14 @@

    GNUPLOT_DEFAULT_FONT_SIZE GNUPLOT_DEFAULT_WINDOW_HEIGHT GNUPLOT_DEFAULT_WINDOW_WIDTH + GNUPLOT_HORIZONTAL_ALIGN_CENTER + GNUPLOT_HORIZONTAL_ALIGN_LEFT + GNUPLOT_HORIZONTAL_ALIGN_RIGHT GNUPLOT_MAX_LABEL_LENGTH GNUPLOT_MAX_PATH_LENGTH + GNUPLOT_ROTATION_ORIGIN_CENTER + GNUPLOT_ROTATION_ORIGIN_LEFT + GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_TERMINAL_LATEX GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT @@ -590,6 +602,57 @@

    Variables

    The default GNUPLOT window width, in pixels.

    + + + + character(len=*), + + public, + +parameter + + :: + GNUPLOT_HORIZONTAL_ALIGN_CENTER + = + "center" + +

    Defines the text should be centered.

    + + + + + + character(len=*), + + public, + +parameter + + :: + GNUPLOT_HORIZONTAL_ALIGN_LEFT + = + "left" + +

    Defines the text should be aligned to the left.

    + + + + + + character(len=*), + + public, + +parameter + + :: + GNUPLOT_HORIZONTAL_ALIGN_RIGHT + = + "right" + +

    Defines the text should be aligned to the right.

    + + @@ -624,6 +687,57 @@

    Variables

    Defines the maximum number of characters allowed in a file path.

    + + + + character(len=*), + + public, + +parameter + + :: + GNUPLOT_ROTATION_ORIGIN_CENTER + = + "center" + +

    Defines the text should be rotated around the center of the text.

    + + + + + + character(len=*), + + public, + +parameter + + :: + GNUPLOT_ROTATION_ORIGIN_LEFT + = + "left" + +

    Defines the text should be rotated around the left side of the text.

    + + + + + + character(len=*), + + public, + +parameter + + :: + GNUPLOT_ROTATION_ORIGIN_RIGHT + = + "right" + +

    Defines the text should be rotated around the right side of the text.

    + + @@ -1284,7 +1398,7 @@

    Variables

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_core.html b/doc/module/fplot_core.html index fd4f927..6b35229 100644 --- a/doc/module/fplot_core.html +++ b/doc/module/fplot_core.html @@ -96,7 +96,7 @@

    fplot_core
  • 166 statements + title=" 2.4% of total for modules and submodules.">174 statements
  • @@ -163,41 +163,42 @@

    Uses

    @@ -258,7 +259,7 @@

    Contents

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_core_routines.html b/doc/module/fplot_core_routines.html index 425b499..57748b9 100644 --- a/doc/module/fplot_core_routines.html +++ b/doc/module/fplot_core_routines.html @@ -96,7 +96,7 @@

    fplot_core_routines
  • 53 statements + title=" 0.7% of total for modules and submodules.">53 statements
  • @@ -460,7 +460,7 @@

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_delaunay_tri_surface.html b/doc/module/fplot_delaunay_tri_surface.html index 169b729..50a627c 100644 --- a/doc/module/fplot_delaunay_tri_surface.html +++ b/doc/module/fplot_delaunay_tri_surface.html @@ -96,7 +96,7 @@

    fplot_delaunay_tri_surface
  • 134 statements + title=" 1.8% of total for modules and submodules.">134 statements
  • @@ -170,10 +170,10 @@

    Uses

  • @@ -372,7 +372,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_errors.html b/doc/module/fplot_errors.html index ed97fd2..bebc6b2 100644 --- a/doc/module/fplot_errors.html +++ b/doc/module/fplot_errors.html @@ -96,7 +96,7 @@

    fplot_errors
  • 54 statements + title=" 0.7% of total for modules and submodules.">54 statements
  • @@ -772,7 +772,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_filled_plot_data.html b/doc/module/fplot_filled_plot_data.html index 4fb0d73..9c22dfe 100644 --- a/doc/module/fplot_filled_plot_data.html +++ b/doc/module/fplot_filled_plot_data.html @@ -96,7 +96,7 @@

    fplot_filled_plot_data
  • 120 statements + title=" 1.6% of total for modules and submodules.">120 statements
  • @@ -170,11 +170,11 @@

    Uses

  • @@ -393,7 +393,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_label.html b/doc/module/fplot_label.html index 112eb6f..bf8e540 100644 --- a/doc/module/fplot_label.html +++ b/doc/module/fplot_label.html @@ -96,7 +96,7 @@

    fplot_label
  • 91 statements + title=" 1.2% of total for modules and submodules.">91 statements
  • @@ -169,10 +169,10 @@

    Uses

    @@ -361,7 +361,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_latex_terminal.html b/doc/module/fplot_latex_terminal.html index 7dfb1c1..4f7268b 100644 --- a/doc/module/fplot_latex_terminal.html +++ b/doc/module/fplot_latex_terminal.html @@ -169,10 +169,10 @@

    Uses

    @@ -431,7 +431,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_legend.html b/doc/module/fplot_legend.html index 2fd70db..3978f54 100644 --- a/doc/module/fplot_legend.html +++ b/doc/module/fplot_legend.html @@ -96,7 +96,7 @@

    fplot_legend
  • 151 statements + title=" 2.1% of total for modules and submodules.">151 statements
  • @@ -169,10 +169,10 @@

    Uses

    @@ -421,7 +421,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_multiplot.html b/doc/module/fplot_multiplot.html index 35f53ce..491d0f2 100644 --- a/doc/module/fplot_multiplot.html +++ b/doc/module/fplot_multiplot.html @@ -96,7 +96,7 @@

    fplot_multiplot
  • 298 statements + title=" 4.1% of total for modules and submodules.">304 statements
  • @@ -169,20 +169,20 @@

    Uses

    @@ -491,7 +491,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot.html b/doc/module/fplot_plot.html index 6ee8fd1..3448b42 100644 --- a/doc/module/fplot_plot.html +++ b/doc/module/fplot_plot.html @@ -96,7 +96,7 @@

    fplot_plot
  • 510 statements + title=" 7.7% of total for modules and submodules.">562 statements
  • @@ -169,25 +169,25 @@

    Uses

    @@ -346,6 +346,16 @@

    Type-Bound Procedures

    :: get_axis_equal => plt_get_axis_equal +Function + + + + + procedure + , public + :: get_bottom_margin + => + plt_get_bottom_margin Function @@ -426,6 +436,16 @@

    Type-Bound Procedures

    :: get_label_count => plt_get_label_count +Function + + + + + procedure + , public + :: get_left_margin + => + plt_get_left_margin Function @@ -436,6 +456,16 @@

    Type-Bound Procedures

    :: get_legend => plt_get_legend +Function + + + + + procedure + , public + :: get_right_margin + => + plt_get_right_margin Function @@ -486,6 +516,16 @@

    Type-Bound Procedures

    :: get_title => plt_get_title +Function + + + + + procedure + , public + :: get_top_margin + => + plt_get_top_margin Function @@ -606,6 +646,16 @@

    Type-Bound Procedures

    :: set_axis_equal => plt_set_axis_equal +Subroutine + + + + + procedure + , public + :: set_bottom_margin + => + plt_set_bottom_margin Subroutine @@ -656,6 +706,26 @@

    Type-Bound Procedures

    :: set_label => plt_set_label +Subroutine + + + + + procedure + , public + :: set_left_margin + => + plt_set_left_margin +Subroutine + + + + + procedure + , public + :: set_right_margin + => + plt_set_right_margin Subroutine @@ -696,6 +766,16 @@

    Type-Bound Procedures

    :: set_title => plt_set_title +Subroutine + + + + + procedure + , public + :: set_top_margin + => + plt_set_top_margin Subroutine @@ -726,7 +806,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_2d.html b/doc/module/fplot_plot_2d.html index b5feb7a..d4b1175 100644 --- a/doc/module/fplot_plot_2d.html +++ b/doc/module/fplot_plot_2d.html @@ -96,7 +96,7 @@

    fplot_plot_2d
  • 215 statements + title=" 3.3% of total for modules and submodules.">240 statements
  • @@ -169,14 +169,14 @@

    Uses

    @@ -344,6 +344,16 @@

    Type-Bound Procedures

    :: get_axis_equal => plt_get_axis_equal +Function + + + + + procedure + , public + :: get_bottom_margin + => + plt_get_bottom_margin Function @@ -424,6 +434,16 @@

    Type-Bound Procedures

    :: get_label_count => plt_get_label_count +Function + + + + + procedure + , public + :: get_left_margin + => + plt_get_left_margin Function @@ -434,6 +454,16 @@

    Type-Bound Procedures

    :: get_legend => plt_get_legend +Function + + + + + procedure + , public + :: get_right_margin + => + plt_get_right_margin Function @@ -494,6 +524,16 @@

    Type-Bound Procedures

    :: get_title => plt_get_title +Function + + + + + procedure + , public + :: get_top_margin + => + plt_get_top_margin Function @@ -654,6 +694,16 @@

    Type-Bound Procedures

    :: set_axis_equal => plt_set_axis_equal +Subroutine + + + + + procedure + , public + :: set_bottom_margin + => + plt_set_bottom_margin Subroutine @@ -704,6 +754,26 @@

    Type-Bound Procedures

    :: set_label => plt_set_label +Subroutine + + + + + procedure + , public + :: set_left_margin + => + plt_set_left_margin +Subroutine + + + + + procedure + , public + :: set_right_margin + => + plt_set_right_margin Subroutine @@ -754,6 +824,16 @@

    Type-Bound Procedures

    :: set_title => plt_set_title +Subroutine + + + + + procedure + , public + :: set_top_margin + => + plt_set_top_margin Subroutine @@ -794,7 +874,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_3d.html b/doc/module/fplot_plot_3d.html index e09debc..d630e31 100644 --- a/doc/module/fplot_plot_3d.html +++ b/doc/module/fplot_plot_3d.html @@ -96,7 +96,7 @@

    fplot_plot_3d
  • 261 statements + title=" 3.9% of total for modules and submodules.">286 statements
  • @@ -169,15 +169,15 @@

    Uses

    @@ -355,6 +355,16 @@

    Type-Bound Procedures

    :: get_azimuth => p3d_get_azimuth +Function + + + + + procedure + , public + :: get_bottom_margin + => + plt_get_bottom_margin Function @@ -455,6 +465,16 @@

    Type-Bound Procedures

    :: get_label_count => plt_get_label_count +Function + + + + + procedure + , public + :: get_left_margin + => + plt_get_left_margin Function @@ -465,6 +485,16 @@

    Type-Bound Procedures

    :: get_legend => plt_get_legend +Function + + + + + procedure + , public + :: get_right_margin + => + plt_get_right_margin Function @@ -515,6 +545,16 @@

    Type-Bound Procedures

    :: get_title => plt_get_title +Function + + + + + procedure + , public + :: get_top_margin + => + plt_get_top_margin Function @@ -695,6 +735,16 @@

    Type-Bound Procedures

    :: set_azimuth => p3d_set_azimuth +Subroutine + + + + + procedure + , public + :: set_bottom_margin + => + plt_set_bottom_margin Subroutine @@ -765,6 +815,26 @@

    Type-Bound Procedures

    :: set_label => plt_set_label +Subroutine + + + + + procedure + , public + :: set_left_margin + => + plt_set_left_margin +Subroutine + + + + + procedure + , public + :: set_right_margin + => + plt_set_right_margin Subroutine @@ -805,6 +875,16 @@

    Type-Bound Procedures

    :: set_title => plt_set_title +Subroutine + + + + + procedure + , public + :: set_top_margin + => + plt_set_top_margin Subroutine @@ -855,7 +935,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_axis.html b/doc/module/fplot_plot_axis.html index 8e8565f..ed50c2c 100644 --- a/doc/module/fplot_plot_axis.html +++ b/doc/module/fplot_plot_axis.html @@ -96,7 +96,7 @@

    fplot_plot_axis
  • 255 statements + title=" 5.7% of total for modules and submodules.">416 statements
  • @@ -185,10 +185,10 @@

    Uses

    @@ -325,7 +325,7 @@

    - +

    Defines a plot axis object.

    @@ -385,9 +385,9 @@

    Type-Bound Procedures

    procedure , public - :: get_tic_label_format + :: get_offset_tics => - pa_get_tic_label_fmt + pa_get_offset_tics Function @@ -395,9 +395,9 @@

    Type-Bound Procedures

    procedure , public - :: get_title + :: get_show_tic_labels => - pa_get_title + pa_get_show_tic_labels Function @@ -405,9 +405,9 @@

    Type-Bound Procedures

    procedure , public - :: get_use_default_tic_label_format + :: get_tic_label_alignment => - pa_get_use_dft_tic_lbl_fmt + pa_get_tic_label_alignment Function @@ -415,9 +415,9 @@

    Type-Bound Procedures

    procedure , public - :: get_zero_axis + :: get_tic_label_angle => - pa_get_zero_axis + pa_get_tic_label_angle Function @@ -425,9 +425,9 @@

    Type-Bound Procedures

    procedure , public - :: get_zero_axis_line_width + :: get_tic_label_format => - pa_get_zero_axis_width + pa_get_tic_label_fmt Function @@ -435,9 +435,9 @@

    Type-Bound Procedures

    procedure , public - :: is_title_defined + :: get_tic_label_rotation_origin => - pa_has_title + pa_get_tic_rotation_origin Function @@ -445,112 +445,79 @@

    Type-Bound Procedures

    procedure , public - :: set_autoscale - => - pa_set_autoscale -Subroutine - - - - - procedure - , public - :: set_is_log_scaled + :: get_tic_label_x_offset => - pa_set_log_scale -Subroutine + pa_get_tic_x_offset +Function procedure , public - :: set_limits + :: get_tic_label_y_offset => - pa_set_axis_limits -Subroutine + pa_get_tic_y_offset +Function procedure , public - :: set_tic_label_format + :: get_title => - pa_set_tic_label_fmt -Subroutine + pa_get_title +Function procedure , public - :: set_title + :: get_title_x_offset => - pa_set_title -Subroutine + pa_get_title_x_offset +Function procedure , public - :: set_use_default_tic_label_format + :: get_title_y_offset => - pa_set_use_dft_tic_lbl_fmt -Subroutine + pa_get_title_y_offset +Function procedure , public - :: set_zero_axis + :: get_use_default_tic_label_format => - pa_set_zero_axis -Subroutine + pa_get_use_dft_tic_lbl_fmt +Function procedure , public - :: set_zero_axis_line_width + :: get_zero_axis => - pa_set_zero_axis_width -Subroutine + pa_get_zero_axis +Function - - -
    - - -
    -
    - -

    - type, public, extends(plot_axis) ::  - x_axis - -

    -
    -
    -

    Defines an x-axis object.

    - - - - -

    Type-Bound Procedures

    - - @@ -558,9 +525,9 @@

    Type-Bound Procedures

    @@ -568,99 +535,99 @@

    Type-Bound Procedures

    + pa_set_autoscale +Subroutine + pa_set_log_scale +Subroutine + pa_set_axis_limits +Subroutine + pa_set_offset_tics +Subroutine + pa_set_show_tic_labels +Subroutine + pa_set_tic_label_alignment +Subroutine + pa_set_tic_label_angle +Subroutine + pa_set_tic_label_fmt +Subroutine + pa_set_tic_rotation_origin +Subroutine @@ -668,9 +635,9 @@

    Type-Bound Procedures

    @@ -678,9 +645,9 @@

    Type-Bound Procedures

    @@ -688,9 +655,9 @@

    Type-Bound Procedures

    @@ -698,9 +665,9 @@

    Type-Bound Procedures

    @@ -741,15 +708,15 @@

    Type-Bound Procedures

    - +

    type, public, extends(plot_axis) ::  - y2_axis + x_axis

    -

    Defines a secondary y-axis object.

    +

    Defines an x-axis object.

    @@ -781,9 +748,9 @@

    Type-Bound Procedures

    @@ -811,9 +778,9 @@

    Type-Bound Procedures

    @@ -821,9 +788,9 @@

    Type-Bound Procedures

    @@ -831,9 +798,9 @@

    Type-Bound Procedures

    @@ -841,9 +808,9 @@

    Type-Bound Procedures

    @@ -851,9 +818,9 @@

    Type-Bound Procedures

    @@ -861,9 +828,9 @@

    Type-Bound Procedures

    @@ -871,112 +838,89 @@

    Type-Bound Procedures

    + pa_get_tic_x_offset +Function + pa_get_tic_y_offset +Function + pa_get_title +Function + pa_get_title_x_offset +Function + pa_get_title_y_offset +Function + pa_get_use_dft_tic_lbl_fmt +Function + pa_get_zero_axis +Function + pa_get_zero_axis_width +Function - -
    procedure , public - :: get_autoscale + :: get_zero_axis_line_width => - pa_get_autoscale + pa_get_zero_axis_width Function
    procedure , public - :: get_command_string + :: is_title_defined => - pa_get_cmd_string + pa_has_title Function
    procedure , public - :: get_id_string + :: set_autoscale => - xa_get_id -Function
    procedure , public - :: get_is_log_scaled + :: set_is_log_scaled => - pa_get_log_scale -Function
    procedure , public - :: get_limits + :: set_limits => - pa_get_axis_limits -Function
    procedure , public - :: get_tic_label_format + :: set_offset_tics => - pa_get_tic_label_fmt -Function
    procedure , public - :: get_title + :: set_show_tic_labels => - pa_get_title -Function
    procedure , public - :: get_use_default_tic_label_format + :: set_tic_label_alignment => - pa_get_use_dft_tic_lbl_fmt -Function
    procedure , public - :: get_zero_axis + :: set_tic_label_angle => - pa_get_zero_axis -Function
    procedure , public - :: get_zero_axis_line_width + :: set_tic_label_format => - pa_get_zero_axis_width -Function
    procedure , public - :: is_title_defined + :: set_tic_label_rotation_origin => - pa_has_title -Function
    procedure , public - :: set_autoscale + :: set_tic_label_x_offset => - pa_set_autoscale + pa_set_tic_x_offset Subroutine
    procedure , public - :: set_is_log_scaled + :: set_tic_label_y_offset => - pa_set_log_scale + pa_set_tic_y_offset Subroutine
    procedure , public - :: set_limits + :: set_title => - pa_set_axis_limits + pa_set_title Subroutine
    procedure , public - :: set_tic_label_format + :: set_title_x_offset => - pa_set_tic_label_fmt + pa_set_title_x_offset Subroutine
    procedure , public - :: set_title + :: set_title_y_offset => - pa_set_title + pa_set_title_y_offset Subroutine
    procedure , public - :: get_id_string + :: get_id_string => - y2a_get_id + xa_get_id Function
    procedure , public - :: get_tic_label_format + :: get_offset_tics => - pa_get_tic_label_fmt + pa_get_offset_tics Function
    procedure , public - :: get_title + :: get_show_tic_labels => - pa_get_title + pa_get_show_tic_labels Function
    procedure , public - :: get_use_default_tic_label_format + :: get_tic_label_alignment => - pa_get_use_dft_tic_lbl_fmt + pa_get_tic_label_alignment Function
    procedure , public - :: get_zero_axis + :: get_tic_label_angle => - pa_get_zero_axis + pa_get_tic_label_angle Function
    procedure , public - :: get_zero_axis_line_width + :: get_tic_label_format => - pa_get_zero_axis_width + pa_get_tic_label_fmt Function
    procedure , public - :: is_title_defined + :: get_tic_label_rotation_origin => - pa_has_title + pa_get_tic_rotation_origin Function
    procedure , public - :: set_autoscale + :: get_tic_label_x_offset => - pa_set_autoscale -Subroutine
    procedure , public - :: set_is_log_scaled + :: get_tic_label_y_offset => - pa_set_log_scale -Subroutine
    procedure , public - :: set_limits + :: get_title => - pa_set_axis_limits -Subroutine
    procedure , public - :: set_tic_label_format + :: get_title_x_offset => - pa_set_tic_label_fmt -Subroutine
    procedure , public - :: set_title + :: get_title_y_offset => - pa_set_title -Subroutine
    procedure , public - :: set_use_default_tic_label_format + :: get_use_default_tic_label_format => - pa_set_use_dft_tic_lbl_fmt -Subroutine
    procedure , public - :: set_zero_axis + :: get_zero_axis => - pa_set_zero_axis -Subroutine
    procedure , public - :: set_zero_axis_line_width + :: get_zero_axis_line_width => - pa_set_zero_axis_width -Subroutine
    -
    -
    - -
    -
    - -

    - type, public, extends(plot_axis) ::  - y_axis - -

    -
    -
    -

    Defines a y-axis object.

    - - - - -

    Type-Bound Procedures

    - - @@ -984,29 +928,675 @@

    Type-Bound Procedures

    + pa_set_autoscale +Subroutine + pa_set_log_scale +Subroutine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    procedure , public - :: get_autoscale + :: is_title_defined => - pa_get_autoscale + pa_has_title Function
    procedure , public - :: get_command_string + :: set_autoscale => - pa_get_cmd_string -Function
    procedure , public - :: get_id_string + :: set_is_log_scaled => - ya_get_id -Function
    procedure , public - :: get_is_log_scaled + :: set_limits => - pa_get_log_scale + pa_set_axis_limits +Subroutine
    + procedure + , public + :: set_offset_tics + => + pa_set_offset_tics +Subroutine
    + procedure + , public + :: set_show_tic_labels + => + pa_set_show_tic_labels +Subroutine
    + procedure + , public + :: set_tic_label_alignment + => + pa_set_tic_label_alignment +Subroutine
    + procedure + , public + :: set_tic_label_angle + => + pa_set_tic_label_angle +Subroutine
    + procedure + , public + :: set_tic_label_format + => + pa_set_tic_label_fmt +Subroutine
    + procedure + , public + :: set_tic_label_rotation_origin + => + pa_set_tic_rotation_origin +Subroutine
    + procedure + , public + :: set_tic_label_x_offset + => + pa_set_tic_x_offset +Subroutine
    + procedure + , public + :: set_tic_label_y_offset + => + pa_set_tic_y_offset +Subroutine
    + procedure + , public + :: set_title + => + pa_set_title +Subroutine
    + procedure + , public + :: set_title_x_offset + => + pa_set_title_x_offset +Subroutine
    + procedure + , public + :: set_title_y_offset + => + pa_set_title_y_offset +Subroutine
    + procedure + , public + :: set_use_default_tic_label_format + => + pa_set_use_dft_tic_lbl_fmt +Subroutine
    + procedure + , public + :: set_zero_axis + => + pa_set_zero_axis +Subroutine
    + procedure + , public + :: set_zero_axis_line_width + => + pa_set_zero_axis_width +Subroutine
    +
    +
    + +
    +
    + +

    + type, public, extends(plot_axis) ::  + y2_axis + +

    +
    +
    +

    Defines a secondary y-axis object.

    + + + + +

    Type-Bound Procedures

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + procedure + , public + :: get_autoscale + => + pa_get_autoscale +Function
    + procedure + , public + :: get_command_string + => + pa_get_cmd_string +Function
    + procedure + , public + :: get_id_string + => + y2a_get_id +Function
    + procedure + , public + :: get_is_log_scaled + => + pa_get_log_scale +Function
    + procedure + , public + :: get_limits + => + pa_get_axis_limits +Function
    + procedure + , public + :: get_offset_tics + => + pa_get_offset_tics +Function
    + procedure + , public + :: get_show_tic_labels + => + pa_get_show_tic_labels +Function
    + procedure + , public + :: get_tic_label_alignment + => + pa_get_tic_label_alignment +Function
    + procedure + , public + :: get_tic_label_angle + => + pa_get_tic_label_angle +Function
    + procedure + , public + :: get_tic_label_format + => + pa_get_tic_label_fmt +Function
    + procedure + , public + :: get_tic_label_rotation_origin + => + pa_get_tic_rotation_origin +Function
    + procedure + , public + :: get_tic_label_x_offset + => + pa_get_tic_x_offset +Function
    + procedure + , public + :: get_tic_label_y_offset + => + pa_get_tic_y_offset +Function
    + procedure + , public + :: get_title + => + pa_get_title +Function
    + procedure + , public + :: get_title_x_offset + => + pa_get_title_x_offset +Function
    + procedure + , public + :: get_title_y_offset + => + pa_get_title_y_offset +Function
    + procedure + , public + :: get_use_default_tic_label_format + => + pa_get_use_dft_tic_lbl_fmt +Function
    + procedure + , public + :: get_zero_axis + => + pa_get_zero_axis +Function
    + procedure + , public + :: get_zero_axis_line_width + => + pa_get_zero_axis_width +Function
    + procedure + , public + :: is_title_defined + => + pa_has_title +Function
    + procedure + , public + :: set_autoscale + => + pa_set_autoscale +Subroutine
    + procedure + , public + :: set_is_log_scaled + => + pa_set_log_scale +Subroutine
    + procedure + , public + :: set_limits + => + pa_set_axis_limits +Subroutine
    + procedure + , public + :: set_offset_tics + => + pa_set_offset_tics +Subroutine
    + procedure + , public + :: set_show_tic_labels + => + pa_set_show_tic_labels +Subroutine
    + procedure + , public + :: set_tic_label_alignment + => + pa_set_tic_label_alignment +Subroutine
    + procedure + , public + :: set_tic_label_angle + => + pa_set_tic_label_angle +Subroutine
    + procedure + , public + :: set_tic_label_format + => + pa_set_tic_label_fmt +Subroutine
    + procedure + , public + :: set_tic_label_rotation_origin + => + pa_set_tic_rotation_origin +Subroutine
    + procedure + , public + :: set_tic_label_x_offset + => + pa_set_tic_x_offset +Subroutine
    + procedure + , public + :: set_tic_label_y_offset + => + pa_set_tic_y_offset +Subroutine
    + procedure + , public + :: set_title + => + pa_set_title +Subroutine
    + procedure + , public + :: set_title_x_offset + => + pa_set_title_x_offset +Subroutine
    + procedure + , public + :: set_title_y_offset + => + pa_set_title_y_offset +Subroutine
    + procedure + , public + :: set_use_default_tic_label_format + => + pa_set_use_dft_tic_lbl_fmt +Subroutine
    + procedure + , public + :: set_zero_axis + => + pa_set_zero_axis +Subroutine
    + procedure + , public + :: set_zero_axis_line_width + => + pa_set_zero_axis_width +Subroutine
    +
    +
    + +
    +
    + +

    + type, public, extends(plot_axis) ::  + y_axis + +

    +
    +
    +

    Defines a y-axis object.

    + + + + +

    Type-Bound Procedures

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1014,9 +1604,9 @@

    Type-Bound Procedures

    @@ -1024,9 +1614,29 @@

    Type-Bound Procedures

    + + + + + + + + @@ -1037,6 +1647,26 @@

    Type-Bound Procedures

    :: get_title => pa_get_title +Function + + + + + + + + @@ -1107,6 +1737,46 @@

    Type-Bound Procedures

    :: set_limits => pa_set_axis_limits +Subroutine + + + + + + + + + + + + + + + + @@ -1117,6 +1787,36 @@

    Type-Bound Procedures

    :: set_tic_label_format => pa_set_tic_label_fmt +Subroutine + + + + + + + + + + + + @@ -1127,6 +1827,26 @@

    Type-Bound Procedures

    :: set_title => pa_set_title +Subroutine + + + + + + + + @@ -1230,6 +1950,46 @@

    Type-Bound Procedures

    :: get_limits => pa_get_axis_limits +Function + + + + + + + + + + + + + + + + @@ -1240,6 +2000,36 @@

    Type-Bound Procedures

    :: get_tic_label_format => pa_get_tic_label_fmt +Function + + + + + + + + + + + + @@ -1250,6 +2040,26 @@

    Type-Bound Procedures

    :: get_title => pa_get_title +Function + + + + + + + + @@ -1320,6 +2130,46 @@

    Type-Bound Procedures

    :: set_limits => pa_set_axis_limits +Subroutine + + + + + + + + + + + + + + + + @@ -1330,6 +2180,36 @@

    Type-Bound Procedures

    :: set_tic_label_format => pa_set_tic_label_fmt +Subroutine + + + + + + + + + + + + @@ -1340,6 +2220,26 @@

    Type-Bound Procedures

    :: set_title => pa_set_title +Subroutine + + + + + + + + @@ -1400,7 +2300,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_bar.html b/doc/module/fplot_plot_bar.html index bfc68e2..84e315f 100644 --- a/doc/module/fplot_plot_bar.html +++ b/doc/module/fplot_plot_bar.html @@ -170,8 +170,8 @@

    Uses

  • @@ -340,6 +340,16 @@

    Type-Bound Procedures

    :: get_bar_width => pb_get_bar_width +Function + + + + @@ -420,6 +430,16 @@

    Type-Bound Procedures

    :: get_label_count => plt_get_label_count +Function + + + + @@ -430,6 +450,16 @@

    Type-Bound Procedures

    :: get_legend => plt_get_legend +Function + + + + @@ -490,6 +520,16 @@

    Type-Bound Procedures

    :: get_title => plt_get_title +Function + + + + @@ -660,6 +700,16 @@

    Type-Bound Procedures

    :: set_bar_width => pb_set_bar_width +Subroutine + + + + @@ -710,6 +760,26 @@

    Type-Bound Procedures

    :: set_label => plt_set_label +Subroutine + + + + + + + + @@ -760,6 +830,16 @@

    Type-Bound Procedures

    :: set_title => plt_set_title +Subroutine + + + + @@ -800,7 +880,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_data.html b/doc/module/fplot_plot_data.html index a229be7..9b3e5c5 100644 --- a/doc/module/fplot_plot_data.html +++ b/doc/module/fplot_plot_data.html @@ -96,7 +96,7 @@

    fplot_plot_data
  • 344 statements + title=" 4.7% of total for modules and submodules.">344 statements
  • @@ -187,13 +187,13 @@

    Uses

    @@ -1143,7 +1143,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_data_2d.html b/doc/module/fplot_plot_data_2d.html index 8cbb1e3..330d922 100644 --- a/doc/module/fplot_plot_data_2d.html +++ b/doc/module/fplot_plot_data_2d.html @@ -96,7 +96,7 @@

    fplot_plot_data_2d
  • 305 statements + title=" 4.2% of total for modules and submodules.">305 statements
  • @@ -170,11 +170,11 @@

    Uses

  • @@ -739,7 +739,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_data_3d.html b/doc/module/fplot_plot_data_3d.html index 8a5fcc9..01e4d71 100644 --- a/doc/module/fplot_plot_data_3d.html +++ b/doc/module/fplot_plot_data_3d.html @@ -96,7 +96,7 @@

    fplot_plot_data_3d
  • 309 statements + title=" 4.2% of total for modules and submodules.">309 statements
  • @@ -170,11 +170,11 @@

    Uses

  • @@ -733,7 +733,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_data_bar.html b/doc/module/fplot_plot_data_bar.html index f04c619..146bec0 100644 --- a/doc/module/fplot_plot_data_bar.html +++ b/doc/module/fplot_plot_data_bar.html @@ -96,7 +96,7 @@

    fplot_plot_data_bar
  • 351 statements + title=" 4.8% of total for modules and submodules.">351 statements
  • @@ -169,12 +169,12 @@

    Uses

    @@ -553,7 +553,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_data_error_bars.html b/doc/module/fplot_plot_data_error_bars.html index 0981fa4..64270a7 100644 --- a/doc/module/fplot_plot_data_error_bars.html +++ b/doc/module/fplot_plot_data_error_bars.html @@ -96,7 +96,7 @@

    fplot_plot_data_error_bars
  • 444 statements + title=" 6.1% of total for modules and submodules.">444 statements
  • @@ -170,11 +170,11 @@

    Uses

  • @@ -491,7 +491,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_data_histogram.html b/doc/module/fplot_plot_data_histogram.html index 1882903..41a1a59 100644 --- a/doc/module/fplot_plot_data_histogram.html +++ b/doc/module/fplot_plot_data_histogram.html @@ -96,7 +96,7 @@

    fplot_plot_data_histogram
  • 171 statements + title=" 2.5% of total for modules and submodules.">181 statements
  • @@ -169,11 +169,12 @@

    Uses

    @@ -231,7 +232,7 @@

    Derived Types

    - type, public, extends(plot_data_bar) ::  + type, public, extends(plot_data_colored) ::  plot_data_histogram

    @@ -249,49 +250,29 @@

    Type-Bound Procedures

  • - - - - - - - - + pdh_define_data +Subroutine + pdh_get_bin_data +Subroutine @@ -319,49 +300,9 @@

    Type-Bound Procedures

    - - - - - - - - - - - - - - - - @@ -369,9 +310,9 @@

    Type-Bound Procedures

    @@ -379,9 +320,9 @@

    Type-Bound Procedures

    @@ -389,9 +330,9 @@

    Type-Bound Procedures

    @@ -409,19 +350,9 @@

    Type-Bound Procedures

    - - - - @@ -429,9 +360,9 @@

    Type-Bound Procedures

    @@ -439,22 +370,12 @@

    Type-Bound Procedures

    - - - - - - - - - - - - - - - - @@ -519,19 +410,9 @@

    Type-Bound Procedures

    - - - - @@ -552,36 +433,6 @@

    Type-Bound Procedures

    :: set_name => pd_set_name -Subroutine - - - - - - - - - - - - @@ -612,7 +463,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_data_tri_2d.html b/doc/module/fplot_plot_data_tri_2d.html index ef9ec12..ecbc2d0 100644 --- a/doc/module/fplot_plot_data_tri_2d.html +++ b/doc/module/fplot_plot_data_tri_2d.html @@ -96,7 +96,7 @@

    fplot_plot_data_tri_2d
  • 155 statements + title=" 2.1% of total for modules and submodules.">155 statements
  • @@ -169,12 +169,12 @@

    Uses

    @@ -270,7 +270,7 @@

    Type-Bound Procedures

  • @@ -280,7 +280,7 @@

    Type-Bound Procedures

    @@ -403,7 +403,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_object.html b/doc/module/fplot_plot_object.html index 2ba488a..f9d8f35 100644 --- a/doc/module/fplot_plot_object.html +++ b/doc/module/fplot_plot_object.html @@ -357,7 +357,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_plot_polar.html b/doc/module/fplot_plot_polar.html index 55cd1e2..ba6b56d 100644 --- a/doc/module/fplot_plot_polar.html +++ b/doc/module/fplot_plot_polar.html @@ -96,7 +96,7 @@

    fplot_plot_polar
  • 181 statements + title=" 2.8% of total for modules and submodules.">206 statements
  • @@ -169,15 +169,15 @@

    Uses

    @@ -355,6 +355,16 @@

    Type-Bound Procedures

    :: get_axis_equal => plt_get_axis_equal +Function +
  • + + + @@ -372,7 +382,7 @@

    Type-Bound Procedures

    @@ -435,6 +445,16 @@

    Type-Bound Procedures

    :: get_label_count => plt_get_label_count +Function + + + + @@ -455,6 +475,16 @@

    Type-Bound Procedures

    :: get_radial_limits => plr_get_limits +Function + + + + @@ -525,6 +555,16 @@

    Type-Bound Procedures

    :: get_title => plt_get_title +Function + + + + @@ -655,6 +695,16 @@

    Type-Bound Procedures

    :: set_axis_equal => plt_set_axis_equal +Subroutine + + + + @@ -705,6 +755,16 @@

    Type-Bound Procedures

    :: set_label => plt_set_label +Subroutine + + + + @@ -715,6 +775,16 @@

    Type-Bound Procedures

    :: set_radial_limits => plr_set_limits +Subroutine + + + + @@ -775,6 +845,16 @@

    Type-Bound Procedures

    :: set_title => plt_set_title +Subroutine + + + + @@ -805,7 +885,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_png_terminal.html b/doc/module/fplot_png_terminal.html index 38c4e99..256b590 100644 --- a/doc/module/fplot_png_terminal.html +++ b/doc/module/fplot_png_terminal.html @@ -169,10 +169,10 @@

    Uses

    @@ -248,7 +248,7 @@

    Type-Bound Procedures

    @@ -431,7 +431,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_qt_terminal.html b/doc/module/fplot_qt_terminal.html index 8ebe424..a03d8b1 100644 --- a/doc/module/fplot_qt_terminal.html +++ b/doc/module/fplot_qt_terminal.html @@ -169,8 +169,8 @@

    Uses

    @@ -246,7 +246,7 @@

    Type-Bound Procedures

    @@ -409,7 +409,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_simplify.html b/doc/module/fplot_simplify.html index f1048a3..f779d45 100644 --- a/doc/module/fplot_simplify.html +++ b/doc/module/fplot_simplify.html @@ -96,7 +96,7 @@

    fplot_simplify
  • 219 statements + title=" 3.0% of total for modules and submodules.">219 statements
  • @@ -540,7 +540,7 @@

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_stats_plots.html b/doc/module/fplot_stats_plots.html new file mode 100644 index 0000000..a35ae9b --- /dev/null +++ b/doc/module/fplot_stats_plots.html @@ -0,0 +1,450 @@ + + + + + + + + + + + fplot_stats_plots – FPLOT + + + + + + + + + + + + + + + + + + + + +
    +
    +

    fplot_stats_plots + Module + +

    +
    +
    +
    + + +
    +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    +

    Contents

    + + + + + + + + + + +
    +
    +

    + Derived Types +

    +
    + +
    + + + + + + + + + + + +
    +
    + + + + + + +
    +

    Derived Types

    +
    +
    + +

    + type, public, extends(plot_object) ::  + correlation_plot + +

    +
    +
    +

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

    + + + + +

    Type-Bound Procedures

    +

  • + procedure + , public + :: get_autoscale + => + pa_get_autoscale +Function
    + procedure + , public + :: get_command_string + => + pa_get_cmd_string +Function
    + procedure + , public + :: get_id_string + => + ya_get_id +Function
    + procedure + , public + :: get_is_log_scaled + => + pa_get_log_scale +Function
    + procedure + , public + :: get_limits + => + pa_get_axis_limits +Function
    + procedure + , public + :: get_offset_tics + => + pa_get_offset_tics +Function
    + procedure + , public + :: get_show_tic_labels + => + pa_get_show_tic_labels +Function
    + procedure + , public + :: get_tic_label_alignment + => + pa_get_tic_label_alignment +Function
    + procedure + , public + :: get_tic_label_angle + => + pa_get_tic_label_angle Function
    procedure , public - :: get_limits + :: get_tic_label_format => - pa_get_axis_limits + pa_get_tic_label_fmt Function
    procedure , public - :: get_tic_label_format + :: get_tic_label_rotation_origin => - pa_get_tic_label_fmt + pa_get_tic_rotation_origin +Function
    + procedure + , public + :: get_tic_label_x_offset + => + pa_get_tic_x_offset +Function
    + procedure + , public + :: get_tic_label_y_offset + => + pa_get_tic_y_offset Function
    + procedure + , public + :: get_title_x_offset + => + pa_get_title_x_offset +Function
    + procedure + , public + :: get_title_y_offset + => + pa_get_title_y_offset Function
    + procedure + , public + :: set_offset_tics + => + pa_set_offset_tics +Subroutine
    + procedure + , public + :: set_show_tic_labels + => + pa_set_show_tic_labels +Subroutine
    + procedure + , public + :: set_tic_label_alignment + => + pa_set_tic_label_alignment +Subroutine
    + procedure + , public + :: set_tic_label_angle + => + pa_set_tic_label_angle Subroutine
    + procedure + , public + :: set_tic_label_rotation_origin + => + pa_set_tic_rotation_origin +Subroutine
    + procedure + , public + :: set_tic_label_x_offset + => + pa_set_tic_x_offset +Subroutine
    + procedure + , public + :: set_tic_label_y_offset + => + pa_set_tic_y_offset Subroutine
    + procedure + , public + :: set_title_x_offset + => + pa_set_title_x_offset +Subroutine
    + procedure + , public + :: set_title_y_offset + => + pa_set_title_y_offset Subroutine
    + procedure + , public + :: get_offset_tics + => + pa_get_offset_tics +Function
    + procedure + , public + :: get_show_tic_labels + => + pa_get_show_tic_labels +Function
    + procedure + , public + :: get_tic_label_alignment + => + pa_get_tic_label_alignment +Function
    + procedure + , public + :: get_tic_label_angle + => + pa_get_tic_label_angle Function
    + procedure + , public + :: get_tic_label_rotation_origin + => + pa_get_tic_rotation_origin +Function
    + procedure + , public + :: get_tic_label_x_offset + => + pa_get_tic_x_offset +Function
    + procedure + , public + :: get_tic_label_y_offset + => + pa_get_tic_y_offset Function
    + procedure + , public + :: get_title_x_offset + => + pa_get_title_x_offset +Function
    + procedure + , public + :: get_title_y_offset + => + pa_get_title_y_offset Function
    + procedure + , public + :: set_offset_tics + => + pa_set_offset_tics +Subroutine
    + procedure + , public + :: set_show_tic_labels + => + pa_set_show_tic_labels +Subroutine
    + procedure + , public + :: set_tic_label_alignment + => + pa_set_tic_label_alignment +Subroutine
    + procedure + , public + :: set_tic_label_angle + => + pa_set_tic_label_angle Subroutine
    + procedure + , public + :: set_tic_label_rotation_origin + => + pa_set_tic_rotation_origin +Subroutine
    + procedure + , public + :: set_tic_label_x_offset + => + pa_set_tic_x_offset +Subroutine
    + procedure + , public + :: set_tic_label_y_offset + => + pa_set_tic_y_offset Subroutine
    + procedure + , public + :: set_title_x_offset + => + pa_set_title_x_offset +Subroutine
    + procedure + , public + :: set_title_y_offset + => + pa_set_title_y_offset Subroutine
    + procedure + , public + :: get_bottom_margin + => + plt_get_bottom_margin Function
    + procedure + , public + :: get_left_margin + => + plt_get_left_margin Function
    + procedure + , public + :: get_right_margin + => + plt_get_right_margin Function
    + procedure + , public + :: get_top_margin + => + plt_get_top_margin Function
    + procedure + , public + :: set_bottom_margin + => + plt_set_bottom_margin Subroutine
    + procedure + , public + :: set_left_margin + => + plt_set_left_margin +Subroutine
    + procedure + , public + :: set_right_margin + => + plt_set_right_margin Subroutine
    + procedure + , public + :: set_top_margin + => + plt_set_top_margin Subroutine
    procedure , public - :: bin_data - => - pdh_bin_data -Function
    -generic, - public :: define_data => - pdb_set_data_1, pdb_set_data_2, pdb_set_data_3 -
    - procedure - , public - :: get - => - pdb_get_data -Function
    procedure , public - :: get_axes_string + :: get => - pdb_get_axes_cmd -Function
    procedure , public - :: get_bar_per_label_count + :: get_axes_string => - pdb_get_col_count + pdh_get_axes_cmd Function
    procedure , public - :: get_command_string - => - pdb_get_cmd -Function
    - procedure - , public - :: get_count - => - pdb_get_count -Function
    - procedure - , public - :: get_data - => - pdb_get_data_set -Function
    - procedure - , public - :: get_data_string - => - pdb_get_data_cmd -Function
    - procedure - , public - :: get_draw_against_y2 + :: get_command_string => - pdb_get_use_y2 + pdh_get_cmd Function
    procedure , public - :: get_extreme_values + :: get_data_string => - pdh_get_extremes + pdh_get_data_cmd Function
    procedure , public - :: get_is_filled + :: get_draw_against_y2 => - pdb_get_is_filled + pdh_get_use_y2 Function
    procedure , public - :: get_label + :: get_is_filled => - pdb_get_label + pdh_get_is_filled Function
    procedure , public - :: get_name - => - pd_get_name -Function
    - procedure - , public - :: get_number_format + :: get_maximum_value => - pdh_get_num_fmt + pdh_get_max_x Function
    procedure , public - :: get_transparency + :: get_minimum_value => - pdb_get_alpha + pdh_get_min_x Function
    procedure , public - :: get_use_labels + :: get_name => - pdb_get_use_labels + pd_get_name Function
    - procedure - , public - :: set - => - pdb_set_data -Subroutine
    procedure @@ -479,39 +400,9 @@

    Type-Bound Procedures

    procedure , public - :: set_data_1 - => - pdh_set_data_1 -Subroutine
    - procedure - , public - :: set_data_2 - => - pdh_set_data_2 -Subroutine
    - procedure - , public - :: set_data_3 - => - pdh_set_data_3 -Subroutine
    - procedure - , public - :: set_draw_against_y2 + :: set_draw_against_y2 => - pdb_set_use_y2 + pdh_set_use_y2 Subroutine
    procedure , public - :: set_is_filled + :: set_is_filled => - pdb_set_is_filled -Subroutine
    - procedure - , public - :: set_label - => - pdb_set_label + pdh_set_is_filled Subroutine
    - procedure - , public - :: set_number_format - => - pdh_set_num_fmt -Subroutine
    - procedure - , public - :: set_transparency - => - pdb_set_alpha -Subroutine
    - procedure - , public - :: set_use_labels - => - pdb_set_use_labels Subroutine
    procedure , public - :: get_command_string + :: get_command_string => pdt2d_get_cmd Function procedure , public - :: get_data_string + :: get_data_string => pdt2d_get_data_cmd Function
    + procedure + , public + :: get_bottom_margin + => + plt_get_bottom_margin Function
    procedure , public - :: get_command_string + :: get_command_string => plr_get_cmd Function
    + procedure + , public + :: get_left_margin + => + plt_get_left_margin Function
    + procedure + , public + :: get_right_margin + => + plt_get_right_margin Function
    + procedure + , public + :: get_top_margin + => + plt_get_top_margin Function
    + procedure + , public + :: set_bottom_margin + => + plt_set_bottom_margin Subroutine
    + procedure + , public + :: set_left_margin + => + plt_set_left_margin Subroutine
    + procedure + , public + :: set_right_margin + => + plt_set_right_margin Subroutine
    + procedure + , public + :: set_top_margin + => + plt_set_top_margin Subroutine
    procedure , public - :: get_command_string + :: get_command_string => png_get_command_string Function procedure , public - :: get_command_string + :: get_command_string => term_get_command_string Function
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + procedure + , public + :: draw + => + cp_draw +Subroutine
    + procedure + , public + :: get + => + cp_get +Function
    + procedure + , public + :: get_column_count + => + cp_get_cols +Function
    + procedure + , public + :: get_command_string + => + cp_get_command +Function
    + procedure + , public + :: get_font_name + => + cp_get_font +Function
    + procedure + , public + :: get_font_size + => + cp_get_font_size +Function
    + procedure + , public + :: get_plot_count + => + cp_get_count +Function
    + procedure + , public + :: get_row_count + => + cp_get_rows +Function
    + procedure + , public + :: get_terminal + => + cp_get_term +Function
    + procedure + , public + :: initialize + => + cp_init +Subroutine
    + procedure + , public + :: save_file + => + cp_save +Subroutine
    + procedure + , public + :: set_font_name + => + cp_set_font +Subroutine
    + procedure + , public + :: set_font_size + => + cp_set_font_size +Subroutine
    +
    +
    + + +
    + + + + + + + + +
    + +
    +
    +
    +

    FPLOT was developed by Jason Christopherson
    © 2025 +

    +
    +
    +

    + Documentation generated by + FORD + on 2025-04-10 13:38

    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/module/fplot_surface_plot.html b/doc/module/fplot_surface_plot.html index 033756e..73d35b8 100644 --- a/doc/module/fplot_surface_plot.html +++ b/doc/module/fplot_surface_plot.html @@ -96,7 +96,7 @@

    fplot_surface_plot
  • 172 statements + title=" 2.3% of total for modules and submodules.">172 statements
  • @@ -170,11 +170,11 @@

    Uses

  • @@ -353,6 +353,16 @@

    Type-Bound Procedures

    :: get_azimuth => p3d_get_azimuth +Function + + + + + procedure + , public + :: get_bottom_margin + => + plt_get_bottom_margin Function @@ -370,7 +380,7 @@

    Type-Bound Procedures

    procedure , public - :: get_command_string + :: get_command_string => surf_get_cmd Function @@ -453,6 +463,16 @@

    Type-Bound Procedures

    :: get_label_count => plt_get_label_count +Function + + + + + procedure + , public + :: get_left_margin + => + plt_get_left_margin Function @@ -473,6 +493,16 @@

    Type-Bound Procedures

    :: get_light_intensity => surf_get_light_intensity +Function + + + + + procedure + , public + :: get_right_margin + => + plt_get_right_margin Function @@ -553,6 +583,16 @@

    Type-Bound Procedures

    :: get_title => plt_get_title +Function + + + + + procedure + , public + :: get_top_margin + => + plt_get_top_margin Function @@ -630,7 +670,7 @@

    Type-Bound Procedures

    procedure , public - :: initialize + :: initialize => surf_init Subroutine @@ -763,6 +803,16 @@

    Type-Bound Procedures

    :: set_azimuth => p3d_set_azimuth +Subroutine + + + + + procedure + , public + :: set_bottom_margin + => + plt_set_bottom_margin Subroutine @@ -833,6 +883,16 @@

    Type-Bound Procedures

    :: set_label => plt_set_label +Subroutine + + + + + procedure + , public + :: set_left_margin + => + plt_set_left_margin Subroutine @@ -843,6 +903,16 @@

    Type-Bound Procedures

    :: set_light_intensity => surf_set_light_intensity +Subroutine + + + + + procedure + , public + :: set_right_margin + => + plt_set_right_margin Subroutine @@ -913,6 +983,16 @@

    Type-Bound Procedures

    :: set_title => plt_set_title +Subroutine + + + + + procedure + , public + :: set_top_margin + => + plt_set_top_margin Subroutine @@ -983,7 +1063,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_surface_plot_data.html b/doc/module/fplot_surface_plot_data.html index d720881..2047a4b 100644 --- a/doc/module/fplot_surface_plot_data.html +++ b/doc/module/fplot_surface_plot_data.html @@ -96,7 +96,7 @@

    fplot_surface_plot_data
  • 197 statements + title=" 2.7% of total for modules and submodules.">197 statements
  • @@ -170,10 +170,10 @@

    Uses

  • @@ -259,7 +259,7 @@

    Type-Bound Procedures

    procedure , public - :: get_command_string + :: get_command_string => surfd_get_cmd Function @@ -269,7 +269,7 @@

    Type-Bound Procedures

    procedure , public - :: get_data_string + :: get_data_string => surfd_get_data_cmd Function @@ -412,7 +412,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_terminal.html b/doc/module/fplot_terminal.html index 0282f85..2c6d63b 100644 --- a/doc/module/fplot_terminal.html +++ b/doc/module/fplot_terminal.html @@ -96,7 +96,7 @@

    fplot_terminal
  • 162 statements + title=" 2.2% of total for modules and submodules.">162 statements
  • @@ -181,10 +181,10 @@

    Uses

    @@ -329,7 +329,7 @@

    Type-Bound Procedures

    procedure , public - :: get_command_string + :: get_command_string => term_get_command_string Function @@ -490,7 +490,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_tri_surface_plot_data.html b/doc/module/fplot_tri_surface_plot_data.html index 372e709..7679792 100644 --- a/doc/module/fplot_tri_surface_plot_data.html +++ b/doc/module/fplot_tri_surface_plot_data.html @@ -96,7 +96,7 @@

    fplot_tri_surface_plot_data
  • 128 statements + title=" 1.7% of total for modules and submodules.">128 statements
  • @@ -169,10 +169,10 @@

    Uses

    @@ -259,7 +259,7 @@

    Type-Bound Procedures

    procedure , public - :: get_command_string + :: get_command_string => tspd_get_cmd Function @@ -269,7 +269,7 @@

    Type-Bound Procedures

    procedure , public - :: get_data_string + :: get_data_string => tspd_get_data_cmd Function @@ -342,7 +342,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_triangulations_delaunay_2d.html b/doc/module/fplot_triangulations_delaunay_2d.html index 9cf8d44..4b95a62 100644 --- a/doc/module/fplot_triangulations_delaunay_2d.html +++ b/doc/module/fplot_triangulations_delaunay_2d.html @@ -96,7 +96,7 @@

    fplot_triangulations_delaunay_2d
  • 149 statements + title=" 2.0% of total for modules and submodules.">149 statements
  • @@ -169,10 +169,10 @@

    Uses

    @@ -341,7 +341,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_vector_field_plot_data.html b/doc/module/fplot_vector_field_plot_data.html index d793cf1..a3bb480 100644 --- a/doc/module/fplot_vector_field_plot_data.html +++ b/doc/module/fplot_vector_field_plot_data.html @@ -96,7 +96,7 @@

    fplot_vector_field_plot_data
  • 195 statements + title=" 2.7% of total for modules and submodules.">195 statements
  • @@ -170,11 +170,11 @@

    Uses

  • @@ -280,7 +280,7 @@

    Type-Bound Procedures

    procedure , public - :: get_command_string + :: get_command_string => vfpd_get_cmd Function @@ -290,7 +290,7 @@

    Type-Bound Procedures

    procedure , public - :: get_data_string + :: get_data_string => vfpd_get_data_cmd Function @@ -413,7 +413,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_windows_terminal.html b/doc/module/fplot_windows_terminal.html index 74309a1..15b14a0 100644 --- a/doc/module/fplot_windows_terminal.html +++ b/doc/module/fplot_windows_terminal.html @@ -169,8 +169,8 @@

    Uses

    @@ -246,7 +246,7 @@

    Type-Bound Procedures

    procedure , public - :: get_command_string + :: get_command_string => term_get_command_string Function @@ -409,7 +409,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/module/fplot_wxt_terminal.html b/doc/module/fplot_wxt_terminal.html index b27c02d..8f39982 100644 --- a/doc/module/fplot_wxt_terminal.html +++ b/doc/module/fplot_wxt_terminal.html @@ -169,8 +169,8 @@

    Uses

    @@ -246,7 +246,7 @@

    Type-Bound Procedures

    procedure , public - :: get_command_string + :: get_command_string => term_get_command_string Function @@ -409,7 +409,7 @@

    Type-Bound Procedures

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/proc/linspace.html b/doc/proc/linspace.html index 874019d..d68602f 100644 --- a/doc/proc/linspace.html +++ b/doc/proc/linspace.html @@ -276,7 +276,7 @@

    Contents

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/proc/logspace.html b/doc/proc/logspace.html index d9b6994..ad4b51a 100644 --- a/doc/proc/logspace.html +++ b/doc/proc/logspace.html @@ -276,7 +276,7 @@

    Contents

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/proc/meshgrid.html b/doc/proc/meshgrid.html index f58edf2..1aa8aa5 100644 --- a/doc/proc/meshgrid.html +++ b/doc/proc/meshgrid.html @@ -262,7 +262,7 @@

    Contents

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/proc/report_array_size_mismatch_error.html b/doc/proc/report_array_size_mismatch_error.html index 9979dde..d44769e 100644 --- a/doc/proc/report_array_size_mismatch_error.html +++ b/doc/proc/report_array_size_mismatch_error.html @@ -357,7 +357,7 @@

    Variables

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/proc/report_file_create_error.html b/doc/proc/report_file_create_error.html index a113b64..cbd58e1 100644 --- a/doc/proc/report_file_create_error.html +++ b/doc/proc/report_file_create_error.html @@ -342,7 +342,7 @@

    Variables

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/proc/report_matrix_size_mismatch_error.html b/doc/proc/report_matrix_size_mismatch_error.html index 3e8e5a8..e341fe0 100644 --- a/doc/proc/report_matrix_size_mismatch_error.html +++ b/doc/proc/report_matrix_size_mismatch_error.html @@ -387,7 +387,7 @@

    Variables

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/proc/report_memory_error.html b/doc/proc/report_memory_error.html index f4f586b..7012fdc 100644 --- a/doc/proc/report_memory_error.html +++ b/doc/proc/report_memory_error.html @@ -327,7 +327,7 @@

    Variables

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/search.html b/doc/search.html index dd2dad3..2f0d714 100644 --- a/doc/search.html +++ b/doc/search.html @@ -119,7 +119,7 @@

    Search Results

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_arrow.f90.html b/doc/sourcefile/fplot_arrow.f90.html index 6c37838..7d3b84e 100644 --- a/doc/sourcefile/fplot_arrow.f90.html +++ b/doc/sourcefile/fplot_arrow.f90.html @@ -96,7 +96,7 @@

    fplot_arrow.f90
  • 296 statements + title=" 4.0% of total for source files.">296 statements
  • @@ -802,7 +802,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_colormap.f90.html b/doc/sourcefile/fplot_colormap.f90.html index f7d2fad..94e3cff 100644 --- a/doc/sourcefile/fplot_colormap.f90.html +++ b/doc/sourcefile/fplot_colormap.f90.html @@ -96,7 +96,7 @@

    fplot_colormap.f90
  • 282 statements + title=" 3.9% of total for source files.">284 statements
  • @@ -621,8 +621,8 @@

    Source Code

    !! The command string. type(string_builder) :: str - integer(int32) :: i, n, r, g, b - type(color) :: clr + integer(int32) :: i, n, r, g, b, c + character(len = 6) :: ctxt if (.not.associated(this%m_map)) then allocate(character(len = 0) :: x) @@ -632,77 +632,79 @@

    Source Code

    n = this%m_map%get_levels() do i = 0, n - 1 ! Get the RGB triple - call this%m_map%get_RGB(i, clr%red, clr%green, clr%blue) - - ! Append the color information - call str%append(to_string(i)) - call str%append(" '#") - call str%append(clr%to_hex_string()) - call str%append("'") - if (i /= n - 1) then - call str%append(",") - end if - end do - - x = char(str%to_string()) - end function - -! ------------------------------------------------------------------------------ - subroutine custom_set(this, map, err) - !! Sets the FORCOLORMAP colormap object. - class(custom_colormap), intent(inout) :: this - !! The custom_colormap object. - class(cmap), intent(in) :: map - !! The FORCOLORMAP colormap object. The custom_colormap object - !! stores a copy of this object; therefore, any changes made to - !! x after calls to this routine will not impact the behavior of - !! the custom_colormap object. - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Local Variables - integer(int32) :: flag - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - - ! Process - if (associated(this%m_map)) deallocate(this%m_map) - allocate(this%m_map, source = map, stat = flag) - if (flag /= 0) then - call report_memory_error(errmgr, "custom_set", flag) - return - end if - end subroutine - -! ------------------------------------------------------------------------------ - function custom_get(this) result(rst) - !! Gets a pointer to the FORCOLORMAP colormap object. - class(custom_colormap), intent(in) :: this - !! The custom_colormap object. - class(cmap), pointer :: rst - !! A pointer to the FORCOLORMAP colormap object. - rst => this%m_map - end function - -! ------------------------------------------------------------------------------ - subroutine custom_final(this) - type(custom_colormap), intent(inout) :: this - !! The custom_colormap object. - if (associated(this%m_map)) then - deallocate(this%m_map) - nullify(this%m_map) - end if - end subroutine - -! ------------------------------------------------------------------------------ -end module + call this%m_map%get_RGB(i, r, g, b) + c = ishft(r, 16) + ishft(g, 8) + b + write(ctxt, '(Z6.6)') c + + ! Append the color information + call str%append(to_string(i)) + call str%append(" '#") + call str%append(ctxt) + call str%append("'") + if (i /= n - 1) then + call str%append(",") + end if + end do + + x = char(str%to_string()) + end function + +! ------------------------------------------------------------------------------ + subroutine custom_set(this, map, err) + !! Sets the FORCOLORMAP colormap object. + class(custom_colormap), intent(inout) :: this + !! The custom_colormap object. + class(cmap), intent(in) :: map + !! The FORCOLORMAP colormap object. The custom_colormap object + !! stores a copy of this object; therefore, any changes made to + !! x after calls to this routine will not impact the behavior of + !! the custom_colormap object. + class(errors), intent(inout), optional, target :: err + !! An error handling object. + + ! Local Variables + integer(int32) :: flag + class(errors), pointer :: errmgr + type(errors), target :: deferr + + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + + ! Process + if (associated(this%m_map)) deallocate(this%m_map) + allocate(this%m_map, source = map, stat = flag) + if (flag /= 0) then + call report_memory_error(errmgr, "custom_set", flag) + return + end if + end subroutine + +! ------------------------------------------------------------------------------ + function custom_get(this) result(rst) + !! Gets a pointer to the FORCOLORMAP colormap object. + class(custom_colormap), intent(in) :: this + !! The custom_colormap object. + class(cmap), pointer :: rst + !! A pointer to the FORCOLORMAP colormap object. + rst => this%m_map + end function + +! ------------------------------------------------------------------------------ + subroutine custom_final(this) + type(custom_colormap), intent(inout) :: this + !! The custom_colormap object. + if (associated(this%m_map)) then + deallocate(this%m_map) + nullify(this%m_map) + end if + end subroutine + +! ------------------------------------------------------------------------------ +end module @@ -721,7 +723,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_colors.f90.html b/doc/sourcefile/fplot_colors.f90.html index 2c1846d..e297d3d 100644 --- a/doc/sourcefile/fplot_colors.f90.html +++ b/doc/sourcefile/fplot_colors.f90.html @@ -96,7 +96,7 @@

    fplot_colors.f90
  • 107 statements + title=" 1.6% of total for source files.">115 statements
  • @@ -249,152 +249,163 @@

    Source Code

    !! The green component of the color (must be between 0 and 255). integer(int32), public :: blue = 255 !! The blue component of the color (must be between 0 and 255). - contains - procedure, public, pass :: to_hex_string => clr_to_hex_string - procedure, public, pass :: copy_from => clr_copy_from - end type - - interface operator(==) - module procedure :: clr_equals - end interface - - interface operator(/=) - module procedure :: clr_not_equals - end interface - - type(color), parameter :: CLR_BLACK = color(0, 0, 0) - !! Black. - type(color), parameter :: CLR_WHITE = color(255, 255, 255) - !! White. - type(color), parameter :: CLR_RED = color(255, 0, 0) - !! Red. - type(color), parameter :: CLR_LIME = color(0, 255, 0) - !! Lime. - type(color), parameter :: CLR_BLUE = color(0, 0, 255) - !! Blue. - type(color), parameter :: CLR_YELLOW = color(255, 255, 0) - !! Yellow. - type(color), parameter :: CLR_CYAN = color(0, 255, 255) - !! Cyan. - type(color), parameter :: CLR_MAGENTA = color(255, 0, 255) - !! Magenta. - type(color), parameter :: CLR_SILVER = color(192, 192, 192) - !! Silver. - type(color), parameter :: CLR_GRAY = color(128, 128, 128) - !! Gray. - type(color), parameter :: CLR_MAROON = color(128, 0, 0) - !! Maroon. - type(color), parameter :: CLR_OLIVE = color(128, 128, 0) - !! Olive. - type(color), parameter :: CLR_GREEN = color(0, 128, 0) - !! Green. - type(color), parameter :: CLR_PURPLE = color(128, 0, 128) - !! Purple. - type(color), parameter :: CLR_TEAL = color(0, 128, 128) - !! Teal. - type(color), parameter :: CLR_NAVY = color(0, 0, 128) - !! Navy. - type(color), parameter :: CLR_ORANGE = color(255, 165, 0) - !! Orange. - - ! A list of colors that can be cycled through by plotting code - type(color), parameter, dimension(7) :: color_list = [ & - color(0, int(0.447 * 255), int(0.741 * 255)), & - color(int(0.85 * 255), int(0.325 * 255), int(0.098 * 255)), & - color(int(0.929 * 255), int(0.694 * 255), int(0.125 * 255)), & - color(int(0.494 * 255), int(0.184 * 255), int(0.556 * 255)), & - color(int(0.466 * 255), int(0.674 * 255), int(0.188 * 255)), & - color(int(0.301 * 255), int(0.745 * 255), int(0.933 * 255)), & - color(int(0.635 * 255), int(0.078 * 255), int(0.184 * 255))] - -contains -! ------------------------------------------------------------------------------ - pure function clr_to_hex_string(this) result(txt) - !! Returns the color in hexadecimal format. - class(color), intent(in) :: this - !! The color object. - character(6) :: txt - !! A string containing the hexadecimal equivalent. - - ! Local Variables - integer(int32) :: r, g, b, clr + integer(int32), public :: alpha = 0 + !! The alpha component of the color (must be between 0 and 255). + !! Notice, 0 is fully opaque and 255 is fully transparent. + contains + procedure, public, pass :: to_hex_string => clr_to_hex_string + procedure, public, pass :: copy_from => clr_copy_from + end type + + interface operator(==) + module procedure :: clr_equals + end interface + + interface operator(/=) + module procedure :: clr_not_equals + end interface + + type(color), parameter :: CLR_BLACK = color(0, 0, 0, 0) + !! Black. + type(color), parameter :: CLR_WHITE = color(255, 255, 255, 0) + !! White. + type(color), parameter :: CLR_RED = color(255, 0, 0, 0) + !! Red. + type(color), parameter :: CLR_LIME = color(0, 255, 0, 0) + !! Lime. + type(color), parameter :: CLR_BLUE = color(0, 0, 255, 0) + !! Blue. + type(color), parameter :: CLR_YELLOW = color(255, 255, 0, 0) + !! Yellow. + type(color), parameter :: CLR_CYAN = color(0, 255, 255, 0) + !! Cyan. + type(color), parameter :: CLR_MAGENTA = color(255, 0, 255, 0) + !! Magenta. + type(color), parameter :: CLR_SILVER = color(192, 192, 192, 0) + !! Silver. + type(color), parameter :: CLR_GRAY = color(128, 128, 128, 0) + !! Gray. + type(color), parameter :: CLR_MAROON = color(128, 0, 0, 0) + !! Maroon. + type(color), parameter :: CLR_OLIVE = color(128, 128, 0, 0) + !! Olive. + type(color), parameter :: CLR_GREEN = color(0, 128, 0, 0) + !! Green. + type(color), parameter :: CLR_PURPLE = color(128, 0, 128, 0) + !! Purple. + type(color), parameter :: CLR_TEAL = color(0, 128, 128, 0) + !! Teal. + type(color), parameter :: CLR_NAVY = color(0, 0, 128, 0) + !! Navy. + type(color), parameter :: CLR_ORANGE = color(255, 165, 0, 0) + !! Orange. + + ! A list of colors that can be cycled through by plotting code + type(color), parameter, dimension(7) :: color_list = [ & + color(0, int(0.447 * 255), int(0.741 * 255), 0), & + color(int(0.85 * 255), int(0.325 * 255), int(0.098 * 255), 0), & + color(int(0.929 * 255), int(0.694 * 255), int(0.125 * 255), 0), & + color(int(0.494 * 255), int(0.184 * 255), int(0.556 * 255), 0), & + color(int(0.466 * 255), int(0.674 * 255), int(0.188 * 255), 0), & + color(int(0.301 * 255), int(0.745 * 255), int(0.933 * 255), 0), & + color(int(0.635 * 255), int(0.078 * 255), int(0.184 * 255), 0)] + +contains +! ------------------------------------------------------------------------------ + pure function clr_to_hex_string(this) result(txt) + !! Returns the color in hexadecimal format. + class(color), intent(in) :: this + !! The color object. + character(8) :: txt + !! A string containing the hexadecimal equivalent. - ! Clip each color if necessary - if (this%red < 0) then - r = 0 - else if (this%red > 255) then - r = 255 - else - r = this%red - end if - - if (this%green < 0) then - g = 0 - else if (this%green > 255) then - g = 255 - else - g = this%green - end if - - if (this%blue < 0) then - b = 0 - else if (this%blue > 255) then - b = 255 - else - b = this%blue - end if - - ! Build the color information - clr = ishft(r, 16) + ishft(g, 8) + b + ! Local Variables + integer(int32) :: r, g, b, a, clr + + ! Clip each color if necessary + if (this%red < 0) then + r = 0 + else if (this%red > 255) then + r = 255 + else + r = this%red + end if + + if (this%green < 0) then + g = 0 + else if (this%green > 255) then + g = 255 + else + g = this%green + end if + + if (this%blue < 0) then + b = 0 + else if (this%blue > 255) then + b = 255 + else + b = this%blue + end if - ! Convert the integer to a hexadecimal string - write(txt, '(Z6.6)') clr - end function - -! ------------------------------------------------------------------------------ - subroutine clr_copy_from(this, clr) - !! Copies another color to this color. - class(color), intent(inout) :: this - !! The color object. - class(color), intent(in) :: clr - !! The color to copy. - - this%red = clr%red - this%green = clr%green - this%blue = clr%blue - end subroutine - -! ****************************************************************************** -! ADDED: JAN. 09, 2024 - JAC -! ------------------------------------------------------------------------------ - ! pure subroutine clr_assign(x, y) - ! type(color), intent(out) :: x - ! class(color), intent(in) :: y - ! call x%copy_from(y) - ! end subroutine - -! ------------------------------------------------------------------------------ - pure function clr_equals(x, y) result(rst) - type(color), intent(in) :: x, y - logical :: rst - rst = .true. - if (x%red /= y%red .or. & - x%green /= y%green .or. & - x%blue /= y%blue & - ) then - rst = .false. - end if - end function - -! ------------------------------------------------------------------------------ - pure function clr_not_equals(x, y) result(rst) - type(color), intent(in) :: x, y - logical :: rst - rst = .not.clr_equals(x, y) - end function - -! ------------------------------------------------------------------------------ -end module + if (this%alpha < 0) then + a = 0 + else if (this%alpha > 255) then + a = 255 + else + a = this%alpha + end if + + ! Build the color information + clr = ishft(a, 24) + ishft(r, 16) + ishft(g, 8) + b + + ! Convert the integer to a hexadecimal string + write(txt, '(Z8.8)') clr + end function + +! ------------------------------------------------------------------------------ + subroutine clr_copy_from(this, clr) + !! Copies another color to this color. + class(color), intent(inout) :: this + !! The color object. + class(color), intent(in) :: clr + !! The color to copy. + + this%red = clr%red + this%green = clr%green + this%blue = clr%blue + end subroutine + +! ****************************************************************************** +! ADDED: JAN. 09, 2024 - JAC +! ------------------------------------------------------------------------------ + ! pure subroutine clr_assign(x, y) + ! type(color), intent(out) :: x + ! class(color), intent(in) :: y + ! call x%copy_from(y) + ! end subroutine + +! ------------------------------------------------------------------------------ + pure function clr_equals(x, y) result(rst) + type(color), intent(in) :: x, y + logical :: rst + rst = .true. + if (x%red /= y%red .or. & + x%green /= y%green .or. & + x%blue /= y%blue & + ) then + rst = .false. + end if + end function + +! ------------------------------------------------------------------------------ + pure function clr_not_equals(x, y) result(rst) + type(color), intent(in) :: x, y + logical :: rst + rst = .not.clr_equals(x, y) + end function + +! ------------------------------------------------------------------------------ +end module @@ -413,7 +424,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_constants.f90.html b/doc/sourcefile/fplot_constants.f90.html index 7dbb387..f71004d 100644 --- a/doc/sourcefile/fplot_constants.f90.html +++ b/doc/sourcefile/fplot_constants.f90.html @@ -96,7 +96,7 @@

    fplot_constants.f90
  • 58 statements + title=" 0.9% of total for source files.">64 statements
  • @@ -364,7 +364,26 @@

    Source Code

    integer(int32), parameter :: GNUPLOT_MAX_PATH_LENGTH = 256 !! Defines the maximum number of characters allowed in a file path. -end module +! ****************************************************************************** +! HORIZONTAL ALIGNMENT CONSTANTS +! ------------------------------------------------------------------------------ + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_LEFT = "left" + !! Defines the text should be aligned to the left. + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_CENTER = "center" + !! Defines the text should be centered. + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT = "right" + !! Defines the text should be aligned to the right. + +! ****************************************************************************** +! ROTATION ORIGIN CONSTANTS +! ------------------------------------------------------------------------------ + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_RIGHT = "right" + !! Defines the text should be rotated around the right side of the text. + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_CENTER = "center" + !! Defines the text should be rotated around the center of the text. + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_LEFT = "left" + !! Defines the text should be rotated around the left side of the text. +end module @@ -383,7 +402,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_core.f90.html b/doc/sourcefile/fplot_core.f90.html index 1ff9de6..7b0b19b 100644 --- a/doc/sourcefile/fplot_core.f90.html +++ b/doc/sourcefile/fplot_core.f90.html @@ -96,7 +96,7 @@

    fplot_core.f90
  • 166 statements + title=" 2.4% of total for source files.">174 statements
  • @@ -255,207 +255,216 @@

    Source Code

    use fplot_multiplot use fplot_plot_bar use fplot_plot_polar - implicit none - private - - ! FPLOT_CONSTANTS.F90 - public :: GNUPLOT_TERMINAL_WIN32 - public :: GNUPLOT_TERMINAL_WXT - public :: GNUPLOT_TERMINAL_QT - public :: GNUPLOT_TERMINAL_PNG - public :: GNUPLOT_TERMINAL_LATEX - public :: MARKER_PLUS - public :: MARKER_X - public :: MARKER_ASTERISK - public :: MARKER_EMPTY_SQUARE - public :: MARKER_FILLED_SQUARE - public :: MARKER_EMPTY_CIRCLE - public :: MARKER_FILLED_CIRCLE - public :: MARKER_EMPTY_TRIANGLE - public :: MARKER_FILLED_TRIANGLE - public :: MARKER_EMPTY_NABLA - public :: MARKER_FILLED_NABLA - public :: MARKER_EMPTY_RHOMBUS - public :: MARKER_FILLED_RHOMBUS - public :: LINE_SOLID - public :: LINE_DASHED - public :: LINE_DOTTED - public :: LINE_DASH_DOTTED - public :: LINE_DASH_DOT_DOT - public :: LEGEND_CENTER - public :: LEGEND_LEFT - public :: LEGEND_RIGHT - public :: LEGEND_TOP - public :: LEGEND_BOTTOM - public :: LEGEND_ARRANGE_VERTICALLY - public :: LEGEND_ARRANGE_HORIZONTALLY - public :: POLAR_THETA_BOTTOM - public :: POLAR_THETA_LEFT - public :: POLAR_THETA_RIGHT - public :: POLAR_THETA_TOP - public :: POLAR_THETA_CCW - public :: POLAR_THETA_CW - public :: PLOTDATA_MAX_NAME_LENGTH - public :: COORDINATES_CARTESIAN - public :: COORDINATES_SPHERICAL - public :: COORDINATES_CYLINDRICAL - public :: ARROW_NO_HEAD - public :: ARROW_HEAD - public :: ARROW_BACKHEAD - public :: ARROW_HEADS - public :: ARROW_FILLED - public :: ARROW_EMPTY - public :: ARROW_NO_FILL - public :: ARROW_NO_BORDER - - ! FPLOT_CORE_ROUTINES.F90 - public :: linspace - public :: logspace - public :: meshgrid - - ! FPLOT_COLORS.F90 - public :: color - public :: operator(==) - public :: operator(/=) - public :: CLR_BLACK - public :: CLR_WHITE - public :: CLR_RED - public :: CLR_LIME - public :: CLR_BLUE - public :: CLR_YELLOW - public :: CLR_CYAN - public :: CLR_MAGENTA - public :: CLR_SILVER - public :: CLR_GRAY - public :: CLR_MAROON - public :: CLR_OLIVE - public :: CLR_GREEN - public :: CLR_PURPLE - public :: CLR_TEAL - public :: CLR_NAVY - public :: CLR_ORANGE - public :: color_list - - ! FPLOT_PLOT_OBJECT.F90 - public :: plot_object - public :: get_string_result - - ! FPLOT_PLOT_DATA.F90 - public :: plot_data - public :: pd_get_string_result - public :: plot_data_colored - public :: scatter_plot_data - public :: spd_get_int_value - public :: spd_get_string_result - public :: spd_get_value - public :: spd_set_value - - ! FPLOT_PLOT_AXIS.F90 - public :: plot_axis - public :: pa_get_string_result - public :: x_axis - public :: y_axis - public :: y2_axis - public :: z_axis - - ! FPLOT_TERMINAL.F90 - public :: terminal - public :: term_get_string_result - - ! FPLOT_WINDOWS_TERMINAL.F90 - public :: windows_terminal - - ! FPLOT_QT_TERMINAL.F90 - public :: qt_terminal - - ! FPLOT_WXT_TERMINAL.F90 - public :: wxt_terminal - - ! FPLOT_PNG_TERMINAL.F90 - public :: png_terminal - - ! FPLOT_LATEX_TERMINAL.F90 - public :: latex_terminal - - ! FPLOT_LABEL.F90 - public :: plot_label - - ! FPLOT_ARROW.F90 - public :: plot_arrow - - ! FPLOT_LEGEND.F90 - public :: legend - - ! FPLOT_PLOT_DATA_2D.F90 - public :: plot_data_2d - - ! FPLOT_PLOT_DATA_3D.F90 - public :: plot_data_3d - - ! FPLOT_SURFACE_PLOT_DATA.F90 - public :: surface_plot_data - - ! FPLOT_PLOT_DATA_ERROR_BARS.F90 - public :: plot_data_error_bars - - ! FPLOT_PLOT_DATA_BAR.F90 - public :: plot_data_bar - - ! FPLOT_PLOT_DATA_HISTOGRAM.F90 - public :: plot_data_histogram - - ! FPLOT_COLORMAP.F90 - public :: cmap - public :: colormap - public :: cm_get_string_result - public :: rainbow_colormap - public :: hot_colormap - public :: cool_colormap - public :: parula_colormap - public :: grey_colormap - public :: earth_colormap - public :: custom_colormap - - ! FPLOT_FILLED_PLOT_DATA.F90 - public :: filled_plot_data - - ! FPLOT_TRIANGULATIONS_DELAUNAY_2D.F90 - public :: delaunay_tri_2d - - ! FPLOT_PLOT_DATA_TRI_2D.F90 - public :: plot_data_tri_2d - - ! FPLOT_DELAUNAY_TRI_SURFACE.F90 - public :: delaunay_tri_surface - - ! FPLOT_TRI_SURFACE_PLOT_DATA.F90 - public :: tri_surface_plot_data - - ! FPLOT_VECTOR_FIELD_PLOT_DATA.F90 - public :: vector_field_plot_data - - ! FPLOT_PLOT.F90 - public :: plot - - ! FPLOT_PLOT_2D.F90 - public :: plot_2d - - ! FPLOT_PLOT_3D.F90 - public :: plot_3d - - ! FPLOT_SURFACE_PLOT.F90 - public :: surface_plot - - ! FPLOT_MULTIPLOT.F90 - public :: multiplot - - ! FPLOT_PLOT_BAR.F90 - public :: plot_bar - - ! FPLOT_PLOT_POLAR.F90 - public :: plot_polar - -end module + use fplot_stats_plots + implicit none + private + + ! FPLOT_CONSTANTS.F90 + public :: GNUPLOT_TERMINAL_WIN32 + public :: GNUPLOT_TERMINAL_WXT + public :: GNUPLOT_TERMINAL_QT + public :: GNUPLOT_TERMINAL_PNG + public :: GNUPLOT_TERMINAL_LATEX + public :: MARKER_PLUS + public :: MARKER_X + public :: MARKER_ASTERISK + public :: MARKER_EMPTY_SQUARE + public :: MARKER_FILLED_SQUARE + public :: MARKER_EMPTY_CIRCLE + public :: MARKER_FILLED_CIRCLE + public :: MARKER_EMPTY_TRIANGLE + public :: MARKER_FILLED_TRIANGLE + public :: MARKER_EMPTY_NABLA + public :: MARKER_FILLED_NABLA + public :: MARKER_EMPTY_RHOMBUS + public :: MARKER_FILLED_RHOMBUS + public :: LINE_SOLID + public :: LINE_DASHED + public :: LINE_DOTTED + public :: LINE_DASH_DOTTED + public :: LINE_DASH_DOT_DOT + public :: LEGEND_CENTER + public :: LEGEND_LEFT + public :: LEGEND_RIGHT + public :: LEGEND_TOP + public :: LEGEND_BOTTOM + public :: LEGEND_ARRANGE_VERTICALLY + public :: LEGEND_ARRANGE_HORIZONTALLY + public :: POLAR_THETA_BOTTOM + public :: POLAR_THETA_LEFT + public :: POLAR_THETA_RIGHT + public :: POLAR_THETA_TOP + public :: POLAR_THETA_CCW + public :: POLAR_THETA_CW + public :: PLOTDATA_MAX_NAME_LENGTH + public :: COORDINATES_CARTESIAN + public :: COORDINATES_SPHERICAL + public :: COORDINATES_CYLINDRICAL + public :: ARROW_NO_HEAD + public :: ARROW_HEAD + public :: ARROW_BACKHEAD + public :: ARROW_HEADS + public :: ARROW_FILLED + public :: ARROW_EMPTY + public :: ARROW_NO_FILL + public :: ARROW_NO_BORDER + public :: GNUPLOT_HORIZONTAL_ALIGN_LEFT + public :: GNUPLOT_HORIZONTAL_ALIGN_CENTER + public :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT + public :: GNUPLOT_ROTATION_ORIGIN_RIGHT + public :: GNUPLOT_ROTATION_ORIGIN_CENTER + public :: GNUPLOT_ROTATION_ORIGIN_LEFT + + ! FPLOT_CORE_ROUTINES.F90 + public :: linspace + public :: logspace + public :: meshgrid + + ! FPLOT_COLORS.F90 + public :: color + public :: operator(==) + public :: operator(/=) + public :: CLR_BLACK + public :: CLR_WHITE + public :: CLR_RED + public :: CLR_LIME + public :: CLR_BLUE + public :: CLR_YELLOW + public :: CLR_CYAN + public :: CLR_MAGENTA + public :: CLR_SILVER + public :: CLR_GRAY + public :: CLR_MAROON + public :: CLR_OLIVE + public :: CLR_GREEN + public :: CLR_PURPLE + public :: CLR_TEAL + public :: CLR_NAVY + public :: CLR_ORANGE + public :: color_list + + ! FPLOT_PLOT_OBJECT.F90 + public :: plot_object + public :: get_string_result + + ! FPLOT_PLOT_DATA.F90 + public :: plot_data + public :: pd_get_string_result + public :: plot_data_colored + public :: scatter_plot_data + public :: spd_get_int_value + public :: spd_get_string_result + public :: spd_get_value + public :: spd_set_value + + ! FPLOT_PLOT_AXIS.F90 + public :: plot_axis + public :: pa_get_string_result + public :: x_axis + public :: y_axis + public :: y2_axis + public :: z_axis + + ! FPLOT_TERMINAL.F90 + public :: terminal + public :: term_get_string_result + + ! FPLOT_WINDOWS_TERMINAL.F90 + public :: windows_terminal + + ! FPLOT_QT_TERMINAL.F90 + public :: qt_terminal + + ! FPLOT_WXT_TERMINAL.F90 + public :: wxt_terminal + + ! FPLOT_PNG_TERMINAL.F90 + public :: png_terminal + + ! FPLOT_LATEX_TERMINAL.F90 + public :: latex_terminal + + ! FPLOT_LABEL.F90 + public :: plot_label + + ! FPLOT_ARROW.F90 + public :: plot_arrow + + ! FPLOT_LEGEND.F90 + public :: legend + + ! FPLOT_PLOT_DATA_2D.F90 + public :: plot_data_2d + + ! FPLOT_PLOT_DATA_3D.F90 + public :: plot_data_3d + + ! FPLOT_SURFACE_PLOT_DATA.F90 + public :: surface_plot_data + + ! FPLOT_PLOT_DATA_ERROR_BARS.F90 + public :: plot_data_error_bars + + ! FPLOT_PLOT_DATA_BAR.F90 + public :: plot_data_bar + + ! FPLOT_PLOT_DATA_HISTOGRAM.F90 + public :: plot_data_histogram + + ! FPLOT_COLORMAP.F90 + public :: cmap + public :: colormap + public :: cm_get_string_result + public :: rainbow_colormap + public :: hot_colormap + public :: cool_colormap + public :: parula_colormap + public :: grey_colormap + public :: earth_colormap + public :: custom_colormap + + ! FPLOT_FILLED_PLOT_DATA.F90 + public :: filled_plot_data + + ! FPLOT_TRIANGULATIONS_DELAUNAY_2D.F90 + public :: delaunay_tri_2d + + ! FPLOT_PLOT_DATA_TRI_2D.F90 + public :: plot_data_tri_2d + + ! FPLOT_DELAUNAY_TRI_SURFACE.F90 + public :: delaunay_tri_surface + + ! FPLOT_TRI_SURFACE_PLOT_DATA.F90 + public :: tri_surface_plot_data + + ! FPLOT_VECTOR_FIELD_PLOT_DATA.F90 + public :: vector_field_plot_data + + ! FPLOT_PLOT.F90 + public :: plot + + ! FPLOT_PLOT_2D.F90 + public :: plot_2d + + ! FPLOT_PLOT_3D.F90 + public :: plot_3d + + ! FPLOT_SURFACE_PLOT.F90 + public :: surface_plot + + ! FPLOT_MULTIPLOT.F90 + public :: multiplot + + ! FPLOT_PLOT_BAR.F90 + public :: plot_bar + + ! FPLOT_PLOT_POLAR.F90 + public :: plot_polar + + ! FPLOT_STATS_PLOTS.F90 + public :: correlation_plot +end module @@ -474,7 +483,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_core_routines.f90.html b/doc/sourcefile/fplot_core_routines.f90.html index 509ca57..c938178 100644 --- a/doc/sourcefile/fplot_core_routines.f90.html +++ b/doc/sourcefile/fplot_core_routines.f90.html @@ -96,7 +96,7 @@

    fplot_core_routines.f90
  • 53 statements + title=" 0.7% of total for source files.">53 statements
  • @@ -320,7 +320,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_delaunay_tri_surface.f90.html b/doc/sourcefile/fplot_delaunay_tri_surface.f90.html index ee96e88..176f216 100644 --- a/doc/sourcefile/fplot_delaunay_tri_surface.f90.html +++ b/doc/sourcefile/fplot_delaunay_tri_surface.f90.html @@ -96,7 +96,7 @@

    fplot_delaunay_tri_surface.f90
  • 134 statements + title=" 1.8% of total for source files.">134 statements
  • @@ -466,7 +466,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_errors.f90.html b/doc/sourcefile/fplot_errors.f90.html index f938a89..eb84b95 100644 --- a/doc/sourcefile/fplot_errors.f90.html +++ b/doc/sourcefile/fplot_errors.f90.html @@ -96,7 +96,7 @@

    fplot_errors.f90
  • 54 statements + title=" 0.7% of total for source files.">54 statements
  • @@ -356,7 +356,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_filled_plot_data.f90.html b/doc/sourcefile/fplot_filled_plot_data.f90.html index 05804ca..2d82bb4 100644 --- a/doc/sourcefile/fplot_filled_plot_data.f90.html +++ b/doc/sourcefile/fplot_filled_plot_data.f90.html @@ -96,7 +96,7 @@

    fplot_filled_plot_data.f90
  • 120 statements + title=" 1.6% of total for source files.">120 statements
  • @@ -435,7 +435,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_label.f90.html b/doc/sourcefile/fplot_label.f90.html index 68a4e4c..ac9321b 100644 --- a/doc/sourcefile/fplot_label.f90.html +++ b/doc/sourcefile/fplot_label.f90.html @@ -96,7 +96,7 @@

    fplot_label.f90
  • 91 statements + title=" 1.2% of total for source files.">91 statements
  • @@ -399,7 +399,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_latex_terminal.f90.html b/doc/sourcefile/fplot_latex_terminal.f90.html index 79cd010..59a44fc 100644 --- a/doc/sourcefile/fplot_latex_terminal.f90.html +++ b/doc/sourcefile/fplot_latex_terminal.f90.html @@ -333,7 +333,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_legend.f90.html b/doc/sourcefile/fplot_legend.f90.html index 6cd9e04..09e64f3 100644 --- a/doc/sourcefile/fplot_legend.f90.html +++ b/doc/sourcefile/fplot_legend.f90.html @@ -96,7 +96,7 @@

    fplot_legend.f90
  • 151 statements + title=" 2.1% of total for source files.">151 statements
  • @@ -501,7 +501,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_multiplot.f90.html b/doc/sourcefile/fplot_multiplot.f90.html index 95e38e4..3d33db9 100644 --- a/doc/sourcefile/fplot_multiplot.f90.html +++ b/doc/sourcefile/fplot_multiplot.f90.html @@ -96,7 +96,7 @@

    fplot_multiplot.f90
  • 298 statements + title=" 4.1% of total for source files.">304 statements
  • @@ -320,7 +320,7 @@

    Source Code

    end function ! ------------------------------------------------------------------------------ - subroutine mp_init(this, m, n, term, err) + subroutine mp_init(this, m, n, term, width, height, err) !! Initializes the multiplot object. class(multiplot), intent(inout) :: this !! The multiplot object. @@ -341,359 +341,368 @@

    Source Code

    !! - GNUPLOT_TERMINAL_WXT !! !! - GNUPLOT_TERMINAL_LATEX - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Local Variables - integer(int32) :: flag, t, i - class(errors), pointer :: errmgr - type(errors), target :: deferr - type(wxt_terminal), pointer :: wxt - type(windows_terminal), pointer :: win - type(qt_terminal), pointer :: qt - type(png_terminal), pointer :: png - type(latex_terminal), pointer :: latex - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - if (present(term)) then - t = term - else - t = GNUPLOT_TERMINAL_WXT - end if - - ! Process - call this%m_plots%clear() - this%m_rows = m - this%m_cols = n - flag = 0 - - ! Populate the list with a dummy variable at the outset. This allows - ! the list to be appropriately sized so the user may use the "set" - ! subroutine appropriately - do i = 1, m * n - call this%m_plots%push(i) - end do - - ! Define the terminal - if (associated(this%m_terminal)) deallocate(this%m_terminal) - select case (t) - case (GNUPLOT_TERMINAL_PNG) - allocate(png, stat = flag) - this%m_terminal => png - case (GNUPLOT_TERMINAL_QT) - allocate(qt, stat = flag) - this%m_terminal => qt - case (GNUPLOT_TERMINAL_WIN32) - allocate(win, stat = flag) - this%m_terminal => win - case (GNUPLOT_TERMINAL_LATEX) - allocate(latex, stat = flag) - this%m_terminal => latex - case default ! WXT is the default - allocate(wxt, stat = flag) - this%m_terminal => wxt - end select - - ! Error Checking - if (flag /= 0) then - call report_memory_error(errmgr, "mp_init", flag) - return - end if - end subroutine - -! ------------------------------------------------------------------------------ - subroutine mp_clean(this) - !! Cleans up resources held by the multiplot object. - type(multiplot), intent(inout) :: this - !! The multiplot object. - if (associated(this%m_terminal)) deallocate(this%m_terminal) - nullify(this%m_terminal) - end subroutine - -! ------------------------------------------------------------------------------ - pure function mp_get_rows(this) result(x) - !! Gets the number of rows of plots. - class(multiplot), intent(in) :: this - !! The multiplot object. - integer(int32) :: x - !! The row count. - x = this%m_rows - end function - -! -------------------- - pure function mp_get_cols(this) result(x) - !! Gets the number of columns of plots. - class(multiplot), intent(in) :: this - !! The multiplot object. - integer(int32) :: x - !! The column count. - x = this%m_cols - end function - -! -------------------- - pure function mp_get_count(this) result(x) - !! Gets the total number of plots. - class(multiplot), intent(in) :: this - !! The multiplot object. - integer(int32) :: x - !! The plot count. - x = this%m_plots%count() - end function - -! ------------------------------------------------------------------------------ - function mp_get_title(this) result(x) - !! Gets the multiplot's title. - class(multiplot), intent(in) :: this - !! The multiplot object. - character(len = :), allocatable :: x - !! The title. - x = this%m_title - end function - -! -------------------- - subroutine mp_set_title(this, x) - !! Sets the multiplot's title. - class(multiplot), intent(inout) :: this - !! The multiplot object. - character(len = *), intent(in) :: x - !! The title. - - ! Local Variables - integer(int32) :: n - - ! Process - n = min(len(x), PLOTDATA_MAX_NAME_LENGTH) - this%m_title = "" - if (n /= 0) then - this%m_title(1:n) = x(1:n) - this%m_hasTitle = .true. - else - this%m_hasTitle = .false. - end if - end subroutine - -! ------------------------------------------------------------------------------ - subroutine mp_draw(this, persist, err) - !! Launches GNUPLOT and draws the multiplot per the current state of - !! the command list. - 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. - - ! Parameters - character(len = *), parameter :: fname = "temp_gnuplot_file.plt" - - ! Local Variables - logical :: p - integer(int32) :: fid, flag - class(errors), pointer :: errmgr - type(errors), target :: deferr - character(len = 256) :: errmsg - class(terminal), pointer :: term - - ! Initialization - if (present(persist)) then - p = persist - else - p = .true. - end if - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - term => this%get_terminal() - - ! Open the file for writing, and write the contents to file - open(newunit = fid, file = fname, iostat = flag) - if (flag > 0) then - call report_file_create_error(errmgr, "mp_draw", fname, flag) - return - end if - write(fid, '(A)') term%get_command_string() - write(fid, '(A)') new_line('a') - write(fid, '(A)') this%get_command_string() - close(fid) + integer(int32), intent(in), optional :: width + !! Optionally, the width of the plot window. + integer(int32), intent(in), optional :: height + !! Optionally, the height of the plot window. + class(errors), intent(inout), optional, target :: err + !! An error handling object. + + ! Local Variables + integer(int32) :: flag, t, i + class(errors), pointer :: errmgr + type(errors), target :: deferr + type(wxt_terminal), pointer :: wxt + type(windows_terminal), pointer :: win + type(qt_terminal), pointer :: qt + type(png_terminal), pointer :: png + type(latex_terminal), pointer :: latex + + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + if (present(term)) then + t = term + else + t = GNUPLOT_TERMINAL_WXT + end if + + ! Process + call this%m_plots%clear() + this%m_rows = m + this%m_cols = n + flag = 0 + + ! Populate the list with a dummy variable at the outset. This allows + ! the list to be appropriately sized so the user may use the "set" + ! subroutine appropriately + do i = 1, m * n + call this%m_plots%push(i) + end do + + ! Define the terminal + if (associated(this%m_terminal)) deallocate(this%m_terminal) + select case (t) + case (GNUPLOT_TERMINAL_PNG) + allocate(png, stat = flag) + this%m_terminal => png + case (GNUPLOT_TERMINAL_QT) + allocate(qt, stat = flag) + this%m_terminal => qt + case (GNUPLOT_TERMINAL_WIN32) + allocate(win, stat = flag) + this%m_terminal => win + case (GNUPLOT_TERMINAL_LATEX) + allocate(latex, stat = flag) + this%m_terminal => latex + case default ! WXT is the default + allocate(wxt, stat = flag) + this%m_terminal => wxt + end select + + ! Error Checking + if (flag /= 0) then + call report_memory_error(errmgr, "mp_init", flag) + return + end if + + ! Size the window? + if (present(width)) then + call this%m_terminal%set_window_width(width) + end if + if (present(height)) then + call this%m_terminal%set_window_height(height) + end if + end subroutine + +! ------------------------------------------------------------------------------ + subroutine mp_clean(this) + !! Cleans up resources held by the multiplot object. + type(multiplot), intent(inout) :: this + !! The multiplot object. + if (associated(this%m_terminal)) deallocate(this%m_terminal) + nullify(this%m_terminal) + end subroutine + +! ------------------------------------------------------------------------------ + pure function mp_get_rows(this) result(x) + !! Gets the number of rows of plots. + class(multiplot), intent(in) :: this + !! The multiplot object. + integer(int32) :: x + !! The row count. + x = this%m_rows + end function + +! -------------------- + pure function mp_get_cols(this) result(x) + !! Gets the number of columns of plots. + class(multiplot), intent(in) :: this + !! The multiplot object. + integer(int32) :: x + !! The column count. + x = this%m_cols + end function + +! -------------------- + pure function mp_get_count(this) result(x) + !! Gets the total number of plots. + class(multiplot), intent(in) :: this + !! The multiplot object. + integer(int32) :: x + !! The plot count. + x = this%m_plots%count() + end function + +! ------------------------------------------------------------------------------ + function mp_get_title(this) result(x) + !! Gets the multiplot's title. + class(multiplot), intent(in) :: this + !! The multiplot object. + character(len = :), allocatable :: x + !! The title. + x = this%m_title + end function + +! -------------------- + subroutine mp_set_title(this, x) + !! Sets the multiplot's title. + class(multiplot), intent(inout) :: this + !! The multiplot object. + character(len = *), intent(in) :: x + !! The title. + + ! Local Variables + integer(int32) :: n + + ! Process + n = min(len(x), PLOTDATA_MAX_NAME_LENGTH) + this%m_title = "" + if (n /= 0) then + this%m_title(1:n) = x(1:n) + this%m_hasTitle = .true. + else + this%m_hasTitle = .false. + end if + end subroutine + +! ------------------------------------------------------------------------------ + subroutine mp_draw(this, persist, err) + !! Launches GNUPLOT and draws the multiplot per the current state of + !! the command list. + 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. + + ! Parameters + character(len = *), parameter :: fname = "temp_gnuplot_file.plt" + + ! Local Variables + logical :: p + integer(int32) :: fid, flag + class(errors), pointer :: errmgr + type(errors), target :: deferr + class(terminal), pointer :: term + + ! Initialization + if (present(persist)) then + p = persist + else + p = .true. + end if + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + term => this%get_terminal() - ! Launch GNUPLOT - if (p) then - call execute_command_line("gnuplot --persist " // fname) - else - call execute_command_line("gnuplot " // fname) - end if - - ! Clean up by deleting the file - open(newunit = fid, file = fname) - close(fid, status = "delete") - -100 format(A, I0, A) - end subroutine - -! ------------------------------------------------------------------------------ - function mp_get(this, i, j) result(x) - !! Gets the requested plot object. - class(multiplot), intent(in) :: this - !! The multiplot object. - integer(int32), intent(in) :: i - !! The row index of the plot to retrieve. - integer(int32), intent(in) :: j - !! The column index of the plot to retrieve. - class(plot), pointer :: x - !! A pointer to the plot object. - - ! Local Variables - class(*), pointer :: item - integer(int32) :: ind - - ! Process - ind = this%m_rows * (j - 1) + i - item => this%m_plots%get(ind) - select type (item) - class is (plot) - x => item - class default - nullify(x) - end select - end function - -! -------------------- - subroutine mp_set(this, i, j, x) - !! Replaces the specified plot. - class(multiplot), intent(inout) :: this - !! The multiplot object. - integer(int32), intent(in) :: i - !! The row index of the plot to replace. - integer(int32), intent(in) :: j - !! The column index of the plot to replace. - class(plot), intent(in) :: x - !! The new plot. - - ! Local Variables - integer(int32) :: ind - - ! Process - ind = this%m_rows * (j - 1) + i - call this%m_plots%set(ind, x) - end subroutine - -! ------------------------------------------------------------------------------ - pure function mp_has_title(this) result(x) - !! Gets a value determining if a title has been defined for the - !! multiplot object. - class(multiplot), intent(in) :: this - !! The multiplot object. - logical :: x - !! Returns true if a title has been defined for this multiplot; - !! else, returns false. - x = this%m_hasTitle - end function - -! ------------------------------------------------------------------------------ - function mp_get_term(this) result(x) - !! Gets the GNUPLOT terminal object. - class(multiplot), intent(in) :: this - !! The multiplot object. - class(terminal), pointer :: x - !! A pointer to the terminal object. - x => this%m_terminal - end function - -! ------------------------------------------------------------------------------ - subroutine mp_save(this, fname, err) - !! Saves a GNUPLOT command file. - 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. - - ! Local Variables - integer(int32) :: fid, flag - class(errors), pointer :: errmgr - type(errors), target :: deferr - class(terminal), pointer :: term - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - term => this%get_terminal() - - ! Open the file for writing, and write the contents to file - open(newunit = fid, file = fname, iostat = flag) - if (flag > 0) then - call report_file_create_error(errmgr, "mp_save", fname, flag) - return - end if - write(fid, '(A)') term%get_command_string() - write(fid, '(A)') new_line('a') - write(fid, '(A)') this%get_command_string() - close(fid) - end subroutine - -! ------------------------------------------------------------------------------ - function mp_get_font(this) result(x) - !! Gets the name of the font used for plot text. - class(multiplot), intent(in) :: this - !! The multiplot object. - character(len = :), allocatable :: x - !! The font name. - class(terminal), pointer :: term - term => this%get_terminal() - x = term%get_font_name() - end function - -! -------------------- - subroutine mp_set_font(this, x) - !! Sets the name of the font used for plot text. - class(multiplot), intent(inout) :: this - !! The multiplot object. - character(len = *), intent(in) :: x - !! The font name. - class(terminal), pointer :: term - term => this%get_terminal() - call term%set_font_name(x) - end subroutine - -! ------------------------------------------------------------------------------ - function mp_get_font_size(this) result(x) - !! Gets the size of the font used by the plot. - class(multiplot), intent(in) :: this - !! The multiplot object. - integer(int32) :: x - !! The font size. - class(terminal), pointer :: term - term => this%get_terminal() - x = term%get_font_size() - end function - -! -------------------- - subroutine mp_set_font_size(this, x) - !! Sets the size of the font used by the plot. - class(multiplot), intent(inout) :: this - !! The multiplot object. - integer(int32), intent(in) :: x - !! The font size. - class(terminal), pointer :: term - term => this%get_terminal() - call term%set_font_size(x) - end subroutine - -! ------------------------------------------------------------------------------ -end module + ! Open the file for writing, and write the contents to file + open(newunit = fid, file = fname, iostat = flag) + if (flag > 0) then + call report_file_create_error(errmgr, "mp_draw", fname, flag) + return + end if + write(fid, '(A)') term%get_command_string() + write(fid, '(A)') new_line('a') + write(fid, '(A)') this%get_command_string() + close(fid) + + ! Launch GNUPLOT + if (p) then + call execute_command_line("gnuplot --persist " // fname) + else + call execute_command_line("gnuplot " // fname) + end if + + ! Clean up by deleting the file + open(newunit = fid, file = fname) + close(fid, status = "delete") + end subroutine + +! ------------------------------------------------------------------------------ + function mp_get(this, i, j) result(x) + !! Gets the requested plot object. + class(multiplot), intent(in) :: this + !! The multiplot object. + integer(int32), intent(in) :: i + !! The row index of the plot to retrieve. + integer(int32), intent(in) :: j + !! The column index of the plot to retrieve. + class(plot), pointer :: x + !! A pointer to the plot object. + + ! Local Variables + class(*), pointer :: item + integer(int32) :: ind + + ! Process + ind = this%m_rows * (j - 1) + i + item => this%m_plots%get(ind) + select type (item) + class is (plot) + x => item + class default + nullify(x) + end select + end function + +! -------------------- + subroutine mp_set(this, i, j, x) + !! Replaces the specified plot. + class(multiplot), intent(inout) :: this + !! The multiplot object. + integer(int32), intent(in) :: i + !! The row index of the plot to replace. + integer(int32), intent(in) :: j + !! The column index of the plot to replace. + class(plot), intent(in) :: x + !! The new plot. + + ! Local Variables + integer(int32) :: ind + + ! Process + ind = this%m_rows * (j - 1) + i + call this%m_plots%set(ind, x) + end subroutine + +! ------------------------------------------------------------------------------ + pure function mp_has_title(this) result(x) + !! Gets a value determining if a title has been defined for the + !! multiplot object. + class(multiplot), intent(in) :: this + !! The multiplot object. + logical :: x + !! Returns true if a title has been defined for this multiplot; + !! else, returns false. + x = this%m_hasTitle + end function + +! ------------------------------------------------------------------------------ + function mp_get_term(this) result(x) + !! Gets the GNUPLOT terminal object. + class(multiplot), intent(in) :: this + !! The multiplot object. + class(terminal), pointer :: x + !! A pointer to the terminal object. + x => this%m_terminal + end function + +! ------------------------------------------------------------------------------ + subroutine mp_save(this, fname, err) + !! Saves a GNUPLOT command file. + 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. + + ! Local Variables + integer(int32) :: fid, flag + class(errors), pointer :: errmgr + type(errors), target :: deferr + class(terminal), pointer :: term + + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + term => this%get_terminal() + + ! Open the file for writing, and write the contents to file + open(newunit = fid, file = fname, iostat = flag) + if (flag > 0) then + call report_file_create_error(errmgr, "mp_save", fname, flag) + return + end if + write(fid, '(A)') term%get_command_string() + write(fid, '(A)') new_line('a') + write(fid, '(A)') this%get_command_string() + close(fid) + end subroutine + +! ------------------------------------------------------------------------------ + function mp_get_font(this) result(x) + !! Gets the name of the font used for plot text. + class(multiplot), intent(in) :: this + !! The multiplot object. + character(len = :), allocatable :: x + !! The font name. + class(terminal), pointer :: term + term => this%get_terminal() + x = term%get_font_name() + end function + +! -------------------- + subroutine mp_set_font(this, x) + !! Sets the name of the font used for plot text. + class(multiplot), intent(inout) :: this + !! The multiplot object. + character(len = *), intent(in) :: x + !! The font name. + class(terminal), pointer :: term + term => this%get_terminal() + call term%set_font_name(x) + end subroutine + +! ------------------------------------------------------------------------------ + function mp_get_font_size(this) result(x) + !! Gets the size of the font used by the plot. + class(multiplot), intent(in) :: this + !! The multiplot object. + integer(int32) :: x + !! The font size. + class(terminal), pointer :: term + term => this%get_terminal() + x = term%get_font_size() + end function + +! -------------------- + subroutine mp_set_font_size(this, x) + !! Sets the size of the font used by the plot. + class(multiplot), intent(inout) :: this + !! The multiplot object. + integer(int32), intent(in) :: x + !! The font size. + class(terminal), pointer :: term + term => this%get_terminal() + call term%set_font_size(x) + end subroutine + +! ------------------------------------------------------------------------------ +end module @@ -712,7 +721,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot.f90.html b/doc/sourcefile/fplot_plot.f90.html index b0cabcc..a277b8b 100644 --- a/doc/sourcefile/fplot_plot.f90.html +++ b/doc/sourcefile/fplot_plot.f90.html @@ -96,7 +96,7 @@

    fplot_plot.f90
  • 510 statements + title=" 7.7% of total for source files.">562 statements
  • @@ -269,813 +269,919 @@

    Source Code

    !! Show the colorbar? type(list), private :: m_arrows ! Added 1/3/2024, JAC !! A collection of plot_arrow items to draw. - contains - procedure, public :: free_resources => plt_clean_up - procedure, public :: initialize => plt_init - procedure, public :: get_title => plt_get_title - procedure, public :: set_title => plt_set_title - procedure, public :: is_title_defined => plt_has_title - procedure, public :: get_legend => plt_get_legend - procedure, public :: get_count => plt_get_count - procedure, public :: push => plt_push_data - procedure, public :: pop => plt_pop_data - procedure, public :: clear_all => plt_clear_all - procedure, public :: get => plt_get - procedure, public :: set => plt_set - procedure, public :: get_terminal => plt_get_term - procedure, public :: get_show_gridlines => plt_get_show_grid - procedure, public :: set_show_gridlines => plt_set_show_grid - procedure, public :: draw => plt_draw - procedure, public :: save_file => plt_save - procedure, public :: get_font_name => plt_get_font - procedure, public :: set_font_name => plt_set_font - procedure, public :: get_font_size => plt_get_font_size - procedure, public :: set_font_size => plt_set_font_size - procedure, public :: get_tics_inward => plt_get_tics_in - procedure, public :: set_tics_inward => plt_set_tics_in - procedure, public :: get_draw_border => plt_get_draw_border - procedure, public :: set_draw_border => plt_set_draw_border - procedure, public :: push_label => plt_push_label - procedure, public :: pop_label => plt_pop_label - procedure, public :: get_label => plt_get_label - procedure, public :: set_label => plt_set_label - procedure, public :: get_label_count => plt_get_label_count - procedure, public :: clear_all_labels => plt_clear_labels - procedure, public :: get_axis_equal => plt_get_axis_equal - procedure, public :: set_axis_equal => plt_set_axis_equal - procedure, public :: get_colormap => plt_get_colormap - procedure, public :: set_colormap => plt_set_colormap - procedure, public :: get_show_colorbar => plt_get_show_colorbar - procedure, public :: set_show_colorbar => plt_set_show_colorbar - procedure, public :: get_command_string => plt_get_cmd - procedure, public :: push_arrow => plt_push_arrow - procedure, public :: pop_arrow => plt_pop_arrow - procedure, public :: get_arrow => plt_get_arrow - procedure, public :: set_arrow => plt_set_arrow - procedure, public :: get_arrow_count => plt_get_arrow_count - procedure, public :: clear_arrows => plt_clear_arrows - end type - -contains -! ------------------------------------------------------------------------------ - subroutine plt_clean_up(this) - !! Cleans up resources held by the plot object. Inheriting - !! classes are expected to call this routine to free internally held - !! resources. - class(plot), intent(inout) :: this - !! The plot object. - if (associated(this%m_terminal)) then - deallocate(this%m_terminal) - nullify(this%m_terminal) - end if - if (associated(this%m_legend)) then - deallocate(this%m_legend) - nullify(this%m_legend) - end if - if (associated(this%m_colormap)) then - deallocate(this%m_colormap) - nullify(this%m_colormap) - end if - end subroutine - -! ------------------------------------------------------------------------------ - subroutine plt_init(this, term, fname, err) - !! Initializes the plot object. - class(plot), intent(inout) :: this - !! The plot object. - integer(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 - character(len = *), intent(in), optional :: fname - !! A filename to pass to the terminal in the event the - !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Local Variables - integer(int32) :: flag, t - class(errors), pointer :: errmgr - type(errors), target :: deferr - type(wxt_terminal), pointer :: wxt - type(windows_terminal), pointer :: win - type(qt_terminal), pointer :: qt - type(png_terminal), pointer :: png - type(latex_terminal), pointer :: latex - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - if (present(term)) then - t = term - else - t = GNUPLOT_TERMINAL_WXT - end if + real(real32), private :: m_leftMargin = -1.0 + real(real32), private :: m_rightMargin = -1.0 + real(real32), private :: m_topMargin = -1.0 + real(real32), private :: m_bottomMargin = -1.0 + contains + procedure, public :: free_resources => plt_clean_up + procedure, public :: initialize => plt_init + procedure, public :: get_title => plt_get_title + procedure, public :: set_title => plt_set_title + procedure, public :: is_title_defined => plt_has_title + procedure, public :: get_legend => plt_get_legend + procedure, public :: get_count => plt_get_count + procedure, public :: push => plt_push_data + procedure, public :: pop => plt_pop_data + procedure, public :: clear_all => plt_clear_all + procedure, public :: get => plt_get + procedure, public :: set => plt_set + procedure, public :: get_terminal => plt_get_term + procedure, public :: get_show_gridlines => plt_get_show_grid + procedure, public :: set_show_gridlines => plt_set_show_grid + procedure, public :: draw => plt_draw + procedure, public :: save_file => plt_save + procedure, public :: get_font_name => plt_get_font + procedure, public :: set_font_name => plt_set_font + procedure, public :: get_font_size => plt_get_font_size + procedure, public :: set_font_size => plt_set_font_size + procedure, public :: get_tics_inward => plt_get_tics_in + procedure, public :: set_tics_inward => plt_set_tics_in + procedure, public :: get_draw_border => plt_get_draw_border + procedure, public :: set_draw_border => plt_set_draw_border + procedure, public :: push_label => plt_push_label + procedure, public :: pop_label => plt_pop_label + procedure, public :: get_label => plt_get_label + procedure, public :: set_label => plt_set_label + procedure, public :: get_label_count => plt_get_label_count + procedure, public :: clear_all_labels => plt_clear_labels + procedure, public :: get_axis_equal => plt_get_axis_equal + procedure, public :: set_axis_equal => plt_set_axis_equal + procedure, public :: get_colormap => plt_get_colormap + procedure, public :: set_colormap => plt_set_colormap + procedure, public :: get_show_colorbar => plt_get_show_colorbar + procedure, public :: set_show_colorbar => plt_set_show_colorbar + procedure, public :: get_command_string => plt_get_cmd + procedure, public :: push_arrow => plt_push_arrow + procedure, public :: pop_arrow => plt_pop_arrow + procedure, public :: get_arrow => plt_get_arrow + procedure, public :: set_arrow => plt_set_arrow + procedure, public :: get_arrow_count => plt_get_arrow_count + procedure, public :: clear_arrows => plt_clear_arrows + procedure, public :: get_left_margin => plt_get_left_margin + procedure, public :: set_left_margin => plt_set_left_margin + procedure, public :: get_right_margin => plt_get_right_margin + procedure, public :: set_right_margin => plt_set_right_margin + procedure, public :: get_top_margin => plt_get_top_margin + procedure, public :: set_top_margin => plt_set_top_margin + procedure, public :: get_bottom_margin => plt_get_bottom_margin + procedure, public :: set_bottom_margin => plt_set_bottom_margin + end type + +contains +! ------------------------------------------------------------------------------ + subroutine plt_clean_up(this) + !! Cleans up resources held by the plot object. Inheriting + !! classes are expected to call this routine to free internally held + !! resources. + class(plot), intent(inout) :: this + !! The plot object. + if (associated(this%m_terminal)) then + deallocate(this%m_terminal) + nullify(this%m_terminal) + end if + if (associated(this%m_legend)) then + deallocate(this%m_legend) + nullify(this%m_legend) + end if + if (associated(this%m_colormap)) then + deallocate(this%m_colormap) + nullify(this%m_colormap) + end if + end subroutine + +! ------------------------------------------------------------------------------ + subroutine plt_init(this, term, fname, err) + !! Initializes the plot object. + class(plot), intent(inout) :: this + !! The plot object. + integer(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 + character(len = *), intent(in), optional :: fname + !! A filename to pass to the terminal in the event the + !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). + class(errors), intent(inout), optional, target :: err + !! An error handling object. + + ! Local Variables + integer(int32) :: flag, t + class(errors), pointer :: errmgr + type(errors), target :: deferr + type(wxt_terminal), pointer :: wxt + type(windows_terminal), pointer :: win + type(qt_terminal), pointer :: qt + type(png_terminal), pointer :: png + type(latex_terminal), pointer :: latex - ! Process - flag = 0 - if (associated(this%m_terminal)) deallocate(this%m_terminal) - select case (t) - case (GNUPLOT_TERMINAL_PNG) - allocate(png, stat = flag) - if (present(fname)) call png%set_filename(fname) - this%m_terminal => png - case (GNUPLOT_TERMINAL_QT) - allocate(qt, stat = flag) - this%m_terminal => qt - case (GNUPLOT_TERMINAL_WIN32) - allocate(win, stat = flag) - this%m_terminal => win - case (GNUPLOT_TERMINAL_LATEX) - allocate(latex, stat = flag) - if (present(fname)) call latex%set_filename(fname) - this%m_terminal => latex - case default ! WXT is the default - allocate(wxt, stat = flag) - this%m_terminal => wxt - end select - - ! Establish the colormap - nullify(this%m_colormap) - - if (flag == 0 .and. .not.associated(this%m_legend)) then - allocate(this%m_legend, stat = flag) - end if - - ! Error Checking - if (flag /= 0) then - call report_memory_error(errmgr, "plt_init", flag) - return - end if - end subroutine - -! ------------------------------------------------------------------------------ - function plt_get_title(this) result(txt) - !! Gets the plot's title. - class(plot), intent(in) :: this - !! The plot object. - character(len = :), allocatable :: txt - !! The title. - integer(int32) :: n - n = len_trim(this%m_title) - allocate(character(len = n) :: txt) - txt = trim(this%m_title) - end function - -! -------------------- - subroutine plt_set_title(this, txt) - !! Sets the plot's title. - class(plot), intent(inout) :: this - !! The plot object. - character(len = *), intent(in) :: txt - !! The title. - integer :: n - n = min(len_trim(txt), PLOTDATA_MAX_NAME_LENGTH) - this%m_title = "" - if (n /= 0) then - this%m_title(1:n) = txt(1:n) - this%m_hasTitle = .true. - else - this%m_hasTitle = .false. - end if - end subroutine - -! ------------------------------------------------------------------------------ - pure function plt_has_title(this) result(x) - !! Gets a value determining if a title has been defined for the plot - !! object. - class(plot), intent(in) :: this - !! The plot object. - logical :: x - !! Returns true if a title has been defined for this plot; else, - !! returns false. - x = this%m_hasTitle - end function + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + if (present(term)) then + t = term + else + t = GNUPLOT_TERMINAL_WXT + end if + + ! Process + flag = 0 + if (associated(this%m_terminal)) deallocate(this%m_terminal) + select case (t) + case (GNUPLOT_TERMINAL_PNG) + allocate(png, stat = flag) + if (present(fname)) call png%set_filename(fname) + this%m_terminal => png + case (GNUPLOT_TERMINAL_QT) + allocate(qt, stat = flag) + this%m_terminal => qt + case (GNUPLOT_TERMINAL_WIN32) + allocate(win, stat = flag) + this%m_terminal => win + case (GNUPLOT_TERMINAL_LATEX) + allocate(latex, stat = flag) + if (present(fname)) call latex%set_filename(fname) + this%m_terminal => latex + case default ! WXT is the default + allocate(wxt, stat = flag) + this%m_terminal => wxt + end select + + ! Establish the colormap + nullify(this%m_colormap) + + if (flag == 0 .and. .not.associated(this%m_legend)) then + allocate(this%m_legend, stat = flag) + end if + + ! Error Checking + if (flag /= 0) then + call report_memory_error(errmgr, "plt_init", flag) + return + end if + end subroutine + +! ------------------------------------------------------------------------------ + function plt_get_title(this) result(txt) + !! Gets the plot's title. + class(plot), intent(in) :: this + !! The plot object. + character(len = :), allocatable :: txt + !! The title. + integer(int32) :: n + n = len_trim(this%m_title) + allocate(character(len = n) :: txt) + txt = trim(this%m_title) + end function + +! -------------------- + subroutine plt_set_title(this, txt) + !! Sets the plot's title. + class(plot), intent(inout) :: this + !! The plot object. + character(len = *), intent(in) :: txt + !! The title. + integer :: n + n = min(len_trim(txt), PLOTDATA_MAX_NAME_LENGTH) + this%m_title = "" + if (n /= 0) then + this%m_title(1:n) = txt(1:n) + this%m_hasTitle = .true. + else + this%m_hasTitle = .false. + end if + end subroutine ! ------------------------------------------------------------------------------ - function plt_get_legend(this) result(x) - !! Gets the plot's legend object. - class(plot), intent(in) :: this - !! The plot object. - type(legend), pointer :: x - !! A pointer to the legend object. - x => this%m_legend - end function - -! ------------------------------------------------------------------------------ - pure function plt_get_count(this) result(x) - !! Gets the number of stored plot_data objects. - class(plot), intent(in) :: this - !! The plot object. - integer(int32) :: x - !! The number of plot_data objects. - x = this%m_data%count() - end function - -! ------------------------------------------------------------------------------ - subroutine plt_push_data(this, x, err) - !! Pushes a plot_data object onto the stack. - class(plot), intent(inout) :: this - !! The plot object. - class(plot_data), intent(inout) :: x - !! The plot_data object. - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Index the color tracking index if the type is of plot_data_colored - select type (x) - class is (plot_data_colored) - call x%set_color_index(this%m_colorIndex) - if (this%m_colorIndex == size(color_list)) then - this%m_colorIndex = 1 - else - this%m_colorIndex = this%m_colorIndex + 1 - end if - end select - - ! Store the object - call this%m_data%push(x, err = err) - end subroutine - -! ------------------------------------------------------------------------------ - subroutine plt_pop_data(this) - !! Pops the last plot_data object from the stack. - class(plot), intent(inout) :: this - !! The plot object. - - ! Process - call this%m_data%pop() - end subroutine - -! ------------------------------------------------------------------------------ - subroutine plt_clear_all(this) - !! Removes all plot_data objects from the plot. - class(plot), intent(inout) :: this - !! The plot object. - - ! Process - this%m_colorIndex = 1 - call this%m_data%clear() - end subroutine - -! ------------------------------------------------------------------------------ - function plt_get(this, i) result(x) - !! Gets a pointer to the requested plot_data object. - class(plot), intent(in) :: this - !! The plot object. - integer(int32), intent(in) :: i - !! The index of the plot_data object. - class(plot_data), pointer :: x - !! A pointer to the requested plot_data object. - - ! Local Variables - class(*), pointer :: item - - ! Process - item => this%m_data%get(i) - select type (item) - class is (plot_data) - x => item - class default - nullify(x) - end select - end function - - -! -------------------- - subroutine plt_set(this, i, x) - !! Sets the requested plot_data object into the plot. - class(plot), intent(inout) :: this - !! The plot object. - integer(int32), intent(in) :: i - !! The index of the plot_data object. - class(plot_data), intent(in) :: x - !! The plot_data object. - call this%m_data%set(i, x) - end subroutine + pure function plt_has_title(this) result(x) + !! Gets a value determining if a title has been defined for the plot + !! object. + class(plot), intent(in) :: this + !! The plot object. + logical :: x + !! Returns true if a title has been defined for this plot; else, + !! returns false. + x = this%m_hasTitle + end function + +! ------------------------------------------------------------------------------ + function plt_get_legend(this) result(x) + !! Gets the plot's legend object. + class(plot), intent(in) :: this + !! The plot object. + type(legend), pointer :: x + !! A pointer to the legend object. + x => this%m_legend + end function + +! ------------------------------------------------------------------------------ + pure function plt_get_count(this) result(x) + !! Gets the number of stored plot_data objects. + class(plot), intent(in) :: this + !! The plot object. + integer(int32) :: x + !! The number of plot_data objects. + x = this%m_data%count() + end function + +! ------------------------------------------------------------------------------ + subroutine plt_push_data(this, x, err) + !! Pushes a plot_data object onto the stack. + class(plot), intent(inout) :: this + !! The plot object. + class(plot_data), intent(inout) :: x + !! The plot_data object. + class(errors), intent(inout), optional, target :: err + !! An error handling object. + + ! Index the color tracking index if the type is of plot_data_colored + select type (x) + class is (plot_data_colored) + call x%set_color_index(this%m_colorIndex) + if (this%m_colorIndex == size(color_list)) then + this%m_colorIndex = 1 + else + this%m_colorIndex = this%m_colorIndex + 1 + end if + end select + + ! Store the object + call this%m_data%push(x, err = err) + end subroutine + +! ------------------------------------------------------------------------------ + subroutine plt_pop_data(this) + !! Pops the last plot_data object from the stack. + class(plot), intent(inout) :: this + !! The plot object. + + ! Process + call this%m_data%pop() + end subroutine + +! ------------------------------------------------------------------------------ + subroutine plt_clear_all(this) + !! Removes all plot_data objects from the plot. + class(plot), intent(inout) :: this + !! The plot object. + + ! Process + this%m_colorIndex = 1 + call this%m_data%clear() + end subroutine + +! ------------------------------------------------------------------------------ + function plt_get(this, i) result(x) + !! Gets a pointer to the requested plot_data object. + class(plot), intent(in) :: this + !! The plot object. + integer(int32), intent(in) :: i + !! The index of the plot_data object. + class(plot_data), pointer :: x + !! A pointer to the requested plot_data object. + + ! Local Variables + class(*), pointer :: item + + ! Process + item => this%m_data%get(i) + select type (item) + class is (plot_data) + x => item + class default + nullify(x) + end select + end function + -! ------------------------------------------------------------------------------ - function plt_get_term(this) result(x) - !! Gets the GNUPLOT terminal object. - class(plot), intent(in) :: this +! -------------------- + subroutine plt_set(this, i, x) + !! Sets the requested plot_data object into the plot. + class(plot), intent(inout) :: this !! The plot object. - class(terminal), pointer :: x - !! A pointer to the GNUPLOT terminal object. - x => this%m_terminal - end function - -! ------------------------------------------------------------------------------ - pure function plt_get_show_grid(this) result(x) - !! Gets a flag determining if the grid lines should be shown. - class(plot), intent(in) :: this - !! The plot object. - logical :: x - !! Returns true if the grid lines should be shown; else, false. - x = this%m_showGrid - end function - -! -------------------- - subroutine plt_set_show_grid(this, x) - !! Sets a flag determining if the grid lines should be shown. - class(plot), intent(inout) :: this - !! The plot object. - logical, intent(in) :: x - !! Set to true if the grid lines should be shown; else, false. - this%m_showGrid = x - end subroutine - -! ------------------------------------------------------------------------------ - subroutine plt_draw(this, persist, err) - !! Launches GNUPLOT and draws the plot per the current state of - !! the command list. - class(plot), intent(in) :: this - !! The 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. - - ! Parameters - character(len = *), parameter :: fname = "temp_gnuplot_file.plt" - - ! Local Variables - logical :: p - integer(int32) :: fid, flag - class(errors), pointer :: errmgr - type(errors), target :: deferr - class(terminal), pointer :: term - - ! Initialization - if (present(persist)) then - p = persist - else - p = .true. - end if - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - term => this%get_terminal() - - ! Open the file for writing, and write the contents to file - open(newunit = fid, file = fname, iostat = flag) - if (flag > 0) then - call report_file_create_error(errmgr, "plt_draw", fname, flag) - return - end if - write(fid, '(A)') term%get_command_string() - write(fid, '(A)') new_line('a') - write(fid, '(A)') this%get_command_string() - close(fid) - - ! Launch GNUPLOT - if (p) then - call execute_command_line("gnuplot --persist " // fname) - else - call execute_command_line("gnuplot " // fname) - end if - - ! Clean up by deleting the file - open(newunit = fid, file = fname) - close(fid, status = "delete") - end subroutine + integer(int32), intent(in) :: i + !! The index of the plot_data object. + class(plot_data), intent(in) :: x + !! The plot_data object. + call this%m_data%set(i, x) + end subroutine + +! ------------------------------------------------------------------------------ + function plt_get_term(this) result(x) + !! Gets the GNUPLOT terminal object. + class(plot), intent(in) :: this + !! The plot object. + class(terminal), pointer :: x + !! A pointer to the GNUPLOT terminal object. + x => this%m_terminal + end function + +! ------------------------------------------------------------------------------ + pure function plt_get_show_grid(this) result(x) + !! Gets a flag determining if the grid lines should be shown. + class(plot), intent(in) :: this + !! The plot object. + logical :: x + !! Returns true if the grid lines should be shown; else, false. + x = this%m_showGrid + end function + +! -------------------- + subroutine plt_set_show_grid(this, x) + !! Sets a flag determining if the grid lines should be shown. + class(plot), intent(inout) :: this + !! The plot object. + logical, intent(in) :: x + !! Set to true if the grid lines should be shown; else, false. + this%m_showGrid = x + end subroutine + +! ------------------------------------------------------------------------------ + subroutine plt_draw(this, persist, err) + !! Launches GNUPLOT and draws the plot per the current state of + !! the command list. + class(plot), intent(in) :: this + !! The 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. + + ! Parameters + character(len = *), parameter :: fname = "temp_gnuplot_file.plt" + + ! Local Variables + logical :: p + integer(int32) :: fid, flag + class(errors), pointer :: errmgr + type(errors), target :: deferr + class(terminal), pointer :: term + + ! Initialization + if (present(persist)) then + p = persist + else + p = .true. + end if + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + term => this%get_terminal() + + ! Open the file for writing, and write the contents to file + open(newunit = fid, file = fname, iostat = flag) + if (flag > 0) then + call report_file_create_error(errmgr, "plt_draw", fname, flag) + return + end if + write(fid, '(A)') term%get_command_string() + write(fid, '(A)') new_line('a') + write(fid, '(A)') this%get_command_string() + close(fid) -! ------------------------------------------------------------------------------ - subroutine plt_save(this, fname, err) - !! Saves a GNUPLOT command file. - class(plot), intent(in) :: this - !! The plot object. - character(len = *), intent(in) :: fname - !! The filename. - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Local Variables - integer(int32) :: fid, flag - class(errors), pointer :: errmgr - type(errors), target :: deferr - class(terminal), pointer :: term - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - term => this%get_terminal() - - ! Open the file for writing, and write the contents to file - open(newunit = fid, file = fname, iostat = flag) - if (flag > 0) then - call report_file_create_error(errmgr, "plt_save", fname, flag) - return - end if - write(fid, '(A)') term%get_command_string() - write(fid, '(A)') new_line('a') - write(fid, '(A)') this%get_command_string() - close(fid) - end subroutine + ! Launch GNUPLOT + if (p) then + call execute_command_line("gnuplot --persist " // fname) + else + call execute_command_line("gnuplot " // fname) + end if + + ! Clean up by deleting the file + open(newunit = fid, file = fname) + close(fid, status = "delete") + end subroutine + +! ------------------------------------------------------------------------------ + subroutine plt_save(this, fname, err) + !! Saves a GNUPLOT command file. + class(plot), intent(in) :: this + !! The plot object. + character(len = *), intent(in) :: fname + !! The filename. + class(errors), intent(inout), optional, target :: err + !! An error handling object. + + ! Local Variables + integer(int32) :: fid, flag + class(errors), pointer :: errmgr + type(errors), target :: deferr + class(terminal), pointer :: term + + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + term => this%get_terminal() -! ------------------------------------------------------------------------------ - function plt_get_font(this) result(x) - !! Gets the name of the font used for plot text. - class(plot), intent(in) :: this - !! The plot object. - character(len = :), allocatable :: x - !! The font name. - class(terminal), pointer :: term - term => this%get_terminal() - x = term%get_font_name() - end function + ! Open the file for writing, and write the contents to file + open(newunit = fid, file = fname, iostat = flag) + if (flag > 0) then + call report_file_create_error(errmgr, "plt_save", fname, flag) + return + end if + write(fid, '(A)') term%get_command_string() + write(fid, '(A)') new_line('a') + write(fid, '(A)') this%get_command_string() + close(fid) + end subroutine -! -------------------- - subroutine plt_set_font(this, x) - !! Sets the name of the font used for plot text. - class(plot), intent(inout) :: this +! ------------------------------------------------------------------------------ + function plt_get_font(this) result(x) + !! Gets the name of the font used for plot text. + class(plot), intent(in) :: this !! The plot object. - character(len = *), intent(in) :: x + character(len = :), allocatable :: x !! The font name. class(terminal), pointer :: term term => this%get_terminal() - call term%set_font_name(x) - end subroutine + x = term%get_font_name() + end function -! ------------------------------------------------------------------------------ - function plt_get_font_size(this) result(x) - !! Gets the size of the font used by the plot. - class(plot), intent(in) :: this +! -------------------- + subroutine plt_set_font(this, x) + !! Sets the name of the font used for plot text. + class(plot), intent(inout) :: this !! The plot object. - integer(int32) :: x - !! The size of the font, in points. + character(len = *), intent(in) :: x + !! The font name. class(terminal), pointer :: term term => this%get_terminal() - x = term%get_font_size() - end function + call term%set_font_name(x) + end subroutine -! -------------------- - subroutine plt_set_font_size(this, x) - !! Sets the size of the font used by the plot. - class(plot), intent(inout) :: this +! ------------------------------------------------------------------------------ + function plt_get_font_size(this) result(x) + !! Gets the size of the font used by the plot. + class(plot), intent(in) :: this !! The plot object. - integer(int32), intent(in) :: x - !! The font size, in points. If a value of zero is provided, - !! the font size is reset to its default value; or, if a negative - !! value is provided, the absolute value of the supplied value is - !! utilized. - class(terminal), pointer :: term - term => this%get_terminal() - call term%set_font_size(x) - end subroutine - -! ------------------------------------------------------------------------------ - pure function plt_get_tics_in(this) result(x) - !! Gets a value determining if the axis tic marks should point inwards. - class(plot), intent(in) :: this - !! The plot object. - logical :: x - !! Returns true if the tic marks should point inwards; else, false - !! if the tic marks should point outwards. - x = this%m_ticsIn - end function - -! -------------------- - subroutine plt_set_tics_in(this, x) - !! Sets a value determining if the axis tic marks should point inwards. - class(plot), intent(inout) :: this - !! The plot object. - logical, intent(in) :: x - !! Set to true if the tic marks should point inwards; else, false - !! if the tic marks should point outwards. - this%m_ticsIn = x - end subroutine - -! ------------------------------------------------------------------------------ - pure function plt_get_draw_border(this) result(x) - !! Gets a value determining if the border should be drawn. - class(plot), intent(in) :: this - !! The plot object. - logical :: x - !! Returns true if the border should be drawn; else, false. - x = this%m_drawBorder - end function - -! -------------------- - subroutine plt_set_draw_border(this, x) - !! Sets a value determining if the border should be drawn. - class(plot), intent(inout) :: this - !! The plot object. - logical, intent(in) :: x - !! Set to true if the border should be drawn; else, false. - this%m_drawBorder = x - end subroutine - -! ****************************************************************************** -! ADDED: JUNE 22, 2018 - JAC -! ------------------------------------------------------------------------------ - subroutine plt_push_label(this, lbl, err) - !! Adds a label to the plot. + integer(int32) :: x + !! The size of the font, in points. + class(terminal), pointer :: term + term => this%get_terminal() + x = term%get_font_size() + end function + +! -------------------- + subroutine plt_set_font_size(this, x) + !! Sets the size of the font used by the plot. + class(plot), intent(inout) :: this + !! The plot object. + integer(int32), intent(in) :: x + !! The font size, in points. If a value of zero is provided, + !! the font size is reset to its default value; or, if a negative + !! value is provided, the absolute value of the supplied value is + !! utilized. + class(terminal), pointer :: term + term => this%get_terminal() + call term%set_font_size(x) + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_tics_in(this) result(x) + !! Gets a value determining if the axis tic marks should point inwards. + class(plot), intent(in) :: this + !! The plot object. + logical :: x + !! Returns true if the tic marks should point inwards; else, false + !! if the tic marks should point outwards. + x = this%m_ticsIn + end function + +! -------------------- + subroutine plt_set_tics_in(this, x) + !! Sets a value determining if the axis tic marks should point inwards. + class(plot), intent(inout) :: this + !! The plot object. + logical, intent(in) :: x + !! Set to true if the tic marks should point inwards; else, false + !! if the tic marks should point outwards. + this%m_ticsIn = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_draw_border(this) result(x) + !! Gets a value determining if the border should be drawn. + class(plot), intent(in) :: this + !! The plot object. + logical :: x + !! Returns true if the border should be drawn; else, false. + x = this%m_drawBorder + end function + +! -------------------- + subroutine plt_set_draw_border(this, x) + !! Sets a value determining if the border should be drawn. class(plot), intent(inout) :: this !! The plot object. - class(plot_label), intent(in) :: lbl - !! The plot label. - class(errors), intent(inout), optional, target :: err - !! An error handling object. + logical, intent(in) :: x + !! Set to true if the border should be drawn; else, false. + this%m_drawBorder = x + end subroutine - ! Process - call this%m_labels%push(lbl, err = err) - end subroutine - -! ------------------------------------------------------------------------------ - subroutine plt_pop_label(this) - !! Removes the last label from the plot. - class(plot), intent(inout) :: this - !! The plot object. - call this%m_labels%pop() - end subroutine +! ****************************************************************************** +! ADDED: JUNE 22, 2018 - JAC +! ------------------------------------------------------------------------------ + subroutine plt_push_label(this, lbl, err) + !! Adds a label to the plot. + class(plot), intent(inout) :: this + !! The plot object. + class(plot_label), intent(in) :: lbl + !! The plot label. + class(errors), intent(inout), optional, target :: err + !! An error handling object. -! ------------------------------------------------------------------------------ - function plt_get_label(this, i) result(x) - !! Gets the requested plot_label from the plot. - class(plot), intent(in) :: this - !! The plot object. - integer(int32), intent(in) :: i - !! The index of the plot_label object to retrieve. - class(plot_label), pointer :: x - !! A pointer to the requested plot_label object. - - ! Local Variables - class(*), pointer :: item - - ! Process - item => this%m_labels%get(i) - select type (item) - class is (plot_label) - x => item - class default - nullify(x) - end select - end function - -! -------------------- - subroutine plt_set_label(this, i, x) - !! Sets the specified plot_label object. - class(plot), intent(inout) :: this - !! The plot object. - integer(int32), intent(in) :: i - !! The index of the plot_label to replace. - class(plot_label), intent(in) :: x - !! The new plot_label object. - call this%m_labels%set(i, x) - end subroutine + ! Process + call this%m_labels%push(lbl, err = err) + end subroutine + +! ------------------------------------------------------------------------------ + subroutine plt_pop_label(this) + !! Removes the last label from the plot. + class(plot), intent(inout) :: this + !! The plot object. + call this%m_labels%pop() + end subroutine + +! ------------------------------------------------------------------------------ + function plt_get_label(this, i) result(x) + !! Gets the requested plot_label from the plot. + class(plot), intent(in) :: this + !! The plot object. + integer(int32), intent(in) :: i + !! The index of the plot_label object to retrieve. + class(plot_label), pointer :: x + !! A pointer to the requested plot_label object. + + ! Local Variables + class(*), pointer :: item + + ! Process + item => this%m_labels%get(i) + select type (item) + class is (plot_label) + x => item + class default + nullify(x) + end select + end function -! ------------------------------------------------------------------------------ - pure function plt_get_label_count(this) result(x) - !! Gets the number of plot_label objects belonging to the plot. - class(plot), intent(in) :: this +! -------------------- + subroutine plt_set_label(this, i, x) + !! Sets the specified plot_label object. + class(plot), intent(inout) :: this !! The plot object. - integer(int32) :: x - !! The number of plot_label objects. - x = this%m_labels%count() - end function - -! ------------------------------------------------------------------------------ - subroutine plt_clear_labels(this) - !! Clears all plot_label objects from the plot. - class(plot), intent(inout) :: this - !! The plot object. - call this%m_labels%clear() - end subroutine - -! ****************************************************************************** -! ADDED: SEPT. 25, 2020 - JAC -! ------------------------------------------------------------------------------ - pure function plt_get_axis_equal(this) result(rst) - !! Gets a flag determining if the axes should be equally scaled. - class(plot), intent(in) :: this - !! The plot object. - logical :: rst - !! Returns true if the axes should be scaled equally; else, false. - rst = this%m_axisEqual - end function + integer(int32), intent(in) :: i + !! The index of the plot_label to replace. + class(plot_label), intent(in) :: x + !! The new plot_label object. + call this%m_labels%set(i, x) + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_label_count(this) result(x) + !! Gets the number of plot_label objects belonging to the plot. + class(plot), intent(in) :: this + !! The plot object. + integer(int32) :: x + !! The number of plot_label objects. + x = this%m_labels%count() + end function + +! ------------------------------------------------------------------------------ + subroutine plt_clear_labels(this) + !! Clears all plot_label objects from the plot. + class(plot), intent(inout) :: this + !! The plot object. + call this%m_labels%clear() + end subroutine -! -------------------- - subroutine plt_set_axis_equal(this, x) - !! Sets a flag determining if the axes should be equally scaled. - class(plot), intent(inout) :: this - !! The plot object. - logical, intent(in) :: x - !! Set to true if the axes should be scaled equally; else, false. - this%m_axisEqual = x - end subroutine - -! ****************************************************************************** -! ADDED: OCT. 8, 2020 - JAC -! ------------------------------------------------------------------------------ - function plt_get_colormap(this) result(x) - !! Gets a pointer to the colormap object. - class(plot), intent(in) :: this +! ****************************************************************************** +! ADDED: SEPT. 25, 2020 - JAC +! ------------------------------------------------------------------------------ + pure function plt_get_axis_equal(this) result(rst) + !! Gets a flag determining if the axes should be equally scaled. + class(plot), intent(in) :: this + !! The plot object. + logical :: rst + !! Returns true if the axes should be scaled equally; else, false. + rst = this%m_axisEqual + end function + +! -------------------- + subroutine plt_set_axis_equal(this, x) + !! Sets a flag determining if the axes should be equally scaled. + class(plot), intent(inout) :: this !! The plot object. - class(colormap), pointer :: x - !! A pointer to the colormap object. If no colormap is defined, a - !! null pointer is returned. - x => this%m_colormap - end function - -! -------------------- - subroutine plt_set_colormap(this, x, err) - !! Sets the colormap object. - class(plot), intent(inout) :: this - !! The plot object. - class(colormap), intent(in) :: x - !! The colormap object. Notice, a copy of this object is - !! stored, and the plot object then manages the lifetime of the - !! copy. - class(errors), intent(inout), optional, target :: err - !! An error handler object. + logical, intent(in) :: x + !! Set to true if the axes should be scaled equally; else, false. + this%m_axisEqual = x + end subroutine + +! ****************************************************************************** +! ADDED: OCT. 8, 2020 - JAC +! ------------------------------------------------------------------------------ + function plt_get_colormap(this) result(x) + !! Gets a pointer to the colormap object. + class(plot), intent(in) :: this + !! The plot object. + class(colormap), pointer :: x + !! A pointer to the colormap object. If no colormap is defined, a + !! null pointer is returned. + x => this%m_colormap + end function - ! Local Variables - integer(int32) :: flag - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if +! -------------------- + subroutine plt_set_colormap(this, x, err) + !! Sets the colormap object. + class(plot), intent(inout) :: this + !! The plot object. + class(colormap), intent(in) :: x + !! The colormap object. Notice, a copy of this object is + !! stored, and the plot object then manages the lifetime of the + !! copy. + class(errors), intent(inout), optional, target :: err + !! An error handler object. - ! Process - if (associated(this%m_colormap)) deallocate(this%m_colormap) - allocate(this%m_colormap, stat = flag, source = x) - if (flag /= 0) then - call errmgr%report_error("surf_set_colormap", & - "Insufficient memory available.", PLOT_OUT_OF_MEMORY_ERROR) - return - end if - end subroutine - -! ------------------------------------------------------------------------------ - pure function plt_get_show_colorbar(this) result(x) - !! Gets a value determining if the colorbar should be shown. - class(plot), intent(in) :: this - !! The plot object. - logical :: x - !! Returns true if the colorbar should be drawn; else, false. - x = this%m_showColorbar - end function - -! -------------------- - subroutine plt_set_show_colorbar(this, x) - !! Sets a value determining if the colorbar should be shown. - class(plot), intent(inout) :: this - !! The plot object. - logical, intent(in) :: x - !! Set to true if the colorbar should be drawn; else, false. - this%m_showColorbar = x - end subroutine - -! ------------------------------------------------------------------------------ - function plt_get_cmd(this) result(x) - !! Gets the GNUPLOT command string to represent this plot object. - class(plot), intent(in) :: this - !! The plot object. - character(len = :), allocatable :: x - !! The command string. - - ! Local Variables - integer(int32) :: i - type(string_builder) :: str - class(colormap), pointer :: clr - class(plot_arrow), pointer :: arrow - class(plot_label), pointer :: lbl - - ! Initialization - call str%initialize() - - ! Define the colormap - clr => this%get_colormap() - if (associated(clr)) then - call str%append(new_line('a')) - call str%append(clr%get_command_string()) - end if - - ! Show the colorbar - if (.not.this%get_show_colorbar()) then - call str%append(new_line('a')) - call str%append("unset colorbox") - end if - - ! Arrows - do i = 1, this%get_arrow_count() - arrow => this%get_arrow(i) - if (.not.associated(arrow)) cycle - call str%append(new_line('a')) - call str%append(arrow%get_command_string()) - end do - - ! Labels - do i = 1, this%get_label_count() - lbl => this%get_label(i) - if (.not.associated(lbl)) cycle - call str%append(new_line('a')) - call str%append(lbl%get_command_string()) - end do - - ! End - x = char(str%to_string()) - end function + ! Local Variables + integer(int32) :: flag + class(errors), pointer :: errmgr + type(errors), target :: deferr + + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + + ! Process + if (associated(this%m_colormap)) deallocate(this%m_colormap) + allocate(this%m_colormap, stat = flag, source = x) + if (flag /= 0) then + call errmgr%report_error("surf_set_colormap", & + "Insufficient memory available.", PLOT_OUT_OF_MEMORY_ERROR) + return + end if + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_show_colorbar(this) result(x) + !! Gets a value determining if the colorbar should be shown. + class(plot), intent(in) :: this + !! The plot object. + logical :: x + !! Returns true if the colorbar should be drawn; else, false. + x = this%m_showColorbar + end function + +! -------------------- + subroutine plt_set_show_colorbar(this, x) + !! Sets a value determining if the colorbar should be shown. + class(plot), intent(inout) :: this + !! The plot object. + logical, intent(in) :: x + !! Set to true if the colorbar should be drawn; else, false. + this%m_showColorbar = x + end subroutine + +! ------------------------------------------------------------------------------ + function plt_get_cmd(this) result(x) + !! Gets the GNUPLOT command string to represent this plot object. + class(plot), intent(in) :: this + !! The plot object. + character(len = :), allocatable :: x + !! The command string. + + ! Local Variables + integer(int32) :: i + type(string_builder) :: str + class(colormap), pointer :: clr + class(plot_arrow), pointer :: arrow + class(plot_label), pointer :: lbl + + ! Initialization + call str%initialize() + + ! Define the colormap + clr => this%get_colormap() + if (associated(clr)) then + call str%append(new_line('a')) + call str%append(clr%get_command_string()) + end if + + ! Show the colorbar + if (.not.this%get_show_colorbar()) then + call str%append(new_line('a')) + call str%append("unset colorbox") + end if + + ! Arrows + do i = 1, this%get_arrow_count() + arrow => this%get_arrow(i) + if (.not.associated(arrow)) cycle + call str%append(new_line('a')) + call str%append(arrow%get_command_string()) + end do -! ****************************************************************************** -! ADDED: 1/3/2024 - JAC -! ------------------------------------------------------------------------------ - subroutine plt_push_arrow(this, x, err) - !! Pushes a new @ref plot_arrow object onto the plot. - class(plot), intent(inout) :: this - !! The plot object. - class(plot_arrow), intent(in) :: x - !! The plot_arrow object. - class(errors), intent(inout), optional, target :: err - !! An error handling object. - call this%m_arrows%push(x, manage = .true., err = err) - end subroutine - + ! Labels + do i = 1, this%get_label_count() + lbl => this%get_label(i) + if (.not.associated(lbl)) cycle + call str%append(new_line('a')) + call str%append(lbl%get_command_string()) + end do + + ! End + x = char(str%to_string()) + end function + +! ****************************************************************************** +! ADDED: 1/3/2024 - JAC ! ------------------------------------------------------------------------------ - subroutine plt_pop_arrow(this) - !! Pops the last plot_arrow object from the plot. + subroutine plt_push_arrow(this, x, err) + !! Pushes a new @ref plot_arrow object onto the plot. class(plot), intent(inout) :: this !! The plot object. - call this%m_arrows%pop() - end subroutine - -! ------------------------------------------------------------------------------ - function plt_get_arrow(this, i) result(rst) - !! Gets a pointer to the requested plot_arrow object. - class(plot), intent(in) :: this - !! The plot object. - integer(int32), intent(in) :: i - !! The index of the plot_arrow to retrieve. - class(plot_arrow), pointer :: rst - !! The plot_arrow object to retrieve. - - class(*), pointer :: ptr - ptr => this%m_arrows%get(i) - select type (ptr) - class is (plot_arrow) - rst => ptr - class default - nullify(rst) - end select - end function - -! ------------------------------------------------------------------------------ - subroutine plt_set_arrow(this, i, x) - !! Sets a plot_arrow into the plot. - class(plot), intent(inout) :: this - !! The plot object. - integer(int32), intent(in) :: i - !! The index of the plot_arrow object to replace. - class(plot_arrow), intent(in) :: x - !! The new plot_arrow object. - call this%m_arrows%set(i, x) - end subroutine + class(plot_arrow), intent(in) :: x + !! The plot_arrow object. + class(errors), intent(inout), optional, target :: err + !! An error handling object. + call this%m_arrows%push(x, manage = .true., err = err) + end subroutine + +! ------------------------------------------------------------------------------ + subroutine plt_pop_arrow(this) + !! Pops the last plot_arrow object from the plot. + class(plot), intent(inout) :: this + !! The plot object. + call this%m_arrows%pop() + end subroutine + +! ------------------------------------------------------------------------------ + function plt_get_arrow(this, i) result(rst) + !! Gets a pointer to the requested plot_arrow object. + class(plot), intent(in) :: this + !! The plot object. + integer(int32), intent(in) :: i + !! The index of the plot_arrow to retrieve. + class(plot_arrow), pointer :: rst + !! The plot_arrow object to retrieve. + + class(*), pointer :: ptr + ptr => this%m_arrows%get(i) + select type (ptr) + class is (plot_arrow) + rst => ptr + class default + nullify(rst) + end select + end function ! ------------------------------------------------------------------------------ - pure function plt_get_arrow_count(this) result(rst) - !! Gets the number of plot_arrow objects held by the plot object. - class(plot), intent(in) :: this + subroutine plt_set_arrow(this, i, x) + !! Sets a plot_arrow into the plot. + class(plot), intent(inout) :: this !! The plot object. - integer(int32) :: rst - !! The plot_arrow objects count. - rst = this%m_arrows%count() - end function - -! ------------------------------------------------------------------------------ - subroutine plt_clear_arrows(this) - !! Clears all plot_arrow objects from the plot. - class(plot), intent(inout) :: this - !! The plot object. - call this%m_arrows%clear() - end subroutine - -! ------------------------------------------------------------------------------ -end module + integer(int32), intent(in) :: i + !! The index of the plot_arrow object to replace. + class(plot_arrow), intent(in) :: x + !! The new plot_arrow object. + call this%m_arrows%set(i, x) + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_arrow_count(this) result(rst) + !! Gets the number of plot_arrow objects held by the plot object. + class(plot), intent(in) :: this + !! The plot object. + integer(int32) :: rst + !! The plot_arrow objects count. + rst = this%m_arrows%count() + end function + +! ------------------------------------------------------------------------------ + subroutine plt_clear_arrows(this) + !! Clears all plot_arrow objects from the plot. + class(plot), intent(inout) :: this + !! The plot object. + call this%m_arrows%clear() + end subroutine + +! ****************************************************************************** +! ADDED: 4/7/2025 - JAC +! ------------------------------------------------------------------------------ + pure function plt_get_left_margin(this) result(x) + !! Gets the left margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_leftMargin + end function + +! ---------- + subroutine plt_set_left_margin(this, x) + !! Sets the left margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_leftMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_right_margin(this) result(x) + !! Gets the right margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_rightMargin + end function + +! ---------- + subroutine plt_set_right_margin(this, x) + !! Sets the right margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_rightMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_top_margin(this) result(x) + !! Gets the top margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_topMargin + end function + +! ---------- + subroutine plt_set_top_margin(this, x) + !! Sets the top margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_topMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_bottom_margin(this) result(x) + !! Gets the bottom margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_bottomMargin + end function + +! ---------- + subroutine plt_set_bottom_margin(this, x) + !! Sets the bottom margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_bottomMargin = x + end subroutine + +! ------------------------------------------------------------------------------ +end module @@ -1094,7 +1200,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_2d.f90.html b/doc/sourcefile/fplot_plot_2d.f90.html index c9ef0b6..1333758 100644 --- a/doc/sourcefile/fplot_plot_2d.f90.html +++ b/doc/sourcefile/fplot_plot_2d.f90.html @@ -96,7 +96,7 @@

    fplot_plot_2d.f90
  • 215 statements + title=" 3.3% of total for source files.">240 statements
  • @@ -345,227 +345,254 @@

    Source Code

    ! Local Variables type(string_builder) :: str integer(int32) :: i, n - class(plot_data), pointer :: ptr - class(plot_axis), pointer :: axis, xAxis, yAxis - type(legend), pointer :: leg - ! class(plot_label), pointer :: lbl - - ! Initialization - call str%initialize() - - ! Call the base routine - call str%append(this%plot%get_command_string()) - - ! Grid - if (this%get_show_gridlines()) then - call str%append(new_line('a')) - call str%append("set grid") - end if - - ! Title - n = len_trim(this%get_title()) - if (n > 0) then - call str%append(new_line('a')) - call str%append('set title "') - call str%append(this%get_title()) - call str%append('"') - end if - - ! Axes - call str%append(new_line('a')) - xAxis => this%get_x_axis() - if (associated(xAxis)) call str%append(xAxis%get_command_string()) - - call str%append(new_line('a')) - yAxis => this%get_y_axis() - if (associated(yAxis)) call str%append(yAxis%get_command_string()) - - ! Secondary Axes - if (this%get_use_y2_axis()) then - call str%append(new_line('a')) - axis => this%get_y2_axis() - if (associated(axis)) then - call str%append(axis%get_command_string()) - call str%append(new_line('a')) - call str%append("set y2tics") - call str%append(new_line('a')) - call str%append("set ytics nomirror") - end if - end if - - ! Tic Marks - if (.not.this%get_tics_inward()) then - call str%append(new_line('a')) - call str%append("set tics out") - end if - if (xAxis%get_zero_axis()) then - call str%append(new_line('a')) - call str%append("set xtics axis") - end if - if (yAxis%get_zero_axis()) then - call str%append(new_line('a')) - call str%append("set ytics axis") - end if + real(real32) :: lmargin, rmargin, tmargin, bmargin + class(plot_data), pointer :: ptr + class(plot_axis), pointer :: axis, xAxis, yAxis + type(legend), pointer :: leg + ! class(plot_label), pointer :: lbl + + ! Initialization + call str%initialize() + + ! Call the base routine + call str%append(this%plot%get_command_string()) + + ! Grid + if (this%get_show_gridlines()) then + call str%append(new_line('a')) + call str%append("set grid") + end if + + ! Title + n = len_trim(this%get_title()) + if (n > 0) then + call str%append(new_line('a')) + call str%append('set title "') + call str%append(this%get_title()) + call str%append('"') + end if + + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if + + ! Axes + call str%append(new_line('a')) + xAxis => this%get_x_axis() + if (associated(xAxis)) call str%append(xAxis%get_command_string()) + + call str%append(new_line('a')) + yAxis => this%get_y_axis() + if (associated(yAxis)) call str%append(yAxis%get_command_string()) - - ! Border - call str%append(new_line('a')) - call str%append("set border back") - - if (this%get_draw_border()) then - n = 31 - else - n = 0 - if (.not.xAxis%get_zero_axis()) n = n + 1 - if (.not.yAxis%get_zero_axis()) n = n + 2 - - call str%append(new_line('a')) - call str%append("set xtics nomirror") - call str%append(new_line('a')) - call str%append("set ytics nomirror") - - if (this%get_use_y2_axis()) then - n = n + 8 - end if - end if - - call str%append(new_line('a')) - if (n > 0) then - call str%append("set border ") - call str%append(to_string(n)) - else - call str%append("unset border") - end if - - ! Scaling - if (this%get_axis_equal()) then - call str%append(new_line('a')) - call str%append("set view equal xy") - end if - - if (this%get_square_axes()) then - call str%append(new_line('a')) - call str%append("set size square") - end if - - ! Legend - call str%append(new_line('a')) - leg => this%get_legend() - if (associated(leg)) call str%append(leg%get_command_string()) - - ! ! Labels - ! do i = 1, this%get_label_count() - ! lbl => this%get_label(i) - ! if (.not.associated(lbl)) cycle - ! call str%append(new_line('a')) - ! call str%append(lbl%get_command_string()) - ! end do - - ! Define the plot function and data formatting commands - n = this%get_count() - call str%append(new_line('a')) - call str%append("plot ") - do i = 1, n - ptr => this%get(i) - if (.not.associated(ptr)) cycle - call str%append(ptr%get_command_string()) - if (i /= n) call str%append(", ") - end do - - ! Define the data to plot - do i = 1, n - ptr => this%get(i) - if (.not.associated(ptr)) cycle - call str%append(new_line('a')) - call str%append(ptr%get_data_string()) - call str%append("e") - ! if (i /= n) then - ! call str%append("e") - ! end if - end do - - ! End - x = char(str%to_string()) - end function + ! Secondary Axes + if (this%get_use_y2_axis()) then + call str%append(new_line('a')) + axis => this%get_y2_axis() + if (associated(axis)) then + call str%append(axis%get_command_string()) + call str%append(new_line('a')) + call str%append("set y2tics") + call str%append(new_line('a')) + call str%append("set ytics nomirror") + end if + end if + + ! Tic Marks + if (.not.this%get_tics_inward()) then + call str%append(new_line('a')) + call str%append("set tics out") + end if + if (xAxis%get_zero_axis()) then + call str%append(new_line('a')) + call str%append("set xtics axis") + end if + if (yAxis%get_zero_axis()) then + call str%append(new_line('a')) + call str%append("set ytics axis") + end if + + + ! Border + call str%append(new_line('a')) + call str%append("set border back") + + if (this%get_draw_border()) then + n = 31 + else + n = 0 + if (.not.xAxis%get_zero_axis()) n = n + 1 + if (.not.yAxis%get_zero_axis()) n = n + 2 + + call str%append(new_line('a')) + call str%append("set xtics nomirror") + call str%append(new_line('a')) + call str%append("set ytics nomirror") + + if (this%get_use_y2_axis()) then + n = n + 8 + end if + end if + + call str%append(new_line('a')) + if (n > 0) then + call str%append("set border ") + call str%append(to_string(n)) + else + call str%append("unset border") + end if + + ! Scaling + if (this%get_axis_equal()) then + call str%append(new_line('a')) + call str%append("set view equal xy") + end if + + if (this%get_square_axes()) then + call str%append(new_line('a')) + call str%append("set size square") + end if + + ! Legend + call str%append(new_line('a')) + leg => this%get_legend() + if (associated(leg)) call str%append(leg%get_command_string()) + + ! ! Labels + ! do i = 1, this%get_label_count() + ! lbl => this%get_label(i) + ! if (.not.associated(lbl)) cycle + ! call str%append(new_line('a')) + ! call str%append(lbl%get_command_string()) + ! end do -! ------------------------------------------------------------------------------ - function p2d_get_x_axis(this) result(ptr) - !! Gets the x-axis object. - class(plot_2d), intent(in) :: this - !! The plot_2d object. - class(plot_axis), pointer :: ptr - !! A pointer to the x-axis object. - ptr => this%m_xAxis - end function - -! ------------------------------------------------------------------------------ - function p2d_get_y_axis(this) result(ptr) - !! Gets the y-axis object. - class(plot_2d), intent(in) :: this - !! The plot_2d object. - class(plot_axis), pointer :: ptr - !! A pointer to the y-axis object. - ptr => this%m_yAxis - end function - -! ------------------------------------------------------------------------------ - function p2d_get_y2_axis(this) result(ptr) - !! Gets the secondary y-axis object. - class(plot_2d), intent(in) :: this - !! The plot_2d object. - class(plot_axis), pointer :: ptr - !! A pointer to the secondary y-axis object. - ptr => this%m_y2Axis - end function - -! ------------------------------------------------------------------------------ - pure function p2d_get_use_y2(this) result(x) - !! Gets a flag determining if the secondary y-axis should be - !! displayed. - class(plot_2d), intent(in) :: this - !! The plot_2d object. - logical :: x - !! Returns true if the axis should be displayed; else, false. - x = this%m_useY2 - end function - -! -------------------- - subroutine p2d_set_use_y2(this, x) - !! Sets a flag determining if the secondary y-axis should be - !! displayed. - class(plot_2d), intent(inout) :: this - !! The plot_2d object. - logical, intent(in) :: x - !! Set to true if the axis should be displayed; else, false. - this%m_useY2 = x - end subroutine - -! ------------------------------------------------------------------------------ - pure function p2d_get_square_axes(this) result(rst) - !! Gets a logical flag determining if the axes size should be squared - !! off. - class(plot_2d), intent(in) :: this - !! The plot_2d object. - logical :: rst - !! Returns true if the axes are to be sized to a square; else, - !! false. - rst = this%m_set2square - end function - -! -------------------- - subroutine p2d_set_square_axes(this, x) - !! Sets a logical flag determining if the axes size should be - !! squared off. - class(plot_2d), intent(inout) :: this - !! The plot_2d object. - logical, intent(in) :: x - !! Set to true if the axes are to be sized to a square; else, - !! false. - this%m_set2square = x - end subroutine - -! ------------------------------------------------------------------------------ -end module + ! Define the plot function and data formatting commands + n = this%get_count() + call str%append(new_line('a')) + call str%append("plot ") + do i = 1, n + ptr => this%get(i) + if (.not.associated(ptr)) cycle + call str%append(ptr%get_command_string()) + if (i /= n) call str%append(", ") + end do + + ! Define the data to plot + do i = 1, n + ptr => this%get(i) + if (.not.associated(ptr)) cycle + call str%append(new_line('a')) + call str%append(ptr%get_data_string()) + call str%append("e") + ! if (i /= n) then + ! call str%append("e") + ! end if + end do + + ! End + x = char(str%to_string()) + end function + +! ------------------------------------------------------------------------------ + function p2d_get_x_axis(this) result(ptr) + !! Gets the x-axis object. + class(plot_2d), intent(in) :: this + !! The plot_2d object. + class(plot_axis), pointer :: ptr + !! A pointer to the x-axis object. + ptr => this%m_xAxis + end function + +! ------------------------------------------------------------------------------ + function p2d_get_y_axis(this) result(ptr) + !! Gets the y-axis object. + class(plot_2d), intent(in) :: this + !! The plot_2d object. + class(plot_axis), pointer :: ptr + !! A pointer to the y-axis object. + ptr => this%m_yAxis + end function + +! ------------------------------------------------------------------------------ + function p2d_get_y2_axis(this) result(ptr) + !! Gets the secondary y-axis object. + class(plot_2d), intent(in) :: this + !! The plot_2d object. + class(plot_axis), pointer :: ptr + !! A pointer to the secondary y-axis object. + ptr => this%m_y2Axis + end function + +! ------------------------------------------------------------------------------ + pure function p2d_get_use_y2(this) result(x) + !! Gets a flag determining if the secondary y-axis should be + !! displayed. + class(plot_2d), intent(in) :: this + !! The plot_2d object. + logical :: x + !! Returns true if the axis should be displayed; else, false. + x = this%m_useY2 + end function + +! -------------------- + subroutine p2d_set_use_y2(this, x) + !! Sets a flag determining if the secondary y-axis should be + !! displayed. + class(plot_2d), intent(inout) :: this + !! The plot_2d object. + logical, intent(in) :: x + !! Set to true if the axis should be displayed; else, false. + this%m_useY2 = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function p2d_get_square_axes(this) result(rst) + !! Gets a logical flag determining if the axes size should be squared + !! off. + class(plot_2d), intent(in) :: this + !! The plot_2d object. + logical :: rst + !! Returns true if the axes are to be sized to a square; else, + !! false. + rst = this%m_set2square + end function + +! -------------------- + subroutine p2d_set_square_axes(this, x) + !! Sets a logical flag determining if the axes size should be + !! squared off. + class(plot_2d), intent(inout) :: this + !! The plot_2d object. + logical, intent(in) :: x + !! Set to true if the axes are to be sized to a square; else, + !! false. + this%m_set2square = x + end subroutine + +! ------------------------------------------------------------------------------ +end module @@ -584,7 +611,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_3d.f90.html b/doc/sourcefile/fplot_plot_3d.f90.html index 1bb0601..c89853e 100644 --- a/doc/sourcefile/fplot_plot_3d.f90.html +++ b/doc/sourcefile/fplot_plot_3d.f90.html @@ -96,7 +96,7 @@

    fplot_plot_3d.f90
  • 261 statements + title=" 3.9% of total for source files.">286 statements
  • @@ -359,312 +359,339 @@

    Source Code

    ! Local Variables type(string_builder) :: str integer(int32) :: i, n - class(plot_data), pointer :: ptr - class(plot_axis), pointer :: xAxis, yAxis, zAxis - type(legend), pointer :: leg - ! class(plot_label), pointer :: lbl - - ! Initialization - call str%initialize() - - ! Call the base routine - call str%append(this%plot%get_command_string()) - - ! Grid - if (this%get_show_gridlines()) then - call str%append(new_line('a')) - call str%append("set grid") - end if - - ! Title - n = len_trim(this%get_title()) - if (n > 0) then - call str%append(new_line('a')) - call str%append('set title "') - call str%append(this%get_title()) - call str%append('"') - end if - - ! Axes - call str%append(new_line('a')) - xAxis => this%get_x_axis() - if (associated(xAxis)) call str%append(xAxis%get_command_string()) - - call str%append(new_line('a')) - yAxis => this%get_y_axis() - if (associated(yAxis)) call str%append(yAxis%get_command_string()) - - call str%append(new_line('a')) - zAxis => this%get_z_axis() - if (associated(zAxis)) call str%append(zAxis%get_command_string()) - - ! Tic Marks - if (.not.this%get_tics_inward()) then - call str%append(new_line('a')) - call str%append("set tics out") - end if - if (xAxis%get_zero_axis() .or. yAxis%get_zero_axis() .or. & - zAxis%get_zero_axis()) then - call str%append(new_line('a')) - call str%append("set tics axis") - end if - - ! Border - if (this%get_draw_border()) then - n = 31 - else - n = 0 - if (.not.xAxis%get_zero_axis()) n = n + 1 - if (.not.yAxis%get_zero_axis()) n = n + 4 - if (.not.zAxis%get_zero_axis()) n = n + 16 - - call str%append(new_line('a')) - call str%append("set xtics nomirror") - call str%append(new_line('a')) - call str%append("set ytics nomirror") - call str%append(new_line('a')) - call str%append("set ztics nomirror") - end if - call str%append(new_line('a')) - if (n > 0) then - call str%append("set border ") - call str%append(to_string(n)) - else - call str%append("unset border") - end if - - ! Force the z-axis to move to the x-y plane - if (this%get_z_intersect_xy()) then - call str%append(new_line('a')) - call str%append("set ticslevel 0") - end if - - ! Scaling - if (this%get_axis_equal()) then - call str%append(new_line('a')) - call str%append("set view equal xyz") - end if + real(real64) :: lmargin, rmargin, tmargin, bmargin + class(plot_data), pointer :: ptr + class(plot_axis), pointer :: xAxis, yAxis, zAxis + type(legend), pointer :: leg + ! class(plot_label), pointer :: lbl + + ! Initialization + call str%initialize() + + ! Call the base routine + call str%append(this%plot%get_command_string()) + + ! Grid + if (this%get_show_gridlines()) then + call str%append(new_line('a')) + call str%append("set grid") + end if + + ! Title + n = len_trim(this%get_title()) + if (n > 0) then + call str%append(new_line('a')) + call str%append('set title "') + call str%append(this%get_title()) + call str%append('"') + end if + + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if + + ! Axes + call str%append(new_line('a')) + xAxis => this%get_x_axis() + if (associated(xAxis)) call str%append(xAxis%get_command_string()) + + call str%append(new_line('a')) + yAxis => this%get_y_axis() + if (associated(yAxis)) call str%append(yAxis%get_command_string()) + + call str%append(new_line('a')) + zAxis => this%get_z_axis() + if (associated(zAxis)) call str%append(zAxis%get_command_string()) + + ! Tic Marks + if (.not.this%get_tics_inward()) then + call str%append(new_line('a')) + call str%append("set tics out") + end if + if (xAxis%get_zero_axis() .or. yAxis%get_zero_axis() .or. & + zAxis%get_zero_axis()) then + call str%append(new_line('a')) + call str%append("set tics axis") + end if + + ! Border + if (this%get_draw_border()) then + n = 31 + else + n = 0 + if (.not.xAxis%get_zero_axis()) n = n + 1 + if (.not.yAxis%get_zero_axis()) n = n + 4 + if (.not.zAxis%get_zero_axis()) n = n + 16 - ! Legend - call str%append(new_line('a')) - leg => this%get_legend() - if (associated(leg)) call str%append(leg%get_command_string()) - - ! ! Labels - ! do i = 1, this%get_label_count() - ! lbl => this%get_label(i) - ! if (.not.associated(lbl)) cycle - ! call str%append(new_line('a')) - ! call str%append(lbl%get_command_string()) - ! end do - - ! Orientation - call str%append(new_line('a')) - call str%append("set view ") - if (this%get_use_map_view()) then - call str%append("map") - else - call str%append(to_string(this%get_elevation())) - call str%append(",") - call str%append(to_string(this%get_azimuth())) - end if - - ! Coordinate system - if (this%get_coordinate_system() == COORDINATES_CYLINDRICAL) then - call str%append(new_line('a')) - call str%append("set mapping cylindrical") - else if (this%get_coordinate_system() == COORDINATES_SPHERICAL) then - call str%append(new_line('a')) - call str%append("set mapping spherical") - end if - - ! Define the plot function and data formatting commands - n = this%get_count() - call str%append(new_line('a')) - call str%append("splot ") - do i = 1, n - ptr => this%get(i) - if (.not.associated(ptr)) cycle - call str%append(ptr%get_command_string()) - if (i /= n) call str%append(", ") - end do - - ! Define the data to plot - do i = 1, n - ptr => this%get(i) - if (.not.associated(ptr)) cycle - call str%append(new_line('a')) - call str%append(ptr%get_data_string()) - call str%append("e") - ! if (i /= n) then - ! call str%append("e") - ! end if - end do - - ! End - x = char(str%to_string()) - end function + call str%append(new_line('a')) + call str%append("set xtics nomirror") + call str%append(new_line('a')) + call str%append("set ytics nomirror") + call str%append(new_line('a')) + call str%append("set ztics nomirror") + end if + call str%append(new_line('a')) + if (n > 0) then + call str%append("set border ") + call str%append(to_string(n)) + else + call str%append("unset border") + end if + + ! Force the z-axis to move to the x-y plane + if (this%get_z_intersect_xy()) then + call str%append(new_line('a')) + call str%append("set ticslevel 0") + end if + + ! Scaling + if (this%get_axis_equal()) then + call str%append(new_line('a')) + call str%append("set view equal xyz") + end if + + ! Legend + call str%append(new_line('a')) + leg => this%get_legend() + if (associated(leg)) call str%append(leg%get_command_string()) + + ! ! Labels + ! do i = 1, this%get_label_count() + ! lbl => this%get_label(i) + ! if (.not.associated(lbl)) cycle + ! call str%append(new_line('a')) + ! call str%append(lbl%get_command_string()) + ! end do + + ! Orientation + call str%append(new_line('a')) + call str%append("set view ") + if (this%get_use_map_view()) then + call str%append("map") + else + call str%append(to_string(this%get_elevation())) + call str%append(",") + call str%append(to_string(this%get_azimuth())) + end if + + ! Coordinate system + if (this%get_coordinate_system() == COORDINATES_CYLINDRICAL) then + call str%append(new_line('a')) + call str%append("set mapping cylindrical") + else if (this%get_coordinate_system() == COORDINATES_SPHERICAL) then + call str%append(new_line('a')) + call str%append("set mapping spherical") + end if -! ------------------------------------------------------------------------------ - function p3d_get_x_axis(this) result(ptr) - !! Gets the x-axis object. - class(plot_3d), intent(in) :: this - !! The plot_3d object. - class(plot_axis), pointer :: ptr - !! A pointer to the x-axis object. - ptr => this%m_xAxis - end function - -! ------------------------------------------------------------------------------ - function p3d_get_y_axis(this) result(ptr) - !! Gets the y-axis object. - class(plot_3d), intent(in) :: this - !! The plot_3d object. - class(plot_axis), pointer :: ptr - !! A pointer to the y-axis object. - ptr => this%m_yAxis - end function - -! ------------------------------------------------------------------------------ - function p3d_get_z_axis(this) result(ptr) - !! Gets the z-axis object. - class(plot_3d), intent(in) :: this - !! The plot_3d object. - class(plot_axis), pointer :: ptr - !! A pointer to the z-axis object. - ptr => this%m_zAxis - end function - -! ------------------------------------------------------------------------------ - pure function p3d_get_elevation(this) result(x) - !! Gets the plot elevation angle. - class(plot_3d), intent(in) :: this - !! The plot_3d object. - real(real64) :: x - !! The elevation angle, in degrees. - x = this%m_elevation - end function - -! -------------------- - subroutine p3d_set_elevation(this, x) - !! Sets the plot elevation angle. - class(plot_3d), intent(inout) :: this - !! The plot_3d object. - real(real64), intent(in) :: x - !! The elevation angle, in degrees. - this%m_elevation = x - end subroutine - -! ------------------------------------------------------------------------------ - pure function p3d_get_azimuth(this) result(x) - !! Gets the plot azimuth angle. - class(plot_3d), intent(in) :: this - !! The plot_3d object. - real(real64) :: x - !! The azimuth angle, in degrees. - x = this%m_azimuth - end function - -! -------------------- - subroutine p3d_set_azimuth(this, x) - !! Sets the plot azimuth angle. - class(plot_3d), intent(inout) :: this - !! The plot_3d object. - real(real64), intent(in) :: x - !! The azimuth angle, in degrees. - this%m_azimuth = x - end subroutine - -! ------------------------------------------------------------------------------ - pure function p3d_get_z_axis_intersect(this) result(x) - !! Gets a value determining if the z-axis should intersect the - !! x-y plane. - class(plot_3d), intent(in) :: this - !! The plot_3d object. - logical :: x - !! Returns true if the z-axis should intersect the x-y plane; else, - !! false to allow the z-axis to float. - x = this%m_zIntersect - end function - -! -------------------- - subroutine p3d_set_z_axis_intersect(this, x) - !! Sets a value determining if the z-axis should intersect the - !! x-y plane. - class(plot_3d), intent(inout) :: this - !! The plot_3d object. - logical, intent(in) :: x - !! Set to true if the z-axis should intersect the x-y plane; else, - !! false to allow the z-axis to float. - this%m_zIntersect = x - end subroutine - -! ADDED March 29, 2023 - JAC -! ------------------------------------------------------------------------------ - pure function p3d_get_use_map_view(this) result(rst) - !! Gets a value determining if the view should be set to a 2D - !! map view. If true, the azimuth and elevation terms are ignored. - class(plot_3d), intent(in) :: this - !! The plot_3d object. - logical :: rst - !! Returns true if the map view will be used; else, false. - rst = this%m_setMap - end function - -! -------------------- - subroutine p3d_set_use_map_view(this, x) - !! Sets a value determining if the view should be set to a 2D - !! map view. If true, the azimuth and elevation terms are ignored. - class(plot_3d), intent(inout) :: this - !! The plot_3d object. - logical, intent(in) :: x - !! Seturns true if the map view will be used; else, false. - this%m_setMap = x - end subroutine - -! ADDED Sept. 15, 2023 - JAC -! ------------------------------------------------------------------------------ - pure function p3d_get_csys(this) result(rst) - !! Gets a value determining the coordinate system. - class(plot_3d), intent(in) :: this - !! The plot_3d object. - integer(int32) :: rst - !! The coordinate system ID, which must be one of the following. - !! - !! - COORDINATES_CARTESIAN - !! - !! - COORDINATES_CYLINDRICAL - !! - !! - COORDINATES_SPHERICAL - rst = this%m_csys - end function - -! -------------------- - subroutine p3d_set_csys(this, x) - !! Sets a value determining the coordinate system. + ! Define the plot function and data formatting commands + n = this%get_count() + call str%append(new_line('a')) + call str%append("splot ") + do i = 1, n + ptr => this%get(i) + if (.not.associated(ptr)) cycle + call str%append(ptr%get_command_string()) + if (i /= n) call str%append(", ") + end do + + ! Define the data to plot + do i = 1, n + ptr => this%get(i) + if (.not.associated(ptr)) cycle + call str%append(new_line('a')) + call str%append(ptr%get_data_string()) + call str%append("e") + ! if (i /= n) then + ! call str%append("e") + ! end if + end do + + ! End + x = char(str%to_string()) + end function + +! ------------------------------------------------------------------------------ + function p3d_get_x_axis(this) result(ptr) + !! Gets the x-axis object. + class(plot_3d), intent(in) :: this + !! The plot_3d object. + class(plot_axis), pointer :: ptr + !! A pointer to the x-axis object. + ptr => this%m_xAxis + end function + +! ------------------------------------------------------------------------------ + function p3d_get_y_axis(this) result(ptr) + !! Gets the y-axis object. + class(plot_3d), intent(in) :: this + !! The plot_3d object. + class(plot_axis), pointer :: ptr + !! A pointer to the y-axis object. + ptr => this%m_yAxis + end function + +! ------------------------------------------------------------------------------ + function p3d_get_z_axis(this) result(ptr) + !! Gets the z-axis object. + class(plot_3d), intent(in) :: this + !! The plot_3d object. + class(plot_axis), pointer :: ptr + !! A pointer to the z-axis object. + ptr => this%m_zAxis + end function + +! ------------------------------------------------------------------------------ + pure function p3d_get_elevation(this) result(x) + !! Gets the plot elevation angle. + class(plot_3d), intent(in) :: this + !! The plot_3d object. + real(real64) :: x + !! The elevation angle, in degrees. + x = this%m_elevation + end function + +! -------------------- + subroutine p3d_set_elevation(this, x) + !! Sets the plot elevation angle. + class(plot_3d), intent(inout) :: this + !! The plot_3d object. + real(real64), intent(in) :: x + !! The elevation angle, in degrees. + this%m_elevation = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function p3d_get_azimuth(this) result(x) + !! Gets the plot azimuth angle. + class(plot_3d), intent(in) :: this + !! The plot_3d object. + real(real64) :: x + !! The azimuth angle, in degrees. + x = this%m_azimuth + end function + +! -------------------- + subroutine p3d_set_azimuth(this, x) + !! Sets the plot azimuth angle. + class(plot_3d), intent(inout) :: this + !! The plot_3d object. + real(real64), intent(in) :: x + !! The azimuth angle, in degrees. + this%m_azimuth = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function p3d_get_z_axis_intersect(this) result(x) + !! Gets a value determining if the z-axis should intersect the + !! x-y plane. + class(plot_3d), intent(in) :: this + !! The plot_3d object. + logical :: x + !! Returns true if the z-axis should intersect the x-y plane; else, + !! false to allow the z-axis to float. + x = this%m_zIntersect + end function + +! -------------------- + subroutine p3d_set_z_axis_intersect(this, x) + !! Sets a value determining if the z-axis should intersect the + !! x-y plane. + class(plot_3d), intent(inout) :: this + !! The plot_3d object. + logical, intent(in) :: x + !! Set to true if the z-axis should intersect the x-y plane; else, + !! false to allow the z-axis to float. + this%m_zIntersect = x + end subroutine + +! ADDED March 29, 2023 - JAC +! ------------------------------------------------------------------------------ + pure function p3d_get_use_map_view(this) result(rst) + !! Gets a value determining if the view should be set to a 2D + !! map view. If true, the azimuth and elevation terms are ignored. + class(plot_3d), intent(in) :: this + !! The plot_3d object. + logical :: rst + !! Returns true if the map view will be used; else, false. + rst = this%m_setMap + end function + +! -------------------- + subroutine p3d_set_use_map_view(this, x) + !! Sets a value determining if the view should be set to a 2D + !! map view. If true, the azimuth and elevation terms are ignored. class(plot_3d), intent(inout) :: this !! The plot_3d object. - integer(int32), intent(in) :: x - !! The coordinate system ID, which must be one of the following. - !! - !! - COORDINATES_CARTESIAN - !! - !! - COORDINATES_CYLINDRICAL - !! - !! - COORDINATES_SPHERICAL - if (x /= COORDINATES_CARTESIAN .and. & - x /= COORDINATES_CYLINDRICAL .and. & - x /= COORDINATES_SPHERICAL) & - then - ! Set to default as the input is nonsensical - this%m_csys = COORDINATES_CARTESIAN - else - this%m_csys = x - end if - end subroutine - -! ------------------------------------------------------------------------------ -end module + logical, intent(in) :: x + !! Seturns true if the map view will be used; else, false. + this%m_setMap = x + end subroutine + +! ADDED Sept. 15, 2023 - JAC +! ------------------------------------------------------------------------------ + pure function p3d_get_csys(this) result(rst) + !! Gets a value determining the coordinate system. + class(plot_3d), intent(in) :: this + !! The plot_3d object. + integer(int32) :: rst + !! The coordinate system ID, which must be one of the following. + !! + !! - COORDINATES_CARTESIAN + !! + !! - COORDINATES_CYLINDRICAL + !! + !! - COORDINATES_SPHERICAL + rst = this%m_csys + end function + +! -------------------- + subroutine p3d_set_csys(this, x) + !! Sets a value determining the coordinate system. + class(plot_3d), intent(inout) :: this + !! The plot_3d object. + integer(int32), intent(in) :: x + !! The coordinate system ID, which must be one of the following. + !! + !! - COORDINATES_CARTESIAN + !! + !! - COORDINATES_CYLINDRICAL + !! + !! - COORDINATES_SPHERICAL + if (x /= COORDINATES_CARTESIAN .and. & + x /= COORDINATES_CYLINDRICAL .and. & + x /= COORDINATES_SPHERICAL) & + then + ! Set to default as the input is nonsensical + this%m_csys = COORDINATES_CARTESIAN + else + this%m_csys = x + end if + end subroutine + +! ------------------------------------------------------------------------------ +end module @@ -683,7 +710,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_axis.f90.html b/doc/sourcefile/fplot_plot_axis.f90.html index c4af8c0..d61b1b0 100644 --- a/doc/sourcefile/fplot_plot_axis.f90.html +++ b/doc/sourcefile/fplot_plot_axis.f90.html @@ -96,7 +96,7 @@

    fplot_plot_axis.f90
  • 255 statements + title=" 5.7% of total for source files.">416 statements
  • @@ -230,434 +230,752 @@

    Source Code

    public :: z_axis type, abstract, extends(plot_object) :: plot_axis - private - logical :: m_hasTitle = .false. + !! Defines a plot axis object. + logical, private :: m_hasTitle = .false. !! Has a title? - character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_title = "" + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_title = "" !! Axis title. - logical :: m_autoscale = .true. + logical, private :: m_autoscale = .true. !! Autoscale? - real(real64), dimension(2) :: m_limits = [0.0d0, 1.0d0] + real(real64), private, dimension(2) :: m_limits = [0.0d0, 1.0d0] !! Display limits. - logical :: m_logScale = .false. + logical, private :: m_logScale = .false. !! Log scaled? - logical :: m_zeroAxis = .false. + logical, private:: m_zeroAxis = .false. !! Has a zero axis? - real(real32) :: m_axisWidth = 1.0 + real(real32), private :: m_axisWidth = 1.0 !! The width, in pixels, of the zero-axis line. - logical :: m_defaultTicLabels = .true. + logical, private :: m_defaultTicLabels = .true. !! Use default tic label format? - character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_ticLabelFmt = "%g" + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_ticLabelFmt = "%g" !! The tic lablel format. - contains - procedure, public :: get_title => pa_get_title - procedure, public :: set_title => pa_set_title - procedure, public :: is_title_defined => pa_has_title - procedure, public :: get_autoscale => pa_get_autoscale - procedure, public :: set_autoscale => pa_set_autoscale - procedure, public :: get_limits => pa_get_axis_limits - procedure, public :: set_limits => pa_set_axis_limits - procedure, public :: get_is_log_scaled => pa_get_log_scale - procedure, public :: set_is_log_scaled => pa_set_log_scale - procedure, public :: get_command_string => pa_get_cmd_string - procedure, public :: get_zero_axis => pa_get_zero_axis - procedure, public :: set_zero_axis => pa_set_zero_axis - procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width - procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width - procedure(pa_get_string_result), deferred, public :: get_id_string - procedure, public :: get_use_default_tic_label_format => & - pa_get_use_dft_tic_lbl_fmt - procedure, public :: set_use_default_tic_label_format => & - pa_set_use_dft_tic_lbl_fmt - procedure, public :: get_tic_label_format => pa_get_tic_label_fmt - procedure, public :: set_tic_label_format => pa_set_tic_label_fmt - end type - - interface - function pa_get_string_result(this) result(x) - !! Retrieves a string from a plot_axis. - import plot_axis - class(plot_axis), intent(in) :: this - !! The plot_axis object. - character(len = :), allocatable :: x - !! The string. - end function - end interface - - type, extends(plot_axis) :: x_axis - !! Defines an x-axis object. - character, private :: m_id = "x" - !! The ID character. - contains - procedure, public :: get_id_string => xa_get_id - end type - - type, extends(plot_axis) :: y_axis - !! Defines a y-axis object. - character, private :: m_id = "y" - !! The ID character. - contains - procedure, public :: get_id_string => ya_get_id - end type - - type, extends(plot_axis) :: y2_axis - !! Defines a secondary y-axis object. - character(len = 2), private :: m_id = "y2" - !! The ID character. - contains - procedure, public :: get_id_string => y2a_get_id - end type - - type, extends(plot_axis) :: z_axis - !! Defines a z-axis object. - character, private :: m_id = "z" - !! The ID character. - contains - procedure, public :: get_id_string => za_get_id - end type - -contains -! ------------------------------------------------------------------------------ - function pa_get_title(this) result(txt) - !! Gets the axis title. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - character(len = :), allocatable :: txt - !! The title. - integer(int32) :: n - n = len_trim(this%m_title) - allocate(character(len = n) :: txt) - txt = trim(this%m_title) - end function - -! -------------------- - subroutine pa_set_title(this, txt) - !! Sets the axis title. - class(plot_axis), intent(inout) :: this - !! The plot_axis object. - character(len = *), intent(in) :: txt - !! The title. + logical, private :: m_showTicLabels = .true. + !! Show tic labels? + integer(int32), private :: m_ticXOffset = 0 + !! The tic label x-offset, in characters. + integer(int32), private :: m_ticYOffset = 0 + !! The tic label y-offset, in characters. + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: & + m_ticLabelAlignment = GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! The tic label alignment. + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + logical, private :: m_offsetTics = .false. + !! Offset tics? + real(real32), private :: m_ticLabelAngle = 0.0 + !! The tic label angle, in degrees. + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_ticRotationOrigin = & + GNUPLOT_ROTATION_ORIGIN_CENTER + !! The tic label rotation origin. + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + integer(int32), private :: m_titleXOffset = 0 + !! The axis title x offset, in characters. + integer(int32), private :: m_titleYOffset = 0 + !! The axis title y offset, in characters. + contains + procedure, public :: get_title => pa_get_title + procedure, public :: set_title => pa_set_title + procedure, public :: is_title_defined => pa_has_title + procedure, public :: get_autoscale => pa_get_autoscale + procedure, public :: set_autoscale => pa_set_autoscale + procedure, public :: get_limits => pa_get_axis_limits + procedure, public :: set_limits => pa_set_axis_limits + procedure, public :: get_is_log_scaled => pa_get_log_scale + procedure, public :: set_is_log_scaled => pa_set_log_scale + procedure, public :: get_command_string => pa_get_cmd_string + procedure, public :: get_zero_axis => pa_get_zero_axis + procedure, public :: set_zero_axis => pa_set_zero_axis + procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width + procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width + procedure(pa_get_string_result), deferred, public :: get_id_string + procedure, public :: get_use_default_tic_label_format => & + pa_get_use_dft_tic_lbl_fmt + procedure, public :: set_use_default_tic_label_format => & + pa_set_use_dft_tic_lbl_fmt + procedure, public :: get_tic_label_format => pa_get_tic_label_fmt + procedure, public :: set_tic_label_format => pa_set_tic_label_fmt + procedure, public :: get_show_tic_labels => pa_get_show_tic_labels + procedure, public :: set_show_tic_labels => pa_set_show_tic_labels + procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset + procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset + procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset + procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset + procedure, public :: get_tic_label_angle => pa_get_tic_label_angle + procedure, public :: set_tic_label_angle => pa_set_tic_label_angle + procedure, public :: get_tic_label_rotation_origin => & + pa_get_tic_rotation_origin + procedure, public :: set_tic_label_rotation_origin => & + pa_set_tic_rotation_origin + procedure, public :: get_tic_label_alignment => & + pa_get_tic_label_alignment + procedure, public :: set_tic_label_alignment => & + pa_set_tic_label_alignment + procedure, public :: get_offset_tics => pa_get_offset_tics + procedure, public :: set_offset_tics => pa_set_offset_tics + procedure, public :: get_title_x_offset => pa_get_title_x_offset + procedure, public :: set_title_x_offset => pa_set_title_x_offset + procedure, public :: get_title_y_offset => pa_get_title_y_offset + procedure, public :: set_title_y_offset => pa_set_title_y_offset + end type + + interface + function pa_get_string_result(this) result(x) + !! Retrieves a string from a plot_axis. + import plot_axis + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: x + !! The string. + end function + end interface - ! Local Variables - integer(int32) :: n - - ! Process - n = min(len_trim(txt), PLOTDATA_MAX_NAME_LENGTH) - this%m_title = "" - if (n /= 0) then - this%m_title(1:n) = txt(1:n) - this%m_hasTitle = .true. - else - this%m_hasTitle = .false. - end if - end subroutine - -! ------------------------------------------------------------------------------ - pure function pa_has_title(this) result(x) - !! Gets a value determining if a title has been defined for this axis. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - logical :: x - !! Returns true if a title has been defined; else, false. - x = this%m_hasTitle - end function + type, extends(plot_axis) :: x_axis + !! Defines an x-axis object. + character, private :: m_id = "x" + !! The ID character. + contains + procedure, public :: get_id_string => xa_get_id + end type + + type, extends(plot_axis) :: y_axis + !! Defines a y-axis object. + character, private :: m_id = "y" + !! The ID character. + contains + procedure, public :: get_id_string => ya_get_id + end type + + type, extends(plot_axis) :: y2_axis + !! Defines a secondary y-axis object. + character(len = 2), private :: m_id = "y2" + !! The ID character. + contains + procedure, public :: get_id_string => y2a_get_id + end type -! ------------------------------------------------------------------------------ - pure function pa_get_autoscale(this) result(x) - !! Gets a value determining if the axis should be automatically scaled - !! to fit the data. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - logical :: x - !! Returns true if the axis should be automatically scaled; else, - !! false. - x = this%m_autoscale - end function - -! -------------------- - subroutine pa_set_autoscale(this, x) - !! Sets a value determining if the axis should be automatically scaled - !! to fit the data. - class(plot_axis), intent(inout) :: this - !! The plot_axis object. - logical, intent(in) :: x - !! Set to true if the axis should be automatically scaled; else, - !! set to false. - this%m_autoscale = x - end subroutine - -! ------------------------------------------------------------------------------ - pure function pa_get_axis_limits(this) result(x) - !! Gets the axis display limits, assuming autoscaling is not - !! active for this axis. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - real(real64), dimension(2) :: x - !! A two-element array containing the limits as follows: - !! [lower, upper]. - x(1) = minval(this%m_limits) - x(2) = maxval(this%m_limits) - end function - -! -------------------- - subroutine pa_set_axis_limits(this, lower, upper) - !! Gets the axis display limits, assuming autoscaling is not - !! active for this axis. - class(plot_axis), intent(inout) :: this - !! The plot_axis object. - real(real64), intent(in) :: lower - !! The lower display limit. - real(real64), intent(in) :: upper - !! The upper display limit. - this%m_limits(1) = min(lower, upper) - this%m_limits(2) = max(lower, upper) - end subroutine - -! ------------------------------------------------------------------------------ - pure function pa_get_log_scale(this) result(x) - !! Gets a logical value defining if the axis should be log scaled. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - logical :: x - !! Returns true if log scaling is applied to the axis; else, false. - x = this%m_logScale - end function - -! -------------------- - subroutine pa_set_log_scale(this, x) - !! Sets a logical value defining if the axis should be log scaled. - class(plot_axis), intent(inout) :: this - !! The plot_axis object. - logical, intent(in) :: x - !! Set to true if log scaling is applied to the axis; else, false. - this%m_logScale = x - end subroutine - -! ------------------------------------------------------------------------------ - function pa_get_cmd_string(this) result(txt) - !! Returns the appropriate GNUPLOT command string to define the - !! plot_axis properties. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - character(len = :), allocatable :: txt - !! The GNUPLOT command string. - - ! Local Variables - type(string_builder) :: str - character(len = :), allocatable :: axis, fmt - real(real64) :: lim(2) - - ! Process - axis = this%get_id_string() - fmt = this%get_tic_label_format() - lim = this%get_limits() - call str%initialize() + type, extends(plot_axis) :: z_axis + !! Defines a z-axis object. + character, private :: m_id = "z" + !! The ID character. + contains + procedure, public :: get_id_string => za_get_id + end type + +contains +! ------------------------------------------------------------------------------ + function pa_get_title(this) result(txt) + !! Gets the axis title. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: txt + !! The title. + integer(int32) :: n + n = len_trim(this%m_title) + allocate(character(len = n) :: txt) + txt = trim(this%m_title) + end function + +! -------------------- + subroutine pa_set_title(this, txt) + !! Sets the axis title. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + character(len = *), intent(in) :: txt + !! The title. + + ! Local Variables + integer(int32) :: n + + ! Process + n = min(len_trim(txt), PLOTDATA_MAX_NAME_LENGTH) + this%m_title = "" + if (n /= 0) then + this%m_title(1:n) = txt(1:n) + this%m_hasTitle = .true. + else + this%m_hasTitle = .false. + end if + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_has_title(this) result(x) + !! Gets a value determining if a title has been defined for this axis. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true if a title has been defined; else, false. + x = this%m_hasTitle + end function + +! ------------------------------------------------------------------------------ + pure function pa_get_autoscale(this) result(x) + !! Gets a value determining if the axis should be automatically scaled + !! to fit the data. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true if the axis should be automatically scaled; else, + !! false. + x = this%m_autoscale + end function + +! -------------------- + subroutine pa_set_autoscale(this, x) + !! Sets a value determining if the axis should be automatically scaled + !! to fit the data. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true if the axis should be automatically scaled; else, + !! set to false. + this%m_autoscale = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_axis_limits(this) result(x) + !! Gets the axis display limits, assuming autoscaling is not + !! active for this axis. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + real(real64), dimension(2) :: x + !! A two-element array containing the limits as follows: + !! [lower, upper]. + x(1) = minval(this%m_limits) + x(2) = maxval(this%m_limits) + end function - ! Formatting - if (.not.this%get_use_default_tic_label_format()) then - call str%append("set format ") - call str%append(axis) - call str%append('"') - call str%append(fmt) - call str%append('"') - call str%append(new_line('a')) - end if - - ! Axis Limits - if (this%get_autoscale()) then - call str%append("set ") - call str%append(axis) - call str%append("range [*:*]") - else - call str%append("set ") - call str%append(axis) - call str%append("range [") - call str%append(to_string(lim(1))) - call str%append(":") - call str%append(to_string(lim(2))) - call str%append("]") - end if - - ! Titles - call str%append(new_line('a')) - if (this%is_title_defined()) then - call str%append("set ") - call str%append(axis) - call str%append("label ") - call str%append('"') - call str%append(this%get_title()) - call str%append('"') - else - call str%append("set ") - call str%append(axis) - call str%append("label ") - call str%append('""') - end if - - ! Scaling - call str%append(new_line('a')) - if (this%get_is_log_scaled()) then - call str%append("set log ") - call str%append(axis) - else - call str%append("unset log ") - call str%append(axis) - end if - - ! Zero Axis - if (this%get_zero_axis()) then - call str%append(new_line('a')) - call str%append("set ") - call str%append(this%get_id_string()) - call str%append("zeroaxis linestyle -1 linewidth ") - call str%append(to_string(this%get_zero_axis_line_width())) - end if - - ! Output - txt = char(str%to_string()) - end function - -! ------------------------------------------------------------------------------ - pure function pa_get_zero_axis(this) result(x) - !! Gets a value determining if the axis should be drawn through - !! zero of opposing axes. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - logical :: x - !! Returns true to draw as a zero axis; else, set to false. - x = this%m_zeroAxis - end function +! -------------------- + subroutine pa_set_axis_limits(this, lower, upper) + !! Gets the axis display limits, assuming autoscaling is not + !! active for this axis. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + real(real64), intent(in) :: lower + !! The lower display limit. + real(real64), intent(in) :: upper + !! The upper display limit. + this%m_limits(1) = min(lower, upper) + this%m_limits(2) = max(lower, upper) + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_log_scale(this) result(x) + !! Gets a logical value defining if the axis should be log scaled. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true if log scaling is applied to the axis; else, false. + x = this%m_logScale + end function + +! -------------------- + subroutine pa_set_log_scale(this, x) + !! Sets a logical value defining if the axis should be log scaled. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true if log scaling is applied to the axis; else, false. + this%m_logScale = x + end subroutine + +! ------------------------------------------------------------------------------ + function pa_get_cmd_string(this) result(txt) + !! Returns the appropriate GNUPLOT command string to define the + !! plot_axis properties. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: txt + !! The GNUPLOT command string. + + ! Local Variables + type(string_builder) :: str + real(real32) :: angle + character(len = :), allocatable :: axis, fmt + real(real64) :: lim(2) + + ! Process + axis = this%get_id_string() + fmt = this%get_tic_label_format() + lim = this%get_limits() + call str%initialize() + + ! Formatting + if (.not.this%get_use_default_tic_label_format()) then + call str%append("set format ") + call str%append(axis) + call str%append('"') + call str%append(fmt) + call str%append('"') + call str%append(new_line('a')) + end if + + ! Show Tic Labels? + if (this%get_show_tic_labels()) then + call str%append("set ") + else + call str%append("unset ") + end if + call str%append(axis) + call str%append("tics") + call str%append(new_line('a')) -! -------------------- - subroutine pa_set_zero_axis(this, x) - !! Sets a value determining if the axis should be drawn through - !! zero of opposing axes. - class(plot_axis), intent(inout) :: this - !! The plot_axis object. - logical, intent(in) :: x - !! Set to true to draw as a zero axis; else, set to false. - this%m_zeroAxis = x - end subroutine - -! ------------------------------------------------------------------------------ - pure function pa_get_zero_axis_width(this) result(x) - !! Gets the width of the line used to represent the zero axis line, if - !! active. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - real(real32) :: x - !! The width of the line, in pixels. - x = this%m_axisWidth - end function - -! -------------------- - subroutine pa_set_zero_axis_width(this, x) - !! Sets the width of the line used to represent the zero axis line, if - !! active. - class(plot_axis), intent(inout) :: this - !! The plot_axis object. - real(real32), intent(in) :: x - !! The width of the line, in pixels. - this%m_axisWidth = x - end subroutine - -! ADDED March 29, 2023 - JAC -! ------------------------------------------------------------------------------ - pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) - !! Gets a value determining if the default tic label format will be - !! used. - class(plot_axis), intent(in) :: this - !! The plot_axis object. - logical :: rst - !! Returns true if the default tic label format will be used; else, - !! false. - rst = this%m_defaultTicLabels - end function - -! -------------------- - subroutine pa_set_use_dft_tic_lbl_fmt(this, x) - !! Sets a value determining if the default tic label format will be - !! used. - class(plot_axis), intent(inout) :: this - !! The plot_axis object. - logical, intent(in) :: x - !! Set to true if the default tic label format will be used; else, - !! false. - this%m_defaultTicLabels = x - end subroutine - -! ------------------------------------------------------------------------------ - pure function pa_get_tic_label_fmt(this) result(rst) - !! Gets the tic label format. The format string can be any format - !! string accepted by the C command 'printf.' - class(plot_axis), intent(in) :: this - !! The plot_axis object. - character(len = :), allocatable :: rst - !! The tic label format string. - rst = trim(this%m_ticLabelFmt) - end function - -! -------------------- - subroutine pa_set_tic_label_fmt(this, x) - !! Sets the tic label format. The format string can be any format - !! string accepted by the C command 'printf.' - class(plot_axis), intent(inout) :: this - !! The plot_axis object. - character(len = *), intent(in) :: x - !! The tic label format string. - this%m_ticLabelFmt = x - end subroutine - -! ****************************************************************************** -! X_AXIS MEMBERS -! ------------------------------------------------------------------------------ - function xa_get_id(this) result(x) - !! Gets the axis identification string. - class(x_axis), intent(in) :: this - !! The x_axis object. - character(len = :), allocatable :: x - !! The identification string. - x = this%m_id - end function - -! ****************************************************************************** -! Y_AXIS MEMBERS -! ------------------------------------------------------------------------------ - function ya_get_id(this) result(x) - !! Gets the axis identification string. - class(y_axis), intent(in) :: this - !! The y_axis object. - character(len = :), allocatable :: x - !! The identification string. - x = this%m_id - end function - -! ****************************************************************************** -! Y2_AXIS MEMBERS -! ------------------------------------------------------------------------------ - function y2a_get_id(this) result(x) - !! Gets the axis identification string. - class(y2_axis), intent(in) :: this - !! The y2_axis object. - character(len = :), allocatable :: x - !! The identification string. - x = this%m_id - end function - -! ****************************************************************************** -! Z_AXIS MEMBERS -! ------------------------------------------------------------------------------ - function za_get_id(this) result(x) - !! Gets the axis identification string. - class(z_axis), intent(in) :: this - !! The z_axis object. - character(len = :), allocatable :: x - !! The identification string. - x = this%m_id - end function - -! ------------------------------------------------------------------------------ -end module + ! Tic Label Offsets + if (this%get_show_tic_labels() .and. this%get_offset_tics()) then + call str%append("set ") + call str%append(axis) + call str%append("tics ") + call str%append(this%get_tic_label_alignment()) + call str%append(" offset ") + call str%append(to_string(this%get_tic_label_x_offset())) + call str%append(",") + call str%append(to_string(this%get_tic_label_y_offset())) + call str%append(new_line('a')) + end if + + ! Tic Label Rotation + angle = this%get_tic_label_angle() + if (this%get_show_tic_labels() .and. angle /= 0.0) then + call str%append("set ") + call str%append(axis) + call str%append("tics rotate by ") + call str%append(to_string(angle)) + call str%append(" ") + call str%append(this%get_tic_label_rotation_origin()) + call str%append(new_line('a')) + end if + + ! Axis Limits + if (this%get_autoscale()) then + call str%append("set ") + call str%append(axis) + call str%append("range [*:*]") + else + call str%append("set ") + call str%append(axis) + call str%append("range [") + call str%append(to_string(lim(1))) + call str%append(":") + call str%append(to_string(lim(2))) + call str%append("]") + end if + + ! Titles + call str%append(new_line('a')) + if (this%is_title_defined()) then + ! Title + call str%append("set ") + call str%append(axis) + call str%append("label ") + call str%append('"') + call str%append(this%get_title()) + call str%append('"') + + ! Offsets + if (this%get_title_x_offset() /= 0 .or. & + this%get_title_y_offset() /= 0) & + then + call str%append(" offset ") + call str%append(to_string(this%get_title_x_offset())) + call str%append(",") + call str%append(to_string(this%get_title_y_offset())) + end if + else + call str%append("set ") + call str%append(axis) + call str%append("label ") + call str%append('""') + end if + call str%append(new_line('a')) + + ! Scaling + call str%append(new_line('a')) + if (this%get_is_log_scaled()) then + call str%append("set log ") + call str%append(axis) + else + call str%append("unset log ") + call str%append(axis) + end if + + ! Zero Axis + if (this%get_zero_axis()) then + call str%append(new_line('a')) + call str%append("set ") + call str%append(this%get_id_string()) + call str%append("zeroaxis linestyle -1 linewidth ") + call str%append(to_string(this%get_zero_axis_line_width())) + end if + + ! Output + txt = char(str%to_string()) + end function + +! ------------------------------------------------------------------------------ + pure function pa_get_zero_axis(this) result(x) + !! Gets a value determining if the axis should be drawn through + !! zero of opposing axes. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true to draw as a zero axis; else, set to false. + x = this%m_zeroAxis + end function + +! -------------------- + subroutine pa_set_zero_axis(this, x) + !! Sets a value determining if the axis should be drawn through + !! zero of opposing axes. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true to draw as a zero axis; else, set to false. + this%m_zeroAxis = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_zero_axis_width(this) result(x) + !! Gets the width of the line used to represent the zero axis line, if + !! active. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + real(real32) :: x + !! The width of the line, in pixels. + x = this%m_axisWidth + end function + +! -------------------- + subroutine pa_set_zero_axis_width(this, x) + !! Sets the width of the line used to represent the zero axis line, if + !! active. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + real(real32), intent(in) :: x + !! The width of the line, in pixels. + this%m_axisWidth = x + end subroutine + +! ADDED March 29, 2023 - JAC +! ------------------------------------------------------------------------------ + pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) + !! Gets a value determining if the default tic label format will be + !! used. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: rst + !! Returns true if the default tic label format will be used; else, + !! false. + rst = this%m_defaultTicLabels + end function + +! -------------------- + subroutine pa_set_use_dft_tic_lbl_fmt(this, x) + !! Sets a value determining if the default tic label format will be + !! used. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true if the default tic label format will be used; else, + !! false. + this%m_defaultTicLabels = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_label_fmt(this) result(rst) + !! Gets the tic label format. The format string can be any format + !! string accepted by the C command 'printf.' + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: rst + !! The tic label format string. + rst = trim(this%m_ticLabelFmt) + end function + +! -------------------- + subroutine pa_set_tic_label_fmt(this, x) + !! Sets the tic label format. The format string can be any format + !! string accepted by the C command 'printf.' + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + character(len = *), intent(in) :: x + !! The tic label format string. + this%m_ticLabelFmt = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_show_tic_labels(this) result(x) + !! Gets a value determining if tic labels should be shown. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true to show tic labels; else, set to false. + x = this%m_showTicLabels + end function + +! -------------------- + subroutine pa_set_show_tic_labels(this, x) + !! Sets a value determining if tic labels should be shown. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true to show tic labels; else, set to false. + this%m_showTicLabels = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_x_offset(this) result(x) + !! Gets the tic label x-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The tic label x-offset, in characters. + x = this%m_ticXOffset + end function + +! -------------------- + subroutine pa_set_tic_x_offset(this, x) + !! Sets the tic label x-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The tic label x-offset, in characters. + this%m_ticXOffset = x + call this%set_offset_tics(.true.) + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_y_offset(this) result(x) + !! Gets the tic label y-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The tic label y-offset, in characters. + x = this%m_ticYOffset + end function + +! -------------------- + subroutine pa_set_tic_y_offset(this, x) + !! Sets the tic label y-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The tic label y-offset, in characters. + this%m_ticYOffset = x + call this%set_offset_tics(.true.) + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_label_angle(this) result(x) + !! Gets the tic label angle, in degrees. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + real(real32) :: x + !! The tic label angle, in degrees. + x = this%m_ticLabelAngle + end function + +! -------------------- + subroutine pa_set_tic_label_angle(this, x) + !! Sets the tic label angle, in degrees. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + real(real32), intent(in) :: x + !! The tic label angle, in degrees. + this%m_ticLabelAngle = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_rotation_origin(this) result(x) + !! Gets the tic label rotation origin. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: x + !! The tic label rotation origin. The tic label rotation origin + !! must be one of the following: + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + integer(int32) :: n + n = len_trim(this%m_ticRotationOrigin) + allocate(character(len = n) :: x) + x = trim(this%m_ticRotationOrigin) + end function + +! -------------------- + subroutine pa_set_tic_rotation_origin(this, x) + !! Sets the tic label rotation origin. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + character(len = *), intent(in) :: x + !! The tic label rotation origin. The tic label rotation origin + !! must be one of the following: + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + this%m_ticRotationOrigin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_label_alignment(this) result(x) + !! Gets the tic label alignment. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: x + !! The tic label alignment. The tic label alignment must be one of + !! the following: + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + integer(int32) :: n + n = len_trim(this%m_ticLabelAlignment) + allocate(character(len = n) :: x) + x = trim(this%m_ticLabelAlignment) + end function + +! -------------------- + subroutine pa_set_tic_label_alignment(this, x) + !! Sets the tic label alignment. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + character(len = *), intent(in) :: x + !! The tic label alignment. The tic label alignment must be one of + !! the following: + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + this%m_ticLabelAlignment = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_offset_tics(this) result(x) + !! Gets a value determining if the tics should be offset. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true to offset the tics; else, set to false. + x = this%m_offsetTics + end function + +! -------------------- + subroutine pa_set_offset_tics(this, x) + !! Sets a value determining if the tics should be offset. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true to offset the tics; else, set to false. + this%m_offsetTics = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_title_x_offset(this) result(x) + !! Gets the axis title x-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The axis title x-offset, in characters. + x = this%m_titleXOffset + end function + +! -------------------- + subroutine pa_set_title_x_offset(this, x) + !! Sets the axis title x-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The axis title x-offset, in characters. + this%m_titleXOffset = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_title_y_offset(this) result(x) + !! Gets the axis title y-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The axis title y-offset, in characters. + x = this%m_titleYOffset + end function + +! -------------------- + subroutine pa_set_title_y_offset(this, x) + !! Sets the axis title y-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The axis title y-offset, in characters. + this%m_titleYOffset = x + end subroutine + +! ****************************************************************************** +! X_AXIS MEMBERS +! ------------------------------------------------------------------------------ + function xa_get_id(this) result(x) + !! Gets the axis identification string. + class(x_axis), intent(in) :: this + !! The x_axis object. + character(len = :), allocatable :: x + !! The identification string. + x = this%m_id + end function + +! ****************************************************************************** +! Y_AXIS MEMBERS +! ------------------------------------------------------------------------------ + function ya_get_id(this) result(x) + !! Gets the axis identification string. + class(y_axis), intent(in) :: this + !! The y_axis object. + character(len = :), allocatable :: x + !! The identification string. + x = this%m_id + end function + +! ****************************************************************************** +! Y2_AXIS MEMBERS +! ------------------------------------------------------------------------------ + function y2a_get_id(this) result(x) + !! Gets the axis identification string. + class(y2_axis), intent(in) :: this + !! The y2_axis object. + character(len = :), allocatable :: x + !! The identification string. + x = this%m_id + end function + +! ****************************************************************************** +! Z_AXIS MEMBERS +! ------------------------------------------------------------------------------ + function za_get_id(this) result(x) + !! Gets the axis identification string. + class(z_axis), intent(in) :: this + !! The z_axis object. + character(len = :), allocatable :: x + !! The identification string. + x = this%m_id + end function + +! ------------------------------------------------------------------------------ +end module @@ -676,7 +994,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_bar.f90.html b/doc/sourcefile/fplot_plot_bar.f90.html index 7401770..e9e92e3 100644 --- a/doc/sourcefile/fplot_plot_bar.f90.html +++ b/doc/sourcefile/fplot_plot_bar.f90.html @@ -225,7 +225,7 @@

    Source Code

    type, extends(plot_2d) :: plot_bar !! Defines a 2D plot tailored towards bar plotting. - real(real32), private :: m_barWidth = 0.75d0 + real(real32), private :: m_barWidth = 1.0d0 !! A relative scaling of the width of a single bar. The value !! must be between 0 and 1 with 1 being full width. contains @@ -313,7 +313,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_data.f90.html b/doc/sourcefile/fplot_plot_data.f90.html index d22f40a..e4e95b5 100644 --- a/doc/sourcefile/fplot_plot_data.f90.html +++ b/doc/sourcefile/fplot_plot_data.f90.html @@ -96,7 +96,7 @@

    fplot_plot_data.f90
  • 344 statements + title=" 4.7% of total for source files.">344 statements
  • @@ -910,7 +910,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_data_2d.f90.html b/doc/sourcefile/fplot_plot_data_2d.f90.html index abcaf8d..8330be9 100644 --- a/doc/sourcefile/fplot_plot_data_2d.f90.html +++ b/doc/sourcefile/fplot_plot_data_2d.f90.html @@ -96,7 +96,7 @@

    fplot_plot_data_2d.f90
  • 305 statements + title=" 4.2% of total for source files.">305 statements
  • @@ -688,7 +688,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_data_3d.f90.html b/doc/sourcefile/fplot_plot_data_3d.f90.html index 762d857..9a6d27b 100644 --- a/doc/sourcefile/fplot_plot_data_3d.f90.html +++ b/doc/sourcefile/fplot_plot_data_3d.f90.html @@ -96,7 +96,7 @@

    fplot_plot_data_3d.f90
  • 309 statements + title=" 4.2% of total for source files.">309 statements
  • @@ -669,7 +669,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_data_bar.f90.html b/doc/sourcefile/fplot_plot_data_bar.f90.html index 11b3521..9ead800 100644 --- a/doc/sourcefile/fplot_plot_data_bar.f90.html +++ b/doc/sourcefile/fplot_plot_data_bar.f90.html @@ -96,7 +96,7 @@

    fplot_plot_data_bar.f90
  • 351 statements + title=" 4.8% of total for source files.">351 statements
  • @@ -805,7 +805,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_data_error_bars.f90.html b/doc/sourcefile/fplot_plot_data_error_bars.f90.html index 96e642d..0ac978c 100644 --- a/doc/sourcefile/fplot_plot_data_error_bars.f90.html +++ b/doc/sourcefile/fplot_plot_data_error_bars.f90.html @@ -96,7 +96,7 @@

    fplot_plot_data_error_bars.f90
  • 444 statements + title=" 6.1% of total for source files.">444 statements
  • @@ -922,7 +922,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_data_histogram.f90.html b/doc/sourcefile/fplot_plot_data_histogram.f90.html index 0cdf71e..9569be2 100644 --- a/doc/sourcefile/fplot_plot_data_histogram.f90.html +++ b/doc/sourcefile/fplot_plot_data_histogram.f90.html @@ -96,7 +96,7 @@

    fplot_plot_data_histogram.f90
  • 171 statements + title=" 2.5% of total for source files.">181 statements
  • @@ -217,286 +217,309 @@

    Source Code

    module fplot_plot_data_histogram use iso_fortran_env - use fplot_plot_data_bar + use fplot_plot_data use fplot_errors use ferror use strings - implicit none - private - public :: plot_data_histogram - - type, extends(plot_data_bar) :: plot_data_histogram - !! A container for plotting data in the form of a histogram. - integer(int32), private :: m_binCount = 10 - !! The number of bins. - character(len = :), private, allocatable :: m_numberFmt - !! The numerical label format string. - contains - procedure, public :: get_bin_count => pdh_get_bin_count - procedure, public :: set_bin_count => pdh_set_bin_count - procedure, public :: bin_data => pdh_bin_data - procedure, public :: get_extreme_values => pdh_get_extremes - procedure, public :: get_number_format => pdh_get_num_fmt - procedure, public :: set_number_format => pdh_set_num_fmt - procedure, public :: set_data_1 => pdh_set_data_1 - procedure, public :: set_data_2 => pdh_set_data_2 - procedure, public :: set_data_3 => pdh_set_data_3 - end type - -contains -! ------------------------------------------------------------------------------ -pure function pdh_get_bin_count(this) result(x) - !! Gets the number of bins. - class(plot_data_histogram), intent(in) :: this - !! The plot_data_histogram object. - integer(int32) :: x - !! The bin count. - x = this%m_binCount -end function - -! ------------------------------------------------------------------------------ -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. - class(plot_data_histogram), intent(inout) :: this - !! The plot_data_histogram object. - integer(int32), intent(in) :: x - !! The bin count. - this%m_binCount = x -end subroutine - -! ------------------------------------------------------------------------------ -function pdh_bin_data(this, x, err) result(bx) - !! Bins the supplied data set. - class(plot_data_histogram), intent(in) :: this - !! The plot_data_histogram object. - real(real64), intent(in), dimension(:) :: x - !! The data set to bin. - class(errors), intent(inout), optional, target :: err - !! An error handling object. - real(real64), allocatable, dimension(:,:) :: bx - !! The binned data. - - ! Local Variables - real(real64) :: maxX, minX, width, val - integer(int32) :: i, j, flag, n, nbins - real(real64), allocatable, dimension(:,:) :: ranges - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - n = size(x) - nbins = this%get_bin_count() - - ! Get the max and min of the entire data set - maxX = maxval(x) - minX = minval(x) - width = (maxX - minX) / (nbins - 1.0) - - ! Allocate space for the output - allocate(bx(nbins, 2), stat = flag) - if (flag == 0) allocate(ranges(nbins, 2), stat = flag) - if (flag /= 0) then - call report_memory_error(errmgr, "pdh_bin_data", flag) - return - end if - bx = 0.0d0 - - ! Define each range - ranges(1,:) = [minX, minX + width] - do i = 2, nbins - ranges(i,1) = ranges(i-1,2) - ranges(i,2) = ranges(i,1) + width - end do - - ! Construct the bins - do i = 1, n - val = x(i) - do j = 1, nbins - if ((val >= ranges(j,1)) .and. (val <= ranges(j,2))) then - bx(j,1) = bx(j,1) + 1.0d0 ! Counter - exit ! Exit the inner do loop - end if - end do - end do - - ! Now compute the center of each bin - store in column 2 of bx - bx(:,2) = 0.5d0 * (ranges(:,1) + ranges(:,2)) -end function - -! ------------------------------------------------------------------------------ -pure function pdh_get_extremes(this) result(x) - !! Returns the extreme values in the data set. - class(plot_data_histogram), intent(in) :: this - !! The plot_data_histogram object. - real(real64), dimension(2) :: x - !! A two-element array containing the minimum and maximum values, in - !! that order. - - ! Local Variables - integer(int32) :: i, j, nrows, ncols - real(real64) :: maxX, minX, val - logical :: check - - ! Initialization - nrows = this%get_count() - ncols = this%get_bar_per_label_count() - check = .true. - - ! Process - do j = 1, ncols - do i = 1, nrows - val = this%get(i, j) - if (check) then - maxX = val - minX = val - check = .false. - else - if (val > maxX) maxX = val - if (val < minX) minX = val - end if - end do - end do - - ! End - x = [minX, maxX] -end function - -! ------------------------------------------------------------------------------ -subroutine pdh_set_data_1(this, x, err) - !! Defines the data set. - class(plot_data_histogram), intent(inout) :: this - !! The plot_data_histogram object. - real(real64), intent(in), dimension(:) :: x - !! The data set. - class(errors), intent(inout), optional, target :: err - !! An error handling object. + use fplot_colors + use fplot_errors + implicit none + private + public :: plot_data_histogram + + type, extends(plot_data_colored) :: plot_data_histogram + !! A container for plotting data in the form of a histogram. + integer(int32), private :: m_binCount = 20 + !! The number of bins. + real(real64), private :: m_minX + !! The minimum data value. + real(real64), private :: m_maxX + !! The maximum data value. + real(real64), private, allocatable, dimension(:,:) :: m_data + !! Column 1 is the center of each bin and column 2 is the number + !! of items in each bin. + logical, private :: m_filled = .true. + !! Determines if each bar is filled. + logical, private :: m_useY2 = .false. + !! Draw against the secondary y axis? + contains + procedure, public :: get_bin_count => pdh_get_bin_count + procedure, public :: set_bin_count => pdh_set_bin_count + procedure, public :: get_minimum_value => pdh_get_min_x + procedure, public :: get_maximum_value => pdh_get_max_x + procedure, public :: define_data => pdh_define_data + procedure, public :: get_command_string => pdh_get_cmd + procedure, public :: get_data_string => pdh_get_data_cmd + procedure, public :: get_axes_string => pdh_get_axes_cmd + procedure, public :: get_is_filled => pdh_get_is_filled + procedure, public :: set_is_filled => pdh_set_is_filled + procedure, public :: get_draw_against_y2 => pdh_get_use_y2 + procedure, public :: set_draw_against_y2 => pdh_set_use_y2 + procedure, public :: get => pdh_get_bin_data + end type + +contains +! ------------------------------------------------------------------------------ +pure function pdh_get_bin_count(this) result(x) + !! Gets the number of bins. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + integer(int32) :: x + !! The bin count. + x = this%m_binCount +end function + +! ------------------------------------------------------------------------------ +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. + class(plot_data_histogram), intent(inout) :: this + !! The plot_data_histogram object. + integer(int32), intent(in) :: x + !! The bin count. + this%m_binCount = x +end subroutine + +! ------------------------------------------------------------------------------ +pure function pdh_get_min_x(this) result(x) + !! Gets the minimum data value. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + real(real64) :: x + !! The minimum data value. + x = this%m_minX +end function + +! ------------------------------------------------------------------------------ +pure function pdh_get_max_x(this) result(x) + !! Gets the maximum data value. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + real(real64) :: x + !! The maximum data value. + x = this%m_maxX +end function + +! ------------------------------------------------------------------------------ +subroutine pdh_define_data(this, x, err) + !! Defines the data set to plot. + class(plot_data_histogram), intent(inout) :: this + !! The plot_data_histogram object. + real(real64), intent(in), dimension(:) :: x + !! The data set to plot. + class(errors), intent(inout), optional, target :: err + !! An error handling object. + + ! Local Variables + integer(int32) :: i, j, n, nbins, flag + real(real64) :: maxX, minX, width, val + real(real64), allocatable, dimension(:,:) :: ranges + class(errors), pointer :: errmgr + type(errors), target :: deferr + + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + n = size(x) + nbins = this%get_bin_count() + + ! Get the max and min of the entire data set + maxX = maxval(x) + minX = minval(x) + width = (maxX - minX) / (nbins - 1.0) + this%m_minX = minX + this%m_maxX = maxX + + ! Allocate space for the output + if (allocated(this%m_data)) deallocate(this%m_data) + allocate(this%m_data(nbins, 2), stat = flag, source = 0.0d0) + if (flag == 0) allocate(ranges(nbins, 2), stat = flag) + if (flag /= 0) then + call report_memory_error(errmgr, "pdh_define_data", flag) + return + end if + + ! Define each range + ranges(1,:) = [minX, minX + width] + do i = 2, nbins + ranges(i,1) = ranges(i-1,2) + ranges(i,2) = ranges(i,1) + width + end do + + ! Construct the bins + do i = 1, n + val = x(i) + do j = 1, nbins + if ((val >= ranges(j,1)) .and. (val <= ranges(j,2))) then + this%m_data(j,1) = this%m_data(j,1) + 1.0d0 ! Counter + exit ! Exit the inner do loop + end if + end do + end do + + ! Now compute the center of each bin - store in column 2 of this%m_data + this%m_data(:,2) = 0.5d0 * (ranges(:,1) + ranges(:,2)) +end subroutine + +! ------------------------------------------------------------------------------ +function pdh_get_cmd(this) result(rst) + !! Gets the GNUPLOT command string for this object. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + character(len = :), allocatable :: rst + !! The command string. + + ! Local Variables + type(string_builder) :: str + integer(int32) :: n, ncols + type(color) :: clr - ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - - ! Bin the data - bx = this%bin_data(x, errmgr) - if (errmgr%has_error_occurred()) return - - ! Call the base routine to store the data - use the average values to - ! establish labels for the x-axis - call this%plot_data_bar%set_data_3(bx(:,2), bx(:,1), & - this%get_number_format(), errmgr) -end subroutine - -! ------------------------------------------------------------------------------ -subroutine pdh_set_data_2(this, labels, x, err) - !! Defines the data set with associated axis labels. - class(plot_data_histogram), intent(inout) :: this - !! The plot_data_histogram object. - class(string), intent(in), dimension(:) :: labels - !! The axis labels. - real(real64), intent(in), dimension(:) :: x - !! The data set. - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - + ! Process + call str%append(' "-" ') + call str%append(" with boxes ") + + ! Color + clr = this%get_line_color() + call str%append(' lc rgb "#') + call str%append(clr%to_hex_string()) + call str%append('"') + + ! Filled + if (this%get_is_filled()) then + call str%append(" fill solid ") + else + call str%append(" fill empty ") + end if + + ! Define the axes structure + call str%append(" ") + call str%append(this%get_axes_string()) + + ! End + rst = char(str%to_string()) +end function + +! ------------------------------------------------------------------------------ +function pdh_get_data_cmd(this) result(rst) + !! Gets the GNUPLOT command string defining the data for this object. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + character(len = :), allocatable :: rst + !! The command string. + + ! Local Variables + type(string_builder) :: str + integer(int32) :: i, nbars, cnt + real(real64) :: val + character :: delimiter, nl + ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - - ! Ensure the labels array is the same size as the number of bins - if (size(labels) /= this%get_bin_count()) then - call report_array_size_mismatch_error(errmgr, "pdh_set_data_2", & - "labels", this%get_bin_count(), size(labels)) - return - end if + delimiter = achar(9) + nl = new_line(nl) + nbars = size(this%m_data, 1) + + ! Process + do i = 1, nbars + call this%get(i, val, cnt) + call str%append(to_string(val)) + call str%append(delimiter) + call str%append(to_string(cnt)) + call str%append(nl) + end do - ! Call the base routine to store the data - call this%plot_data_bar%set_data_2(labels, bx(:,1), errmgr) -end subroutine + ! End + rst = char(str%to_string()) +end function ! ------------------------------------------------------------------------------ -subroutine pdh_set_data_3(this, labels, x, fmt, err) - !! Defines the data set with associated axis labels with a specific format. - class(plot_data_histogram), intent(inout) :: this - !! The plot_data_histogram object. - real(real64), intent(in), dimension(:) :: labels - !! The axis labels. - real(real64), intent(in), dimension(:) :: x - !! The data set. - character(len = *), intent(in), optional :: fmt - !! The format string for the labels (e.g. '(I0)', etc.). - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if - - ! Ensure the labels array is the same size as the number of bins - if (size(labels) /= this%get_bin_count()) then - call report_array_size_mismatch_error(errmgr, "pdh_set_data_3", & - "labels", this%get_bin_count(), size(labels)) - return - end if - - ! Call the base routine to store the data - call this%plot_data_bar%set_data_3(labels, bx(:,1), fmt, errmgr) -end subroutine - -! ------------------------------------------------------------------------------ -pure function pdh_get_num_fmt(this) result(x) - !! Gets the numerical format string used for the labels. - class(plot_data_histogram), intent(in) :: this - !! The plot_data_histogram object. - character(len = :), allocatable :: x - !! The format string. - if (allocated(this%m_numberFmt)) then - x = this%m_numberFmt - else - x = "(F6.2)" - end if -end function - -! ------------------------------------------------------------------------------ -subroutine pdh_set_num_fmt(this, x) - !! Sets the numerical format string used for the labels. +function pdh_get_axes_cmd(this) result(rst) + !! Gets the GNUPLOT command string defining which axes the data is to be + !! plotted against. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + character(len = :), allocatable :: rst + !! The command string. + + ! Define which axes the data is to be plotted against + if (this%get_draw_against_y2()) then + rst = "axes x1y2" + else + rst = "axes x1y1" + end if +end function + +! ------------------------------------------------------------------------------ +pure function pdh_get_is_filled(this) result(rst) + !! Gets a value determining if each box is filled. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + logical :: rst + !! Returns true if the boxes are filled; else, false for an empty box. + rst = this%m_filled +end function + +! -------------------- +subroutine pdh_set_is_filled(this, x) + !! Sets a value determining if each box is filled. + 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. + this%m_filled = x +end subroutine + +! ------------------------------------------------------------------------------ +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. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + logical :: rst + !! Returns true if the data is to be plotted against the secondary y + !! axis; else, false for the primary y axis. + rst = this%m_useY2 +end function + +! -------------------- +subroutine pdh_set_use_y2(this, x) + !! Sets a value determining if the data is to be plotted against the + !! secondary y axis. class(plot_data_histogram), intent(inout) :: this !! The plot_data_histogram object. - character(len = *), intent(in) :: x - !! The format string (e.g. "(F6.2)"). - this%m_numberFmt = x -end subroutine - -! ------------------------------------------------------------------------------ -end module + 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. + this%m_useY2 = x +end subroutine + +! ------------------------------------------------------------------------------ +subroutine pdh_get_bin_data(this, i, x, cnt) + !! Gets the requested binned data. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + integer(int32), intent(in) :: i + !! The bin number to get. + real(real64), intent(out) :: x + !! The center of the bin. + integer(int32), intent(out) :: cnt + !! The number of items in the bin. + + ! Process + if (.not.allocated(this%m_data)) then + cnt = 0 + x = 0.0d0 + return + end if + x = this%m_data(i,2) + cnt = floor(this%m_data(i,1)) +end subroutine + +! ------------------------------------------------------------------------------ +end module @@ -515,7 +538,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_data_tri_2d.f90.html b/doc/sourcefile/fplot_plot_data_tri_2d.f90.html index 77cf0d4..76aac6d 100644 --- a/doc/sourcefile/fplot_plot_data_tri_2d.f90.html +++ b/doc/sourcefile/fplot_plot_data_tri_2d.f90.html @@ -96,7 +96,7 @@

    fplot_plot_data_tri_2d.f90
  • 155 statements + title=" 2.1% of total for source files.">155 statements
  • @@ -251,7 +251,7 @@

    Source Code

    contains ! ------------------------------------------------------------------------------ - module function pdt2d_get_data_cmd(this) result(x) + function pdt2d_get_data_cmd(this) result(x) !! Gets the GNUPLOT command string describing the data to plot. class(plot_data_tri_2d), intent(in) :: this !! The plot_data_tri_2d object. @@ -346,7 +346,7 @@

    Source Code

    end function ! ------------------------------------------------------------------------------ - module function pdt2d_get_cmd(this) result(x) + function pdt2d_get_cmd(this) result(x) !! Gets the GNUPLOT command string for the object. class(plot_data_tri_2d), intent(in) :: this !! The plot_data_tri_2d object. @@ -397,7 +397,7 @@

    Source Code

    end function ! ------------------------------------------------------------------------------ - module subroutine pdt2d_define_data(this, tri) + subroutine pdt2d_define_data(this, tri) !! Defines the data to plot. class(plot_data_tri_2d), intent(inout) :: this !! The plot_data_tri_2d object. @@ -415,7 +415,7 @@

    Source Code

    end subroutine ! ------------------------------------------------------------------------------ - pure module function pdt2d_get_line_width(this) result(rst) + pure function pdt2d_get_line_width(this) result(rst) !! Gets the width of the lines used to draw the triangulation. class(plot_data_tri_2d), intent(in) :: this !! The plot_data_tri_2d object. @@ -425,7 +425,7 @@

    Source Code

    end function ! -------------------- - module subroutine pdt2d_set_line_width(this, x) + subroutine pdt2d_set_line_width(this, x) !! Sets the width of the lines used to draw the triangulation. class(plot_data_tri_2d), intent(inout) :: this !! The plot_data_tri_2d object. @@ -438,7 +438,7 @@

    Source Code

    end if end subroutine ! ------------------------------------------------------------------------------ - pure module function pdt2d_get_line_style(this) result(rst) + pure function pdt2d_get_line_style(this) result(rst) !! Gets the line style. class(plot_data_tri_2d), intent(in) :: this !! The plot_data_tri_2d object. @@ -459,7 +459,7 @@

    Source Code

    end function ! -------------------- - module subroutine pdt2d_set_line_style(this, x) + subroutine pdt2d_set_line_style(this, x) !! Sets the line style. class(plot_data_tri_2d), intent(inout) :: this !! The plot_data_tri_2d object. @@ -506,7 +506,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_object.f90.html b/doc/sourcefile/fplot_plot_object.f90.html index 7516d68..3033cf7 100644 --- a/doc/sourcefile/fplot_plot_object.f90.html +++ b/doc/sourcefile/fplot_plot_object.f90.html @@ -252,7 +252,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_plot_polar.f90.html b/doc/sourcefile/fplot_plot_polar.f90.html index 4f83220..092d409 100644 --- a/doc/sourcefile/fplot_plot_polar.f90.html +++ b/doc/sourcefile/fplot_plot_polar.f90.html @@ -96,7 +96,7 @@

    fplot_plot_polar.f90
  • 181 statements + title=" 2.8% of total for source files.">206 statements
  • @@ -324,239 +324,266 @@

    Source Code

    integer(int32) :: i, n type(string_builder) :: str type(legend), pointer :: leg - real(real64) :: lim(2) - ! class(plot_label), pointer :: lbl - class(plot_data), pointer :: ptr - - ! Initialization - call str%initialize() - - ! Call the base routine - call str%append(this%plot%get_command_string()) - - ! Polar-Specific Settings - call str%append(new_line('a')) - call str%append("unset border") - - call str%append(new_line('a')) - call str%append("set polar") - - call str%append(new_line('a')) - call str%append("set size square") - - call str%append(new_line('a')) - call str%append("unset xtics") - call str%append(new_line('a')) - call str%append("unset ytics") - - call str%append(new_line('a')) - call str%append('set ttics 0, 30 format "%g".GPVAL_DEGREE_SIGN') - - call str%append(new_line('a')) - call str%append("set mttics 3") - - call str%append(new_line('a')) - call str%append("set theta ") - call str%append(this%get_theta_start_position()) - call str%append(" ") - call str%append(this%get_theta_direction()) + real(real64) :: lmargin, rmargin, tmargin, bmargin + real(real64) :: lim(2) + ! class(plot_label), pointer :: lbl + class(plot_data), pointer :: ptr + + ! Initialization + call str%initialize() + + ! Call the base routine + call str%append(this%plot%get_command_string()) + + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if - ! Radial Limits - if (.not.this%get_autoscale()) then - lim = this%get_radial_limits() - call str%append(new_line('a')) - call str%append("set rrange [") - call str%append(to_string(lim(1))) - call str%append(":") - call str%append(to_string(lim(2))) - call str%append("]") - end if - - ! Grid - if (this%get_show_gridlines()) then - call str%append(new_line('a')) - call str%append("set grid r polar") - end if - - ! Title - n = len_trim(this%get_title()) - if (n > 0) then - call str%append(new_line('a')) - call str%append('set title "') - call str%append(this%get_title()) - call str%append('"') - end if - - ! Border - call str%append(new_line('a')) - if (this%get_draw_border()) then - call str%append("set border polar") - else - call str%append("set border 0") - end if - - ! Legend - call str%append(new_line('a')) - leg => this%get_legend() - if (associated(leg)) call str%append(leg%get_command_string()) - - ! ! Labels - ! do i = 1, this%get_label_count() - ! lbl => this%get_label(i) - ! if (.not.associated(lbl)) cycle - ! call str%append(new_line('a')) - ! call str%append(lbl%get_command_string()) - ! end do - - ! Define the plot function and data formatting commands - n = this%get_count() - call str%append(new_line('a')) - call str%append("plot ") - do i = 1, n - ptr => this%get(i) - if (.not.associated(ptr)) cycle - call str%append(ptr%get_command_string()) - if (i /= n) call str%append(", ") - end do - - ! Define the data to plot - do i = 1, n - ptr => this%get(i) - if (.not.associated(ptr)) cycle - call str%append(new_line('a')) - call str%append(ptr%get_data_string()) - call str%append("e") - end do - - ! End - x = char(str%to_string()) - end function - -! ------------------------------------------------------------------------------ - pure function plr_get_autoscale(this) result(rst) - !! Gets a logical value determining if the axis should be - !! automatically scaled to fit the data. - class(plot_polar), intent(in) :: this - !! The plot_polar object. - logical :: rst - !! Returns true if the plot will autoscale; else, false. - rst = this%m_autoscale - end function - -! -------------------- - subroutine plr_set_autoscale(this, x) - !! Sets a logical value determining if the axis should be - !! automatically scaled to fit the data. - class(plot_polar), intent(inout) :: this - !! The plot_polar object. - logical, intent(in) :: x - !! Set to true if the plot will autoscale; else, false. - this%m_autoscale = x - end subroutine - -! ------------------------------------------------------------------------------ - pure function plr_get_limits(this) result(rst) - !! Gets the radial axis limits if autoscaling is inactive. - class(plot_polar), intent(in) :: this - !! The plot_polar object. - real(real64) :: rst(2) - !! A 2-element array containing the minimum and maximum limit - !! values in that order. - rst = [this%m_minrad, this%m_maxrad] - end function - -! -------------------- - subroutine plr_set_limits(this, x) - !! Sets the radial axis limits if autoscaling is inactive. - class(plot_polar), intent(inout) :: this - !! The plot_polar object. - real(real64), intent(in) :: x(2) - !! A 2-element array containing the minimum and maximum limit - !! values in that order. - this%m_minrad = minval(x) - this%m_maxrad = maxval(x) - end subroutine - -! ------------------------------------------------------------------------------ - pure function plr_get_theta_start(this) result(rst) - !! Gets the position for \(\theta = 0\). - class(plot_polar), intent(in) :: this - !! The plot_polar object. - character(len = :), allocatable :: rst - !! The starting position. It is one of the following flags. - !! - !! - POLAR_THETA_BOTTOM - !! - !! - POLAR_THETA_TOP - !! - !! - POLAR_THETA_RIGHT - !! - !! - POLAR_THETA_LEFT - rst = this%m_thetaStart - end function - -! -------------------- - subroutine plr_set_theta_start(this, x) - !! Sets the position for \(\theta = 0\). - class(plot_polar), intent(inout) :: this - !! The plot_polar object. - character(len = *), intent(in) :: x - !! The starting position. It is one of the following flags. - !! - !! - POLAR_THETA_BOTTOM - !! - !! - POLAR_THETA_TOP - !! - !! - POLAR_THETA_RIGHT - !! - !! - POLAR_THETA_LEFT - if (x /= POLAR_THETA_BOTTOM .and. & - x /= POLAR_THETA_TOP .and. & - x /= POLAR_THETA_LEFT .and. & - x /= POLAR_THETA_RIGHT) & - then - ! Reset to default - this%m_thetaStart = POLAR_THETA_RIGHT - else - this%m_thetaStart = x - end if - end subroutine + ! Polar-Specific Settings + call str%append(new_line('a')) + call str%append("unset border") + + call str%append(new_line('a')) + call str%append("set polar") + + call str%append(new_line('a')) + call str%append("set size square") + + call str%append(new_line('a')) + call str%append("unset xtics") + call str%append(new_line('a')) + call str%append("unset ytics") + + call str%append(new_line('a')) + call str%append('set ttics 0, 30 format "%g".GPVAL_DEGREE_SIGN') + + call str%append(new_line('a')) + call str%append("set mttics 3") + + call str%append(new_line('a')) + call str%append("set theta ") + call str%append(this%get_theta_start_position()) + call str%append(" ") + call str%append(this%get_theta_direction()) + + ! Radial Limits + if (.not.this%get_autoscale()) then + lim = this%get_radial_limits() + call str%append(new_line('a')) + call str%append("set rrange [") + call str%append(to_string(lim(1))) + call str%append(":") + call str%append(to_string(lim(2))) + call str%append("]") + end if + + ! Grid + if (this%get_show_gridlines()) then + call str%append(new_line('a')) + call str%append("set grid r polar") + end if + + ! Title + n = len_trim(this%get_title()) + if (n > 0) then + call str%append(new_line('a')) + call str%append('set title "') + call str%append(this%get_title()) + call str%append('"') + end if + + ! Border + call str%append(new_line('a')) + if (this%get_draw_border()) then + call str%append("set border polar") + else + call str%append("set border 0") + end if + + ! Legend + call str%append(new_line('a')) + leg => this%get_legend() + if (associated(leg)) call str%append(leg%get_command_string()) + + ! ! Labels + ! do i = 1, this%get_label_count() + ! lbl => this%get_label(i) + ! if (.not.associated(lbl)) cycle + ! call str%append(new_line('a')) + ! call str%append(lbl%get_command_string()) + ! end do + + ! Define the plot function and data formatting commands + n = this%get_count() + call str%append(new_line('a')) + call str%append("plot ") + do i = 1, n + ptr => this%get(i) + if (.not.associated(ptr)) cycle + call str%append(ptr%get_command_string()) + if (i /= n) call str%append(", ") + end do + + ! Define the data to plot + do i = 1, n + ptr => this%get(i) + if (.not.associated(ptr)) cycle + call str%append(new_line('a')) + call str%append(ptr%get_data_string()) + call str%append("e") + end do + + ! End + x = char(str%to_string()) + end function + +! ------------------------------------------------------------------------------ + pure function plr_get_autoscale(this) result(rst) + !! Gets a logical value determining if the axis should be + !! automatically scaled to fit the data. + class(plot_polar), intent(in) :: this + !! The plot_polar object. + logical :: rst + !! Returns true if the plot will autoscale; else, false. + rst = this%m_autoscale + end function + +! -------------------- + subroutine plr_set_autoscale(this, x) + !! Sets a logical value determining if the axis should be + !! automatically scaled to fit the data. + class(plot_polar), intent(inout) :: this + !! The plot_polar object. + logical, intent(in) :: x + !! Set to true if the plot will autoscale; else, false. + this%m_autoscale = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plr_get_limits(this) result(rst) + !! Gets the radial axis limits if autoscaling is inactive. + class(plot_polar), intent(in) :: this + !! The plot_polar object. + real(real64) :: rst(2) + !! A 2-element array containing the minimum and maximum limit + !! values in that order. + rst = [this%m_minrad, this%m_maxrad] + end function + +! -------------------- + subroutine plr_set_limits(this, x) + !! Sets the radial axis limits if autoscaling is inactive. + class(plot_polar), intent(inout) :: this + !! The plot_polar object. + real(real64), intent(in) :: x(2) + !! A 2-element array containing the minimum and maximum limit + !! values in that order. + this%m_minrad = minval(x) + this%m_maxrad = maxval(x) + end subroutine + +! ------------------------------------------------------------------------------ + pure function plr_get_theta_start(this) result(rst) + !! Gets the position for \(\theta = 0\). + class(plot_polar), intent(in) :: this + !! The plot_polar object. + character(len = :), allocatable :: rst + !! The starting position. It is one of the following flags. + !! + !! - POLAR_THETA_BOTTOM + !! + !! - POLAR_THETA_TOP + !! + !! - POLAR_THETA_RIGHT + !! + !! - POLAR_THETA_LEFT + rst = this%m_thetaStart + end function -! ------------------------------------------------------------------------------ - pure function plr_get_theta_direction(this) result(rst) - !! Gets the \(\theta\) direction. - class(plot_polar), intent(in) :: this +! -------------------- + subroutine plr_set_theta_start(this, x) + !! Sets the position for \(\theta = 0\). + class(plot_polar), intent(inout) :: this !! The plot_polar object. - character(len = :), allocatable :: rst - !! The direction. It is one of the following flags. + character(len = *), intent(in) :: x + !! The starting position. It is one of the following flags. !! - !! - POLAR_THETA_CCW + !! - POLAR_THETA_BOTTOM !! - !! - POLAR_THETA_CW - rst = this%m_thetaDirection - end function - -! -------------------- - subroutine plr_set_theta_direction(this, x) - !! Sets the \(\theta\) direction. - class(plot_polar), intent(inout) :: this - !! The plot_polar object. - character(len = *), intent(in) :: x - !! The direction. It is one of the following flags. - !! - !! - POLAR_THETA_CCW - !! - !! - POLAR_THETA_CW - if (x /= POLAR_THETA_CCW .and. x /= POLAR_THETA_CW) then - ! Reset to default - this%m_thetaDirection = POLAR_THETA_CCW - else - this%m_thetaDirection = x - end if - end subroutine - -! ------------------------------------------------------------------------------ -end module + !! - POLAR_THETA_TOP + !! + !! - POLAR_THETA_RIGHT + !! + !! - POLAR_THETA_LEFT + if (x /= POLAR_THETA_BOTTOM .and. & + x /= POLAR_THETA_TOP .and. & + x /= POLAR_THETA_LEFT .and. & + x /= POLAR_THETA_RIGHT) & + then + ! Reset to default + this%m_thetaStart = POLAR_THETA_RIGHT + else + this%m_thetaStart = x + end if + end subroutine + +! ------------------------------------------------------------------------------ + pure function plr_get_theta_direction(this) result(rst) + !! Gets the \(\theta\) direction. + class(plot_polar), intent(in) :: this + !! The plot_polar object. + character(len = :), allocatable :: rst + !! The direction. It is one of the following flags. + !! + !! - POLAR_THETA_CCW + !! + !! - POLAR_THETA_CW + rst = this%m_thetaDirection + end function + +! -------------------- + subroutine plr_set_theta_direction(this, x) + !! Sets the \(\theta\) direction. + class(plot_polar), intent(inout) :: this + !! The plot_polar object. + character(len = *), intent(in) :: x + !! The direction. It is one of the following flags. + !! + !! - POLAR_THETA_CCW + !! + !! - POLAR_THETA_CW + if (x /= POLAR_THETA_CCW .and. x /= POLAR_THETA_CW) then + ! Reset to default + this%m_thetaDirection = POLAR_THETA_CCW + else + this%m_thetaDirection = x + end if + end subroutine + +! ------------------------------------------------------------------------------ +end module @@ -575,7 +602,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_png_terminal.f90.html b/doc/sourcefile/fplot_png_terminal.f90.html index 9787d57..217e573 100644 --- a/doc/sourcefile/fplot_png_terminal.f90.html +++ b/doc/sourcefile/fplot_png_terminal.f90.html @@ -333,7 +333,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_qt_terminal.f90.html b/doc/sourcefile/fplot_qt_terminal.f90.html index 4726410..6befa06 100644 --- a/doc/sourcefile/fplot_qt_terminal.f90.html +++ b/doc/sourcefile/fplot_qt_terminal.f90.html @@ -261,7 +261,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_simplify.f90.html b/doc/sourcefile/fplot_simplify.f90.html index fd384c8..def4c0b 100644 --- a/doc/sourcefile/fplot_simplify.f90.html +++ b/doc/sourcefile/fplot_simplify.f90.html @@ -96,7 +96,7 @@

    fplot_simplify.f90
  • 219 statements + title=" 3.0% of total for source files.">219 statements
  • @@ -584,7 +584,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_stats_plots.f90.html b/doc/sourcefile/fplot_stats_plots.f90.html new file mode 100644 index 0000000..60328cf --- /dev/null +++ b/doc/sourcefile/fplot_stats_plots.f90.html @@ -0,0 +1,625 @@ + + + + + + + + + + + fplot_stats_plots.f90 – FPLOT + + + + + + + + + + + + + + + + + + + + +
    +
    +

    fplot_stats_plots.f90 + Source File + +

    +
    +
    +
    + + +
    +
    +
    + + +
    +
    + +
    + +
    + +
    +

    Contents

    + + + + + +
    +
    +

    + Modules +

    +
    + +
    + + + + + + + + + + + + + + +
    +

    Source Code

    + +
    + + +
    +
    + +
    +

    Source Code

    +
    module fplot_stats_plots
    +    use iso_fortran_env
    +    use fplot_plot_object
    +    use fplot_plot
    +    use fplot_plot_data_2d
    +    use fplot_plot_data_histogram
    +    use fplot_plot_2d
    +    use fplot_multiplot
    +    use fplot_terminal
    +    use fplot_constants
    +    use fplot_errors
    +    use fplot_colors
    +    use fplot_plot_axis
    +    use collections
    +    use strings
    +    use ferror
    +    implicit none
    +    private
    +    public :: correlation_plot
    +
    +    type, extends(plot_object) :: correlation_plot
    +        !! Defines a multiplot arrangement designed to illustrate correlation
    +        !! between data sets.
    +        type(multiplot), private :: m_plt
    +            !! The multiplot object.
    +    contains
    +        procedure, public :: get_command_string => cp_get_command
    +        procedure, public :: initialize => cp_init
    +        procedure, public :: get_row_count => cp_get_rows
    +        procedure, public :: get_column_count => cp_get_cols
    +        procedure, public :: get_plot_count => cp_get_count
    +        procedure, public :: draw => cp_draw
    +        procedure, public :: save_file => cp_save
    +        procedure, public :: get => cp_get
    +        procedure, public :: get_terminal => cp_get_term
    +        procedure, public :: get_font_name => cp_get_font
    +        procedure, public :: set_font_name => cp_set_font
    +        procedure, public :: get_font_size => cp_get_font_size
    +        procedure, public :: set_font_size => cp_set_font_size
    +    end type
    +
    +contains
    +! ------------------------------------------------------------------------------
    +    function cp_get_command(this) result(x)
    +        !! Gets the GNUPLOT commands for this object.
    +        class(correlation_plot), intent(in) :: this
    +            !! The correlation_plot object.
    +        character(len = :), allocatable :: x
    +            !! The command string.
    +    end function
    +
    +! ------------------------------------------------------------------------------
    +    subroutine cp_init(this, x, labels, term, width, height, err)
    +        !! Initializes the correlation_plot object.
    +        class(correlation_plot), intent(inout) :: this
    +            !! The correlation_plot object.
    +        real(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(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(int32), intent(in), optional :: width
    +            !! Optionally, the width of the plot window.
    +        integer(int32), intent(in), optional :: height
    +            !! Optionally, the height of the plot window.
    +        class(errors), intent(inout), optional, target :: err
    +            !! An error handling object.
    +
    +        ! Local Variables
    +        integer(int32) :: i, j, k, t, n, flag
    +        real(real64) :: m, b
    +        real(real64), allocatable, dimension(:) :: mdl
    +        class(errors), pointer :: errmgr
    +        type(errors), target :: deferr
    +        type(plot_2d), allocatable, dimension(:) :: plts
    +        type(plot_data_2d) :: pdata, mdata
    +        type(plot_data_histogram) :: hdata
    +        class(plot_axis), pointer :: xAxis, yAxis
    +        
    +        ! Initialization
    +        if (present(err)) then
    +            errmgr => err
    +        else
    +            errmgr => deferr
    +        end if
    +        n = size(x, 2)
    +        call this%m_plt%initialize(n, n, term = term, width = width, &
    +            height = height, err = errmgr)
    +        if (errmgr%has_error_occurred()) return
    +        allocate(plts(n * n), stat = flag)
    +        if (flag /= 0) then
    +            call report_memory_error(errmgr, "cp_init", flag)
    +            return
    +        end if
    +        call this%m_plt%set_font_size(11)    ! use a small font size
    +
    +        ! Input Checking
    +        if (present(labels)) then
    +            if (size(labels) /= n) then
    +                call report_array_size_mismatch_error(errmgr, "cp_init", &
    +                    "labels", n, size(labels))
    +                return
    +            end if
    +        end if
    +
    +        ! Create plots
    +        k = 0
    +        call pdata%set_draw_line(.false.)
    +        call pdata%set_draw_markers(.true.)
    +        call pdata%set_marker_style(MARKER_FILLED_CIRCLE)
    +        call pdata%set_marker_scaling(0.5)
    +        call mdata%set_line_width(2.0)
    +        call mdata%set_line_color(CLR_BLACK)
    +        if (errmgr%has_error_occurred()) return
    +        do j = 1, n
    +            do i = 1, n
    +                k = k + 1
    +                call plts(k)%initialize(err = errmgr)
    +                if (errmgr%has_error_occurred()) return
    +                if (i == j) then
    +                    ! Plot a histogram of the data
    +                    call hdata%define_data(x(:,i), err = errmgr)
    +                    if (errmgr%has_error_occurred()) return
    +                    call plts(k)%push(hdata)
    +                else
    +                    ! Plot a scatter plot
    +                    call pdata%define_data(x(:,j), x(:,i), err = errmgr)
    +                    if (errmgr%has_error_occurred()) return
    +                    call plts(k)%push(pdata)
    +
    +                    ! Fit a line to the data
    +                    call compute_linear_fit(x(:,j), x(:,i), m, b)
    +                    mdl = m * x(:,j) + b
    +
    +                    ! Plot the fitted line
    +                    call mdata%define_data(x(:,j), mdl, err = err)
    +                    if (errmgr%has_error_occurred()) return
    +                    call plts(k)%push(mdata)
    +                end if
    +
    +                ! Deal with axis labels
    +                if (j == 1) then
    +                    ! Display y axis labels for these plots
    +                    yAxis => plts(k)%get_y_axis()
    +                    if (present(labels)) then
    +                        call yAxis%set_title(char(labels(i)))
    +                    else
    +                        call yAxis%set_title(char("x_{" // to_string(i) // "}"))
    +                    end if
    +                end if
    +
    +                ! Get an x-axis object for the plot
    +                xAxis => plts(k)%get_x_axis()
    +
    +                ! Define axis labels
    +                if (i == n) then
    +                    ! Display x axis labels for these plots
    +                    if (present(labels)) then
    +                        call xAxis%set_title(char(labels(j)))
    +                    else
    +                        call xAxis%set_title(char("x_{" // to_string(j) // "}"))
    +                    end if
    +                end if
    +
    +                ! Rotate histogram tic labels
    +                call xAxis%set_tic_label_angle(45.0)
    +                call xAxis%set_tic_label_rotation_origin(GNUPLOT_ROTATION_ORIGIN_RIGHT)
    +
    +                ! Store the plot - the collection makes a copy of the plot and
    +                ! manages it's lifetime
    +                call this%m_plt%set(i, j, plts(k))
    +            end do
    +        end do
    +    end subroutine
    +
    +! ------------------------------------------------------------------------------
    +    pure function cp_get_rows(this) result(x)
    +        !! Gets the number of rows of plots.
    +        class(correlation_plot), intent(in) :: this
    +            !! The correlation_plot object.
    +        integer(int32) :: x
    +            !! The row count.
    +
    +        x = this%m_plt%get_row_count()
    +    end function
    +
    +! --------------------
    +    pure function cp_get_cols(this) result(x)
    +        !! Gets the number of columns of plots.
    +        class(correlation_plot), intent(in) :: this
    +            !! The correlation_plot object.
    +        integer(int32) :: x
    +            !! The column count.
    +
    +        x = this%m_plt%get_column_count()
    +    end function
    +
    +! --------------------
    +    pure function cp_get_count(this) result(x)
    +        !! Gets the total number of plots.
    +        class(correlation_plot), intent(in) :: this
    +            !! The correlation_plot object.
    +        integer(int32) :: x
    +            !! The plot count.
    +
    +        x = this%m_plt%get_plot_count()
    +    end function
    +    
    +! ------------------------------------------------------------------------------
    +    subroutine cp_draw(this, persist, err)
    +        !! Launches GNUPLOT and draws the correlation_plot per the current 
    +        !! state of the command list.
    +        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.
    +        
    +        call this%m_plt%draw(persist, err)
    +    end subroutine
    +
    +! ------------------------------------------------------------------------------
    +    subroutine cp_save(this, fname, err)
    +        !! Saves a GNUPLOT command file.
    +        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.
    +
    +        call this%m_plt%save_file(fname, err)
    +    end subroutine
    +
    +! ------------------------------------------------------------------------------
    +    function cp_get(this, i, j) result(x)
    +        !! Gets the requested plot object.
    +        class(correlation_plot), intent(in) :: this
    +            !! The correlation_plot object.
    +        integer(int32), intent(in) :: i
    +            !! The row index of the plot to retrieve.
    +        integer(int32), intent(in) :: j
    +            !! The column index of the plot to retrieve.
    +        class(plot), pointer :: x
    +            !! A pointer to the plot object.
    +
    +        x => this%m_plt%get(i, j)
    +    end function
    +
    +! ------------------------------------------------------------------------------
    +    function cp_get_term(this) result(x)
    +        !! Gets the GNUPLOT terminal object.
    +        class(correlation_plot), intent(in) :: this
    +            !! The correlation_plot object.
    +        class(terminal), pointer :: x
    +            !! A pointer to the terminal object.
    +        x => this%m_plt%get_terminal()
    +    end function
    +
    +! ------------------------------------------------------------------------------
    +    function cp_get_font(this) result(x)
    +        !! Gets the name of the font used for plot text.
    +        class(correlation_plot), intent(in) :: this
    +            !! The correlation_plot object.
    +        character(len = :), allocatable :: x
    +            !! The font name.
    +        x = this%m_plt%get_font_name()
    +    end function
    +
    +! --------------------
    +    subroutine cp_set_font(this, x)
    +        !! Sets the name of the font used for plot text.
    +        class(correlation_plot), intent(inout) :: this
    +            !! The correlation_plot object.
    +        character(len = *), intent(in) :: x
    +            !! The font name.
    +        call this%m_plt%set_font_name(x)
    +    end subroutine
    +
    +! ------------------------------------------------------------------------------
    +    function cp_get_font_size(this) result(x)
    +        !! Gets the size of the font used by the plot.
    +        class(correlation_plot), intent(in) :: this
    +            !! The correlation_plot object.
    +        integer(int32) :: x
    +            !! The font size.
    +        x = this%m_plt%get_font_size()
    +    end function
    +
    +! --------------------
    +    subroutine cp_set_font_size(this, x)
    +        !! Sets the size of the font used by the plot.
    +        class(correlation_plot), intent(inout) :: this
    +            !! The correlation_plot object.
    +        integer(int32), intent(in) :: x
    +            !! The font size.
    +        call this%m_plt%set_font_size(x)
    +    end subroutine
    +
    +! ******************************************************************************
    +! PRIVATE HELPER ROUTINES
    +! ------------------------------------------------------------------------------
    +subroutine compute_linear_fit(x, y, m, b)
    +    !! Computes the coefficients of a linear equation (y = m * x + b) using a
    +    !! least-squares approach.
    +    real(real64), intent(in), dimension(:) :: x
    +        !! The x-coordinate data.
    +    real(real64), intent(in), dimension(:) :: y
    +        !! The y-coordinate data.
    +    real(real64), intent(out) :: m
    +        !! The slope term.
    +    real(real64), intent(out) :: b
    +        !! The intercept term.
    +
    +    ! Local Variables
    +    integer(int32) :: i, n
    +    real(real64) :: sumX, sumY, sumX2, sumY2, sumXY
    +
    +    ! Initialization
    +    n = size(x)
    +    sumX = 0.0d0
    +    sumY = 0.0d0
    +    sumX2 = 0.0d0
    +    sumY2 = 0.0d0
    +    sumXY = 0.0d0
    +
    +    ! Process
    +    do i = 1, n
    +        sumX = sumX + x(i)
    +        sumY = sumY + y(i)
    +        sumXY = sumXY + x(i) * y(i)
    +        sumX2 = sumX2 + (x(i))**2
    +        sumY2 = sumY2 + (y(i))**2
    +    end do
    +    m = (n * sumXY - sumX * sumY) / (n * sumX2 - sumX**2)
    +    b = (sumY * sumX2 - sumX * sumXY) / (n * sumX2 - sumX**2)
    +end subroutine
    +
    +! ------------------------------------------------------------------------------
    +end module
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +

    FPLOT was developed by Jason Christopherson
    © 2025 +

    +
    +
    +

    + Documentation generated by + FORD + on 2025-04-10 13:38

    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/sourcefile/fplot_surface_plot.f90.html b/doc/sourcefile/fplot_surface_plot.f90.html index 305dccd..b7fd2e9 100644 --- a/doc/sourcefile/fplot_surface_plot.f90.html +++ b/doc/sourcefile/fplot_surface_plot.f90.html @@ -96,7 +96,7 @@

    fplot_surface_plot.f90
  • 172 statements + title=" 2.3% of total for source files.">172 statements
  • @@ -619,7 +619,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_surface_plot_data.f90.html b/doc/sourcefile/fplot_surface_plot_data.f90.html index 454f01e..d24f691 100644 --- a/doc/sourcefile/fplot_surface_plot_data.f90.html +++ b/doc/sourcefile/fplot_surface_plot_data.f90.html @@ -96,7 +96,7 @@

    fplot_surface_plot_data.f90
  • 197 statements + title=" 2.7% of total for source files.">197 statements
  • @@ -546,7 +546,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_terminal.f90.html b/doc/sourcefile/fplot_terminal.f90.html index 8a6a6e8..e78e625 100644 --- a/doc/sourcefile/fplot_terminal.f90.html +++ b/doc/sourcefile/fplot_terminal.f90.html @@ -96,7 +96,7 @@

    fplot_terminal.f90
  • 162 statements + title=" 2.2% of total for source files.">162 statements
  • @@ -482,7 +482,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_tri_surface_plot_data.f90.html b/doc/sourcefile/fplot_tri_surface_plot_data.f90.html index c758471..cc3939a 100644 --- a/doc/sourcefile/fplot_tri_surface_plot_data.f90.html +++ b/doc/sourcefile/fplot_tri_surface_plot_data.f90.html @@ -96,7 +96,7 @@

    fplot_tri_surface_plot_data.f90
  • 128 statements + title=" 1.7% of total for source files.">128 statements
  • @@ -439,7 +439,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_triangulations_delaunay_2d.f90.html b/doc/sourcefile/fplot_triangulations_delaunay_2d.f90.html index a03f273..7edae69 100644 --- a/doc/sourcefile/fplot_triangulations_delaunay_2d.f90.html +++ b/doc/sourcefile/fplot_triangulations_delaunay_2d.f90.html @@ -96,7 +96,7 @@

    fplot_triangulations_delaunay_2d.f90
  • 149 statements + title=" 2.0% of total for source files.">149 statements
  • @@ -483,7 +483,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_vector_field_plot_data.f90.html b/doc/sourcefile/fplot_vector_field_plot_data.f90.html index 145bdbb..dee19de 100644 --- a/doc/sourcefile/fplot_vector_field_plot_data.f90.html +++ b/doc/sourcefile/fplot_vector_field_plot_data.f90.html @@ -96,7 +96,7 @@

    fplot_vector_field_plot_data.f90
  • 195 statements + title=" 2.7% of total for source files.">195 statements
  • @@ -536,7 +536,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_windows_terminal.f90.html b/doc/sourcefile/fplot_windows_terminal.f90.html index 83dc5b1..eb9097b 100644 --- a/doc/sourcefile/fplot_windows_terminal.f90.html +++ b/doc/sourcefile/fplot_windows_terminal.f90.html @@ -263,7 +263,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/sourcefile/fplot_wxt_terminal.f90.html b/doc/sourcefile/fplot_wxt_terminal.f90.html index 1d44e9a..b98b8e5 100644 --- a/doc/sourcefile/fplot_wxt_terminal.f90.html +++ b/doc/sourcefile/fplot_wxt_terminal.f90.html @@ -261,7 +261,7 @@

    Source Code

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/src/fplot_colormap.f90 b/doc/src/fplot_colormap.f90 index 92dea51..17469e7 100644 --- a/doc/src/fplot_colormap.f90 +++ b/doc/src/fplot_colormap.f90 @@ -406,8 +406,8 @@ function custom_get_clr(this) result(x) !! The command string. type(string_builder) :: str - integer(int32) :: i, n, r, g, b - type(color) :: clr + integer(int32) :: i, n, r, g, b, c + character(len = 6) :: ctxt if (.not.associated(this%m_map)) then allocate(character(len = 0) :: x) @@ -417,12 +417,14 @@ function custom_get_clr(this) result(x) n = this%m_map%get_levels() do i = 0, n - 1 ! Get the RGB triple - call this%m_map%get_RGB(i, clr%red, clr%green, clr%blue) + call this%m_map%get_RGB(i, r, g, b) + c = ishft(r, 16) + ishft(g, 8) + b + write(ctxt, '(Z6.6)') c ! Append the color information call str%append(to_string(i)) call str%append(" '#") - call str%append(clr%to_hex_string()) + call str%append(ctxt) call str%append("'") if (i /= n - 1) then call str%append(",") diff --git a/doc/src/fplot_colors.f90 b/doc/src/fplot_colors.f90 index 8a8c486..3338c9b 100644 --- a/doc/src/fplot_colors.f90 +++ b/doc/src/fplot_colors.f90 @@ -34,6 +34,9 @@ module fplot_colors !! The green component of the color (must be between 0 and 255). integer(int32), public :: blue = 255 !! The blue component of the color (must be between 0 and 255). + integer(int32), public :: alpha = 0 + !! The alpha component of the color (must be between 0 and 255). + !! Notice, 0 is fully opaque and 255 is fully transparent. contains procedure, public, pass :: to_hex_string => clr_to_hex_string procedure, public, pass :: copy_from => clr_copy_from @@ -47,50 +50,50 @@ module fplot_colors module procedure :: clr_not_equals end interface - type(color), parameter :: CLR_BLACK = color(0, 0, 0) + type(color), parameter :: CLR_BLACK = color(0, 0, 0, 0) !! Black. - type(color), parameter :: CLR_WHITE = color(255, 255, 255) + type(color), parameter :: CLR_WHITE = color(255, 255, 255, 0) !! White. - type(color), parameter :: CLR_RED = color(255, 0, 0) + type(color), parameter :: CLR_RED = color(255, 0, 0, 0) !! Red. - type(color), parameter :: CLR_LIME = color(0, 255, 0) + type(color), parameter :: CLR_LIME = color(0, 255, 0, 0) !! Lime. - type(color), parameter :: CLR_BLUE = color(0, 0, 255) + type(color), parameter :: CLR_BLUE = color(0, 0, 255, 0) !! Blue. - type(color), parameter :: CLR_YELLOW = color(255, 255, 0) + type(color), parameter :: CLR_YELLOW = color(255, 255, 0, 0) !! Yellow. - type(color), parameter :: CLR_CYAN = color(0, 255, 255) + type(color), parameter :: CLR_CYAN = color(0, 255, 255, 0) !! Cyan. - type(color), parameter :: CLR_MAGENTA = color(255, 0, 255) + type(color), parameter :: CLR_MAGENTA = color(255, 0, 255, 0) !! Magenta. - type(color), parameter :: CLR_SILVER = color(192, 192, 192) + type(color), parameter :: CLR_SILVER = color(192, 192, 192, 0) !! Silver. - type(color), parameter :: CLR_GRAY = color(128, 128, 128) + type(color), parameter :: CLR_GRAY = color(128, 128, 128, 0) !! Gray. - type(color), parameter :: CLR_MAROON = color(128, 0, 0) + type(color), parameter :: CLR_MAROON = color(128, 0, 0, 0) !! Maroon. - type(color), parameter :: CLR_OLIVE = color(128, 128, 0) + type(color), parameter :: CLR_OLIVE = color(128, 128, 0, 0) !! Olive. - type(color), parameter :: CLR_GREEN = color(0, 128, 0) + type(color), parameter :: CLR_GREEN = color(0, 128, 0, 0) !! Green. - type(color), parameter :: CLR_PURPLE = color(128, 0, 128) + type(color), parameter :: CLR_PURPLE = color(128, 0, 128, 0) !! Purple. - type(color), parameter :: CLR_TEAL = color(0, 128, 128) + type(color), parameter :: CLR_TEAL = color(0, 128, 128, 0) !! Teal. - type(color), parameter :: CLR_NAVY = color(0, 0, 128) + type(color), parameter :: CLR_NAVY = color(0, 0, 128, 0) !! Navy. - type(color), parameter :: CLR_ORANGE = color(255, 165, 0) + type(color), parameter :: CLR_ORANGE = color(255, 165, 0, 0) !! Orange. ! A list of colors that can be cycled through by plotting code type(color), parameter, dimension(7) :: color_list = [ & - color(0, int(0.447 * 255), int(0.741 * 255)), & - color(int(0.85 * 255), int(0.325 * 255), int(0.098 * 255)), & - color(int(0.929 * 255), int(0.694 * 255), int(0.125 * 255)), & - color(int(0.494 * 255), int(0.184 * 255), int(0.556 * 255)), & - color(int(0.466 * 255), int(0.674 * 255), int(0.188 * 255)), & - color(int(0.301 * 255), int(0.745 * 255), int(0.933 * 255)), & - color(int(0.635 * 255), int(0.078 * 255), int(0.184 * 255))] + color(0, int(0.447 * 255), int(0.741 * 255), 0), & + color(int(0.85 * 255), int(0.325 * 255), int(0.098 * 255), 0), & + color(int(0.929 * 255), int(0.694 * 255), int(0.125 * 255), 0), & + color(int(0.494 * 255), int(0.184 * 255), int(0.556 * 255), 0), & + color(int(0.466 * 255), int(0.674 * 255), int(0.188 * 255), 0), & + color(int(0.301 * 255), int(0.745 * 255), int(0.933 * 255), 0), & + color(int(0.635 * 255), int(0.078 * 255), int(0.184 * 255), 0)] contains ! ------------------------------------------------------------------------------ @@ -98,11 +101,11 @@ pure function clr_to_hex_string(this) result(txt) !! Returns the color in hexadecimal format. class(color), intent(in) :: this !! The color object. - character(6) :: txt + character(8) :: txt !! A string containing the hexadecimal equivalent. ! Local Variables - integer(int32) :: r, g, b, clr + integer(int32) :: r, g, b, a, clr ! Clip each color if necessary if (this%red < 0) then @@ -129,11 +132,19 @@ pure function clr_to_hex_string(this) result(txt) b = this%blue end if + if (this%alpha < 0) then + a = 0 + else if (this%alpha > 255) then + a = 255 + else + a = this%alpha + end if + ! Build the color information - clr = ishft(r, 16) + ishft(g, 8) + b + clr = ishft(a, 24) + ishft(r, 16) + ishft(g, 8) + b ! Convert the integer to a hexadecimal string - write(txt, '(Z6.6)') clr + write(txt, '(Z8.8)') clr end function ! ------------------------------------------------------------------------------ diff --git a/doc/src/fplot_constants.f90 b/doc/src/fplot_constants.f90 index 1edd0cc..fb476a9 100644 --- a/doc/src/fplot_constants.f90 +++ b/doc/src/fplot_constants.f90 @@ -149,4 +149,23 @@ module fplot_constants integer(int32), parameter :: GNUPLOT_MAX_PATH_LENGTH = 256 !! Defines the maximum number of characters allowed in a file path. +! ****************************************************************************** +! HORIZONTAL ALIGNMENT CONSTANTS +! ------------------------------------------------------------------------------ + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_LEFT = "left" + !! Defines the text should be aligned to the left. + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_CENTER = "center" + !! Defines the text should be centered. + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT = "right" + !! Defines the text should be aligned to the right. + +! ****************************************************************************** +! ROTATION ORIGIN CONSTANTS +! ------------------------------------------------------------------------------ + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_RIGHT = "right" + !! Defines the text should be rotated around the right side of the text. + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_CENTER = "center" + !! Defines the text should be rotated around the center of the text. + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_LEFT = "left" + !! Defines the text should be rotated around the left side of the text. end module \ No newline at end of file diff --git a/doc/src/fplot_core.f90 b/doc/src/fplot_core.f90 index 12d590a..42abae9 100644 --- a/doc/src/fplot_core.f90 +++ b/doc/src/fplot_core.f90 @@ -40,6 +40,7 @@ module fplot_core use fplot_multiplot use fplot_plot_bar use fplot_plot_polar + use fplot_stats_plots implicit none private @@ -92,6 +93,12 @@ module fplot_core public :: ARROW_EMPTY public :: ARROW_NO_FILL public :: ARROW_NO_BORDER + public :: GNUPLOT_HORIZONTAL_ALIGN_LEFT + public :: GNUPLOT_HORIZONTAL_ALIGN_CENTER + public :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT + public :: GNUPLOT_ROTATION_ORIGIN_RIGHT + public :: GNUPLOT_ROTATION_ORIGIN_CENTER + public :: GNUPLOT_ROTATION_ORIGIN_LEFT ! FPLOT_CORE_ROUTINES.F90 public :: linspace @@ -240,4 +247,6 @@ module fplot_core ! FPLOT_PLOT_POLAR.F90 public :: plot_polar + ! FPLOT_STATS_PLOTS.F90 + public :: correlation_plot end module diff --git a/doc/src/fplot_multiplot.f90 b/doc/src/fplot_multiplot.f90 index db0b2d5..571eb6f 100644 --- a/doc/src/fplot_multiplot.f90 +++ b/doc/src/fplot_multiplot.f90 @@ -105,7 +105,7 @@ function mp_get_command(this) result(x) end function ! ------------------------------------------------------------------------------ - subroutine mp_init(this, m, n, term, err) + subroutine mp_init(this, m, n, term, width, height, err) !! Initializes the multiplot object. class(multiplot), intent(inout) :: this !! The multiplot object. @@ -126,6 +126,10 @@ subroutine mp_init(this, m, n, term, err) !! - GNUPLOT_TERMINAL_WXT !! !! - GNUPLOT_TERMINAL_LATEX + integer(int32), intent(in), optional :: width + !! Optionally, the width of the plot window. + integer(int32), intent(in), optional :: height + !! Optionally, the height of the plot window. class(errors), intent(inout), optional, target :: err !! An error handling object. @@ -189,6 +193,14 @@ subroutine mp_init(this, m, n, term, err) call report_memory_error(errmgr, "mp_init", flag) return end if + + ! Size the window? + if (present(width)) then + call this%m_terminal%set_window_width(width) + end if + if (present(height)) then + call this%m_terminal%set_window_height(height) + end if end subroutine ! ------------------------------------------------------------------------------ @@ -283,7 +295,6 @@ subroutine mp_draw(this, persist, err) integer(int32) :: fid, flag class(errors), pointer :: errmgr type(errors), target :: deferr - character(len = 256) :: errmsg class(terminal), pointer :: term ! Initialization @@ -320,8 +331,6 @@ subroutine mp_draw(this, persist, err) ! Clean up by deleting the file open(newunit = fid, file = fname) close(fid, status = "delete") - -100 format(A, I0, A) end subroutine ! ------------------------------------------------------------------------------ diff --git a/doc/src/fplot_plot.f90 b/doc/src/fplot_plot.f90 index 7b75a96..6a51e7b 100644 --- a/doc/src/fplot_plot.f90 +++ b/doc/src/fplot_plot.f90 @@ -54,6 +54,10 @@ module fplot_plot !! Show the colorbar? type(list), private :: m_arrows ! Added 1/3/2024, JAC !! A collection of plot_arrow items to draw. + real(real32), private :: m_leftMargin = -1.0 + real(real32), private :: m_rightMargin = -1.0 + real(real32), private :: m_topMargin = -1.0 + real(real32), private :: m_bottomMargin = -1.0 contains procedure, public :: free_resources => plt_clean_up procedure, public :: initialize => plt_init @@ -99,6 +103,14 @@ module fplot_plot procedure, public :: set_arrow => plt_set_arrow procedure, public :: get_arrow_count => plt_get_arrow_count procedure, public :: clear_arrows => plt_clear_arrows + procedure, public :: get_left_margin => plt_get_left_margin + procedure, public :: set_left_margin => plt_set_left_margin + procedure, public :: get_right_margin => plt_get_right_margin + procedure, public :: set_right_margin => plt_set_right_margin + procedure, public :: get_top_margin => plt_get_top_margin + procedure, public :: set_top_margin => plt_set_top_margin + procedure, public :: get_bottom_margin => plt_get_bottom_margin + procedure, public :: set_bottom_margin => plt_set_bottom_margin end type contains @@ -859,5 +871,99 @@ subroutine plt_clear_arrows(this) call this%m_arrows%clear() end subroutine +! ****************************************************************************** +! ADDED: 4/7/2025 - JAC +! ------------------------------------------------------------------------------ + pure function plt_get_left_margin(this) result(x) + !! Gets the left margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_leftMargin + end function + +! ---------- + subroutine plt_set_left_margin(this, x) + !! Sets the left margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_leftMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_right_margin(this) result(x) + !! Gets the right margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_rightMargin + end function + +! ---------- + subroutine plt_set_right_margin(this, x) + !! Sets the right margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_rightMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_top_margin(this) result(x) + !! Gets the top margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_topMargin + end function + +! ---------- + subroutine plt_set_top_margin(this, x) + !! Sets the top margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_topMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_bottom_margin(this) result(x) + !! Gets the bottom margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_bottomMargin + end function + +! ---------- + subroutine plt_set_bottom_margin(this, x) + !! Sets the bottom margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_bottomMargin = x + end subroutine + ! ------------------------------------------------------------------------------ end module \ No newline at end of file diff --git a/doc/src/fplot_plot_2d.f90 b/doc/src/fplot_plot_2d.f90 index 62769ea..56e9410 100644 --- a/doc/src/fplot_plot_2d.f90 +++ b/doc/src/fplot_plot_2d.f90 @@ -130,6 +130,7 @@ function p2d_get_cmd(this) result(x) ! Local Variables type(string_builder) :: str integer(int32) :: i, n + real(real32) :: lmargin, rmargin, tmargin, bmargin class(plot_data), pointer :: ptr class(plot_axis), pointer :: axis, xAxis, yAxis type(legend), pointer :: leg @@ -156,6 +157,32 @@ function p2d_get_cmd(this) result(x) call str%append('"') end if + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if + ! Axes call str%append(new_line('a')) xAxis => this%get_x_axis() diff --git a/doc/src/fplot_plot_3d.f90 b/doc/src/fplot_plot_3d.f90 index 5fe21c4..22aa7b7 100644 --- a/doc/src/fplot_plot_3d.f90 +++ b/doc/src/fplot_plot_3d.f90 @@ -144,6 +144,7 @@ function p3d_get_cmd(this) result(x) ! Local Variables type(string_builder) :: str integer(int32) :: i, n + real(real64) :: lmargin, rmargin, tmargin, bmargin class(plot_data), pointer :: ptr class(plot_axis), pointer :: xAxis, yAxis, zAxis type(legend), pointer :: leg @@ -170,6 +171,32 @@ function p3d_get_cmd(this) result(x) call str%append('"') end if + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if + ! Axes call str%append(new_line('a')) xAxis => this%get_x_axis() diff --git a/doc/src/fplot_plot_axis.f90 b/doc/src/fplot_plot_axis.f90 index a25142a..3e4397d 100644 --- a/doc/src/fplot_plot_axis.f90 +++ b/doc/src/fplot_plot_axis.f90 @@ -15,25 +15,57 @@ module fplot_plot_axis public :: z_axis type, abstract, extends(plot_object) :: plot_axis - private - logical :: m_hasTitle = .false. + !! Defines a plot axis object. + logical, private :: m_hasTitle = .false. !! Has a title? - character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_title = "" + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_title = "" !! Axis title. - logical :: m_autoscale = .true. + logical, private :: m_autoscale = .true. !! Autoscale? - real(real64), dimension(2) :: m_limits = [0.0d0, 1.0d0] + real(real64), private, dimension(2) :: m_limits = [0.0d0, 1.0d0] !! Display limits. - logical :: m_logScale = .false. + logical, private :: m_logScale = .false. !! Log scaled? - logical :: m_zeroAxis = .false. + logical, private:: m_zeroAxis = .false. !! Has a zero axis? - real(real32) :: m_axisWidth = 1.0 + real(real32), private :: m_axisWidth = 1.0 !! The width, in pixels, of the zero-axis line. - logical :: m_defaultTicLabels = .true. + logical, private :: m_defaultTicLabels = .true. !! Use default tic label format? - character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_ticLabelFmt = "%g" + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_ticLabelFmt = "%g" !! The tic lablel format. + logical, private :: m_showTicLabels = .true. + !! Show tic labels? + integer(int32), private :: m_ticXOffset = 0 + !! The tic label x-offset, in characters. + integer(int32), private :: m_ticYOffset = 0 + !! The tic label y-offset, in characters. + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: & + m_ticLabelAlignment = GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! The tic label alignment. + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + logical, private :: m_offsetTics = .false. + !! Offset tics? + real(real32), private :: m_ticLabelAngle = 0.0 + !! The tic label angle, in degrees. + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_ticRotationOrigin = & + GNUPLOT_ROTATION_ORIGIN_CENTER + !! The tic label rotation origin. + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + integer(int32), private :: m_titleXOffset = 0 + !! The axis title x offset, in characters. + integer(int32), private :: m_titleYOffset = 0 + !! The axis title y offset, in characters. contains procedure, public :: get_title => pa_get_title procedure, public :: set_title => pa_set_title @@ -56,6 +88,28 @@ module fplot_plot_axis pa_set_use_dft_tic_lbl_fmt procedure, public :: get_tic_label_format => pa_get_tic_label_fmt procedure, public :: set_tic_label_format => pa_set_tic_label_fmt + procedure, public :: get_show_tic_labels => pa_get_show_tic_labels + procedure, public :: set_show_tic_labels => pa_set_show_tic_labels + procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset + procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset + procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset + procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset + procedure, public :: get_tic_label_angle => pa_get_tic_label_angle + procedure, public :: set_tic_label_angle => pa_set_tic_label_angle + procedure, public :: get_tic_label_rotation_origin => & + pa_get_tic_rotation_origin + procedure, public :: set_tic_label_rotation_origin => & + pa_set_tic_rotation_origin + procedure, public :: get_tic_label_alignment => & + pa_get_tic_label_alignment + procedure, public :: set_tic_label_alignment => & + pa_set_tic_label_alignment + procedure, public :: get_offset_tics => pa_get_offset_tics + procedure, public :: set_offset_tics => pa_set_offset_tics + procedure, public :: get_title_x_offset => pa_get_title_x_offset + procedure, public :: set_title_x_offset => pa_set_title_x_offset + procedure, public :: get_title_y_offset => pa_get_title_y_offset + procedure, public :: set_title_y_offset => pa_set_title_y_offset end type interface @@ -229,6 +283,7 @@ function pa_get_cmd_string(this) result(txt) ! Local Variables type(string_builder) :: str + real(real32) :: angle character(len = :), allocatable :: axis, fmt real(real64) :: lim(2) @@ -248,6 +303,41 @@ function pa_get_cmd_string(this) result(txt) call str%append(new_line('a')) end if + ! Show Tic Labels? + if (this%get_show_tic_labels()) then + call str%append("set ") + else + call str%append("unset ") + end if + call str%append(axis) + call str%append("tics") + call str%append(new_line('a')) + + ! Tic Label Offsets + if (this%get_show_tic_labels() .and. this%get_offset_tics()) then + call str%append("set ") + call str%append(axis) + call str%append("tics ") + call str%append(this%get_tic_label_alignment()) + call str%append(" offset ") + call str%append(to_string(this%get_tic_label_x_offset())) + call str%append(",") + call str%append(to_string(this%get_tic_label_y_offset())) + call str%append(new_line('a')) + end if + + ! Tic Label Rotation + angle = this%get_tic_label_angle() + if (this%get_show_tic_labels() .and. angle /= 0.0) then + call str%append("set ") + call str%append(axis) + call str%append("tics rotate by ") + call str%append(to_string(angle)) + call str%append(" ") + call str%append(this%get_tic_label_rotation_origin()) + call str%append(new_line('a')) + end if + ! Axis Limits if (this%get_autoscale()) then call str%append("set ") @@ -266,18 +356,30 @@ function pa_get_cmd_string(this) result(txt) ! Titles call str%append(new_line('a')) if (this%is_title_defined()) then + ! Title call str%append("set ") call str%append(axis) call str%append("label ") call str%append('"') call str%append(this%get_title()) call str%append('"') + + ! Offsets + if (this%get_title_x_offset() /= 0 .or. & + this%get_title_y_offset() /= 0) & + then + call str%append(" offset ") + call str%append(to_string(this%get_title_x_offset())) + call str%append(",") + call str%append(to_string(this%get_title_y_offset())) + end if else call str%append("set ") call str%append(axis) call str%append("label ") call str%append('""') end if + call str%append(new_line('a')) ! Scaling call str%append(new_line('a')) @@ -393,6 +495,222 @@ subroutine pa_set_tic_label_fmt(this, x) this%m_ticLabelFmt = x end subroutine +! ------------------------------------------------------------------------------ + pure function pa_get_show_tic_labels(this) result(x) + !! Gets a value determining if tic labels should be shown. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true to show tic labels; else, set to false. + x = this%m_showTicLabels + end function + +! -------------------- + subroutine pa_set_show_tic_labels(this, x) + !! Sets a value determining if tic labels should be shown. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true to show tic labels; else, set to false. + this%m_showTicLabels = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_x_offset(this) result(x) + !! Gets the tic label x-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The tic label x-offset, in characters. + x = this%m_ticXOffset + end function + +! -------------------- + subroutine pa_set_tic_x_offset(this, x) + !! Sets the tic label x-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The tic label x-offset, in characters. + this%m_ticXOffset = x + call this%set_offset_tics(.true.) + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_y_offset(this) result(x) + !! Gets the tic label y-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The tic label y-offset, in characters. + x = this%m_ticYOffset + end function + +! -------------------- + subroutine pa_set_tic_y_offset(this, x) + !! Sets the tic label y-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The tic label y-offset, in characters. + this%m_ticYOffset = x + call this%set_offset_tics(.true.) + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_label_angle(this) result(x) + !! Gets the tic label angle, in degrees. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + real(real32) :: x + !! The tic label angle, in degrees. + x = this%m_ticLabelAngle + end function + +! -------------------- + subroutine pa_set_tic_label_angle(this, x) + !! Sets the tic label angle, in degrees. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + real(real32), intent(in) :: x + !! The tic label angle, in degrees. + this%m_ticLabelAngle = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_rotation_origin(this) result(x) + !! Gets the tic label rotation origin. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: x + !! The tic label rotation origin. The tic label rotation origin + !! must be one of the following: + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + integer(int32) :: n + n = len_trim(this%m_ticRotationOrigin) + allocate(character(len = n) :: x) + x = trim(this%m_ticRotationOrigin) + end function + +! -------------------- + subroutine pa_set_tic_rotation_origin(this, x) + !! Sets the tic label rotation origin. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + character(len = *), intent(in) :: x + !! The tic label rotation origin. The tic label rotation origin + !! must be one of the following: + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + this%m_ticRotationOrigin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_label_alignment(this) result(x) + !! Gets the tic label alignment. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: x + !! The tic label alignment. The tic label alignment must be one of + !! the following: + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + integer(int32) :: n + n = len_trim(this%m_ticLabelAlignment) + allocate(character(len = n) :: x) + x = trim(this%m_ticLabelAlignment) + end function + +! -------------------- + subroutine pa_set_tic_label_alignment(this, x) + !! Sets the tic label alignment. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + character(len = *), intent(in) :: x + !! The tic label alignment. The tic label alignment must be one of + !! the following: + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + this%m_ticLabelAlignment = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_offset_tics(this) result(x) + !! Gets a value determining if the tics should be offset. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true to offset the tics; else, set to false. + x = this%m_offsetTics + end function + +! -------------------- + subroutine pa_set_offset_tics(this, x) + !! Sets a value determining if the tics should be offset. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true to offset the tics; else, set to false. + this%m_offsetTics = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_title_x_offset(this) result(x) + !! Gets the axis title x-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The axis title x-offset, in characters. + x = this%m_titleXOffset + end function + +! -------------------- + subroutine pa_set_title_x_offset(this, x) + !! Sets the axis title x-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The axis title x-offset, in characters. + this%m_titleXOffset = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_title_y_offset(this) result(x) + !! Gets the axis title y-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The axis title y-offset, in characters. + x = this%m_titleYOffset + end function + +! -------------------- + subroutine pa_set_title_y_offset(this, x) + !! Sets the axis title y-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The axis title y-offset, in characters. + this%m_titleYOffset = x + end subroutine + ! ****************************************************************************** ! X_AXIS MEMBERS ! ------------------------------------------------------------------------------ diff --git a/doc/src/fplot_plot_bar.f90 b/doc/src/fplot_plot_bar.f90 index a479311..551b14d 100644 --- a/doc/src/fplot_plot_bar.f90 +++ b/doc/src/fplot_plot_bar.f90 @@ -10,7 +10,7 @@ module fplot_plot_bar type, extends(plot_2d) :: plot_bar !! Defines a 2D plot tailored towards bar plotting. - real(real32), private :: m_barWidth = 0.75d0 + real(real32), private :: m_barWidth = 1.0d0 !! A relative scaling of the width of a single bar. The value !! must be between 0 and 1 with 1 being full width. contains diff --git a/doc/src/fplot_plot_data_histogram.f90 b/doc/src/fplot_plot_data_histogram.f90 index b87c58d..56aebb0 100644 --- a/doc/src/fplot_plot_data_histogram.f90 +++ b/doc/src/fplot_plot_data_histogram.f90 @@ -2,30 +2,45 @@ module fplot_plot_data_histogram use iso_fortran_env - use fplot_plot_data_bar + use fplot_plot_data use fplot_errors use ferror use strings + use fplot_colors + use fplot_errors implicit none private public :: plot_data_histogram - type, extends(plot_data_bar) :: plot_data_histogram + type, extends(plot_data_colored) :: plot_data_histogram !! A container for plotting data in the form of a histogram. - integer(int32), private :: m_binCount = 10 + integer(int32), private :: m_binCount = 20 !! The number of bins. - character(len = :), private, allocatable :: m_numberFmt - !! The numerical label format string. + real(real64), private :: m_minX + !! The minimum data value. + real(real64), private :: m_maxX + !! The maximum data value. + real(real64), private, allocatable, dimension(:,:) :: m_data + !! Column 1 is the center of each bin and column 2 is the number + !! of items in each bin. + logical, private :: m_filled = .true. + !! Determines if each bar is filled. + logical, private :: m_useY2 = .false. + !! Draw against the secondary y axis? contains procedure, public :: get_bin_count => pdh_get_bin_count procedure, public :: set_bin_count => pdh_set_bin_count - procedure, public :: bin_data => pdh_bin_data - procedure, public :: get_extreme_values => pdh_get_extremes - procedure, public :: get_number_format => pdh_get_num_fmt - procedure, public :: set_number_format => pdh_set_num_fmt - procedure, public :: set_data_1 => pdh_set_data_1 - procedure, public :: set_data_2 => pdh_set_data_2 - procedure, public :: set_data_3 => pdh_set_data_3 + procedure, public :: get_minimum_value => pdh_get_min_x + procedure, public :: get_maximum_value => pdh_get_max_x + procedure, public :: define_data => pdh_define_data + procedure, public :: get_command_string => pdh_get_cmd + procedure, public :: get_data_string => pdh_get_data_cmd + procedure, public :: get_axes_string => pdh_get_axes_cmd + procedure, public :: get_is_filled => pdh_get_is_filled + procedure, public :: set_is_filled => pdh_set_is_filled + procedure, public :: get_draw_against_y2 => pdh_get_use_y2 + procedure, public :: set_draw_against_y2 => pdh_set_use_y2 + procedure, public :: get => pdh_get_bin_data end type contains @@ -51,20 +66,38 @@ subroutine pdh_set_bin_count(this, x) end subroutine ! ------------------------------------------------------------------------------ -function pdh_bin_data(this, x, err) result(bx) - !! Bins the supplied data set. +pure function pdh_get_min_x(this) result(x) + !! Gets the minimum data value. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + real(real64) :: x + !! The minimum data value. + x = this%m_minX +end function + +! ------------------------------------------------------------------------------ +pure function pdh_get_max_x(this) result(x) + !! Gets the maximum data value. class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. + real(real64) :: x + !! The maximum data value. + x = this%m_maxX +end function + +! ------------------------------------------------------------------------------ +subroutine pdh_define_data(this, x, err) + !! Defines the data set to plot. + class(plot_data_histogram), intent(inout) :: this + !! The plot_data_histogram object. real(real64), intent(in), dimension(:) :: x - !! The data set to bin. + !! The data set to plot. class(errors), intent(inout), optional, target :: err !! An error handling object. - real(real64), allocatable, dimension(:,:) :: bx - !! The binned data. ! Local Variables + integer(int32) :: i, j, n, nbins, flag real(real64) :: maxX, minX, width, val - integer(int32) :: i, j, flag, n, nbins real(real64), allocatable, dimension(:,:) :: ranges class(errors), pointer :: errmgr type(errors), target :: deferr @@ -82,15 +115,17 @@ function pdh_bin_data(this, x, err) result(bx) maxX = maxval(x) minX = minval(x) width = (maxX - minX) / (nbins - 1.0) + this%m_minX = minX + this%m_maxX = maxX ! Allocate space for the output - allocate(bx(nbins, 2), stat = flag) + if (allocated(this%m_data)) deallocate(this%m_data) + allocate(this%m_data(nbins, 2), stat = flag, source = 0.0d0) if (flag == 0) allocate(ranges(nbins, 2), stat = flag) if (flag /= 0) then - call report_memory_error(errmgr, "pdh_bin_data", flag) + call report_memory_error(errmgr, "pdh_define_data", flag) return end if - bx = 0.0d0 ! Define each range ranges(1,:) = [minX, minX + width] @@ -104,180 +139,168 @@ function pdh_bin_data(this, x, err) result(bx) val = x(i) do j = 1, nbins if ((val >= ranges(j,1)) .and. (val <= ranges(j,2))) then - bx(j,1) = bx(j,1) + 1.0d0 ! Counter + this%m_data(j,1) = this%m_data(j,1) + 1.0d0 ! Counter exit ! Exit the inner do loop end if end do end do - ! Now compute the center of each bin - store in column 2 of bx - bx(:,2) = 0.5d0 * (ranges(:,1) + ranges(:,2)) -end function + ! Now compute the center of each bin - store in column 2 of this%m_data + this%m_data(:,2) = 0.5d0 * (ranges(:,1) + ranges(:,2)) +end subroutine ! ------------------------------------------------------------------------------ -pure function pdh_get_extremes(this) result(x) - !! Returns the extreme values in the data set. +function pdh_get_cmd(this) result(rst) + !! Gets the GNUPLOT command string for this object. class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. - real(real64), dimension(2) :: x - !! A two-element array containing the minimum and maximum values, in - !! that order. + character(len = :), allocatable :: rst + !! The command string. ! Local Variables - integer(int32) :: i, j, nrows, ncols - real(real64) :: maxX, minX, val - logical :: check - - ! Initialization - nrows = this%get_count() - ncols = this%get_bar_per_label_count() - check = .true. + type(string_builder) :: str + integer(int32) :: n, ncols + type(color) :: clr ! Process - do j = 1, ncols - do i = 1, nrows - val = this%get(i, j) - if (check) then - maxX = val - minX = val - check = .false. - else - if (val > maxX) maxX = val - if (val < minX) minX = val - end if - end do - end do + call str%append(' "-" ') + call str%append(" with boxes ") - ! End - x = [minX, maxX] -end function + ! Color + clr = this%get_line_color() + call str%append(' lc rgb "#') + call str%append(clr%to_hex_string()) + call str%append('"') -! ------------------------------------------------------------------------------ -subroutine pdh_set_data_1(this, x, err) - !! Defines the data set. - class(plot_data_histogram), intent(inout) :: this - !! The plot_data_histogram object. - real(real64), intent(in), dimension(:) :: x - !! The data set. - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err + ! Filled + if (this%get_is_filled()) then + call str%append(" fill solid ") else - errmgr => deferr + call str%append(" fill empty ") end if - ! Bin the data - bx = this%bin_data(x, errmgr) - if (errmgr%has_error_occurred()) return + ! Define the axes structure + call str%append(" ") + call str%append(this%get_axes_string()) - ! Call the base routine to store the data - use the average values to - ! establish labels for the x-axis - call this%plot_data_bar%set_data_3(bx(:,2), bx(:,1), & - this%get_number_format(), errmgr) -end subroutine + ! End + rst = char(str%to_string()) +end function ! ------------------------------------------------------------------------------ -subroutine pdh_set_data_2(this, labels, x, err) - !! Defines the data set with associated axis labels. - class(plot_data_histogram), intent(inout) :: this +function pdh_get_data_cmd(this) result(rst) + !! Gets the GNUPLOT command string defining the data for this object. + class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. - class(string), intent(in), dimension(:) :: labels - !! The axis labels. - real(real64), intent(in), dimension(:) :: x - !! The data set. - class(errors), intent(inout), optional, target :: err - !! An error handling object. + character(len = :), allocatable :: rst + !! The command string. ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - + type(string_builder) :: str + integer(int32) :: i, nbars, cnt + real(real64) :: val + character :: delimiter, nl + ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if + delimiter = achar(9) + nl = new_line(nl) + nbars = size(this%m_data, 1) - ! Ensure the labels array is the same size as the number of bins - if (size(labels) /= this%get_bin_count()) then - call report_array_size_mismatch_error(errmgr, "pdh_set_data_2", & - "labels", this%get_bin_count(), size(labels)) - return - end if + ! Process + do i = 1, nbars + call this%get(i, val, cnt) + call str%append(to_string(val)) + call str%append(delimiter) + call str%append(to_string(cnt)) + call str%append(nl) + end do - ! Call the base routine to store the data - call this%plot_data_bar%set_data_2(labels, bx(:,1), errmgr) -end subroutine + ! End + rst = char(str%to_string()) +end function ! ------------------------------------------------------------------------------ -subroutine pdh_set_data_3(this, labels, x, fmt, err) - !! Defines the data set with associated axis labels with a specific format. - class(plot_data_histogram), intent(inout) :: this +function pdh_get_axes_cmd(this) result(rst) + !! Gets the GNUPLOT command string defining which axes the data is to be + !! plotted against. + class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. - real(real64), intent(in), dimension(:) :: labels - !! The axis labels. - real(real64), intent(in), dimension(:) :: x - !! The data set. - character(len = *), intent(in), optional :: fmt - !! The format string for the labels (e.g. '(I0)', etc.). - class(errors), intent(inout), optional, target :: err - !! An error handling object. + character(len = :), allocatable :: rst + !! The command string. - ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err + ! Define which axes the data is to be plotted against + if (this%get_draw_against_y2()) then + rst = "axes x1y2" else - errmgr => deferr + rst = "axes x1y1" end if +end function - ! Ensure the labels array is the same size as the number of bins - if (size(labels) /= this%get_bin_count()) then - call report_array_size_mismatch_error(errmgr, "pdh_set_data_3", & - "labels", this%get_bin_count(), size(labels)) - return - end if +! ------------------------------------------------------------------------------ +pure function pdh_get_is_filled(this) result(rst) + !! Gets a value determining if each box is filled. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + logical :: rst + !! Returns true if the boxes are filled; else, false for an empty box. + rst = this%m_filled +end function - ! Call the base routine to store the data - call this%plot_data_bar%set_data_3(labels, bx(:,1), fmt, errmgr) +! -------------------- +subroutine pdh_set_is_filled(this, x) + !! Sets a value determining if each box is filled. + 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. + this%m_filled = x end subroutine ! ------------------------------------------------------------------------------ -pure function pdh_get_num_fmt(this) result(x) - !! Gets the numerical format string used for the labels. +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. class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. - character(len = :), allocatable :: x - !! The format string. - if (allocated(this%m_numberFmt)) then - x = this%m_numberFmt - else - x = "(F6.2)" - end if + logical :: rst + !! Returns true if the data is to be plotted against the secondary y + !! axis; else, false for the primary y axis. + rst = this%m_useY2 end function -! ------------------------------------------------------------------------------ -subroutine pdh_set_num_fmt(this, x) - !! Sets the numerical format string used for the labels. +! -------------------- +subroutine pdh_set_use_y2(this, x) + !! Sets a value determining if the data is to be plotted against the + !! secondary y axis. class(plot_data_histogram), intent(inout) :: this !! The plot_data_histogram object. - character(len = *), intent(in) :: x - !! The format string (e.g. "(F6.2)"). - this%m_numberFmt = x + 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. + this%m_useY2 = x +end subroutine + +! ------------------------------------------------------------------------------ +subroutine pdh_get_bin_data(this, i, x, cnt) + !! Gets the requested binned data. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + integer(int32), intent(in) :: i + !! The bin number to get. + real(real64), intent(out) :: x + !! The center of the bin. + integer(int32), intent(out) :: cnt + !! The number of items in the bin. + + ! Process + if (.not.allocated(this%m_data)) then + cnt = 0 + x = 0.0d0 + return + end if + x = this%m_data(i,2) + cnt = floor(this%m_data(i,1)) end subroutine ! ------------------------------------------------------------------------------ diff --git a/doc/src/fplot_plot_data_tri_2d.f90 b/doc/src/fplot_plot_data_tri_2d.f90 index 55ca117..703836e 100644 --- a/doc/src/fplot_plot_data_tri_2d.f90 +++ b/doc/src/fplot_plot_data_tri_2d.f90 @@ -36,7 +36,7 @@ module fplot_plot_data_tri_2d contains ! ------------------------------------------------------------------------------ - module function pdt2d_get_data_cmd(this) result(x) + function pdt2d_get_data_cmd(this) result(x) !! Gets the GNUPLOT command string describing the data to plot. class(plot_data_tri_2d), intent(in) :: this !! The plot_data_tri_2d object. @@ -131,7 +131,7 @@ module function pdt2d_get_data_cmd(this) result(x) end function ! ------------------------------------------------------------------------------ - module function pdt2d_get_cmd(this) result(x) + function pdt2d_get_cmd(this) result(x) !! Gets the GNUPLOT command string for the object. class(plot_data_tri_2d), intent(in) :: this !! The plot_data_tri_2d object. @@ -182,7 +182,7 @@ module function pdt2d_get_cmd(this) result(x) end function ! ------------------------------------------------------------------------------ - module subroutine pdt2d_define_data(this, tri) + subroutine pdt2d_define_data(this, tri) !! Defines the data to plot. class(plot_data_tri_2d), intent(inout) :: this !! The plot_data_tri_2d object. @@ -200,7 +200,7 @@ module subroutine pdt2d_define_data(this, tri) end subroutine ! ------------------------------------------------------------------------------ - pure module function pdt2d_get_line_width(this) result(rst) + pure function pdt2d_get_line_width(this) result(rst) !! Gets the width of the lines used to draw the triangulation. class(plot_data_tri_2d), intent(in) :: this !! The plot_data_tri_2d object. @@ -210,7 +210,7 @@ pure module function pdt2d_get_line_width(this) result(rst) end function ! -------------------- - module subroutine pdt2d_set_line_width(this, x) + subroutine pdt2d_set_line_width(this, x) !! Sets the width of the lines used to draw the triangulation. class(plot_data_tri_2d), intent(inout) :: this !! The plot_data_tri_2d object. @@ -223,7 +223,7 @@ module subroutine pdt2d_set_line_width(this, x) end if end subroutine ! ------------------------------------------------------------------------------ - pure module function pdt2d_get_line_style(this) result(rst) + pure function pdt2d_get_line_style(this) result(rst) !! Gets the line style. class(plot_data_tri_2d), intent(in) :: this !! The plot_data_tri_2d object. @@ -244,7 +244,7 @@ pure module function pdt2d_get_line_style(this) result(rst) end function ! -------------------- - module subroutine pdt2d_set_line_style(this, x) + subroutine pdt2d_set_line_style(this, x) !! Sets the line style. class(plot_data_tri_2d), intent(inout) :: this !! The plot_data_tri_2d object. diff --git a/doc/src/fplot_plot_polar.f90 b/doc/src/fplot_plot_polar.f90 index 47b3ebd..ce171d3 100644 --- a/doc/src/fplot_plot_polar.f90 +++ b/doc/src/fplot_plot_polar.f90 @@ -109,6 +109,7 @@ function plr_get_cmd(this) result(x) integer(int32) :: i, n type(string_builder) :: str type(legend), pointer :: leg + real(real64) :: lmargin, rmargin, tmargin, bmargin real(real64) :: lim(2) ! class(plot_label), pointer :: lbl class(plot_data), pointer :: ptr @@ -119,6 +120,32 @@ function plr_get_cmd(this) result(x) ! Call the base routine call str%append(this%plot%get_command_string()) + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if + ! Polar-Specific Settings call str%append(new_line('a')) call str%append("unset border") diff --git a/doc/src/fplot_stats_plots.f90 b/doc/src/fplot_stats_plots.f90 new file mode 100644 index 0000000..6e5871a --- /dev/null +++ b/doc/src/fplot_stats_plots.f90 @@ -0,0 +1,357 @@ +module fplot_stats_plots + use iso_fortran_env + use fplot_plot_object + use fplot_plot + use fplot_plot_data_2d + use fplot_plot_data_histogram + use fplot_plot_2d + use fplot_multiplot + use fplot_terminal + use fplot_constants + use fplot_errors + use fplot_colors + use fplot_plot_axis + use collections + use strings + use ferror + implicit none + private + public :: correlation_plot + + type, extends(plot_object) :: correlation_plot + !! Defines a multiplot arrangement designed to illustrate correlation + !! between data sets. + type(multiplot), private :: m_plt + !! The multiplot object. + contains + procedure, public :: get_command_string => cp_get_command + procedure, public :: initialize => cp_init + procedure, public :: get_row_count => cp_get_rows + procedure, public :: get_column_count => cp_get_cols + procedure, public :: get_plot_count => cp_get_count + procedure, public :: draw => cp_draw + procedure, public :: save_file => cp_save + procedure, public :: get => cp_get + procedure, public :: get_terminal => cp_get_term + procedure, public :: get_font_name => cp_get_font + procedure, public :: set_font_name => cp_set_font + procedure, public :: get_font_size => cp_get_font_size + procedure, public :: set_font_size => cp_set_font_size + end type + +contains +! ------------------------------------------------------------------------------ + function cp_get_command(this) result(x) + !! Gets the GNUPLOT commands for this object. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + character(len = :), allocatable :: x + !! The command string. + end function + +! ------------------------------------------------------------------------------ + subroutine cp_init(this, x, labels, term, width, height, err) + !! Initializes the correlation_plot object. + class(correlation_plot), intent(inout) :: this + !! The correlation_plot object. + real(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(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(int32), intent(in), optional :: width + !! Optionally, the width of the plot window. + integer(int32), intent(in), optional :: height + !! Optionally, the height of the plot window. + class(errors), intent(inout), optional, target :: err + !! An error handling object. + + ! Local Variables + integer(int32) :: i, j, k, t, n, flag + real(real64) :: m, b + real(real64), allocatable, dimension(:) :: mdl + class(errors), pointer :: errmgr + type(errors), target :: deferr + type(plot_2d), allocatable, dimension(:) :: plts + type(plot_data_2d) :: pdata, mdata + type(plot_data_histogram) :: hdata + class(plot_axis), pointer :: xAxis, yAxis + + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + n = size(x, 2) + call this%m_plt%initialize(n, n, term = term, width = width, & + height = height, err = errmgr) + if (errmgr%has_error_occurred()) return + allocate(plts(n * n), stat = flag) + if (flag /= 0) then + call report_memory_error(errmgr, "cp_init", flag) + return + end if + call this%m_plt%set_font_size(11) ! use a small font size + + ! Input Checking + if (present(labels)) then + if (size(labels) /= n) then + call report_array_size_mismatch_error(errmgr, "cp_init", & + "labels", n, size(labels)) + return + end if + end if + + ! Create plots + k = 0 + call pdata%set_draw_line(.false.) + call pdata%set_draw_markers(.true.) + call pdata%set_marker_style(MARKER_FILLED_CIRCLE) + call pdata%set_marker_scaling(0.5) + call mdata%set_line_width(2.0) + call mdata%set_line_color(CLR_BLACK) + if (errmgr%has_error_occurred()) return + do j = 1, n + do i = 1, n + k = k + 1 + call plts(k)%initialize(err = errmgr) + if (errmgr%has_error_occurred()) return + if (i == j) then + ! Plot a histogram of the data + call hdata%define_data(x(:,i), err = errmgr) + if (errmgr%has_error_occurred()) return + call plts(k)%push(hdata) + else + ! Plot a scatter plot + call pdata%define_data(x(:,j), x(:,i), err = errmgr) + if (errmgr%has_error_occurred()) return + call plts(k)%push(pdata) + + ! Fit a line to the data + call compute_linear_fit(x(:,j), x(:,i), m, b) + mdl = m * x(:,j) + b + + ! Plot the fitted line + call mdata%define_data(x(:,j), mdl, err = err) + if (errmgr%has_error_occurred()) return + call plts(k)%push(mdata) + end if + + ! Deal with axis labels + if (j == 1) then + ! Display y axis labels for these plots + yAxis => plts(k)%get_y_axis() + if (present(labels)) then + call yAxis%set_title(char(labels(i))) + else + call yAxis%set_title(char("x_{" // to_string(i) // "}")) + end if + end if + + ! Get an x-axis object for the plot + xAxis => plts(k)%get_x_axis() + + ! Define axis labels + if (i == n) then + ! Display x axis labels for these plots + if (present(labels)) then + call xAxis%set_title(char(labels(j))) + else + call xAxis%set_title(char("x_{" // to_string(j) // "}")) + end if + end if + + ! Rotate histogram tic labels + call xAxis%set_tic_label_angle(45.0) + call xAxis%set_tic_label_rotation_origin(GNUPLOT_ROTATION_ORIGIN_RIGHT) + + ! Store the plot - the collection makes a copy of the plot and + ! manages it's lifetime + call this%m_plt%set(i, j, plts(k)) + end do + end do + end subroutine + +! ------------------------------------------------------------------------------ + pure function cp_get_rows(this) result(x) + !! Gets the number of rows of plots. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32) :: x + !! The row count. + + x = this%m_plt%get_row_count() + end function + +! -------------------- + pure function cp_get_cols(this) result(x) + !! Gets the number of columns of plots. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32) :: x + !! The column count. + + x = this%m_plt%get_column_count() + end function + +! -------------------- + pure function cp_get_count(this) result(x) + !! Gets the total number of plots. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32) :: x + !! The plot count. + + x = this%m_plt%get_plot_count() + end function + +! ------------------------------------------------------------------------------ + subroutine cp_draw(this, persist, err) + !! Launches GNUPLOT and draws the correlation_plot per the current + !! state of the command list. + 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. + + call this%m_plt%draw(persist, err) + end subroutine + +! ------------------------------------------------------------------------------ + subroutine cp_save(this, fname, err) + !! Saves a GNUPLOT command file. + 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. + + call this%m_plt%save_file(fname, err) + end subroutine + +! ------------------------------------------------------------------------------ + function cp_get(this, i, j) result(x) + !! Gets the requested plot object. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32), intent(in) :: i + !! The row index of the plot to retrieve. + integer(int32), intent(in) :: j + !! The column index of the plot to retrieve. + class(plot), pointer :: x + !! A pointer to the plot object. + + x => this%m_plt%get(i, j) + end function + +! ------------------------------------------------------------------------------ + function cp_get_term(this) result(x) + !! Gets the GNUPLOT terminal object. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + class(terminal), pointer :: x + !! A pointer to the terminal object. + x => this%m_plt%get_terminal() + end function + +! ------------------------------------------------------------------------------ + function cp_get_font(this) result(x) + !! Gets the name of the font used for plot text. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + character(len = :), allocatable :: x + !! The font name. + x = this%m_plt%get_font_name() + end function + +! -------------------- + subroutine cp_set_font(this, x) + !! Sets the name of the font used for plot text. + class(correlation_plot), intent(inout) :: this + !! The correlation_plot object. + character(len = *), intent(in) :: x + !! The font name. + call this%m_plt%set_font_name(x) + end subroutine + +! ------------------------------------------------------------------------------ + function cp_get_font_size(this) result(x) + !! Gets the size of the font used by the plot. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32) :: x + !! The font size. + x = this%m_plt%get_font_size() + end function + +! -------------------- + subroutine cp_set_font_size(this, x) + !! Sets the size of the font used by the plot. + class(correlation_plot), intent(inout) :: this + !! The correlation_plot object. + integer(int32), intent(in) :: x + !! The font size. + call this%m_plt%set_font_size(x) + end subroutine + +! ****************************************************************************** +! PRIVATE HELPER ROUTINES +! ------------------------------------------------------------------------------ +subroutine compute_linear_fit(x, y, m, b) + !! Computes the coefficients of a linear equation (y = m * x + b) using a + !! least-squares approach. + real(real64), intent(in), dimension(:) :: x + !! The x-coordinate data. + real(real64), intent(in), dimension(:) :: y + !! The y-coordinate data. + real(real64), intent(out) :: m + !! The slope term. + real(real64), intent(out) :: b + !! The intercept term. + + ! Local Variables + integer(int32) :: i, n + real(real64) :: sumX, sumY, sumX2, sumY2, sumXY + + ! Initialization + n = size(x) + sumX = 0.0d0 + sumY = 0.0d0 + sumX2 = 0.0d0 + sumY2 = 0.0d0 + sumXY = 0.0d0 + + ! Process + do i = 1, n + sumX = sumX + x(i) + sumY = sumY + y(i) + sumXY = sumXY + x(i) * y(i) + sumX2 = sumX2 + (x(i))**2 + sumY2 = sumY2 + (y(i))**2 + end do + m = (n * sumXY - sumX * sumY) / (n * sumX2 - sumX**2) + b = (sumY * sumX2 - sumX * sumXY) / (n * sumX2 - sumX**2) +end subroutine + +! ------------------------------------------------------------------------------ +end module \ No newline at end of file diff --git a/doc/tipuesearch/tipuesearch_content.js b/doc/tipuesearch/tipuesearch_content.js index 58719d2..f8be9c8 100644 --- a/doc/tipuesearch/tipuesearch_content.js +++ b/doc/tipuesearch/tipuesearch_content.js @@ -1 +1 @@ -var tipuesearch = {"pages":[{"title":" FPLOT ","text":"FPLOT Developer Info Jason Christopherson","tags":"home","loc":"index.html"},{"title":"plot_arrow – FPLOT ","text":"type, public, extends( plot_object ) :: plot_arrow Defines an arrow that can be drawn on a plot. Contents Type-Bound Procedures get_color get_command_string get_head_angle get_head_back_angle get_head_fill get_head_location get_head_size get_head_type get_is_visible get_line_style get_line_width get_move_to_front get_tail_location get_use_default_size set_color set_head_angle set_head_back_angle set_head_fill set_head_location set_head_size set_head_type set_is_visible set_line_style set_line_width set_move_to_front set_tail_location set_use_default_size Type-Bound Procedures procedure, public :: get_color => par_get_color private pure function par_get_color(this) result(rst) Gets the color of the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value type( color ) The color. procedure, public :: get_command_string => par_get_cmd private function par_get_cmd(this) result(rst) Returns the appropriate GNUPLOT command string to establish appropriate \nparameters. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_head_angle => par_get_head_angle private pure function par_get_head_angle(this) result(rst) Gets the angle of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32) The angle, in degrees. procedure, public :: get_head_back_angle => par_get_head_back_angle private pure function par_get_head_back_angle(this) result(rst) Gets the angle of the back of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32) The angle, in degrees. procedure, public :: get_head_fill => par_get_fill private pure function par_get_fill(this) result(rst) Gets a flag denoting the head fill type. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value integer(kind=int32) The flag denoting head fill. procedure, public :: get_head_location => par_get_head private pure function par_get_head(this) result(rst) Gets the coordinates of the arrow's head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32), dimension(3) A 3-element array containing the x, y, and z coordinates of the\narrow's head. procedure, public :: get_head_size => par_get_head_size private pure function par_get_head_size(this) result(rst) Gets the size of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32) The head size. procedure, public :: get_head_type => par_get_head_type private pure function par_get_head_type(this) result(rst) Gets the type of arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value integer(kind=int32) The arrow head type. procedure, public :: get_is_visible => par_get_is_visible private pure function par_get_is_visible(this) result(rst) Gets a value determining if the arrow is visible. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value logical True if the arrow is visible; else, false. procedure, public :: get_line_style => par_get_line_style private pure function par_get_line_style(this) result(rst) Gets the line style used to draw the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value integer(kind=int32) The line style. procedure, public :: get_line_width => par_get_line_width private pure function par_get_line_width(this) result(rst) Gets the width of the lines used to draw the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32) The width of the line. procedure, public :: get_move_to_front => par_get_move_to_front private pure function par_get_move_to_front(this) result(rst) Gets a value determining if the arrow should be moved to the front. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value logical True if the arrow should be moved to the front; else, false. procedure, public :: get_tail_location => par_get_tail private pure function par_get_tail(this) result(rst) Gets the coordinates of the arrow's tail. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32), dimension(3) A 3-element array containing the x, y, and z coordinates of the \narrow's tail. procedure, public :: get_use_default_size => par_get_use_default_size private pure function par_get_use_default_size(this) result(rst) Gets a value determining if arrow head sizing defaults should be used. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value logical True if the defaults should be used; else, false. procedure, public :: set_color => par_set_color private subroutine par_set_color(this, x) Sets the color of the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. type( color ), intent(in) :: x The color. procedure, public :: set_head_angle => par_set_head_angle private subroutine par_set_head_angle(this, x) Sets the angle of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The angle, in degrees. procedure, public :: set_head_back_angle => par_set_head_back_angle private subroutine par_set_head_back_angle(this, x) Sets the angle of the back of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The angle, in degrees. procedure, public :: set_head_fill => par_set_fill private subroutine par_set_fill(this, x) Sets a flag denoting the head fill type. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. integer(kind=int32), intent(in) :: x The flag denoting head fill. It must be one of the following \nconstants. ARROW_FILLED ARROW_EMPTY ARROW_NO_BORDER ARROW_NO_FILL If the value is not one of the above, the command is ignored. generic, public :: set_head_location => par_set_head_1, par_set_head_2, par_set_head_3 private subroutine par_set_head_1(this, x) Sets the location of the arrow's head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x (3) A 3-element array containing the x, y, and z coordinates of the\narrow's head. private subroutine par_set_head_2(this, x, y) Sets the location of the arrow's head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The x-coordinate of the arrow's head. real(kind=real32), intent(in) :: y The y-coordinate of the arrow's head. private subroutine par_set_head_3(this, x, y, z) Sets the location of the arrow's head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The x-coordinate of the arrow's head. real(kind=real32), intent(in) :: y The y-coordinate of the arrow's head. real(kind=real32), intent(in) :: z The z-coordinate of the arrow's head. procedure, public :: set_head_size => par_set_head_size private subroutine par_set_head_size(this, x) Sets the size of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The head size. procedure, public :: set_head_type => par_set_head_type private subroutine par_set_head_type(this, x) Sets the type of arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. integer(kind=int32), intent(in) :: x The arrow head type. It must be one of the following constants. ARROW_HEAD ARROW_BACKHEAD ARROW_HEADS ARROW_NO_HEAD If the value is not one of the above, the command is ignored. procedure, public :: set_is_visible => par_set_is_visible private subroutine par_set_is_visible(this, x) Sets a value determining if the arrow is visible. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. logical, intent(in) :: x True if the arrow is visible; else, false. procedure, public :: set_line_style => par_set_line_style private subroutine par_set_line_style(this, x) Sets the line style used to draw the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. integer(kind=int32), intent(in) :: x The line style. The value must be one of the following. LINE_SOLID LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED If the value is not one of the above, the command is ignored. procedure, public :: set_line_width => par_set_line_width private subroutine par_set_line_width(this, x) Sets the width of the lines used to draw the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The width of the line. procedure, public :: set_move_to_front => par_set_move_to_front private subroutine par_set_move_to_front(this, x) Sets a value determining if the arrow should be moved to the front. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. logical, intent(in) :: x True if the arrow should be moved to the front; else, false. generic, public :: set_tail_location => par_set_tail_1, par_set_tail_2, par_set_tail_3 private subroutine par_set_tail_1(this, x) Sets the coordinates of the arrow's tail. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x (3) A 3-element array containing the x, y, and z coordinates of the \narrow's tail. private subroutine par_set_tail_2(this, x, y) Sets the coordinates of the arrow's tail. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The x-coordinate of the arrow's tail. real(kind=real32), intent(in) :: y !! The y-coordinate of the arrow's tail. private subroutine par_set_tail_3(this, x, y, z) Sets the coordinates of the arrow's tail. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The x-coordinate of the arrow's tail. real(kind=real32), intent(in) :: y The y-coordinate of the arrow's tail. real(kind=real32), intent(in) :: z The z-coordinate of the arrow's tail. procedure, public :: set_use_default_size => par_set_use_default_size private subroutine par_set_use_default_size(this, x) Sets a value determining if arrow head sizing defaults should be used. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. logical, intent(in) :: x True if the defaults should be used; else, false.","tags":"","loc":"type\\plot_arrow.html"},{"title":"colormap – FPLOT ","text":"type, public, abstract, extends( plot_object ) :: colormap A colormap object for a surface plot. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure( cm_get_string_result ), public, deferred :: get_color_string function cm_get_string_result(this) result(x) Prototype Retrieves a string result from a colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\colormap.html"},{"title":"cool_colormap – FPLOT ","text":"type, public, extends( colormap ) :: cool_colormap Defines a colormap consisting of \"cool\" colors. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => ccm_get_clr private function ccm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( cool_colormap ), intent(in) :: this The cool_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\cool_colormap.html"},{"title":"custom_colormap – FPLOT ","text":"type, public, extends( colormap ) :: custom_colormap Defines a custom colormap that utilizes the FORCOLORMAP library\nto provide the map. Contents Finalization Procedures custom_final Type-Bound Procedures get_color_string get_colormap get_command_string get_draw_border get_horizontal get_label get_show_tics set_colormap set_draw_border set_horizontal set_label set_show_tics Finalization Procedures final :: custom_final private subroutine custom_final(this) Arguments Type Intent Optional Attributes Name type( custom_colormap ), intent(inout) :: this The custom_colormap object. Type-Bound Procedures procedure, public :: get_color_string => custom_get_clr private function custom_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( custom_colormap ), intent(in) :: this The custom_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_colormap => custom_get private function custom_get(this) result(rst) Gets a pointer to the FORCOLORMAP colormap object. Arguments Type Intent Optional Attributes Name class( custom_colormap ), intent(in) :: this The custom_colormap object. Return Value class(cmap), pointer A pointer to the FORCOLORMAP colormap object. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_colormap => custom_set private subroutine custom_set(this, map, err) Sets the FORCOLORMAP colormap object. Arguments Type Intent Optional Attributes Name class( custom_colormap ), intent(inout) :: this The custom_colormap object. class(cmap), intent(in) :: map The FORCOLORMAP colormap object. The custom_colormap object \nstores a copy of this object; therefore, any changes made to \nx after calls to this routine will not impact the behavior of \nthe custom_colormap object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\custom_colormap.html"},{"title":"earth_colormap – FPLOT ","text":"type, public, extends( colormap ) :: earth_colormap Defines an earthy-colored colormap. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => ecm_get_clr private function ecm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( earth_colormap ), intent(in) :: this The earth_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\earth_colormap.html"},{"title":"grey_colormap – FPLOT ","text":"type, public, extends( colormap ) :: grey_colormap Defines a grey-scaled colormap. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => gcm_get_clr private function gcm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( grey_colormap ), intent(in) :: this The grey_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\grey_colormap.html"},{"title":"hot_colormap – FPLOT ","text":"type, public, extends( colormap ) :: hot_colormap Defines a colormap consisting of \"hot\" colors. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => hcm_get_clr private function hcm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( hot_colormap ), intent(in) :: this The hot_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\hot_colormap.html"},{"title":"parula_colormap – FPLOT ","text":"type, public, extends( colormap ) :: parula_colormap Defines a colormap equivalent to the MATLAB parula colormap. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => pcm_get_clr private function pcm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( parula_colormap ), intent(in) :: this The parula_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\parula_colormap.html"},{"title":"rainbow_colormap – FPLOT ","text":"type, public, extends( colormap ) :: rainbow_colormap Defines a rainbow colormap. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => rcm_get_clr private function rcm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( rainbow_colormap ), intent(in) :: this The rainbow_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\rainbow_colormap.html"},{"title":"color – FPLOT ","text":"type, public :: color Describes an RGB color. Contents Variables blue green red Type-Bound Procedures copy_from to_hex_string Components Type Visibility Attributes Name Initial integer(kind=int32), public :: blue = 255 The blue component of the color (must be between 0 and 255). integer(kind=int32), public :: green = 0 The green component of the color (must be between 0 and 255). integer(kind=int32), public :: red = 0 The red component of the color (must be between 0 and 255). Type-Bound Procedures procedure, public, pass :: copy_from => clr_copy_from private subroutine clr_copy_from(this, clr) Copies another color to this color. Arguments Type Intent Optional Attributes Name class( color ), intent(inout) :: this The color object. class( color ), intent(in) :: clr The color to copy. procedure, public, pass :: to_hex_string => clr_to_hex_string private pure function clr_to_hex_string(this) result(txt) Returns the color in hexadecimal format. Arguments Type Intent Optional Attributes Name class( color ), intent(in) :: this The color object. Return Value character(len=6) A string containing the hexadecimal equivalent.","tags":"","loc":"type\\color.html"},{"title":"delaunay_tri_surface – FPLOT ","text":"type, public, extends( delaunay_tri_2d ) :: delaunay_tri_surface Provides a type describing a triangulated surface. Contents Type-Bound Procedures create define_function_values evaluate find_triangle get_indices get_point_count get_points_x get_points_y get_points_z get_triangle_count Type-Bound Procedures procedure, public :: create => d2d_init private subroutine d2d_init(this, x, y, err) Creates an unconstrained 2D Delaunay triangulation given a \nset of x-y points. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(inout) :: this The delaunay_tri_2d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of each\ndata point. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of each\ndata point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: define_function_values => dts_define_fcn private subroutine dts_define_fcn(this, z, err) Defines the function values that correspond to the x and y\ndata points. Arguments Type Intent Optional Attributes Name class( delaunay_tri_surface ), intent(inout) :: this The delaunay_tri_surface object. real(kind=real64), intent(in), dimension(:) :: z An N-element array containing the function values for\neach x and y coordinate. Notice, the x and y coordinates must \nalready be defined prior to calling this routine. class(errors), intent(inout), optional, target :: err An error handling object. generic, public :: evaluate => dts_interp_1, dts_interp_2 private pure function dts_interp_1(this, x, y) result(z) Evaluates the function at the requested point by means of \nlinear interpolation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_surface ), intent(in) :: this The delaunay_tri_surface object. real(kind=real64), intent(in) :: x The x-coordinate at which to evaluate the function. real(kind=real64), intent(in) :: y The y-coordinate at which to evaluate the function. Return Value real(kind=real64) The function value. If the point (x, y) does not lie within the \nrange of defined values, then a value of NaN is returned. private pure function dts_interp_2(this, x, y) result(z) Evaluates the function at the requested point by means of \nlinear interpolation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_surface ), intent(in) :: this The delaunay_tri_surface object. real(kind=real64), intent(in), dimension(:) :: x The x data coordinates. real(kind=real64), intent(in), dimension(:) :: y The x data coordinates. Return Value real(kind=real64), allocatable, dimension(:) The interpolated z coordinate points. If the point (x, y) does \nnot lie within the range of defined values, then a value of NaN \nis returned. procedure, public :: find_triangle => d2d_get_tri_with_pt private pure function d2d_get_tri_with_pt(this, x, y) result(rst) Finds the triangle that contains the specified point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. real(kind=real64), intent(in) :: x The x-coordinate of the point. real(kind=real64), intent(in) :: y The y-coordinate of the point. Return Value integer(kind=int32) Returns the index of the triangle containing the specified\npoint. If no triangle contains the specified point, a value of\n-1 is returned. procedure, public :: get_indices => d2d_get_tris private pure function d2d_get_tris(this) result(rst) Gets a list of the indices of each triangle vertex. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32), allocatable, dimension(:,:) An N-by-3 matrix with each column containing the index of the\nvertex of each triangle where N is the number of triangles. procedure, public :: get_point_count => d2d_get_pt_count private pure function d2d_get_pt_count(this) result(rst) Gets the number of points in the triangulation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32) The number of points in the triangulation. procedure, public :: get_points_x => d2d_get_x_pts private pure function d2d_get_x_pts(this) result(rst) Gets the x-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value real(kind=real64), allocatable, dimension(:) An array of the x-coordinates of each point. procedure, public :: get_points_y => d2d_get_y_pts private pure function d2d_get_y_pts(this) result(rst) Gets the y-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value real(kind=real64), allocatable, dimension(:) An array of the y-coordinates of each point. procedure, public :: get_points_z => dts_get_z private pure function dts_get_z(this) result(rst) Gets the z-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_surface ), intent(in) :: this The delaunay_tri_surface object. Return Value real(kind=real64), allocatable, dimension(:) An array of the z-coordinates of each point. procedure, public :: get_triangle_count => d2d_get_tri_count private pure function d2d_get_tri_count(this) result(rst) Gets the number of triangles in the triangulation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32) The number of triangles in the triangulation.","tags":"","loc":"type\\delaunay_tri_surface.html"},{"title":"filled_plot_data – FPLOT ","text":"type, public, extends( plot_data_colored ) :: filled_plot_data Defines a two-dimensional filled plot data set. Contents Type-Bound Procedures define_data get_axes_string get_color_index get_command_string get_data_string get_draw_against_y2 get_line_color get_name set_color_index set_draw_against_y2 set_line_color set_name Type-Bound Procedures procedure, public :: define_data => fpd_define_data private subroutine fpd_define_data(this, x, y, yc, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(inout) :: this The filled_plot_data object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinate data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinate data. real(kind=real64), intent(in), dimension(:) :: yc An N-element array containing the constraining curve y \ncoordinate data. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get_axes_string => fpd_get_axes_cmd private function fpd_get_axes_cmd(this) result(x) Gets the GNUPLOT command string defining which axes the data\nis to be plotted against. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(in) :: this The filled_plot_data object. Return Value character(len=:), allocatable The command string. 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 Intent Optional 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 => fpd_get_cmd private function fpd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nfilled_plot_data object. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(in) :: this The filled_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => fpd_get_data_cmd private function fpd_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data to plot. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(in) :: this The filled_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_against_y2 => fpd_get_draw_against_y2 private pure function fpd_get_draw_against_y2(this) result(x) Gets a value determining if the data should be plotted against\nthe secondary y-axis. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(in) :: this The filled_plot_data object. Return Value logical Returns true if the data should be plotted against the secondary\ny-axis; else, false to plot against the primary y-axis. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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 => fpd_set_draw_against_y2 private subroutine fpd_set_draw_against_y2(this, x) Sets a value determining if the data should be plotted against\nthe secondary y-axis. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(inout) :: this The filled_plot_data object. logical, intent(in) :: x Set to true if the data should be plotted against the secondary\ny-axis; else, false to plot against the primary y-axis. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\filled_plot_data.html"},{"title":"plot_label – FPLOT ","text":"type, public, extends( plot_object ) :: plot_label Defines a plot label. Contents Type-Bound Procedures get_angle get_command_string get_is_visible get_position get_text set_angle set_is_visible set_position set_text Type-Bound Procedures procedure, public :: get_angle => lbl_get_angle private pure function lbl_get_angle(this) result(x) Gets the angle of the label text, in degrees. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value real(kind=real32) The angle, in degrees. procedure, public :: get_command_string => lbl_get_cmd private function lbl_get_cmd(this) result(x) Gets the GNUPLOT command string for the label. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value character(len=:), allocatable The command string. procedure, public :: get_is_visible => lbl_get_is_visible private pure function lbl_get_is_visible(this) result(x) Gets a value determining if the label is to be drawn. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value logical Returns true if the label is to be drawn; else, false. procedure, public :: get_position => lbl_get_position private pure function lbl_get_position(this) result(x) Gets the position of the label in terms of plot coordinates. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value real(kind=real32), dimension(3) A 3-element array containing the X, Y, and Z position of the \nlabel. procedure, public :: get_text => lbl_get_txt private function lbl_get_txt(this) result(x) Gets the text displayed by the label. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value character(len=:), allocatable The text string to display. procedure, public :: set_angle => lbl_set_angle private subroutine lbl_set_angle(this, x) Sets the angle of the label text, in degrees. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(inout) :: this The plot_label object. real(kind=real32), intent(in) :: x The angle, in degrees. procedure, public :: set_is_visible => lbl_set_is_visible private subroutine lbl_set_is_visible(this, x) Sets a value determining if the label is to be drawn. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(inout) :: this The plot_label object. logical, intent(in) :: x Set to true if the label is to be drawn; else, false. procedure, public :: set_position => lbl_set_position private subroutine lbl_set_position(this, x) Sets the position of the label in terms of plot coordinates. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(inout) :: this The plot_label object. real(kind=real32), intent(in), dimension(3) :: x A 3-element array containing the X, Y, and Z position of the \nlabel. procedure, public :: set_text => lbl_set_txt private subroutine lbl_set_txt(this, x) Sets the text displayed by the label. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(inout) :: this The plot_label object. character(len=*), intent(in) :: x The text string to display.","tags":"","loc":"type\\plot_label.html"},{"title":"latex_terminal – FPLOT ","text":"type, public, extends( terminal ) :: latex_terminal A LATEX terminal. Contents Type-Bound Procedures get_command_string get_filename get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_filename set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => tex_get_command_string private function tex_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( latex_terminal ), intent(in) :: this The latex_terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_filename => tex_get_filename private function tex_get_filename(this) result(txt) Gets the filename for the output LATEX file. Arguments Type Intent Optional Attributes Name class( latex_terminal ), intent(in) :: this The latex_terminal object. Return Value character(len=:), allocatable The filename, including the file extension (.tex). procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => tex_get_term_string private function tex_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( latex_terminal ), intent(in) :: this The latex_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_filename => tex_set_filename private subroutine tex_set_filename(this, txt) Sets the filename for the output LATEX file. Arguments Type Intent Optional Attributes Name class( latex_terminal ), intent(inout) :: this The latex_terminal object. character(len=*), intent(in) :: txt The filename, including the file extension (.tex). procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\latex_terminal.html"},{"title":"legend – FPLOT ","text":"type, public, extends( plot_object ) :: legend Defines a legend object. Contents Type-Bound Procedures get_command_string get_draw_border get_draw_inside_axes get_horizontal_position get_is_opaque get_is_visible get_layout get_vertical_position set_draw_border set_draw_inside_axes set_horizontal_position set_is_opaque set_is_visible set_layout set_vertical_position Type-Bound Procedures procedure, public :: get_command_string => leg_get_command_txt private function leg_get_command_txt(this) result(txt) Gets the command string defining the legend properties. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_draw_border => leg_get_box private pure function leg_get_box(this) result(x) Gets a value determining if the legend should have a border. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value logical True if the legend should have a border; else, false. procedure, public :: get_draw_inside_axes => leg_get_inside private pure function leg_get_inside(this) result(x) Gets a value determining if the legend should be drawn inside\nor outside the axes border. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value logical True to draw inside the axes border; else, false for outside. procedure, public :: get_horizontal_position => leg_get_horz_pos private pure function leg_get_horz_pos(this) result(x) Gets the horizontal position of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value character(len=:), allocatable The horizontal position of the legend (LEGEND_LEFT,\nLEGEND_CENTER, or LEGEND_RIGHT). procedure, public :: get_is_opaque => leg_get_opaque private pure function leg_get_opaque(this) result(rst) Gets a value determining if the legend is to be opaque. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value logical True if the legend is to be opaque; else, false. procedure, public :: get_is_visible => leg_get_visible private pure function leg_get_visible(this) result(x) Gets a value determining if the legend is visible. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value logical True if the legend is visible; else, false. procedure, public :: get_layout => leg_get_layout private pure function leg_get_layout(this) result(rst) Gets the layout of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value character(len=:), allocatable The layout type, either LEGEND_ARRANGE_VERTICALLY or \nLEGEND_ARRANGE_HORIZONTALLY. procedure, public :: get_vertical_position => leg_get_vert_pos private pure function leg_get_vert_pos(this) result(x) Gets the vertical position of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value character(len=:), allocatable The vertical position of the legend (LEGEND_TOP,\nLEGEND_CENTER, or LEGEND_BOTTOM). procedure, public :: set_draw_border => leg_set_box private subroutine leg_set_box(this, x) Sets a value determining if the legend should have a border. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. logical, intent(in) :: x True if the legend should have a border; else, false. procedure, public :: set_draw_inside_axes => leg_set_inside private subroutine leg_set_inside(this, x) Sets a value determining if the legend should be drawn inside\nor outside the axes border. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. logical, intent(in) :: x True to draw inside the axes border; else, false for outside. procedure, public :: set_horizontal_position => leg_set_horz_pos private subroutine leg_set_horz_pos(this, x) Sets the horizontal position of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. character(len=*), intent(in) :: x The horizontal position of the legend. The parameter must be\nset to one of the following: LEGEND_LEFT, LEGEND_CENTER, or\nLEGEND_RIGHT. If not, the default LEGEND_RIGHT will be used. procedure, public :: set_is_opaque => leg_set_opaque private subroutine leg_set_opaque(this, x) Sets a value determining if the legend is to be opaque. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. logical :: x True if the legend is to be opaque; else, false. procedure, public :: set_is_visible => leg_set_visible private subroutine leg_set_visible(this, x) Sets a value determining if the legend is visible. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. logical, intent(in) :: x True if the legend is visible; else, false. procedure, public :: set_layout => leg_set_layout private subroutine leg_set_layout(this, x) Sets the layout of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. character(len=*), intent(in) :: x The layout type, either LEGEND_ARRANGE_VERTICALLY or \nLEGEND_ARRANGE_HORIZONTALLY. procedure, public :: set_vertical_position => leg_set_vert_pos private subroutine leg_set_vert_pos(this, x) Sets the vertical position of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. character(len=*), intent(in) :: x The vertical position of the legend. The parameter must be\nset to one of the following: LEGEND_TOP, LEGEND_CENTER, or\nLEGEND_BOTTOM. If not, the default LEGEND_TOP will be used.","tags":"","loc":"type\\legend.html"},{"title":"multiplot – FPLOT ","text":"type, public, extends( plot_object ) :: multiplot Defines a multi-plot layout. Contents Variables m_terminal Finalization Procedures mp_clean Type-Bound Procedures draw get get_column_count get_command_string get_font_name get_font_size get_plot_count get_row_count get_terminal get_title initialize is_title_defined save_file set set_font_name set_font_size set_title 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 Intent Optional 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\nthe command list. Arguments Type Intent Optional 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\nto 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 \ndefault 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\nmultiplot object. Arguments Type Intent Optional Attributes Name class( multiplot ), intent(in) :: this The multiplot object. Return Value logical Returns true if a title has been defined for this multiplot; \nelse, returns false. procedure, public :: save_file => mp_save private subroutine mp_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional Attributes Name class( multiplot ), intent(inout) :: this The multiplot object. character(len=*), intent(in) :: x The title.","tags":"","loc":"type\\multiplot.html"},{"title":"plot – FPLOT ","text":"type, public, extends( plot_object ) :: plot Defines the basic GNUPLOT plot. Contents Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_axis_equal get_colormap get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count get_legend get_show_colorbar get_show_gridlines get_terminal get_tics_inward get_title initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_axis_equal set_colormap set_draw_border set_font_name set_font_size set_label set_show_colorbar set_show_gridlines set_tics_inward set_title Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => plt_get_cmd private function plt_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: initialize => plt_init private subroutine plt_init(this, term, fname, err) Initializes the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\nThe default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title.","tags":"","loc":"type\\plot.html"},{"title":"plot_2d – FPLOT ","text":"type, public, extends( plot ) :: plot_2d A plot object defining a 2D plot. Contents Finalization Procedures p2d_clean_up Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_axis_equal get_colormap get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count get_legend get_show_colorbar get_show_gridlines get_square_axes get_terminal get_tics_inward get_title get_use_y2_axis get_x_axis get_y2_axis get_y_axis initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_axis_equal set_colormap set_draw_border set_font_name set_font_size set_label set_show_colorbar set_show_gridlines set_square_axes set_tics_inward set_title set_use_y2_axis Finalization Procedures final :: p2d_clean_up private subroutine p2d_clean_up(this) Cleans up resources held by the plot_2d object. Arguments Type Intent Optional Attributes Name type( plot_2d ), intent(inout) :: this The plot_2d object. Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => p2d_get_cmd private function p2d_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot_2d object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_square_axes => p2d_get_square_axes private pure function p2d_get_square_axes(this) result(rst) Gets a logical flag determining if the axes size should be squared\noff. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value logical Returns true if the axes are to be sized to a square; else,\nfalse. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_use_y2_axis => p2d_get_use_y2 private pure function p2d_get_use_y2(this) result(x) Gets a flag determining if the secondary y-axis should be\ndisplayed. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value logical Returns true if the axis should be displayed; else, false. procedure, public :: get_x_axis => p2d_get_x_axis private function p2d_get_x_axis(this) result(ptr) Gets the x-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the x-axis object. procedure, public :: get_y2_axis => p2d_get_y2_axis private function p2d_get_y2_axis(this) result(ptr) Gets the secondary y-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the secondary y-axis object. procedure, public :: get_y_axis => p2d_get_y_axis private function p2d_get_y_axis(this) result(ptr) Gets the y-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the y-axis object. procedure, public :: initialize => p2d_init private subroutine p2d_init(this, term, fname, err) Initializes the plot_2d object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_square_axes => p2d_set_square_axes private subroutine p2d_set_square_axes(this, x) Sets a logical flag determining if the axes size should be\nsquared off. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. logical, intent(in) :: x Set to true if the axes are to be sized to a square; else,\nfalse. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_use_y2_axis => p2d_set_use_y2 private subroutine p2d_set_use_y2(this, x) Sets a flag determining if the secondary y-axis should be\ndisplayed. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. logical, intent(in) :: x Set to true if the axis should be displayed; else, false.","tags":"","loc":"type\\plot_2d.html"},{"title":"plot_3d – FPLOT ","text":"type, public, extends( plot ) :: plot_3d A plot object defining a 3D plot. Contents Finalization Procedures p3d_clean_up Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_axis_equal get_azimuth get_colormap get_command_string get_coordinate_system get_count get_draw_border get_elevation get_font_name get_font_size get_label get_label_count get_legend get_show_colorbar get_show_gridlines get_terminal get_tics_inward get_title get_use_map_view get_x_axis get_y_axis get_z_axis get_z_intersect_xy initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_axis_equal set_azimuth set_colormap set_coordinate_system set_draw_border set_elevation set_font_name set_font_size set_label set_show_colorbar set_show_gridlines set_tics_inward set_title set_use_map_view set_z_intersect_xy Finalization Procedures final :: p3d_clean_up private subroutine p3d_clean_up(this) Cleans up resources held by the plot_3d object. Arguments Type Intent Optional Attributes Name type( plot_3d ), intent(inout) :: this The plot_3d object. Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_azimuth => p3d_get_azimuth private pure function p3d_get_azimuth(this) result(x) Gets the plot azimuth angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value real(kind=real64) The azimuth angle, in degrees. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => p3d_get_cmd private function p3d_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot_3d object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_coordinate_system => p3d_get_csys private pure function p3d_get_csys(this) result(rst) Gets a value determining the coordinate system. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value integer(kind=int32) The coordinate system ID, which must be one of the following. COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_elevation => p3d_get_elevation private pure function p3d_get_elevation(this) result(x) Gets the plot elevation angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value real(kind=real64) The elevation angle, in degrees. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_use_map_view => p3d_get_use_map_view private pure function p3d_get_use_map_view(this) result(rst) Gets a value determining if the view should be set to a 2D\nmap view. If true, the azimuth and elevation terms are ignored. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value logical Returns true if the map view will be used; else, false. procedure, public :: get_x_axis => p3d_get_x_axis private function p3d_get_x_axis(this) result(ptr) Gets the x-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the x-axis object. procedure, public :: get_y_axis => p3d_get_y_axis private function p3d_get_y_axis(this) result(ptr) Gets the y-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the y-axis object. procedure, public :: get_z_axis => p3d_get_z_axis private function p3d_get_z_axis(this) result(ptr) Gets the z-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the z-axis object. procedure, public :: get_z_intersect_xy => p3d_get_z_axis_intersect private pure function p3d_get_z_axis_intersect(this) result(x) Gets a value determining if the z-axis should intersect the\nx-y plane. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value logical Returns true if the z-axis should intersect the x-y plane; else,\nfalse to allow the z-axis to float. procedure, public :: initialize => p3d_init private subroutine p3d_init(this, term, fname, err) Initializes the plot_3d object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_azimuth => p3d_set_azimuth private subroutine p3d_set_azimuth(this, x) Sets the plot azimuth angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. real(kind=real64), intent(in) :: x The azimuth angle, in degrees. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_coordinate_system => p3d_set_csys private subroutine p3d_set_csys(this, x) Sets a value determining the coordinate system. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. integer(kind=int32), intent(in) :: x The coordinate system ID, which must be one of the following. COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_elevation => p3d_set_elevation private subroutine p3d_set_elevation(this, x) Sets the plot elevation angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. real(kind=real64), intent(in) :: x The elevation angle, in degrees. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_use_map_view => p3d_set_use_map_view private subroutine p3d_set_use_map_view(this, x) Sets a value determining if the view should be set to a 2D\nmap view. If true, the azimuth and elevation terms are ignored. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. logical, intent(in) :: x Seturns true if the map view will be used; else, false. procedure, public :: set_z_intersect_xy => p3d_set_z_axis_intersect private subroutine p3d_set_z_axis_intersect(this, x) Sets a value determining if the z-axis should intersect the\nx-y plane. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. logical, intent(in) :: x Set to true if the z-axis should intersect the x-y plane; else,\nfalse to allow the z-axis to float.","tags":"","loc":"type\\plot_3d.html"},{"title":"plot_axis – FPLOT ","text":"type, public, abstract, extends( plot_object ) :: plot_axis Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_tic_label_format get_title get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_tic_label_format set_title set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure( pa_get_string_result ), public, deferred :: get_id_string function pa_get_string_result(this) result(x) Prototype Retrieves a string from a plot_axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\plot_axis.html"},{"title":"x_axis – FPLOT ","text":"type, public, extends( plot_axis ) :: x_axis Defines an x-axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_tic_label_format get_title get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_tic_label_format set_title set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_id_string => xa_get_id private function xa_get_id(this) result(x) Gets the axis identification string. Arguments Type Intent Optional Attributes Name class( x_axis ), intent(in) :: this The x_axis object. Return Value character(len=:), allocatable The identification string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\x_axis.html"},{"title":"y2_axis – FPLOT ","text":"type, public, extends( plot_axis ) :: y2_axis Defines a secondary y-axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_tic_label_format get_title get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_tic_label_format set_title set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_id_string => y2a_get_id private function y2a_get_id(this) result(x) Gets the axis identification string. Arguments Type Intent Optional Attributes Name class( y2_axis ), intent(in) :: this The y2_axis object. Return Value character(len=:), allocatable The identification string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\y2_axis.html"},{"title":"y_axis – FPLOT ","text":"type, public, extends( plot_axis ) :: y_axis Defines a y-axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_tic_label_format get_title get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_tic_label_format set_title set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_id_string => ya_get_id private function ya_get_id(this) result(x) Gets the axis identification string. Arguments Type Intent Optional Attributes Name class( y_axis ), intent(in) :: this The y_axis object. Return Value character(len=:), allocatable The identification string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\y_axis.html"},{"title":"z_axis – FPLOT ","text":"type, public, extends( plot_axis ) :: z_axis Defines a z-axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_tic_label_format get_title get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_tic_label_format set_title set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_id_string => za_get_id private function za_get_id(this) result(x) Gets the axis identification string. Arguments Type Intent Optional Attributes Name class( z_axis ), intent(in) :: this The z_axis object. Return Value character(len=:), allocatable The identification string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\z_axis.html"},{"title":"plot_bar – FPLOT ","text":"type, public, extends( plot_2d ) :: plot_bar Defines a 2D plot tailored towards bar plotting. Contents Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_axis_equal get_bar_width get_colormap get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count get_legend get_show_colorbar get_show_gridlines get_square_axes get_terminal get_tics_inward get_title get_use_y2_axis get_x_axis get_y2_axis get_y_axis initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_axis_equal set_bar_width set_colormap set_draw_border set_font_name set_font_size set_label set_show_colorbar set_show_gridlines set_square_axes set_tics_inward set_title set_use_y2_axis Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_bar_width => pb_get_bar_width private pure function pb_get_bar_width(this) result(x) Gets the bar width scaling factor. Arguments Type Intent Optional Attributes Name class( plot_bar ), intent(in) :: this The plot_bar object. Return Value real(kind=real32) The scaling factor. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => pb_get_cmd private function pb_get_cmd(this) result(x) Gets the GNUPLOT commands required to draw the plot. Arguments Type Intent Optional Attributes Name class( plot_bar ), intent(in) :: this The plot_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_square_axes => p2d_get_square_axes private pure function p2d_get_square_axes(this) result(rst) Gets a logical flag determining if the axes size should be squared\noff. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value logical Returns true if the axes are to be sized to a square; else,\nfalse. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_use_y2_axis => p2d_get_use_y2 private pure function p2d_get_use_y2(this) result(x) Gets a flag determining if the secondary y-axis should be\ndisplayed. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value logical Returns true if the axis should be displayed; else, false. procedure, public :: get_x_axis => p2d_get_x_axis private function p2d_get_x_axis(this) result(ptr) Gets the x-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the x-axis object. procedure, public :: get_y2_axis => p2d_get_y2_axis private function p2d_get_y2_axis(this) result(ptr) Gets the secondary y-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the secondary y-axis object. procedure, public :: get_y_axis => p2d_get_y_axis private function p2d_get_y_axis(this) result(ptr) Gets the y-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the y-axis object. procedure, public :: initialize => p2d_init private subroutine p2d_init(this, term, fname, err) Initializes the plot_2d object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_bar_width => pb_set_bar_width private subroutine pb_set_bar_width(this, x) Sets the bar width scaling factor. Arguments Type Intent Optional Attributes Name class( plot_bar ), intent(inout) :: this The plot_bar object. real(kind=real32), intent(in) :: x The scaling factor. The value must be in the set [0, 1]; else, the\nvalue will be shifted accordingly. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_square_axes => p2d_set_square_axes private subroutine p2d_set_square_axes(this, x) Sets a logical flag determining if the axes size should be\nsquared off. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. logical, intent(in) :: x Set to true if the axes are to be sized to a square; else,\nfalse. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_use_y2_axis => p2d_set_use_y2 private subroutine p2d_set_use_y2(this, x) Sets a flag determining if the secondary y-axis should be\ndisplayed. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. logical, intent(in) :: x Set to true if the axis should be displayed; else, false.","tags":"","loc":"type\\plot_bar.html"},{"title":"plot_data – FPLOT ","text":"type, public, abstract, extends( plot_object ) :: plot_data A container for plot data. Contents Type-Bound Procedures get_command_string get_data_string get_name set_name Type-Bound Procedures procedure( get_string_result ), public, deferred :: get_command_string function get_string_result(this) result(x) Prototype Returns a string from a plot_object. Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:), allocatable The result string. procedure( pd_get_string_result ), public, deferred :: get_data_string function pd_get_string_result(this) result(x) Prototype Retrieves a string from a plot_data object. Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The string. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\plot_data.html"},{"title":"plot_data_colored – FPLOT ","text":"type, public, abstract, extends( plot_data ) :: plot_data_colored Defines a colored plot data set. Contents Type-Bound Procedures get_color_index get_command_string get_data_string get_line_color get_name set_color_index set_line_color set_name Type-Bound Procedures 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value integer(kind=int32) The index value. procedure( get_string_result ), public, deferred :: get_command_string function get_string_result(this) result(x) Prototype Returns a string from a plot_object. Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:), allocatable The result string. procedure( pd_get_string_result ), public, deferred :: get_data_string function pd_get_string_result(this) result(x) Prototype Retrieves a string from a plot_data object. Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The string. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\plot_data_colored.html"},{"title":"scatter_plot_data – FPLOT ","text":"type, public, abstract, extends( plot_data_colored ) :: scatter_plot_data A plot_data object for describing scatter plot data sets. Contents Type-Bound Procedures get_axes_string get_color_index get_command_string get_count get_data_string get_draw_line get_draw_markers get_fill_curve get_line_color get_line_style get_line_width get_marker_frequency get_marker_scaling get_marker_style get_name get_simplification_factor get_simplify_data get_use_data_dependent_colors get_use_variable_size_points get_x get_y set_color_index set_draw_line set_draw_markers set_fill_curve set_line_color set_line_style set_line_width set_marker_frequency set_marker_scaling set_marker_style set_name set_simplification_factor set_simplify_data set_use_data_dependent_colors set_use_variable_size_points set_x set_y Type-Bound Procedures procedure( spd_get_string_result ), public, deferred :: get_axes_string function spd_get_string_result(this) result(x) Prototype Gets a string value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The string. 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 Intent Optional 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 => spd_get_cmd private function spd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nscatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The command string. procedure( spd_get_int_value ), public, deferred :: get_count pure function spd_get_int_value(this) result(x) Prototype Gets an integer value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The value. procedure( pd_get_string_result ), public, deferred :: get_data_string function pd_get_string_result(this) result(x) Prototype Retrieves a string from a plot_data object. Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The string. procedure, public :: get_draw_line => spd_get_draw_line private pure function spd_get_draw_line(this) result(x) Gets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the line should be drawn; else, false. procedure, public :: get_draw_markers => spd_get_draw_markers private pure function spd_get_draw_markers(this) result(x) Gets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the markers should be drawn; else, false. procedure, public :: get_fill_curve => spd_get_filled private pure function spd_get_filled(this) result(rst) Gets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the curve should be filled; else, false. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. procedure, public :: get_line_style => spd_get_line_style private pure function spd_get_line_style(this) result(x) Gets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: get_line_width => spd_get_line_width private pure function spd_get_line_width(this) result(x) Gets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The line width. procedure, public :: get_marker_frequency => spd_get_marker_frequency private pure function spd_get_marker_frequency(this) result(x) Gets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker frequency. procedure, public :: get_marker_scaling => spd_get_marker_scaling private pure function spd_get_marker_scaling(this) result(x) Gets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The scaling factor. procedure, public :: get_marker_style => spd_get_marker_style private pure function spd_get_marker_style(this) result(x) Gets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_simplification_factor => spd_get_simplify_factor private pure function spd_get_simplify_factor(this) result(x) Gets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real64) The scaling factor. procedure, public :: get_simplify_data => spd_get_simplify_data private pure function spd_get_simplify_data(this) result(x) Gets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: get_use_data_dependent_colors => spd_get_data_dependent_colors private pure function spd_get_data_dependent_colors(this) result(rst) Gets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if data-dependent colors should be used; else, false. procedure, public :: get_use_variable_size_points => spd_get_use_var_point_size private pure function spd_get_use_var_point_size(this) result(rst) Gets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if variable size points should be used; else, false. procedure( spd_get_value ), public, deferred :: get_x pure function spd_get_value(this, index) result(x) Prototype Gets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. Return Value real(kind=real64) The value. procedure( spd_get_value ), public, deferred :: get_y pure function spd_get_value(this, index) result(x) Prototype Gets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. Return Value real(kind=real64) The value. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line => spd_set_draw_line private subroutine spd_set_draw_line(this, x) Sets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the line should be drawn; else, false. procedure, public :: set_draw_markers => spd_set_draw_markers private subroutine spd_set_draw_markers(this, x) Sets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the markers should be drawn; else, false. procedure, public :: set_fill_curve => spd_set_filled private subroutine spd_set_filled(this, x) Sets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the curve should be filled; else, false. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional Attributes Name class( plot_data_colored ), intent(inout) :: this The plot_data_colored object. type( color ), intent(in) :: x The color. procedure, public :: set_line_style => spd_set_line_style private subroutine spd_set_line_style(this, x) Sets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: set_line_width => spd_set_line_width private subroutine spd_set_line_width(this, x) Sets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The line width. procedure, public :: set_marker_frequency => spd_set_marker_frequency private subroutine spd_set_marker_frequency(this, x) Sets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker frequency. procedure, public :: set_marker_scaling => spd_set_marker_scaling private subroutine spd_set_marker_scaling(this, x) Sets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The scaling factor. procedure, public :: set_marker_style => spd_set_marker_style private subroutine spd_set_marker_style(this, x) Sets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_simplification_factor => spd_set_simplify_factor private subroutine spd_set_simplify_factor(this, x) Sets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real64), intent(in) :: x The scaling factor. procedure, public :: set_simplify_data => spd_set_simplify_data private subroutine spd_set_simplify_data(this, x) Sets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: set_use_data_dependent_colors => spd_set_data_dependent_colors private subroutine spd_set_data_dependent_colors(this, x) Sets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if data-dependent colors should be used; else, false. procedure, public :: set_use_variable_size_points => spd_set_use_var_point_size private subroutine spd_set_use_var_point_size(this, x) Sets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if variable size points should be used; else, false. procedure( spd_set_value ), public, deferred :: set_x subroutine spd_set_value(this, index, x) Prototype Sets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. real(kind=real64), intent(in) :: x The value. procedure( spd_set_value ), public, deferred :: set_y subroutine spd_set_value(this, index, x) Prototype Sets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. real(kind=real64), intent(in) :: x The value.","tags":"","loc":"type\\scatter_plot_data.html"},{"title":"plot_data_2d – FPLOT ","text":"type, public, extends( scatter_plot_data ) :: plot_data_2d Defines a two-dimensional plot data set. Contents Type-Bound Procedures define_data get_axes_string get_color_data get_color_index get_command_string get_count get_data_string get_draw_against_y2 get_draw_line get_draw_markers get_fill_curve get_line_color get_line_style get_line_width get_marker_frequency get_marker_scaling get_marker_style get_name get_point_size_data get_simplification_factor get_simplify_data get_use_data_dependent_colors get_use_variable_size_points get_x get_x_data get_y get_y_data pd2d_set_data_1 pd2d_set_data_2 set_color_index set_draw_against_y2 set_draw_line set_draw_markers set_fill_curve set_line_color set_line_style set_line_width set_marker_frequency set_marker_scaling set_marker_style set_name set_simplification_factor set_simplify_data set_use_data_dependent_colors set_use_variable_size_points set_x set_y Type-Bound Procedures generic, public :: define_data => pd2d_set_data_1 , pd2d_set_data_2 private subroutine pd2d_set_data_1(this, x, y, c, ps, err) Defines the data set to plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinate data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinate data. real(kind=real64), intent(in), optional, dimension(:) :: c An N-element array defining how color should vary with the \ncurrent colormap for each value. real(kind=real64), intent(in), optional, dimension(:) :: ps An N-element array defining the size of each data point. class(errors), intent(inout), optional, target :: err An error-handling object. private subroutine pd2d_set_data_2(this, y, err) Defines the data set to plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinate data. This\ndata will be plotted against its own index. class(errors), intent(inout), optional, target :: err An error-handling object. procedure, public :: get_axes_string => pd2d_get_axes_cmd private function pd2d_get_axes_cmd(this) result(x) Gets the GNUPLOT command string defining which axes the data\nis to be plotted against. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_color_data => pd2d_get_c_array private function pd2d_get_c_array(this) result(x) Gets the stored color scaling data array. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. 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 Intent Optional 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 => spd_get_cmd private function spd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nscatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pd2d_get_data_count private pure function pd2d_get_data_count(this) result(x) Gets the number of data points. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value integer(kind=int32) The number of data points. procedure, public :: get_data_string => pd2d_get_data_cmd private function pd2d_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data\nto plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_against_y2 => pd2d_get_draw_against_y2 private pure function pd2d_get_draw_against_y2(this) result(x) Gets a value determining if the data should be plotted against\nthe secondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value logical Returns true if the data should be plotted against the secondary\ny-axis; else, false to plot against the primary y-axis. procedure, public :: get_draw_line => spd_get_draw_line private pure function spd_get_draw_line(this) result(x) Gets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the line should be drawn; else, false. procedure, public :: get_draw_markers => spd_get_draw_markers private pure function spd_get_draw_markers(this) result(x) Gets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the markers should be drawn; else, false. procedure, public :: get_fill_curve => spd_get_filled private pure function spd_get_filled(this) result(rst) Gets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the curve should be filled; else, false. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. procedure, public :: get_line_style => spd_get_line_style private pure function spd_get_line_style(this) result(x) Gets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: get_line_width => spd_get_line_width private pure function spd_get_line_width(this) result(x) Gets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The line width. procedure, public :: get_marker_frequency => spd_get_marker_frequency private pure function spd_get_marker_frequency(this) result(x) Gets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker frequency. procedure, public :: get_marker_scaling => spd_get_marker_scaling private pure function spd_get_marker_scaling(this) result(x) Gets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The scaling factor. procedure, public :: get_marker_style => spd_get_marker_style private pure function spd_get_marker_style(this) result(x) Gets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_point_size_data => pd2d_get_ps_array private function pd2d_get_ps_array(this) result(x) Gets the stored point size data array. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_simplification_factor => spd_get_simplify_factor private pure function spd_get_simplify_factor(this) result(x) Gets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real64) The scaling factor. procedure, public :: get_simplify_data => spd_get_simplify_data private pure function spd_get_simplify_data(this) result(x) Gets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: get_use_data_dependent_colors => spd_get_data_dependent_colors private pure function spd_get_data_dependent_colors(this) result(rst) Gets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if data-dependent colors should be used; else, false. procedure, public :: get_use_variable_size_points => spd_get_use_var_point_size private pure function spd_get_use_var_point_size(this) result(rst) Gets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if variable size points should be used; else, false. procedure, public :: get_x => pd2d_get_x_data private pure function pd2d_get_x_data(this, index) result(x) Gets the requested X data point. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_x_data => pd2d_get_x_array private function pd2d_get_x_array(this) result(x) Gets the stored X data array. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_y => pd2d_get_y_data private pure function pd2d_get_y_data(this, index) result(x) Gets the requested Y data point. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_y_data => pd2d_get_y_array private function pd2d_get_y_array(this) result(x) Gets the stored Y data array. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public, :: pd2d_set_data_1 private subroutine pd2d_set_data_1(this, x, y, c, ps, err) Defines the data set to plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinate data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinate data. real(kind=real64), intent(in), optional, dimension(:) :: c An N-element array defining how color should vary with the \ncurrent colormap for each value. real(kind=real64), intent(in), optional, dimension(:) :: ps An N-element array defining the size of each data point. class(errors), intent(inout), optional, target :: err An error-handling object. procedure, public, :: pd2d_set_data_2 private subroutine pd2d_set_data_2(this, y, err) Defines the data set to plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinate data. This\ndata will be plotted against its own index. class(errors), intent(inout), optional, target :: err An error-handling object. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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 => pd2d_set_draw_against_y2 private subroutine pd2d_set_draw_against_y2(this, x) Sets a value determining if the data should be plotted against\nthe secondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. logical, intent(in) :: x Set to true if the data should be plotted against the\nsecondary y-axis; else, false to plot against the primary y-axis. procedure, public :: set_draw_line => spd_set_draw_line private subroutine spd_set_draw_line(this, x) Sets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the line should be drawn; else, false. procedure, public :: set_draw_markers => spd_set_draw_markers private subroutine spd_set_draw_markers(this, x) Sets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the markers should be drawn; else, false. procedure, public :: set_fill_curve => spd_set_filled private subroutine spd_set_filled(this, x) Sets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the curve should be filled; else, false. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional Attributes Name class( plot_data_colored ), intent(inout) :: this The plot_data_colored object. type( color ), intent(in) :: x The color. procedure, public :: set_line_style => spd_set_line_style private subroutine spd_set_line_style(this, x) Sets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: set_line_width => spd_set_line_width private subroutine spd_set_line_width(this, x) Sets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The line width. procedure, public :: set_marker_frequency => spd_set_marker_frequency private subroutine spd_set_marker_frequency(this, x) Sets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker frequency. procedure, public :: set_marker_scaling => spd_set_marker_scaling private subroutine spd_set_marker_scaling(this, x) Sets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The scaling factor. procedure, public :: set_marker_style => spd_set_marker_style private subroutine spd_set_marker_style(this, x) Sets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_simplification_factor => spd_set_simplify_factor private subroutine spd_set_simplify_factor(this, x) Sets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real64), intent(in) :: x The scaling factor. procedure, public :: set_simplify_data => spd_set_simplify_data private subroutine spd_set_simplify_data(this, x) Sets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: set_use_data_dependent_colors => spd_set_data_dependent_colors private subroutine spd_set_data_dependent_colors(this, x) Sets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if data-dependent colors should be used; else, false. procedure, public :: set_use_variable_size_points => spd_set_use_var_point_size private subroutine spd_set_use_var_point_size(this, x) Sets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if variable size points should be used; else, false. procedure, public :: set_x => pd2d_set_x_data private subroutine pd2d_set_x_data(this, index, x) Sets the requested X data point. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point. procedure, public :: set_y => pd2d_set_y_data private subroutine pd2d_set_y_data(this, index, x) Sets the requested Y data point. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point.","tags":"","loc":"type\\plot_data_2d.html"},{"title":"plot_data_3d – FPLOT ","text":"type, public, extends( scatter_plot_data ) :: plot_data_3d Defines a three-dimensional plot data set. Contents Type-Bound Procedures define_data get_axes_string get_color_data get_color_index get_command_string get_count get_data_string get_draw_line get_draw_markers get_fill_curve get_line_color get_line_style get_line_width get_marker_frequency get_marker_scaling get_marker_style get_name get_point_size_data get_simplification_factor get_simplify_data get_use_data_dependent_colors get_use_variable_size_points get_x get_x_data get_y get_y_data get_z get_z_data set_color_index set_draw_line set_draw_markers set_fill_curve set_line_color set_line_style set_line_width set_marker_frequency set_marker_scaling set_marker_style set_name set_simplification_factor set_simplify_data set_use_data_dependent_colors set_use_variable_size_points set_x set_y set_z Type-Bound Procedures procedure, public :: define_data => pd3d_set_data_1 private subroutine pd3d_set_data_1(this, x, y, z, c, ps, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(inout) :: this The plot_data_3d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinate data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinate data. real(kind=real64), intent(in), dimension(:) :: z An N-element array containing the z coordinate data. real(kind=real64), intent(in), optional, dimension(:) :: c An N-element array defining how color should vary with the \ncurrent colormap for each value. real(kind=real64), intent(in), optional, dimension(:) :: ps An N-element array defining the size of each data point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get_axes_string => pd3d_get_axes_cmd private function pd3d_get_axes_cmd(this) result(x) Gets the GNUPLOT command string defining which axes the data\nis to be plotted against. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_color_data => pd3d_get_c_array private function pd3d_get_c_array(this) result(x) Gets the stored color scaling data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. 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 Intent Optional 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 => spd_get_cmd private function spd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nscatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pd3d_get_data_count private pure function pd3d_get_data_count(this) result(x) Gets the number of data points. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value integer(kind=int32) The number of data points. procedure, public :: get_data_string => pd3d_get_data_cmd private function pd3d_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data to plot. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_line => spd_get_draw_line private pure function spd_get_draw_line(this) result(x) Gets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the line should be drawn; else, false. procedure, public :: get_draw_markers => spd_get_draw_markers private pure function spd_get_draw_markers(this) result(x) Gets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the markers should be drawn; else, false. procedure, public :: get_fill_curve => spd_get_filled private pure function spd_get_filled(this) result(rst) Gets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the curve should be filled; else, false. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. procedure, public :: get_line_style => spd_get_line_style private pure function spd_get_line_style(this) result(x) Gets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: get_line_width => spd_get_line_width private pure function spd_get_line_width(this) result(x) Gets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The line width. procedure, public :: get_marker_frequency => spd_get_marker_frequency private pure function spd_get_marker_frequency(this) result(x) Gets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker frequency. procedure, public :: get_marker_scaling => spd_get_marker_scaling private pure function spd_get_marker_scaling(this) result(x) Gets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The scaling factor. procedure, public :: get_marker_style => spd_get_marker_style private pure function spd_get_marker_style(this) result(x) Gets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_point_size_data => pd3d_get_c_array private function pd3d_get_c_array(this) result(x) Gets the stored color scaling data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_simplification_factor => spd_get_simplify_factor private pure function spd_get_simplify_factor(this) result(x) Gets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real64) The scaling factor. procedure, public :: get_simplify_data => spd_get_simplify_data private pure function spd_get_simplify_data(this) result(x) Gets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: get_use_data_dependent_colors => spd_get_data_dependent_colors private pure function spd_get_data_dependent_colors(this) result(rst) Gets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if data-dependent colors should be used; else, false. procedure, public :: get_use_variable_size_points => spd_get_use_var_point_size private pure function spd_get_use_var_point_size(this) result(rst) Gets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if variable size points should be used; else, false. procedure, public :: get_x => pd3d_get_x_data private pure function pd3d_get_x_data(this, index) result(x) Gets the requested X data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_x_data => pd3d_get_x_array private function pd3d_get_x_array(this) result(x) Gets the stored X data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_y => pd3d_get_y_data private pure function pd3d_get_y_data(this, index) result(x) Gets the requested Y data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_y_data => pd3d_get_y_array private function pd3d_get_y_array(this) result(x) Gets the stored Y data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_z => pd3d_get_z_data private pure function pd3d_get_z_data(this, index) result(x) Gets the requested Z data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_z_data => pd3d_get_z_array private function pd3d_get_z_array(this) result(x) Gets the stored Z data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line => spd_set_draw_line private subroutine spd_set_draw_line(this, x) Sets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the line should be drawn; else, false. procedure, public :: set_draw_markers => spd_set_draw_markers private subroutine spd_set_draw_markers(this, x) Sets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the markers should be drawn; else, false. procedure, public :: set_fill_curve => spd_set_filled private subroutine spd_set_filled(this, x) Sets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the curve should be filled; else, false. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional Attributes Name class( plot_data_colored ), intent(inout) :: this The plot_data_colored object. type( color ), intent(in) :: x The color. procedure, public :: set_line_style => spd_set_line_style private subroutine spd_set_line_style(this, x) Sets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: set_line_width => spd_set_line_width private subroutine spd_set_line_width(this, x) Sets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The line width. procedure, public :: set_marker_frequency => spd_set_marker_frequency private subroutine spd_set_marker_frequency(this, x) Sets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker frequency. procedure, public :: set_marker_scaling => spd_set_marker_scaling private subroutine spd_set_marker_scaling(this, x) Sets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The scaling factor. procedure, public :: set_marker_style => spd_set_marker_style private subroutine spd_set_marker_style(this, x) Sets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_simplification_factor => spd_set_simplify_factor private subroutine spd_set_simplify_factor(this, x) Sets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real64), intent(in) :: x The scaling factor. procedure, public :: set_simplify_data => spd_set_simplify_data private subroutine spd_set_simplify_data(this, x) Sets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: set_use_data_dependent_colors => spd_set_data_dependent_colors private subroutine spd_set_data_dependent_colors(this, x) Sets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if data-dependent colors should be used; else, false. procedure, public :: set_use_variable_size_points => spd_set_use_var_point_size private subroutine spd_set_use_var_point_size(this, x) Sets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if variable size points should be used; else, false. procedure, public :: set_x => pd3d_set_x_data private subroutine pd3d_set_x_data(this, index, x) Sets the requested X data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(inout) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point. procedure, public :: set_y => pd3d_set_y_data private subroutine pd3d_set_y_data(this, index, x) Sets the requested Y data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(inout) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point. procedure, public :: set_z => pd3d_set_z_data private subroutine pd3d_set_z_data(this, index, x) Sets the requested Z data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(inout) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point.","tags":"","loc":"type\\plot_data_3d.html"},{"title":"plot_data_bar – FPLOT ","text":"type, public, extends( plot_data_colored ) :: plot_data_bar Defines a data set tailored to bar charts. Contents Type-Bound Procedures define_data get get_axes_string get_bar_per_label_count get_color_index get_command_string get_count get_data get_data_string get_draw_against_y2 get_is_filled get_label get_line_color get_name get_transparency get_use_labels set set_color_index set_data_1 set_data_2 set_data_3 set_draw_against_y2 set_is_filled set_label set_line_color set_name set_transparency set_use_labels Type-Bound Procedures generic, public :: define_data => pdb_set_data_1, pdb_set_data_2, pdb_set_data_3 private subroutine pdb_set_data_1(this, x, err) Defines a single data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: x The data to plot. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pdb_set_data_2(this, labels, x, err) Defines data along with associated axis labels. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. class(string), intent(in), dimension(:) :: labels The axis labels to associate with the data. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pdb_set_data_3(this, labels, x, fmt, err) Defines data along with labels and formatting information. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: labels The axis labels to associate with the data. real(kind=real64), intent(in), dimension(:) :: x The data set. character(len=*), intent(in), optional :: fmt The format string for the labels (e.g. '(I0)', etc.). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get => pdb_get_data private pure function pdb_get_data(this, index, col) result(x) Gets the requested data point. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The data point index. integer(kind=int32), intent(in) :: col The column index. Return Value real(kind=real64) The value. procedure, public :: get_axes_string => pdb_get_axes_cmd private function pdb_get_axes_cmd(this) result(x) Gets the GNUPLOT command defining which axes to plot against. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_bar_per_label_count => pdb_get_col_count private pure function pdb_get_col_count(this) result(x) Gets the number of data sets (columns). Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value integer(kind=int32) The 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 Intent Optional 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 => pdb_get_cmd private function pdb_get_cmd(this) result(x) Gets the GNUPLOT command string for this object. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pdb_get_count private pure function pdb_get_count(this) result(x) Gets the number of stored data points. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value integer(kind=int32) The number of stored data points. procedure, public :: get_data => pdb_get_data_set private pure function pdb_get_data_set(this, col) result(x) Gets the requested data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: col The column index. Return Value real(kind=real64), allocatable, dimension(:) A copy of the data set. procedure, public :: get_data_string => pdb_get_data_cmd private function pdb_get_data_cmd(this) result(x) Gets the GNUPLOT command string defining the data for this object. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_against_y2 => pdb_get_use_y2 private pure function pdb_get_use_y2(this) result(x) Gets a value determining if the data should be plotted against a\nsecondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true to plot against a secondary y-axis; else, false. procedure, public :: get_is_filled => pdb_get_is_filled private pure function pdb_get_is_filled(this) result(x) Gets a value determining if each bar is filled. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true if the bars are to be filled; else, false. procedure, public :: get_label => pdb_get_label private pure function pdb_get_label(this, index) result(x) Gets the axis label associated with a specific data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The index of the data set. Return Value character(len=:), allocatable The label. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_transparency => pdb_get_alpha private pure function pdb_get_alpha(this) result(x) Gets the alpha (transparency) for the bar color. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value real(kind=real32) The alpha value ([0, 1]). procedure, public :: get_use_labels => pdb_get_use_labels private pure function pdb_get_use_labels(this) result(x) Gets a value determining if labels are used to identify the data. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true if labels are used; else, false. procedure, public :: set => pdb_set_data private subroutine pdb_set_data(this, index, col, x) Replaces the requested data point. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The data point index. integer(kind=int32), intent(in) :: col The column index. real(kind=real64), intent(in) :: x The new value. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_data_1 => pdb_set_data_1_core private subroutine pdb_set_data_1_core(this, x, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_data_2 => pdb_set_data_2_core private subroutine pdb_set_data_2_core(this, labels, x, err) Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. class(string), intent(in), dimension(:) :: labels The axis labels. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_data_3 => pdb_set_data_3_core private subroutine pdb_set_data_3_core(this, labels, x, fmt, err) Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: labels The axis labels. real(kind=real64), intent(in), dimension(:) :: x The data set. character(len=*), intent(in), optional :: fmt The format string for the labels (e.g. '(I0)', etc.). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_draw_against_y2 => pdb_set_use_y2 private subroutine pdb_set_use_y2(this, x) Sets a value determining if the data should be plotted against a\nsecondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true to plot against a secondary y-axis; else, false. procedure, public :: set_is_filled => pdb_set_is_filled private subroutine pdb_set_is_filled(this, x) Sets a value determining if each bar is filled. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true if the bars are to be filled; else, false. procedure, public :: set_label => pdb_set_label private subroutine pdb_set_label(this, index, txt) Sets the axis label for a specific data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. integer(kind=int32) :: index The index of the data set. character(len=*), intent(in) :: txt The label. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_transparency => pdb_set_alpha private subroutine pdb_set_alpha(this, x) Gets the alpha (transparency) for the bar color. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real32), intent(in) :: x The alpha value ([0, 1]). procedure, public :: set_use_labels => pdb_set_use_labels private subroutine pdb_set_use_labels(this, x) Sets a value determining if labels are used to identify the data. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true if labels are used; else, false.","tags":"","loc":"type\\plot_data_bar.html"},{"title":"plot_data_error_bars – FPLOT ","text":"type, public, extends( plot_data_colored ) :: plot_data_error_bars Defines a 2D error-bar based data set. Contents Type-Bound Procedures define_x_error_data define_xy_error_data define_y_error_data get_color_index get_command_string get_count get_data_string get_line_color get_name get_plot_x_error_bars get_plot_y_error_bars get_use_error_box get_use_range pde_define_x_err pde_define_x_err_lim pde_define_xy_err pde_define_xy_err_lim pde_define_y_err pde_define_y_err_lim set_color_index set_line_color set_name set_use_error_box Type-Bound Procedures generic, public :: define_x_error_data => pde_define_x_err , pde_define_x_err_lim private subroutine pde_define_x_err(this, x, y, xerr, err) Defines the x error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xerr An N-element array containing the x errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pde_define_x_err_lim(this, x, y, xmin, xmax, err) Defines the x error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xmin An N-element array containing the minimum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: xmax An N-element array containing the maximum x values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. generic, public :: define_xy_error_data => pde_define_xy_err , pde_define_xy_err_lim private subroutine pde_define_xy_err(this, x, y, xerr, yerr, err) Defines x and y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xerr An N-element array containing the x errors at each data point. real(kind=real64), intent(in), dimension(:) :: yerr An N-element array containing the y errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pde_define_xy_err_lim(this, x, y, xmin, xmax, ymin, ymax, err) Defines the x and y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xmin An N-element array containing the minimum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: xmax An N-element array containing the maximum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymin An N-element array containing the minimum y values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymax An N-element array containing the maximum x values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. generic, public :: define_y_error_data => pde_define_y_err , pde_define_y_err_lim private subroutine pde_define_y_err(this, x, y, yerr, err) Defines the y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: yerr An N-element array containing the y errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pde_define_y_err_lim(this, x, y, ymin, ymax, err) Defines the y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: ymin An N-element array containing the minimum y values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymax An N-element array containing the maximum y values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. 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 Intent Optional 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 => pde_get_cmd private function pde_get_cmd(this) result(cmd) Gets the appropriate GNUPLOT command string for the object. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pde_get_count private pure function pde_get_count(this) result(x) Gets the number of stored data points. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value integer(kind=int32) The number of data points. procedure, public :: get_data_string => pde_get_data_cmd private function pde_get_data_cmd(this) result(cmd) Gets the appropriate GNUPLOT commands to plot the data itself. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value character(len=:), allocatable The command string. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_plot_x_error_bars => pde_get_plot_x_err private pure function pde_get_plot_x_err(this) result(x) Checks to see if the x error bar data has been defined, and as\na result, if the x error data is to be plotted. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value logical Returns true if the x error bars are to be plotted; else, false. procedure, public :: get_plot_y_error_bars => pde_get_plot_y_err private pure function pde_get_plot_y_err(this) result(x) Checks to see if the y error bar data has been defined, and as\na result, if the x error data is to be plotted. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value logical Returns true if the y error bars are to be plotted; else, false. procedure, public :: get_use_error_box => pde_get_box private pure function pde_get_box(this) result(x) Checks to see if the x and y error boxes should be utilized. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value logical Returns true if the error boxes are to be plotted; else,\nfalse. Notice, the error boxes are only utilized if there is \nboth x and y error data defined, regardless of the value of this \nproperty. procedure, public :: get_use_range => pde_get_use_range private pure function pde_get_use_range(this) result(x) Gets a value determining if a defined range is being used\nto define the error bar extremes. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value logical True if a defined range is being used; else, false. procedure, public, :: pde_define_x_err private subroutine pde_define_x_err(this, x, y, xerr, err) Defines the x error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xerr An N-element array containing the x errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_x_err_lim private subroutine pde_define_x_err_lim(this, x, y, xmin, xmax, err) Defines the x error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xmin An N-element array containing the minimum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: xmax An N-element array containing the maximum x values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_xy_err private subroutine pde_define_xy_err(this, x, y, xerr, yerr, err) Defines x and y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xerr An N-element array containing the x errors at each data point. real(kind=real64), intent(in), dimension(:) :: yerr An N-element array containing the y errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_xy_err_lim private subroutine pde_define_xy_err_lim(this, x, y, xmin, xmax, ymin, ymax, err) Defines the x and y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xmin An N-element array containing the minimum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: xmax An N-element array containing the maximum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymin An N-element array containing the minimum y values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymax An N-element array containing the maximum x values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_y_err private subroutine pde_define_y_err(this, x, y, yerr, err) Defines the y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: yerr An N-element array containing the y errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_y_err_lim private subroutine pde_define_y_err_lim(this, x, y, ymin, ymax, err) Defines the y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: ymin An N-element array containing the minimum y values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymax An N-element array containing the maximum y values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_use_error_box => pde_set_box private subroutine pde_set_box(this, x) Deterimines if the x and y error boxes should be utilized. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. logical, intent(in) :: x Set to true if the error boxes are to be plotted; else,\nfalse. Notice, the error boxes are only utilized if there is \nboth x and y error data defined, regardless of the value of this \nproperty.","tags":"","loc":"type\\plot_data_error_bars.html"},{"title":"plot_data_histogram – FPLOT ","text":"type, public, extends( plot_data_bar ) :: plot_data_histogram A container for plotting data in the form of a histogram. Contents Type-Bound Procedures bin_data define_data get get_axes_string get_bar_per_label_count get_bin_count get_color_index get_command_string get_count get_data get_data_string get_draw_against_y2 get_extreme_values get_is_filled get_label get_line_color get_name get_number_format get_transparency get_use_labels set set_bin_count set_color_index set_data_1 set_data_2 set_data_3 set_draw_against_y2 set_is_filled set_label set_line_color set_name set_number_format set_transparency set_use_labels Type-Bound Procedures procedure, public :: bin_data => pdh_bin_data private function pdh_bin_data(this, x, err) result(bx) Bins the supplied data set. Arguments Type Intent Optional Attributes Name class( plot_data_histogram ), intent(in) :: this The plot_data_histogram object. real(kind=real64), intent(in), dimension(:) :: x The data set to bin. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) The binned data. generic, public :: define_data => pdb_set_data_1, pdb_set_data_2, pdb_set_data_3 private subroutine pdb_set_data_1(this, x, err) Defines a single data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: x The data to plot. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pdb_set_data_2(this, labels, x, err) Defines data along with associated axis labels. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. class(string), intent(in), dimension(:) :: labels The axis labels to associate with the data. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pdb_set_data_3(this, labels, x, fmt, err) Defines data along with labels and formatting information. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: labels The axis labels to associate with the data. real(kind=real64), intent(in), dimension(:) :: x The data set. character(len=*), intent(in), optional :: fmt The format string for the labels (e.g. '(I0)', etc.). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get => pdb_get_data private pure function pdb_get_data(this, index, col) result(x) Gets the requested data point. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The data point index. integer(kind=int32), intent(in) :: col The column index. Return Value real(kind=real64) The value. procedure, public :: get_axes_string => pdb_get_axes_cmd private function pdb_get_axes_cmd(this) result(x) Gets the GNUPLOT command defining which axes to plot against. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_bar_per_label_count => pdb_get_col_count private pure function pdb_get_col_count(this) result(x) Gets the number of data sets (columns). Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value integer(kind=int32) The count. 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 Intent Optional 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 Intent Optional 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 => pdb_get_cmd private function pdb_get_cmd(this) result(x) Gets the GNUPLOT command string for this object. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pdb_get_count private pure function pdb_get_count(this) result(x) Gets the number of stored data points. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value integer(kind=int32) The number of stored data points. procedure, public :: get_data => pdb_get_data_set private pure function pdb_get_data_set(this, col) result(x) Gets the requested data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: col The column index. Return Value real(kind=real64), allocatable, dimension(:) A copy of the data set. procedure, public :: get_data_string => pdb_get_data_cmd private function pdb_get_data_cmd(this) result(x) Gets the GNUPLOT command string defining the data for this object. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_against_y2 => pdb_get_use_y2 private pure function pdb_get_use_y2(this) result(x) Gets a value determining if the data should be plotted against a\nsecondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true to plot against a secondary y-axis; else, false. procedure, public :: get_extreme_values => pdh_get_extremes private pure function pdh_get_extremes(this) result(x) Returns the extreme values in the data set. Arguments Type Intent Optional Attributes Name class( plot_data_histogram ), intent(in) :: this The plot_data_histogram object. Return Value real(kind=real64), dimension(2) A two-element array containing the minimum and maximum values, in \nthat order. procedure, public :: get_is_filled => pdb_get_is_filled private pure function pdb_get_is_filled(this) result(x) Gets a value determining if each bar is filled. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true if the bars are to be filled; else, false. procedure, public :: get_label => pdb_get_label private pure function pdb_get_label(this, index) result(x) Gets the axis label associated with a specific data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The index of the data set. Return Value character(len=:), allocatable The label. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_number_format => pdh_get_num_fmt private pure function pdh_get_num_fmt(this) result(x) Gets the numerical format string used for the labels. Arguments Type Intent Optional Attributes Name class( plot_data_histogram ), intent(in) :: this The plot_data_histogram object. Return Value character(len=:), allocatable The format string. procedure, public :: get_transparency => pdb_get_alpha private pure function pdb_get_alpha(this) result(x) Gets the alpha (transparency) for the bar color. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value real(kind=real32) The alpha value ([0, 1]). procedure, public :: get_use_labels => pdb_get_use_labels private pure function pdb_get_use_labels(this) result(x) Gets a value determining if labels are used to identify the data. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true if labels are used; else, false. procedure, public :: set => pdb_set_data private subroutine pdb_set_data(this, index, col, x) Replaces the requested data point. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The data point index. integer(kind=int32), intent(in) :: col The column index. real(kind=real64), intent(in) :: x The new value. 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\ncalling the define_data subroutine or bin_data subroutine. Arguments Type Intent Optional 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 Intent Optional 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_data_1 => pdh_set_data_1 private subroutine pdh_set_data_1(this, x, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( plot_data_histogram ), intent(inout) :: this The plot_data_histogram object. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_data_2 => pdh_set_data_2 private subroutine pdh_set_data_2(this, labels, x, err) Defines the data set with associated axis labels. Arguments Type Intent Optional Attributes Name class( plot_data_histogram ), intent(inout) :: this The plot_data_histogram object. class(string), intent(in), dimension(:) :: labels The axis labels. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_data_3 => pdh_set_data_3 private subroutine pdh_set_data_3(this, labels, x, fmt, err) Defines the data set with associated axis labels with a specific format. Arguments Type Intent Optional Attributes Name class( plot_data_histogram ), intent(inout) :: this The plot_data_histogram object. real(kind=real64), intent(in), dimension(:) :: labels The axis labels. real(kind=real64), intent(in), dimension(:) :: x The data set. character(len=*), intent(in), optional :: fmt The format string for the labels (e.g. '(I0)', etc.). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_draw_against_y2 => pdb_set_use_y2 private subroutine pdb_set_use_y2(this, x) Sets a value determining if the data should be plotted against a\nsecondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true to plot against a secondary y-axis; else, false. procedure, public :: set_is_filled => pdb_set_is_filled private subroutine pdb_set_is_filled(this, x) Sets a value determining if each bar is filled. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true if the bars are to be filled; else, false. procedure, public :: set_label => pdb_set_label private subroutine pdb_set_label(this, index, txt) Sets the axis label for a specific data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. integer(kind=int32) :: index The index of the data set. character(len=*), intent(in) :: txt The label. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_number_format => pdh_set_num_fmt private subroutine pdh_set_num_fmt(this, x) Sets the numerical format string used for the labels. Arguments Type Intent Optional Attributes Name class( plot_data_histogram ), intent(inout) :: this The plot_data_histogram object. character(len=*), intent(in) :: x The format string (e.g. \"(F6.2)\"). procedure, public :: set_transparency => pdb_set_alpha private subroutine pdb_set_alpha(this, x) Gets the alpha (transparency) for the bar color. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real32), intent(in) :: x The alpha value ([0, 1]). procedure, public :: set_use_labels => pdb_set_use_labels private subroutine pdb_set_use_labels(this, x) Sets a value determining if labels are used to identify the data. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true if labels are used; else, false.","tags":"","loc":"type\\plot_data_histogram.html"},{"title":"plot_data_tri_2d – FPLOT ","text":"type, public, extends( plot_data_colored ) :: plot_data_tri_2d Defines a 2D triangulated data set. Contents Type-Bound Procedures define_data get_color_index get_command_string get_data_string get_line_color get_line_style get_line_width get_name set_color_index set_line_color set_line_style set_line_width set_name Type-Bound Procedures procedure, public :: define_data => pdt2d_define_data private module subroutine pdt2d_define_data(this, tri) Defines the data to plot. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(inout) :: this The plot_data_tri_2d object. class( delaunay_tri_2d ), intent(in) :: tri The triangulation data to plot. 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 Intent Optional 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 => pdt2d_get_cmd private module function pdt2d_get_cmd(this) result(x) Gets the GNUPLOT command string for the object. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(in) :: this The plot_data_tri_2d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => pdt2d_get_data_cmd private module function pdt2d_get_data_cmd(this) result(x) Gets the GNUPLOT command string describing the data to plot. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(in) :: this The plot_data_tri_2d object. Return Value character(len=:), allocatable The command string. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. procedure, public :: get_line_style => pdt2d_get_line_style private pure module function pdt2d_get_line_style(this) result(rst) Gets the line style. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(in) :: this The plot_data_tri_2d object. Return Value integer(kind=int32) The line style. The line style must be one of the following\nconstants. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: get_line_width => pdt2d_get_line_width private pure module function pdt2d_get_line_width(this) result(rst) Gets the width of the lines used to draw the triangulation. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(in) :: this The plot_data_tri_2d object. Return Value real(kind=real32) The line width. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional Attributes Name class( plot_data_colored ), intent(inout) :: this The plot_data_colored object. type( color ), intent(in) :: x The color. procedure, public :: set_line_style => pdt2d_set_line_style private module subroutine pdt2d_set_line_style(this, x) Sets the line style. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(inout) :: this The plot_data_tri_2d object. integer(kind=int32), intent(in) :: x The line style. The line style must be one of the following\nconstants. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: set_line_width => pdt2d_set_line_width private module subroutine pdt2d_set_line_width(this, x) Sets the width of the lines used to draw the triangulation. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(inout) :: this The plot_data_tri_2d object. real(kind=real32), intent(in) :: x The line width. 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\plot_data_tri_2d.html"},{"title":"plot_object – FPLOT ","text":"type, public, abstract :: plot_object The base type for all plot objects. Contents Type-Bound Procedures get_command_string Type-Bound Procedures procedure( get_string_result ), public, deferred :: get_command_string function get_string_result(this) result(x) Prototype Returns a string from a plot_object. Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:), allocatable The result string.","tags":"","loc":"type\\plot_object.html"},{"title":"plot_polar – FPLOT ","text":"type, public, extends( plot ) :: plot_polar Contents Finalization Procedures plr_clean_up Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_autoscale get_axis_equal get_colormap get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count get_legend get_radial_limits get_show_colorbar get_show_gridlines get_terminal get_theta_direction get_theta_start_position get_tics_inward get_title initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_autoscale set_axis_equal set_colormap set_draw_border set_font_name set_font_size set_label set_radial_limits set_show_colorbar set_show_gridlines set_theta_direction set_theta_start_position set_tics_inward set_title Finalization Procedures final :: plr_clean_up private subroutine plr_clean_up(this) Cleans up resources held by the plot_polar object. Arguments Type Intent Optional Attributes Name type( plot_polar ), intent(inout) :: this The plot_polar object. Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_autoscale => plr_get_autoscale private pure function plr_get_autoscale(this) result(rst) Gets a logical value determining if the axis should be \nautomatically scaled to fit the data. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value logical Returns true if the plot will autoscale; else, false. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => plr_get_cmd private function plr_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot_polar object. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_radial_limits => plr_get_limits private pure function plr_get_limits(this) result(rst) Gets the radial axis limits if autoscaling is inactive. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value real(kind=real64), (2) A 2-element array containing the minimum and maximum limit\nvalues in that order. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_theta_direction => plr_get_theta_direction private pure function plr_get_theta_direction(this) result(rst) Gets the direction. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value character(len=:), allocatable The direction. It is one of the following flags. POLAR_THETA_CCW POLAR_THETA_CW procedure, public :: get_theta_start_position => plr_get_theta_start private pure function plr_get_theta_start(this) result(rst) Gets the position for . Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value character(len=:), allocatable The starting position. It is one of the following flags. POLAR_THETA_BOTTOM POLAR_THETA_TOP POLAR_THETA_RIGHT POLAR_THETA_LEFT procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: initialize => plr_init private subroutine plr_init(this, term, fname, err) Initializes the plot_polar object. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_autoscale => plr_set_autoscale private subroutine plr_set_autoscale(this, x) Sets a logical value determining if the axis should be \nautomatically scaled to fit the data. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. logical, intent(in) :: x Set to true if the plot will autoscale; else, false. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_radial_limits => plr_set_limits private subroutine plr_set_limits(this, x) Sets the radial axis limits if autoscaling is inactive. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. real(kind=real64), intent(in) :: x (2) A 2-element array containing the minimum and maximum limit\nvalues in that order. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_theta_direction => plr_set_theta_direction private subroutine plr_set_theta_direction(this, x) Sets the direction. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. character(len=*), intent(in) :: x The direction. It is one of the following flags. POLAR_THETA_CCW POLAR_THETA_CW procedure, public :: set_theta_start_position => plr_set_theta_start private subroutine plr_set_theta_start(this, x) Sets the position for . Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. character(len=*), intent(in) :: x The starting position. It is one of the following flags. POLAR_THETA_BOTTOM POLAR_THETA_TOP POLAR_THETA_RIGHT POLAR_THETA_LEFT procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title.","tags":"","loc":"type\\plot_polar.html"},{"title":"png_terminal – FPLOT ","text":"type, public, extends( terminal ) :: png_terminal Defines a terminal used for producing PNG outputs. Contents Type-Bound Procedures get_command_string get_filename get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_filename set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => png_get_command_string private function png_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( png_terminal ), intent(in) :: this The png_terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_filename => png_get_filename private function png_get_filename(this) result(txt) Gets the filename for the output PNG file. Arguments Type Intent Optional Attributes Name class( png_terminal ), intent(in) :: this The png_terminal object. Return Value character(len=:), allocatable The filename, including the file extension (.png). procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => png_get_term_string private function png_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( png_terminal ), intent(in) :: this The png_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_filename => png_set_filename private subroutine png_set_filename(this, txt) Sets the filename for the output PNG file. Arguments Type Intent Optional Attributes Name class( png_terminal ), intent(inout) :: this The png_terminal object. character(len=*), intent(in) :: txt The filename, including the file extension (.png). procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\png_terminal.html"},{"title":"qt_terminal – FPLOT ","text":"type, public, extends( terminal ) :: qt_terminal Defines a terminal that utilizes QT. Contents Type-Bound Procedures get_command_string get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => term_get_command_string private function term_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => qt_get_term_string private function qt_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( qt_terminal ), intent(in) :: this The qt_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\qt_terminal.html"},{"title":"surface_plot – FPLOT ","text":"type, public, extends( plot_3d ) :: surface_plot Contents Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_allow_smoothing get_arrow get_arrow_count get_axis_equal get_azimuth get_colormap get_command_string get_coordinate_system get_count get_draw_border get_elevation get_font_name get_font_size get_label get_label_count get_legend get_light_intensity get_show_colorbar get_show_contours get_show_gridlines get_show_hidden get_specular_intensity get_terminal get_tics_inward get_title get_transparency get_use_lighting get_use_map_view get_x_axis get_y_axis get_z_axis get_z_intersect_xy initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_allow_smoothing set_arrow set_axis_equal set_azimuth set_colormap set_coordinate_system set_draw_border set_elevation set_font_name set_font_size set_label set_light_intensity set_show_colorbar set_show_contours set_show_gridlines set_show_hidden set_specular_intensity set_tics_inward set_title set_transparency set_use_lighting set_use_map_view set_z_intersect_xy Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_allow_smoothing => surf_get_smooth private pure function surf_get_smooth(this) result(x) Gets a value determining if the plotted surfaces should be\nsmoothed. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value logical Returns true if the surface should be smoothed; else, false. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_azimuth => p3d_get_azimuth private pure function p3d_get_azimuth(this) result(x) Gets the plot azimuth angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value real(kind=real64) The azimuth angle, in degrees. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => surf_get_cmd private function surf_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot_3d\nobject. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value character(len=:), allocatable The command string. procedure, public :: get_coordinate_system => p3d_get_csys private pure function p3d_get_csys(this) result(rst) Gets a value determining the coordinate system. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value integer(kind=int32) The coordinate system ID, which must be one of the following. COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_elevation => p3d_get_elevation private pure function p3d_get_elevation(this) result(x) Gets the plot elevation angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value real(kind=real64) The elevation angle, in degrees. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_light_intensity => surf_get_light_intensity private pure function surf_get_light_intensity(this) result(x) Gets the ratio of the strength of the light source relative\nto the ambient light. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value real(kind=real32) The light intensity ratio. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_contours => surf_get_show_contours private pure function surf_get_show_contours(this) result(x) Gets a value determining if a contour plot should be drawn in\nconjunction with the surface plot. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value logical Returns true if the contour plot should be drawn; else, false to\nonly draw the surface. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_show_hidden => surf_get_show_hidden private pure function surf_get_show_hidden(this) result(x) Gets a value indicating if hidden lines should be shown. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value logical Returns true if hidden lines should be shown; else, false. procedure, public :: get_specular_intensity => surf_get_specular_intensity private pure function surf_get_specular_intensity(this) result(x) Gets the ratio of the strength of the specular light source\nrelative to the ambient light. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value real(kind=real32) The specular light intensity ratio. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_transparency => surf_get_transparency private pure function surf_get_transparency(this) result(x) Gets a factor defining the transparency of plotted surfaces. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value real(kind=real32) A value existing on the set (0 1] defining the level of\ntransparency. A value of 1 indicates a fully opaque surface. procedure, public :: get_use_lighting => surf_get_use_lighting private pure function surf_get_use_lighting(this) result(x) Gets a value indicating if lighting, beyond the ambient\nlight source, is to be used. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value logical True if lighting should be used; else, false. procedure, public :: get_use_map_view => p3d_get_use_map_view private pure function p3d_get_use_map_view(this) result(rst) Gets a value determining if the view should be set to a 2D\nmap view. If true, the azimuth and elevation terms are ignored. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value logical Returns true if the map view will be used; else, false. procedure, public :: get_x_axis => p3d_get_x_axis private function p3d_get_x_axis(this) result(ptr) Gets the x-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the x-axis object. procedure, public :: get_y_axis => p3d_get_y_axis private function p3d_get_y_axis(this) result(ptr) Gets the y-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the y-axis object. procedure, public :: get_z_axis => p3d_get_z_axis private function p3d_get_z_axis(this) result(ptr) Gets the z-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the z-axis object. procedure, public :: get_z_intersect_xy => p3d_get_z_axis_intersect private pure function p3d_get_z_axis_intersect(this) result(x) Gets a value determining if the z-axis should intersect the\nx-y plane. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value logical Returns true if the z-axis should intersect the x-y plane; else,\nfalse to allow the z-axis to float. procedure, public :: initialize => surf_init private subroutine surf_init(this, term, fname, err) Initializes the surface_plot object. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_allow_smoothing => surf_set_smooth private subroutine surf_set_smooth(this, x) Sets a value determining if the plotted surfaces should be\nsmoothed. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. logical, intent(in) :: x Set to true if the surface should be smoothed; else, false. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_azimuth => p3d_set_azimuth private subroutine p3d_set_azimuth(this, x) Sets the plot azimuth angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. real(kind=real64), intent(in) :: x The azimuth angle, in degrees. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_coordinate_system => p3d_set_csys private subroutine p3d_set_csys(this, x) Sets a value determining the coordinate system. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. integer(kind=int32), intent(in) :: x The coordinate system ID, which must be one of the following. COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_elevation => p3d_set_elevation private subroutine p3d_set_elevation(this, x) Sets the plot elevation angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. real(kind=real64), intent(in) :: x The elevation angle, in degrees. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_light_intensity => surf_set_light_intensity private subroutine surf_set_light_intensity(this, x) Sets the ratio of the strength of the light source relative\nto the ambient light. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. real(kind=real32), intent(in) :: x The light intensity ratio. The value must exist in the\nset [0, 1]; else, it will be clipped to lie within the range. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_contours => surf_set_show_contours private subroutine surf_set_show_contours(this, x) Sets a value determining if a contour plot should be drawn in\nconjunction with the surface plot. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. logical, intent(in) :: x Set to true if the contour plot should be drawn; else, false to\nonly draw the surface. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_show_hidden => surf_set_show_hidden private subroutine surf_set_show_hidden(this, x) Sets a value indicating if hidden lines should be shown. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. logical, intent(in) :: x Set to true if hidden lines should be shown; else, false. procedure, public :: set_specular_intensity => surf_set_specular_intensity private subroutine surf_set_specular_intensity(this, x) Sets the ratio of the strength of the specular light source\nrelative to the ambient light. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. real(kind=real32), intent(in) :: x The specular light intensity ratio. The value must exist in the \nset [0, 1]; else, it will be clipped to lie within the range. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_transparency => surf_set_transparency private subroutine surf_set_transparency(this, x) Sets a factor defining the transparency of plotted surfaces. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. real(kind=real32), intent(in) :: x A value existing on the set (0 1] defining the level of\ntransparency. A value of 1 indicates a fully opaque surface. Any values supplied outside of the set are clipped to fit within\n(0 1]. procedure, public :: set_use_lighting => surf_set_use_lighting private subroutine surf_set_use_lighting(this, x) Sets a value indicating if lighting, beyond the ambient\nlight source, is to be used. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. logical, intent(in) :: x True if lighting should be used; else, false. procedure, public :: set_use_map_view => p3d_set_use_map_view private subroutine p3d_set_use_map_view(this, x) Sets a value determining if the view should be set to a 2D\nmap view. If true, the azimuth and elevation terms are ignored. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. logical, intent(in) :: x Seturns true if the map view will be used; else, false. procedure, public :: set_z_intersect_xy => p3d_set_z_axis_intersect private subroutine p3d_set_z_axis_intersect(this, x) Sets a value determining if the z-axis should intersect the\nx-y plane. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. logical, intent(in) :: x Set to true if the z-axis should intersect the x-y plane; else,\nfalse to allow the z-axis to float.","tags":"","loc":"type\\surface_plot.html"},{"title":"surface_plot_data – FPLOT ","text":"type, public, extends( plot_data ) :: surface_plot_data Provides a three-dimensional surface plot data set. Contents Type-Bound Procedures define_data get_command_string get_data_string get_name get_size get_use_wireframe get_x get_y get_z set_name set_use_wireframe set_x set_y set_z Type-Bound Procedures procedure, public :: define_data => surfd_set_data_1 private subroutine surfd_set_data_1(this, x, y, z, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. real(kind=real64), intent(in), dimension(:,:) :: x An M-by-N matrix containing the x-coordinate data. real(kind=real64), intent(in), dimension(:,:) :: y An M-by-N matrix containing the y-coordinate data. real(kind=real64), intent(in), dimension(:,:) :: z An M-by-N matrix containing the z-coordinate data. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get_command_string => surfd_get_cmd private function surfd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this surface_plot_data \nobject. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => surfd_get_data_cmd private function surfd_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data to plot. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. Return Value character(len=:), allocatable The GNUPLOT command string. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_size => surfd_get_size private pure function surfd_get_size(this, dim) result(x) Gets the size of the stored data set. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: dim The dimension of interest. Notice, data is stored as a\n2D matrix (i.e. only 1 and 2 are valid inputs). Return Value integer(kind=int32) The size of the requested dimension. procedure, public :: get_use_wireframe => surfd_get_wireframe private pure function surfd_get_wireframe(this) result(x) Gets a value determining if a wireframe mesh should be displayed. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. Return Value logical Returns true if a wireframe mesh should be displayed; else, \nfalse to display a solid surface. procedure, public :: get_x => surfd_get_x private pure function surfd_get_x(this, i, j) result(x) Gets the requested X data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. Return Value real(kind=real64) The value. procedure, public :: get_y => surfd_get_y private pure function surfd_get_y(this, i, j) result(x) Gets the requested Y data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. Return Value real(kind=real64) The value. procedure, public :: get_z => surfd_get_z private pure function surfd_get_z(this, i, j) result(x) Gets the requested Z data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. Return Value real(kind=real64) The value. 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_use_wireframe => surfd_set_wireframe private subroutine surfd_set_wireframe(this, x) Sets a value determining if a wireframe mesh should be displayed. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. logical, intent(in) :: x Set to true if a wireframe mesh should be displayed; else,\nfalse to display a solid surface. procedure, public :: set_x => surfd_set_x private subroutine surfd_set_x(this, i, j, x) Sets the requested X data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. real(kind=real64), intent(in) :: x The value. procedure, public :: set_y => surfd_set_y private subroutine surfd_set_y(this, i, j, x) Sets the requested Y data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. real(kind=real64), intent(in) :: x The value. procedure, public :: set_z => surfd_set_z private subroutine surfd_set_z(this, i, j, x) Sets the requested Z data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. real(kind=real64), intent(in) :: x The value.","tags":"","loc":"type\\surface_plot_data.html"},{"title":"terminal – FPLOT ","text":"type, public, abstract, extends( plot_object ) :: terminal A GNUPLOT terminal object. Contents Type-Bound Procedures get_command_string get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => term_get_command_string private function term_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure( term_get_string_result ), public, deferred :: get_id_string function term_get_string_result(this) result(x) Prototype Retrieves a string from a terminal. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\terminal.html"},{"title":"delaunay_tri_2d – FPLOT ","text":"type, public :: delaunay_tri_2d Provides a container for a 2D Delaunay triangulation. Contents Type-Bound Procedures create find_triangle get_indices get_point_count get_points_x get_points_y get_triangle_count Type-Bound Procedures procedure, public :: create => d2d_init private subroutine d2d_init(this, x, y, err) Creates an unconstrained 2D Delaunay triangulation given a \nset of x-y points. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(inout) :: this The delaunay_tri_2d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of each\ndata point. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of each\ndata point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: find_triangle => d2d_get_tri_with_pt private pure function d2d_get_tri_with_pt(this, x, y) result(rst) Finds the triangle that contains the specified point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. real(kind=real64), intent(in) :: x The x-coordinate of the point. real(kind=real64), intent(in) :: y The y-coordinate of the point. Return Value integer(kind=int32) Returns the index of the triangle containing the specified\npoint. If no triangle contains the specified point, a value of\n-1 is returned. procedure, public :: get_indices => d2d_get_tris private pure function d2d_get_tris(this) result(rst) Gets a list of the indices of each triangle vertex. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32), allocatable, dimension(:,:) An N-by-3 matrix with each column containing the index of the\nvertex of each triangle where N is the number of triangles. procedure, public :: get_point_count => d2d_get_pt_count private pure function d2d_get_pt_count(this) result(rst) Gets the number of points in the triangulation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32) The number of points in the triangulation. procedure, public :: get_points_x => d2d_get_x_pts private pure function d2d_get_x_pts(this) result(rst) Gets the x-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value real(kind=real64), allocatable, dimension(:) An array of the x-coordinates of each point. procedure, public :: get_points_y => d2d_get_y_pts private pure function d2d_get_y_pts(this) result(rst) Gets the y-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value real(kind=real64), allocatable, dimension(:) An array of the y-coordinates of each point. procedure, public :: get_triangle_count => d2d_get_tri_count private pure function d2d_get_tri_count(this) result(rst) Gets the number of triangles in the triangulation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32) The number of triangles in the triangulation.","tags":"","loc":"type\\delaunay_tri_2d.html"},{"title":"tri_surface_plot_data – FPLOT ","text":"type, public, extends( plot_data ) :: tri_surface_plot_data Provides a three-dimensional surface plot data set constructed of\ntriangulated points. Contents Type-Bound Procedures define_data get_command_string get_data_string get_name get_use_wireframe set_name set_use_wireframe Type-Bound Procedures procedure, public :: define_data => tspd_define_data private subroutine tspd_define_data(this, tri) Defines the data to plot. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(inout) :: this The tri_surface_plot_data object. class( delaunay_tri_surface ), intent(in) :: tri The triangulation to plot. procedure, public :: get_command_string => tspd_get_cmd private function tspd_get_cmd(this) result(x) Gets the GNUPLOT command string for the object. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(in) :: this The tri_surface_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => tspd_get_data_cmd private function tspd_get_data_cmd(this) result(x) Gets the GNUPLOT command string for representing the data. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(in) :: this The tri_surface_plot_data object. Return Value character(len=:), allocatable The command string. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_use_wireframe => tspd_get_wireframe private pure function tspd_get_wireframe(this) result(rst) Gets a value determining if a wireframe mesh should be displayed. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(in) :: this The tri_surface_plot_data object. Return Value logical Returns true if the plot is to be drawn as a wireframe; else,\nfalse to draw as a surface. 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_use_wireframe => tspd_set_wireframe private subroutine tspd_set_wireframe(this, x) Sets a value determining if a wireframe mesh should be displayed. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(inout) :: this The tri_surface_plot_data object. logical, intent(in) :: x Set to true if the plot is to be drawn as a wireframe; else,\nfalse to draw as a surface.","tags":"","loc":"type\\tri_surface_plot_data.html"},{"title":"vector_field_plot_data – FPLOT ","text":"type, public, extends( plot_data_colored ) :: vector_field_plot_data Defines a two-dimensional vector-field plot data set. Contents Type-Bound Procedures define_data get_arrow_size get_color_index get_command_string get_data_string get_fill_arrow get_line_color get_name get_use_data_dependent_colors set_arrow_size set_color_index set_fill_arrow set_line_color set_name Type-Bound Procedures procedure, public :: define_data => vfpd_define_data private subroutine vfpd_define_data(this, x, y, dx, dy, c, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(inout) :: this The vector_field_plot_data object. real(kind=real64), intent(in), dimension(:,:) :: x An M-by-N matrix containing the x-locations of each arrow's \norigin. real(kind=real64), intent(in), dimension(:,:) :: y An M-by-N matrix containing the y-locations of each arrow's \norigin. real(kind=real64), intent(in), dimension(:,:) :: dx An M-by-N matrix containing the x-direction of each arrow. real(kind=real64), intent(in), dimension(:,:) :: dy An M-by-N matrix containing the y-direction of each arrow. real(kind=real64), intent(in), optional, dimension(:,:) :: c An optional M-by-N matrix containing information on how to color \nthe arrows. The colors are determined by the active colormap. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get_arrow_size => vfpd_get_arrow_size private pure function vfpd_get_arrow_size(this) result(rst) Gets the scaling factor used to determine the arrow size. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value real(kind=real64) The scaling factor. 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 Intent Optional 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 => vfpd_get_cmd private function vfpd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nvector_field_plot_data object. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => vfpd_get_data_cmd private function vfpd_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data to plot. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_fill_arrow => vfpd_get_fill_arrow private pure function vfpd_get_fill_arrow(this) result(rst) Gets a value determining if the arrow heads should be filled. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value logical True if the arrow heads should be filled; else, false. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_use_data_dependent_colors => vfpd_get_use_data_dependent_colors private pure function vfpd_get_use_data_dependent_colors(this) result(rst) Gets a value indicating if data-dependent coloring should be\nused. This is defined by supplying information on how to scale the\ncoloring when calling define_data. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value logical Returns true if data-dependent coloring is being used; else,\nfalse. procedure, public :: set_arrow_size => vfpd_set_arrow_size private subroutine vfpd_set_arrow_size(this, x) Sets the scaling factor used to determine the arrow size. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(inout) :: this The vector_field_plot_data object. real(kind=real64), intent(in) :: x The scaling factor. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_fill_arrow => vfpd_set_fill_arrow private subroutine vfpd_set_fill_arrow(this, x) Sets a value determining if the arrow heads should be filled. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(inout) :: this The vector_field_plot_data object. logical, intent(in) :: x True if the arrow heads should be filled; else, false. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\vector_field_plot_data.html"},{"title":"windows_terminal – FPLOT ","text":"type, public, extends( terminal ) :: windows_terminal A Windows-specific terminal. Contents Type-Bound Procedures get_command_string get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => term_get_command_string private function term_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => wt_get_term_string private function wt_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( windows_terminal ), intent(in) :: this The windows_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\windows_terminal.html"},{"title":"wxt_terminal – FPLOT ","text":"type, public, extends( terminal ) :: wxt_terminal A WXT terminal. Contents Type-Bound Procedures get_command_string get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => term_get_command_string private function term_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => wxt_get_term_string private function wxt_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( wxt_terminal ), intent(in) :: this The wxt_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\wxt_terminal.html"},{"title":"cm_get_string_result – FPLOT","text":"interface public function cm_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:),allocatable The string. Description Retrieves a string result from a colormap object.","tags":"","loc":"interface\\cm_get_string_result.html"},{"title":"operator(/=) – FPLOT","text":"public interface operator(/=) Contents Module Procedures clr_not_equals Module Procedures private pure function clr_not_equals(x, y) result(rst) Arguments Type Intent Optional Attributes Name type( color ), intent(in) :: x type( color ), intent(in) :: y Return Value logical","tags":"","loc":"interface\\operator(SLASH=).html"},{"title":"operator(==) – FPLOT","text":"public interface operator(==) Contents Module Procedures clr_equals Module Procedures private pure function clr_equals(x, y) result(rst) Arguments Type Intent Optional Attributes Name type( color ), intent(in) :: x type( color ), intent(in) :: y Return Value logical","tags":"","loc":"interface\\operator(==).html"},{"title":"linspace – FPLOT","text":"public pure function linspace(start, finish, npts) result(x) Constructs a linearly spaced array. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in) :: start The first value in the array. real(kind=real64), intent(in) :: finish The last value in the array. integer(kind=int32), intent(in) :: npts The number of values in the array. Return Value real(kind=real64), allocatable, dimension(:) The resulting array. Contents","tags":"","loc":"proc\\linspace.html"},{"title":"logspace – FPLOT","text":"public pure function logspace(start, finish, npts) result(x) Construcst a logarithmically spaced array. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in) :: start The exponent of the first value in the array. real(kind=real64), intent(in) :: finish The exponent of the final value in the array. integer(kind=int32), intent(in) :: npts The number of values in the array. Return Value real(kind=real64), allocatable, dimension(:) The resulting array. Contents","tags":"","loc":"proc\\logspace.html"},{"title":"meshgrid – FPLOT","text":"public pure function meshgrid(x, y) result(xy) Constructs two matrices (X and Y) from x and y data arrays. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An M-element array of x data points. real(kind=real64), intent(in), dimension(:) :: y An N-element array of y data points. Return Value real(kind=real64), allocatable, dimension(:,:,:) An N-by-M-by-2 array containing the x data matrix on the first \npage of the array, and the y data matrix on the second page. Contents","tags":"","loc":"proc\\meshgrid.html"},{"title":"report_array_size_mismatch_error – FPLOT","text":"public subroutine report_array_size_mismatch_error(err, fcn, name, expected, actual) Reports an array size mismatch error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: name The variable name. integer(kind=int32), intent(in) :: expected The expected array size. integer(kind=int32), intent(in) :: actual The actual array size. Contents Variables msg Variables Type Visibility Attributes Name Initial character(len=256), public :: msg","tags":"","loc":"proc\\report_array_size_mismatch_error.html"},{"title":"report_file_create_error – FPLOT","text":"public subroutine report_file_create_error(err, fcn, fname, flag) Reports an I/O error related to file creating. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: fname The filename. integer(kind=int32), intent(in) :: flag The error flag returned by the system. Contents Variables msg Variables Type Visibility Attributes Name Initial character(len=2048), public :: msg","tags":"","loc":"proc\\report_file_create_error.html"},{"title":"report_matrix_size_mismatch_error – FPLOT","text":"public subroutine report_matrix_size_mismatch_error(err, fcn, name, mexp, nexp, mact, nact) Reports a matrix size mismatch error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: name The variable name. integer(kind=int32), intent(in) :: mexp The expected number of rows. integer(kind=int32), intent(in) :: nexp The expected number of columns. integer(kind=int32), intent(in) :: mact The actual number of rows. integer(kind=int32), intent(in) :: nact The actual number of columns. Contents Variables msg Variables Type Visibility Attributes Name Initial character(len=256), public :: msg","tags":"","loc":"proc\\report_matrix_size_mismatch_error.html"},{"title":"report_memory_error – FPLOT","text":"public subroutine report_memory_error(err, fcn, flag) Reports a memory allocation error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. integer(kind=int32), intent(in) :: flag The error flag returned by the system. Contents Variables msg Variables Type Visibility Attributes Name Initial character(len=256), public :: msg","tags":"","loc":"proc\\report_memory_error.html"},{"title":"pa_get_string_result – FPLOT","text":"interface public function pa_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:),allocatable The string. Description Retrieves a string from a plot_axis.","tags":"","loc":"interface\\pa_get_string_result.html"},{"title":"pd_get_string_result – FPLOT","text":"interface public function pd_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:),allocatable The string. Description Retrieves a string from a plot_data object.","tags":"","loc":"interface\\pd_get_string_result.html"},{"title":"spd_get_int_value – FPLOT","text":"interface public pure function spd_get_int_value(this) result(x) Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The value. Description Gets an integer value from the scatter_plot_data object.","tags":"","loc":"interface\\spd_get_int_value.html"},{"title":"spd_get_string_result – FPLOT","text":"interface public function spd_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:),allocatable The string. Description Gets a string value from the scatter_plot_data object.","tags":"","loc":"interface\\spd_get_string_result.html"},{"title":"spd_get_value – FPLOT","text":"interface public pure function spd_get_value(this, index) result(x) Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. Return Value real(kind=real64) The value. Description Gets an indexed value from the scatter_plot_data object.","tags":"","loc":"interface\\spd_get_value.html"},{"title":"spd_set_value – FPLOT","text":"interface public subroutine spd_set_value(this, index, x) Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. real(kind=real64), intent(in) :: x The value. Description Sets an indexed value from the scatter_plot_data object.","tags":"","loc":"interface\\spd_set_value.html"},{"title":"get_string_result – FPLOT","text":"interface public function get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:),allocatable The result string. Description Returns a string from a plot_object.","tags":"","loc":"interface\\get_string_result.html"},{"title":"simplify_polyline – FPLOT","text":"public interface simplify_polyline Contents Module Procedures simplify_polyline_2d1 simplify_polyline_3d1 simplify_polyline_mtx Module Procedures private function simplify_polyline_2d1(x, y, tol, err) result(ln) Simplifies a 2D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, and the second \ncolumn contains the y-coordinates. private function simplify_polyline_3d1(x, y, z, tol, err) result(ln) Simplifies a 3D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: z An N-element array containing the z-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, the second \ncolumn contains the y-coordinates, and the third column contains \nthe z-coordinates. private function simplify_polyline_mtx(xy, tol, err) result(ln) Simplifies a 2D or 3D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:,:) :: xy An N-by-2 or N-by-3 matrix containing the polyline vertex data. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, the second \ncolumn contains the y-coordinates, and if necessary, the third \ncolumn contains the z-coordinates.","tags":"","loc":"interface\\simplify_polyline.html"},{"title":"term_get_string_result – FPLOT","text":"interface public function term_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:),allocatable The string. Description Retrieves a string from a terminal.","tags":"","loc":"interface\\term_get_string_result.html"},{"title":"fplot_arrow – FPLOT","text":"Uses fplot_constants fplot_plot_object strings fplot_colors iso_fortran_env Contents Derived Types plot_arrow Derived Types type, public, extends( plot_object ) :: plot_arrow Defines an arrow that can be drawn on a plot. Type-Bound Procedures procedure\n , public\n :: get_color =>\n par_get_color Function procedure\n , public\n :: get_command_string =>\n par_get_cmd Function procedure\n , public\n :: get_head_angle =>\n par_get_head_angle Function procedure\n , public\n :: get_head_back_angle =>\n par_get_head_back_angle Function procedure\n , public\n :: get_head_fill =>\n par_get_fill Function procedure\n , public\n :: get_head_location =>\n par_get_head Function procedure\n , public\n :: get_head_size =>\n par_get_head_size Function procedure\n , public\n :: get_head_type =>\n par_get_head_type Function procedure\n , public\n :: get_is_visible =>\n par_get_is_visible Function procedure\n , public\n :: get_line_style =>\n par_get_line_style Function procedure\n , public\n :: get_line_width =>\n par_get_line_width Function procedure\n , public\n :: get_move_to_front =>\n par_get_move_to_front Function procedure\n , public\n :: get_tail_location =>\n par_get_tail Function procedure\n , public\n :: get_use_default_size =>\n par_get_use_default_size Function procedure\n , public\n :: set_color =>\n par_set_color Subroutine procedure\n , public\n :: set_head_angle =>\n par_set_head_angle Subroutine procedure\n , public\n :: set_head_back_angle =>\n par_set_head_back_angle Subroutine procedure\n , public\n :: set_head_fill =>\n par_set_fill Subroutine generic,\n public\n :: set_head_location =>\n par_set_head_1, par_set_head_2, par_set_head_3 procedure\n , public\n :: set_head_size =>\n par_set_head_size Subroutine procedure\n , public\n :: set_head_type =>\n par_set_head_type Subroutine procedure\n , public\n :: set_is_visible =>\n par_set_is_visible Subroutine procedure\n , public\n :: set_line_style =>\n par_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n par_set_line_width Subroutine procedure\n , public\n :: set_move_to_front =>\n par_set_move_to_front Subroutine generic,\n public\n :: set_tail_location =>\n par_set_tail_1, par_set_tail_2, par_set_tail_3 procedure\n , public\n :: set_use_default_size =>\n par_set_use_default_size Subroutine","tags":"","loc":"module\\fplot_arrow.html"},{"title":"fplot_colormap – FPLOT","text":"Uses ferror fplot_plot_object forcolormap fplot_errors strings fplot_colors iso_fortran_env Contents Interfaces cm_get_string_result Derived Types colormap cool_colormap custom_colormap earth_colormap grey_colormap hot_colormap parula_colormap rainbow_colormap Interfaces interface public function cm_get_string_result(this) result(x) Retrieves a string result from a colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The string. Derived Types type, public, extends( plot_object ) :: colormap A colormap object for a surface plot. Type-Bound Procedures procedure\n(cm_get_string_result) , public\n :: get_color_string procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: cool_colormap Defines a colormap consisting of \"cool\" colors. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n ccm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: custom_colormap Defines a custom colormap that utilizes the FORCOLORMAP library\nto provide the map. Finalizations Procedures final :: custom_final Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n custom_get_clr Function procedure\n , public\n :: get_colormap =>\n custom_get Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_colormap =>\n custom_set Subroutine procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: earth_colormap Defines an earthy-colored colormap. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n ecm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: grey_colormap Defines a grey-scaled colormap. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n gcm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: hot_colormap Defines a colormap consisting of \"hot\" colors. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n hcm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: parula_colormap Defines a colormap equivalent to the MATLAB parula colormap. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n pcm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: rainbow_colormap Defines a rainbow colormap. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n rcm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine","tags":"","loc":"module\\fplot_colormap.html"},{"title":"fplot_colors – FPLOT","text":"Uses iso_fortran_env Contents Variables CLR_BLACK CLR_BLUE CLR_CYAN CLR_GRAY CLR_GREEN CLR_LIME CLR_MAGENTA CLR_MAROON CLR_NAVY CLR_OLIVE CLR_ORANGE CLR_PURPLE CLR_RED CLR_SILVER CLR_TEAL CLR_WHITE CLR_YELLOW color_list Interfaces operator(/=) operator(==) Derived Types color Variables Type Visibility Attributes Name Initial type( color ), public, parameter :: CLR_BLACK = color(0, 0, 0) Black. type( color ), public, parameter :: CLR_BLUE = color(0, 0, 255) Blue. type( color ), public, parameter :: CLR_CYAN = color(0, 255, 255) Cyan. type( color ), public, parameter :: CLR_GRAY = color(128, 128, 128) Gray. type( color ), public, parameter :: CLR_GREEN = color(0, 128, 0) Green. type( color ), public, parameter :: CLR_LIME = color(0, 255, 0) Lime. type( color ), public, parameter :: CLR_MAGENTA = color(255, 0, 255) Magenta. type( color ), public, parameter :: CLR_MAROON = color(128, 0, 0) Maroon. type( color ), public, parameter :: CLR_NAVY = color(0, 0, 128) Navy. type( color ), public, parameter :: CLR_OLIVE = color(128, 128, 0) Olive. type( color ), public, parameter :: CLR_ORANGE = color(255, 165, 0) Orange. type( color ), public, parameter :: CLR_PURPLE = color(128, 0, 128) Purple. type( color ), public, parameter :: CLR_RED = color(255, 0, 0) Red. type( color ), public, parameter :: CLR_SILVER = color(192, 192, 192) Silver. type( color ), public, parameter :: CLR_TEAL = color(0, 128, 128) Teal. type( color ), public, parameter :: CLR_WHITE = color(255, 255, 255) White. type( color ), public, parameter :: CLR_YELLOW = color(255, 255, 0) Yellow. type( color ), public, parameter, dimension(7) :: color_list = [color(0, int(0.447*255), int(0.741*255)), color(int(0.85*255), int(0.325*255), int(0.098*255)), color(int(0.929*255), int(0.694*255), int(0.125*255)), color(int(0.494*255), int(0.184*255), int(0.556*255)), color(int(0.466*255), int(0.674*255), int(0.188*255)), color(int(0.301*255), int(0.745*255), int(0.933*255)), color(int(0.635*255), int(0.078*255), int(0.184*255))] Interfaces public interface operator(/=) private pure function clr_not_equals(x, y) result(rst) Arguments Type Intent Optional Attributes Name type( color ), intent(in) :: x type( color ), intent(in) :: y Return Value logical public interface operator(==) private pure function clr_equals(x, y) result(rst) Arguments Type Intent Optional Attributes Name type( color ), intent(in) :: x type( color ), intent(in) :: y Return Value logical Derived Types type, public :: color Describes an RGB color. Components Type Visibility Attributes Name Initial integer(kind=int32), public :: blue = 255 The blue component of the color (must be between 0 and 255). integer(kind=int32), public :: green = 0 The green component of the color (must be between 0 and 255). integer(kind=int32), public :: red = 0 The red component of the color (must be between 0 and 255). Type-Bound Procedures procedure\n , public\n, pass :: copy_from =>\n clr_copy_from Subroutine procedure\n , public\n, pass :: to_hex_string =>\n clr_to_hex_string Function","tags":"","loc":"module\\fplot_colors.html"},{"title":"fplot_constants – FPLOT","text":"Uses iso_fortran_env Contents Variables ARROW_BACKHEAD ARROW_EMPTY ARROW_FILLED ARROW_HEAD ARROW_HEADS ARROW_NO_BORDER ARROW_NO_FILL ARROW_NO_HEAD COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL GNUPLOT_DEFAULT_FONTNAME GNUPLOT_DEFAULT_FONT_SIZE GNUPLOT_DEFAULT_WINDOW_HEIGHT GNUPLOT_DEFAULT_WINDOW_WIDTH GNUPLOT_MAX_LABEL_LENGTH GNUPLOT_MAX_PATH_LENGTH GNUPLOT_TERMINAL_LATEX GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT LEGEND_ARRANGE_HORIZONTALLY LEGEND_ARRANGE_VERTICALLY LEGEND_BOTTOM LEGEND_CENTER LEGEND_LEFT LEGEND_RIGHT LEGEND_TOP LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X PLOTDATA_MAX_NAME_LENGTH POLAR_THETA_BOTTOM POLAR_THETA_CCW POLAR_THETA_CW POLAR_THETA_LEFT POLAR_THETA_RIGHT POLAR_THETA_TOP Variables Type Visibility Attributes Name Initial integer(kind=int32), public, parameter :: ARROW_BACKHEAD = 2 Defines an arrow with it's head at it's back end (tail). integer(kind=int32), public, parameter :: ARROW_EMPTY = 101 Defines an empty arrow head. integer(kind=int32), public, parameter :: ARROW_FILLED = 100 Defines a filled arrow head. integer(kind=int32), public, parameter :: ARROW_HEAD = 1 Defines an arrow with a traditional head. integer(kind=int32), public, parameter :: ARROW_HEADS = 3 Defines an arrow with a head on both ends. integer(kind=int32), public, parameter :: ARROW_NO_BORDER = 103 Defines an arrow head with no border. integer(kind=int32), public, parameter :: ARROW_NO_FILL = 102 Defines an arrow head without fill. integer(kind=int32), public, parameter :: ARROW_NO_HEAD = 0 Defines an arrow with no head. integer(kind=int32), public, parameter :: COORDINATES_CARTESIAN = 100 Defines a Cartesian coordinate system. integer(kind=int32), public, parameter :: COORDINATES_CYLINDRICAL = 102 Defines a cylindrical coordinate system. integer(kind=int32), public, parameter :: COORDINATES_SPHERICAL = 101 Defines a spherical coordinate system. character(len=*), public, parameter :: GNUPLOT_DEFAULT_FONTNAME = \"Calibri\" Defines the default font used by text on the graph. integer(kind=int32), public, parameter :: GNUPLOT_DEFAULT_FONT_SIZE = 14 Defines the default font size used by text on the graph. integer(kind=int32), public, parameter :: GNUPLOT_DEFAULT_WINDOW_HEIGHT = 420 The default GNUPLOT window height, in pixels. integer(kind=int32), public, parameter :: GNUPLOT_DEFAULT_WINDOW_WIDTH = 640 The default GNUPLOT window width, in pixels. integer(kind=int32), public, parameter :: GNUPLOT_MAX_LABEL_LENGTH = 128 Defines the maximum number of characters allowed in a graph label. integer(kind=int32), public, parameter :: GNUPLOT_MAX_PATH_LENGTH = 256 Defines the maximum number of characters allowed in a file path. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_LATEX = 5 Defines a LATEX terminal. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_PNG = 4 Defines a PNG terminal. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_QT = 3 Defines a QT terminal. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_WIN32 = 1 Defines a Win32 terminal. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_WXT = 2 Defines a WXT terminal. character(len=*), public, parameter :: LEGEND_ARRANGE_HORIZONTALLY = \"horizontal\" Defines the legend should be arranged such that the row count\nis minimized. character(len=*), public, parameter :: LEGEND_ARRANGE_VERTICALLY = \"vertical\" Defines the legend should be arranged such that the column count\nis minimized. character(len=*), public, parameter :: LEGEND_BOTTOM = \"bottom\" Defines the legend should be placed at the bottom of the plot. character(len=*), public, parameter :: LEGEND_CENTER = \"center\" Defines the legend should be centered on the plot. character(len=*), public, parameter :: LEGEND_LEFT = \"left\" Defines the legend should be placed at the left of the plot. character(len=*), public, parameter :: LEGEND_RIGHT = \"right\" Defines the legend should be placed at the right of the plot. character(len=*), public, parameter :: LEGEND_TOP = \"top\" Defines the legend should be placed at the top of the plot. integer(kind=int32), public, parameter :: LINE_DASHED = 2 Defines a dashed line. integer(kind=int32), public, parameter :: LINE_DASH_DOTTED = 4 Defines a dash-dotted line. integer(kind=int32), public, parameter :: LINE_DASH_DOT_DOT = 5 Defines a dash-dot-dotted line. integer(kind=int32), public, parameter :: LINE_DOTTED = 3 Defines a dotted line. integer(kind=int32), public, parameter :: LINE_SOLID = 1 Defines a solid line. integer(kind=int32), public, parameter :: MARKER_ASTERISK = 3 Defines an * data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_CIRCLE = 6 Defines an empty circle-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_NABLA = 10 Defines an empty nabla-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_RHOMBUS = 12 Defines an empty rhombus-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_SQUARE = 4 Defines an empty square-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_TRIANGLE = 8 Defines an empty triangle-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_CIRCLE = 7 Defines an filled circle-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_NABLA = 11 Defines an filled nabla-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_RHOMBUS = 13 Defines an filled rhombus-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_SQUARE = 5 Defines an filled square-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_TRIANGLE = 9 Defines an filled triangle-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_PLUS = 1 Defines a + data point marker. integer(kind=int32), public, parameter :: MARKER_X = 2 Defines an x data point marker. integer(kind=int32), public, parameter :: PLOTDATA_MAX_NAME_LENGTH = 128 Defines the maximum number of characters allowed in a graph label. character(len=*), public, parameter :: POLAR_THETA_BOTTOM = \"bottom\" States that theta should start at the bottom of the plot. character(len=*), public, parameter :: POLAR_THETA_CCW = \"ccw\" States that theta should proceed in a counter-clockwise direction. character(len=*), public, parameter :: POLAR_THETA_CW = \"cw\" States that theta should proceed in a clockwise direction. character(len=*), public, parameter :: POLAR_THETA_LEFT = \"left\" States that theta should start at the left of the plot. character(len=*), public, parameter :: POLAR_THETA_RIGHT = \"right\" States that theta should start at the right of the plot. character(len=*), public, parameter :: POLAR_THETA_TOP = \"top\" States that theta should start at the top of the plot.","tags":"","loc":"module\\fplot_constants.html"},{"title":"fplot_core – FPLOT","text":"FPLOT is a Fortran library providing a means of interacting with GNUPLOT from a Fortran program. The library\nis designed in an object-oriented manner, and as such utilizes language \nfeatures that require a compiler that supports the 2003 standard. Additionally, it is expected that Gnuplot is installed on the system \npath. For full functionallity, a minimum of GNUPLOT v5.2 is expected. Uses fplot_constants fplot_plot_data_bar fplot_plot_bar fplot_plot_axis fplot_core_routines fplot_delaunay_tri_surface fplot_colors fplot_plot_data fplot_colormap fplot_plot_object fplot_surface_plot fplot_plot_polar fplot_plot_data_error_bars fplot_plot_data_histogram fplot_png_terminal fplot_plot_data_2d fplot_latex_terminal fplot_triangulations_delaunay_2d fplot_arrow fplot_windows_terminal fplot_qt_terminal fplot_filled_plot_data fplot_wxt_terminal fplot_tri_surface_plot_data fplot_surface_plot_data fplot_terminal fplot_multiplot fplot_vector_field_plot_data fplot_plot_3d fplot_plot fplot_plot_data_tri_2d fplot_plot_2d fplot_legend fplot_plot_data_3d fplot_label Contents None","tags":"","loc":"module\\fplot_core.html"},{"title":"fplot_core_routines – FPLOT","text":"Uses iso_fortran_env Contents Functions linspace logspace meshgrid Functions public pure function linspace (start, finish, npts) result(x) Constructs a linearly spaced array. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in) :: start The first value in the array. real(kind=real64), intent(in) :: finish The last value in the array. integer(kind=int32), intent(in) :: npts The number of values in the array. Return Value real(kind=real64), allocatable, dimension(:) The resulting array. public pure function logspace (start, finish, npts) result(x) Construcst a logarithmically spaced array. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in) :: start The exponent of the first value in the array. real(kind=real64), intent(in) :: finish The exponent of the final value in the array. integer(kind=int32), intent(in) :: npts The number of values in the array. Return Value real(kind=real64), allocatable, dimension(:) The resulting array. public pure function meshgrid (x, y) result(xy) Constructs two matrices (X and Y) from x and y data arrays. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An M-element array of x data points. real(kind=real64), intent(in), dimension(:) :: y An N-element array of y data points. Return Value real(kind=real64), allocatable, dimension(:,:,:) An N-by-M-by-2 array containing the x data matrix on the first \npage of the array, and the y data matrix on the second page.","tags":"","loc":"module\\fplot_core_routines.html"},{"title":"fplot_delaunay_tri_surface – FPLOT","text":"Uses ferror fplot_errors ieee_arithmetic fplot_triangulations_delaunay_2d iso_fortran_env Contents Derived Types delaunay_tri_surface Derived Types type, public, extends( delaunay_tri_2d ) :: delaunay_tri_surface Provides a type describing a triangulated surface. Type-Bound Procedures procedure\n , public\n :: create =>\n d2d_init Subroutine procedure\n , public\n :: define_function_values =>\n dts_define_fcn Subroutine generic,\n public\n :: evaluate =>\n dts_interp_1, dts_interp_2 procedure\n , public\n :: find_triangle =>\n d2d_get_tri_with_pt Function procedure\n , public\n :: get_indices =>\n d2d_get_tris Function procedure\n , public\n :: get_point_count =>\n d2d_get_pt_count Function procedure\n , public\n :: get_points_x =>\n d2d_get_x_pts Function procedure\n , public\n :: get_points_y =>\n d2d_get_y_pts Function procedure\n , public\n :: get_points_z =>\n dts_get_z Function procedure\n , public\n :: get_triangle_count =>\n d2d_get_tri_count Function","tags":"","loc":"module\\fplot_delaunay_tri_surface.html"},{"title":"fplot_errors – FPLOT","text":"Uses ferror iso_fortran_env Contents Variables PLOT_ARRAY_SIZE_MISMATCH_ERROR PLOT_GNUPLOT_FILE_ERROR PLOT_INVALID_INPUT_ERROR PLOT_INVALID_OPERATION_ERROR PLOT_OUT_OF_MEMORY_ERROR Subroutines report_array_size_mismatch_error report_file_create_error report_matrix_size_mismatch_error report_memory_error Variables Type Visibility Attributes Name Initial integer(kind=int32), public, parameter :: PLOT_ARRAY_SIZE_MISMATCH_ERROR = 1003 Occurs if there is an array size mismatch error. integer(kind=int32), public, parameter :: PLOT_GNUPLOT_FILE_ERROR = 1004 Occurs if there is a GNUPLOT file error. integer(kind=int32), public, parameter :: PLOT_INVALID_INPUT_ERROR = 1001 Occurs if an invalid input is provided. integer(kind=int32), public, parameter :: PLOT_INVALID_OPERATION_ERROR = 1002 Occurs if an attempt is made to perform an invalid operation. integer(kind=int32), public, parameter :: PLOT_OUT_OF_MEMORY_ERROR = 1000 Occurs if there is insufficient memory available for the\nrequested operation. Subroutines public subroutine report_array_size_mismatch_error (err, fcn, name, expected, actual) Reports an array size mismatch error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: name The variable name. integer(kind=int32), intent(in) :: expected The expected array size. integer(kind=int32), intent(in) :: actual The actual array size. public subroutine report_file_create_error (err, fcn, fname, flag) Reports an I/O error related to file creating. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: fname The filename. integer(kind=int32), intent(in) :: flag The error flag returned by the system. public subroutine report_matrix_size_mismatch_error (err, fcn, name, mexp, nexp, mact, nact) Reports a matrix size mismatch error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: name The variable name. integer(kind=int32), intent(in) :: mexp The expected number of rows. integer(kind=int32), intent(in) :: nexp The expected number of columns. integer(kind=int32), intent(in) :: mact The actual number of rows. integer(kind=int32), intent(in) :: nact The actual number of columns. public subroutine report_memory_error (err, fcn, flag) Reports a memory allocation error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. integer(kind=int32), intent(in) :: flag The error flag returned by the system.","tags":"","loc":"module\\fplot_errors.html"},{"title":"fplot_filled_plot_data – FPLOT","text":"Uses ferror fplot_errors strings fplot_colors fplot_plot_data iso_fortran_env Contents Derived Types filled_plot_data Derived Types type, public, extends( plot_data_colored ) :: filled_plot_data Defines a two-dimensional filled plot data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n fpd_define_data Subroutine procedure\n , public\n :: get_axes_string =>\n fpd_get_axes_cmd Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n fpd_get_cmd Function procedure\n , public\n :: get_data_string =>\n fpd_get_data_cmd Function procedure\n , public\n :: get_draw_against_y2 =>\n fpd_get_draw_against_y2 Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_against_y2 =>\n fpd_set_draw_against_y2 Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine","tags":"","loc":"module\\fplot_filled_plot_data.html"},{"title":"fplot_label – FPLOT","text":"Uses fplot_constants strings fplot_plot_object iso_fortran_env Contents Derived Types plot_label Derived Types type, public, extends( plot_object ) :: plot_label Defines a plot label. Type-Bound Procedures procedure\n , public\n :: get_angle =>\n lbl_get_angle Function procedure\n , public\n :: get_command_string =>\n lbl_get_cmd Function procedure\n , public\n :: get_is_visible =>\n lbl_get_is_visible Function procedure\n , public\n :: get_position =>\n lbl_get_position Function procedure\n , public\n :: get_text =>\n lbl_get_txt Function procedure\n , public\n :: set_angle =>\n lbl_set_angle Subroutine procedure\n , public\n :: set_is_visible =>\n lbl_set_is_visible Subroutine procedure\n , public\n :: set_position =>\n lbl_set_position Subroutine procedure\n , public\n :: set_text =>\n lbl_set_txt Subroutine","tags":"","loc":"module\\fplot_label.html"},{"title":"fplot_latex_terminal – FPLOT","text":"Uses strings fplot_constants fplot_terminal iso_fortran_env Contents Derived Types latex_terminal Derived Types type, public, extends( terminal ) :: latex_terminal A LATEX terminal. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n tex_get_command_string Function procedure\n , public\n :: get_filename =>\n tex_get_filename Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n tex_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_filename =>\n tex_set_filename Subroutine procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_latex_terminal.html"},{"title":"fplot_legend – FPLOT","text":"Uses fplot_constants strings fplot_plot_object iso_fortran_env Contents Derived Types legend Derived Types type, public, extends( plot_object ) :: legend Defines a legend object. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n leg_get_command_txt Function procedure\n , public\n :: get_draw_border =>\n leg_get_box Function procedure\n , public\n :: get_draw_inside_axes =>\n leg_get_inside Function procedure\n , public\n :: get_horizontal_position =>\n leg_get_horz_pos Function procedure\n , public\n :: get_is_opaque =>\n leg_get_opaque Function procedure\n , public\n :: get_is_visible =>\n leg_get_visible Function procedure\n , public\n :: get_layout =>\n leg_get_layout Function procedure\n , public\n :: get_vertical_position =>\n leg_get_vert_pos Function procedure\n , public\n :: set_draw_border =>\n leg_set_box Subroutine procedure\n , public\n :: set_draw_inside_axes =>\n leg_set_inside Subroutine procedure\n , public\n :: set_horizontal_position =>\n leg_set_horz_pos Subroutine procedure\n , public\n :: set_is_opaque =>\n leg_set_opaque Subroutine procedure\n , public\n :: set_is_visible =>\n leg_set_visible Subroutine procedure\n , public\n :: set_layout =>\n leg_set_layout Subroutine procedure\n , public\n :: set_vertical_position =>\n leg_set_vert_pos Subroutine","tags":"","loc":"module\\fplot_legend.html"},{"title":"fplot_multiplot – FPLOT","text":"Uses fplot_constants fplot_terminal fplot_plot_object ferror fplot_errors strings fplot_png_terminal fplot_windows_terminal fplot_plot fplot_qt_terminal fplot_latex_terminal collections fplot_wxt_terminal iso_fortran_env Contents Derived Types multiplot Derived Types type, public, extends( plot_object ) :: multiplot Defines a multi-plot layout. Components Type Visibility Attributes Name Initial class( terminal ), public, pointer :: m_terminal => null() The GNUPLOT terminal object to target. Finalizations Procedures final :: mp_clean Type-Bound Procedures procedure\n , public\n :: draw =>\n mp_draw Subroutine procedure\n , public\n :: get =>\n mp_get Function procedure\n , public\n :: get_column_count =>\n mp_get_cols Function procedure\n , public\n :: get_command_string =>\n mp_get_command Function procedure\n , public\n :: get_font_name =>\n mp_get_font Function procedure\n , public\n :: get_font_size =>\n mp_get_font_size Function procedure\n , public\n :: get_plot_count =>\n mp_get_count Function procedure\n , public\n :: get_row_count =>\n mp_get_rows Function procedure\n , public\n :: get_terminal =>\n mp_get_term Function procedure\n , public\n :: get_title =>\n mp_get_title Function procedure\n , public\n :: initialize =>\n mp_init Subroutine procedure\n , public\n :: is_title_defined =>\n mp_has_title Function procedure\n , public\n :: save_file =>\n mp_save Subroutine procedure\n , public\n :: set =>\n mp_set Subroutine procedure\n , public\n :: set_font_name =>\n mp_set_font Subroutine procedure\n , public\n :: set_font_size =>\n mp_set_font_size Subroutine procedure\n , public\n :: set_title =>\n mp_set_title Subroutine","tags":"","loc":"module\\fplot_multiplot.html"},{"title":"fplot_plot – FPLOT","text":"Uses fplot_constants fplot_errors fplot_colors fplot_plot_data fplot_colormap ferror fplot_plot_object fplot_png_terminal collections fplot_latex_terminal fplot_arrow fplot_windows_terminal fplot_qt_terminal fplot_wxt_terminal iso_fortran_env fplot_terminal strings fplot_legend fplot_label Contents Derived Types plot Derived Types type, public, extends( plot_object ) :: plot Defines the basic GNUPLOT plot. Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n plt_get_cmd Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: initialize =>\n plt_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine","tags":"","loc":"module\\fplot_plot.html"},{"title":"fplot_plot_2d – FPLOT","text":"Uses fplot_legend ferror fplot_errors strings fplot_plot fplot_plot_axis fplot_plot_data iso_fortran_env Contents Derived Types plot_2d Derived Types type, public, extends( plot ) :: plot_2d A plot object defining a 2D plot. Finalizations Procedures final :: p2d_clean_up Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n p2d_get_cmd Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_square_axes =>\n p2d_get_square_axes Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_use_y2_axis =>\n p2d_get_use_y2 Function procedure\n , public\n :: get_x_axis =>\n p2d_get_x_axis Function procedure\n , public\n :: get_y2_axis =>\n p2d_get_y2_axis Function procedure\n , public\n :: get_y_axis =>\n p2d_get_y_axis Function procedure\n , public\n :: initialize =>\n p2d_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_square_axes =>\n p2d_set_square_axes Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_use_y2_axis =>\n p2d_set_use_y2 Subroutine","tags":"","loc":"module\\fplot_plot_2d.html"},{"title":"fplot_plot_3d – FPLOT","text":"Uses fplot_legend fplot_constants ferror fplot_errors strings fplot_plot fplot_plot_axis fplot_plot_data iso_fortran_env Contents Derived Types plot_3d Derived Types type, public, extends( plot ) :: plot_3d A plot object defining a 3D plot. Finalizations Procedures final :: p3d_clean_up Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_azimuth =>\n p3d_get_azimuth Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n p3d_get_cmd Function procedure\n , public\n :: get_coordinate_system =>\n p3d_get_csys Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_elevation =>\n p3d_get_elevation Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_use_map_view =>\n p3d_get_use_map_view Function procedure\n , public\n :: get_x_axis =>\n p3d_get_x_axis Function procedure\n , public\n :: get_y_axis =>\n p3d_get_y_axis Function procedure\n , public\n :: get_z_axis =>\n p3d_get_z_axis Function procedure\n , public\n :: get_z_intersect_xy =>\n p3d_get_z_axis_intersect Function procedure\n , public\n :: initialize =>\n p3d_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_azimuth =>\n p3d_set_azimuth Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_coordinate_system =>\n p3d_set_csys Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_elevation =>\n p3d_set_elevation Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_use_map_view =>\n p3d_set_use_map_view Subroutine procedure\n , public\n :: set_z_intersect_xy =>\n p3d_set_z_axis_intersect Subroutine","tags":"","loc":"module\\fplot_plot_3d.html"},{"title":"fplot_plot_axis – FPLOT","text":"Uses fplot_constants strings fplot_plot_object iso_fortran_env Contents Interfaces pa_get_string_result Derived Types plot_axis x_axis y2_axis y_axis z_axis Interfaces interface public function pa_get_string_result(this) result(x) Retrieves a string from a plot_axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The string. Derived Types type, public, extends( plot_object ) :: plot_axis Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n(pa_get_string_result) , public\n :: get_id_string procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine type, public, extends( plot_axis ) :: x_axis Defines an x-axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n , public\n :: get_id_string =>\n xa_get_id Function procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine type, public, extends( plot_axis ) :: y2_axis Defines a secondary y-axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n , public\n :: get_id_string =>\n y2a_get_id Function procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine type, public, extends( plot_axis ) :: y_axis Defines a y-axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n , public\n :: get_id_string =>\n ya_get_id Function procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine type, public, extends( plot_axis ) :: z_axis Defines a z-axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n , public\n :: get_id_string =>\n za_get_id Function procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine","tags":"","loc":"module\\fplot_plot_axis.html"},{"title":"fplot_plot_bar – FPLOT","text":"Uses fplot_plot_2d strings iso_fortran_env Contents Derived Types plot_bar Derived Types type, public, extends( plot_2d ) :: plot_bar Defines a 2D plot tailored towards bar plotting. Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_bar_width =>\n pb_get_bar_width Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n pb_get_cmd Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_square_axes =>\n p2d_get_square_axes Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_use_y2_axis =>\n p2d_get_use_y2 Function procedure\n , public\n :: get_x_axis =>\n p2d_get_x_axis Function procedure\n , public\n :: get_y2_axis =>\n p2d_get_y2_axis Function procedure\n , public\n :: get_y_axis =>\n p2d_get_y_axis Function procedure\n , public\n :: initialize =>\n p2d_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_bar_width =>\n pb_set_bar_width Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_square_axes =>\n p2d_set_square_axes Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_use_y2_axis =>\n p2d_set_use_y2 Subroutine","tags":"","loc":"module\\fplot_plot_bar.html"},{"title":"fplot_plot_data – FPLOT","text":"Uses fplot_constants ferror fplot_plot_object fplot_errors strings fplot_colors iso_fortran_env Contents Interfaces pd_get_string_result spd_get_int_value spd_get_string_result spd_get_value spd_set_value Derived Types plot_data plot_data_colored scatter_plot_data Interfaces interface public function pd_get_string_result(this) result(x) Retrieves a string from a plot_data object. Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The string. interface public pure function spd_get_int_value(this) result(x) Gets an integer value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The value. interface public function spd_get_string_result(this) result(x) Gets a string value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The string. interface public pure function spd_get_value(this, index) result(x) Gets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. Return Value real(kind=real64) The value. interface public subroutine spd_set_value(this, index, x) Sets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. real(kind=real64), intent(in) :: x The value. Derived Types type, public, extends( plot_object ) :: plot_data A container for plot data. Type-Bound Procedures procedure\n(get_string_result) , public\n :: get_command_string procedure\n(pd_get_string_result) , public\n :: get_data_string procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_name =>\n pd_set_name Subroutine type, public, extends( plot_data ) :: plot_data_colored Defines a colored plot data set. Type-Bound Procedures procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n(get_string_result) , public\n :: get_command_string procedure\n(pd_get_string_result) , public\n :: get_data_string procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine type, public, extends( plot_data_colored ) :: scatter_plot_data A plot_data object for describing scatter plot data sets. Type-Bound Procedures procedure\n(spd_get_string_result) , public\n :: get_axes_string procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n spd_get_cmd Function procedure\n(spd_get_int_value) , public\n :: get_count procedure\n(pd_get_string_result) , public\n :: get_data_string procedure\n , public\n :: get_draw_line =>\n spd_get_draw_line Function procedure\n , public\n :: get_draw_markers =>\n spd_get_draw_markers Function procedure\n , public\n :: get_fill_curve =>\n spd_get_filled Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_line_style =>\n spd_get_line_style Function procedure\n , public\n :: get_line_width =>\n spd_get_line_width Function procedure\n , public\n :: get_marker_frequency =>\n spd_get_marker_frequency Function procedure\n , public\n :: get_marker_scaling =>\n spd_get_marker_scaling Function procedure\n , public\n :: get_marker_style =>\n spd_get_marker_style Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_simplification_factor =>\n spd_get_simplify_factor Function procedure\n , public\n :: get_simplify_data =>\n spd_get_simplify_data Function procedure\n , public\n :: get_use_data_dependent_colors =>\n spd_get_data_dependent_colors Function procedure\n , public\n :: get_use_variable_size_points =>\n spd_get_use_var_point_size Function procedure\n(spd_get_value) , public\n :: get_x procedure\n(spd_get_value) , public\n :: get_y procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_line =>\n spd_set_draw_line Subroutine procedure\n , public\n :: set_draw_markers =>\n spd_set_draw_markers Subroutine procedure\n , public\n :: set_fill_curve =>\n spd_set_filled Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_line_style =>\n spd_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n spd_set_line_width Subroutine procedure\n , public\n :: set_marker_frequency =>\n spd_set_marker_frequency Subroutine procedure\n , public\n :: set_marker_scaling =>\n spd_set_marker_scaling Subroutine procedure\n , public\n :: set_marker_style =>\n spd_set_marker_style Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_simplification_factor =>\n spd_set_simplify_factor Subroutine procedure\n , public\n :: set_simplify_data =>\n spd_set_simplify_data Subroutine procedure\n , public\n :: set_use_data_dependent_colors =>\n spd_set_data_dependent_colors Subroutine procedure\n , public\n :: set_use_variable_size_points =>\n spd_set_use_var_point_size Subroutine procedure\n(spd_set_value) , public\n :: set_x procedure\n(spd_set_value) , public\n :: set_y","tags":"","loc":"module\\fplot_plot_data.html"},{"title":"fplot_plot_data_2d – FPLOT","text":"Uses ferror fplot_errors strings fplot_simplify fplot_plot_data iso_fortran_env Contents Derived Types plot_data_2d Derived Types type, public, extends( scatter_plot_data ) :: plot_data_2d Defines a two-dimensional plot data set. Type-Bound Procedures generic,\n public\n :: define_data => pd2d_set_data_1 , pd2d_set_data_2 procedure\n , public\n :: get_axes_string =>\n pd2d_get_axes_cmd Function procedure\n , public\n :: get_color_data =>\n pd2d_get_c_array Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n spd_get_cmd Function procedure\n , public\n :: get_count =>\n pd2d_get_data_count Function procedure\n , public\n :: get_data_string =>\n pd2d_get_data_cmd Function procedure\n , public\n :: get_draw_against_y2 =>\n pd2d_get_draw_against_y2 Function procedure\n , public\n :: get_draw_line =>\n spd_get_draw_line Function procedure\n , public\n :: get_draw_markers =>\n spd_get_draw_markers Function procedure\n , public\n :: get_fill_curve =>\n spd_get_filled Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_line_style =>\n spd_get_line_style Function procedure\n , public\n :: get_line_width =>\n spd_get_line_width Function procedure\n , public\n :: get_marker_frequency =>\n spd_get_marker_frequency Function procedure\n , public\n :: get_marker_scaling =>\n spd_get_marker_scaling Function procedure\n , public\n :: get_marker_style =>\n spd_get_marker_style Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_point_size_data =>\n pd2d_get_ps_array Function procedure\n , public\n :: get_simplification_factor =>\n spd_get_simplify_factor Function procedure\n , public\n :: get_simplify_data =>\n spd_get_simplify_data Function procedure\n , public\n :: get_use_data_dependent_colors =>\n spd_get_data_dependent_colors Function procedure\n , public\n :: get_use_variable_size_points =>\n spd_get_use_var_point_size Function procedure\n , public\n :: get_x =>\n pd2d_get_x_data Function procedure\n , public\n :: get_x_data =>\n pd2d_get_x_array Function procedure\n , public\n :: get_y =>\n pd2d_get_y_data Function procedure\n , public\n :: get_y_data =>\n pd2d_get_y_array Function procedure\n , public\n, :: pd2d_set_data_1 Subroutine procedure\n , public\n, :: pd2d_set_data_2 Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_against_y2 =>\n pd2d_set_draw_against_y2 Subroutine procedure\n , public\n :: set_draw_line =>\n spd_set_draw_line Subroutine procedure\n , public\n :: set_draw_markers =>\n spd_set_draw_markers Subroutine procedure\n , public\n :: set_fill_curve =>\n spd_set_filled Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_line_style =>\n spd_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n spd_set_line_width Subroutine procedure\n , public\n :: set_marker_frequency =>\n spd_set_marker_frequency Subroutine procedure\n , public\n :: set_marker_scaling =>\n spd_set_marker_scaling Subroutine procedure\n , public\n :: set_marker_style =>\n spd_set_marker_style Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_simplification_factor =>\n spd_set_simplify_factor Subroutine procedure\n , public\n :: set_simplify_data =>\n spd_set_simplify_data Subroutine procedure\n , public\n :: set_use_data_dependent_colors =>\n spd_set_data_dependent_colors Subroutine procedure\n , public\n :: set_use_variable_size_points =>\n spd_set_use_var_point_size Subroutine procedure\n , public\n :: set_x =>\n pd2d_set_x_data Subroutine procedure\n , public\n :: set_y =>\n pd2d_set_y_data Subroutine","tags":"","loc":"module\\fplot_plot_data_2d.html"},{"title":"fplot_plot_data_3d – FPLOT","text":"Uses ferror fplot_errors strings fplot_simplify fplot_plot_data iso_fortran_env Contents Derived Types plot_data_3d Derived Types type, public, extends( scatter_plot_data ) :: plot_data_3d Defines a three-dimensional plot data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n pd3d_set_data_1 Subroutine procedure\n , public\n :: get_axes_string =>\n pd3d_get_axes_cmd Function procedure\n , public\n :: get_color_data =>\n pd3d_get_c_array Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n spd_get_cmd Function procedure\n , public\n :: get_count =>\n pd3d_get_data_count Function procedure\n , public\n :: get_data_string =>\n pd3d_get_data_cmd Function procedure\n , public\n :: get_draw_line =>\n spd_get_draw_line Function procedure\n , public\n :: get_draw_markers =>\n spd_get_draw_markers Function procedure\n , public\n :: get_fill_curve =>\n spd_get_filled Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_line_style =>\n spd_get_line_style Function procedure\n , public\n :: get_line_width =>\n spd_get_line_width Function procedure\n , public\n :: get_marker_frequency =>\n spd_get_marker_frequency Function procedure\n , public\n :: get_marker_scaling =>\n spd_get_marker_scaling Function procedure\n , public\n :: get_marker_style =>\n spd_get_marker_style Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_point_size_data =>\n pd3d_get_c_array Function procedure\n , public\n :: get_simplification_factor =>\n spd_get_simplify_factor Function procedure\n , public\n :: get_simplify_data =>\n spd_get_simplify_data Function procedure\n , public\n :: get_use_data_dependent_colors =>\n spd_get_data_dependent_colors Function procedure\n , public\n :: get_use_variable_size_points =>\n spd_get_use_var_point_size Function procedure\n , public\n :: get_x =>\n pd3d_get_x_data Function procedure\n , public\n :: get_x_data =>\n pd3d_get_x_array Function procedure\n , public\n :: get_y =>\n pd3d_get_y_data Function procedure\n , public\n :: get_y_data =>\n pd3d_get_y_array Function procedure\n , public\n :: get_z =>\n pd3d_get_z_data Function procedure\n , public\n :: get_z_data =>\n pd3d_get_z_array Function procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_line =>\n spd_set_draw_line Subroutine procedure\n , public\n :: set_draw_markers =>\n spd_set_draw_markers Subroutine procedure\n , public\n :: set_fill_curve =>\n spd_set_filled Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_line_style =>\n spd_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n spd_set_line_width Subroutine procedure\n , public\n :: set_marker_frequency =>\n spd_set_marker_frequency Subroutine procedure\n , public\n :: set_marker_scaling =>\n spd_set_marker_scaling Subroutine procedure\n , public\n :: set_marker_style =>\n spd_set_marker_style Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_simplification_factor =>\n spd_set_simplify_factor Subroutine procedure\n , public\n :: set_simplify_data =>\n spd_set_simplify_data Subroutine procedure\n , public\n :: set_use_data_dependent_colors =>\n spd_set_data_dependent_colors Subroutine procedure\n , public\n :: set_use_variable_size_points =>\n spd_set_use_var_point_size Subroutine procedure\n , public\n :: set_x =>\n pd3d_set_x_data Subroutine procedure\n , public\n :: set_y =>\n pd3d_set_y_data Subroutine procedure\n , public\n :: set_z =>\n pd3d_set_z_data Subroutine","tags":"","loc":"module\\fplot_plot_data_3d.html"},{"title":"fplot_plot_data_bar – FPLOT","text":"Uses ferror fplot_errors strings fplot_colors fplot_plot_data iso_fortran_env Contents Derived Types plot_data_bar Derived Types type, public, extends( plot_data_colored ) :: plot_data_bar Defines a data set tailored to bar charts. Type-Bound Procedures generic,\n public\n :: define_data =>\n pdb_set_data_1, pdb_set_data_2, pdb_set_data_3 procedure\n , public\n :: get =>\n pdb_get_data Function procedure\n , public\n :: get_axes_string =>\n pdb_get_axes_cmd Function procedure\n , public\n :: get_bar_per_label_count =>\n pdb_get_col_count Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n pdb_get_cmd Function procedure\n , public\n :: get_count =>\n pdb_get_count Function procedure\n , public\n :: get_data =>\n pdb_get_data_set Function procedure\n , public\n :: get_data_string =>\n pdb_get_data_cmd Function procedure\n , public\n :: get_draw_against_y2 =>\n pdb_get_use_y2 Function procedure\n , public\n :: get_is_filled =>\n pdb_get_is_filled Function procedure\n , public\n :: get_label =>\n pdb_get_label Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_transparency =>\n pdb_get_alpha Function procedure\n , public\n :: get_use_labels =>\n pdb_get_use_labels Function procedure\n , public\n :: set =>\n pdb_set_data Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_data_1 =>\n pdb_set_data_1_core Subroutine procedure\n , public\n :: set_data_2 =>\n pdb_set_data_2_core Subroutine procedure\n , public\n :: set_data_3 =>\n pdb_set_data_3_core Subroutine procedure\n , public\n :: set_draw_against_y2 =>\n pdb_set_use_y2 Subroutine procedure\n , public\n :: set_is_filled =>\n pdb_set_is_filled Subroutine procedure\n , public\n :: set_label =>\n pdb_set_label Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_transparency =>\n pdb_set_alpha Subroutine procedure\n , public\n :: set_use_labels =>\n pdb_set_use_labels Subroutine","tags":"","loc":"module\\fplot_plot_data_bar.html"},{"title":"fplot_plot_data_error_bars – FPLOT","text":"Uses ferror fplot_errors strings fplot_colors fplot_plot_data iso_fortran_env Contents Derived Types plot_data_error_bars Derived Types type, public, extends( plot_data_colored ) :: plot_data_error_bars Defines a 2D error-bar based data set. Type-Bound Procedures generic,\n public\n :: define_x_error_data => pde_define_x_err , pde_define_x_err_lim generic,\n public\n :: define_xy_error_data => pde_define_xy_err , pde_define_xy_err_lim generic,\n public\n :: define_y_error_data => pde_define_y_err , pde_define_y_err_lim procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n pde_get_cmd Function procedure\n , public\n :: get_count =>\n pde_get_count Function procedure\n , public\n :: get_data_string =>\n pde_get_data_cmd Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_plot_x_error_bars =>\n pde_get_plot_x_err Function procedure\n , public\n :: get_plot_y_error_bars =>\n pde_get_plot_y_err Function procedure\n , public\n :: get_use_error_box =>\n pde_get_box Function procedure\n , public\n :: get_use_range =>\n pde_get_use_range Function procedure\n , public\n, :: pde_define_x_err Subroutine procedure\n , public\n, :: pde_define_x_err_lim Subroutine procedure\n , public\n, :: pde_define_xy_err Subroutine procedure\n , public\n, :: pde_define_xy_err_lim Subroutine procedure\n , public\n, :: pde_define_y_err Subroutine procedure\n , public\n, :: pde_define_y_err_lim Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_use_error_box =>\n pde_set_box Subroutine","tags":"","loc":"module\\fplot_plot_data_error_bars.html"},{"title":"fplot_plot_data_histogram – FPLOT","text":"Uses fplot_plot_data_bar ferror fplot_errors strings iso_fortran_env Contents Derived Types plot_data_histogram Derived Types type, public, extends( plot_data_bar ) :: plot_data_histogram A container for plotting data in the form of a histogram. Type-Bound Procedures procedure\n , public\n :: bin_data =>\n pdh_bin_data Function generic,\n public\n :: define_data =>\n pdb_set_data_1, pdb_set_data_2, pdb_set_data_3 procedure\n , public\n :: get =>\n pdb_get_data Function procedure\n , public\n :: get_axes_string =>\n pdb_get_axes_cmd Function procedure\n , public\n :: get_bar_per_label_count =>\n pdb_get_col_count Function procedure\n , public\n :: get_bin_count =>\n pdh_get_bin_count Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n pdb_get_cmd Function procedure\n , public\n :: get_count =>\n pdb_get_count Function procedure\n , public\n :: get_data =>\n pdb_get_data_set Function procedure\n , public\n :: get_data_string =>\n pdb_get_data_cmd Function procedure\n , public\n :: get_draw_against_y2 =>\n pdb_get_use_y2 Function procedure\n , public\n :: get_extreme_values =>\n pdh_get_extremes Function procedure\n , public\n :: get_is_filled =>\n pdb_get_is_filled Function procedure\n , public\n :: get_label =>\n pdb_get_label Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_number_format =>\n pdh_get_num_fmt Function procedure\n , public\n :: get_transparency =>\n pdb_get_alpha Function procedure\n , public\n :: get_use_labels =>\n pdb_get_use_labels Function procedure\n , public\n :: set =>\n pdb_set_data Subroutine procedure\n , public\n :: set_bin_count =>\n pdh_set_bin_count Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_data_1 =>\n pdh_set_data_1 Subroutine procedure\n , public\n :: set_data_2 =>\n pdh_set_data_2 Subroutine procedure\n , public\n :: set_data_3 =>\n pdh_set_data_3 Subroutine procedure\n , public\n :: set_draw_against_y2 =>\n pdb_set_use_y2 Subroutine procedure\n , public\n :: set_is_filled =>\n pdb_set_is_filled Subroutine procedure\n , public\n :: set_label =>\n pdb_set_label Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_number_format =>\n pdh_set_num_fmt Subroutine procedure\n , public\n :: set_transparency =>\n pdb_set_alpha Subroutine procedure\n , public\n :: set_use_labels =>\n pdb_set_use_labels Subroutine","tags":"","loc":"module\\fplot_plot_data_histogram.html"},{"title":"fplot_plot_data_tri_2d – FPLOT","text":"Uses fplot_constants strings fplot_colors fplot_triangulations_delaunay_2d fplot_plot_data iso_fortran_env Contents Derived Types plot_data_tri_2d Derived Types type, public, extends( plot_data_colored ) :: plot_data_tri_2d Defines a 2D triangulated data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n pdt2d_define_data Subroutine procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n pdt2d_get_cmd Function procedure\n , public\n :: get_data_string =>\n pdt2d_get_data_cmd Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_line_style =>\n pdt2d_get_line_style Function procedure\n , public\n :: get_line_width =>\n pdt2d_get_line_width Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_line_style =>\n pdt2d_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n pdt2d_set_line_width Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine","tags":"","loc":"module\\fplot_plot_data_tri_2d.html"},{"title":"fplot_plot_object – FPLOT","text":"Uses iso_fortran_env Contents Interfaces get_string_result Derived Types plot_object Interfaces interface public function get_string_result(this) result(x) Returns a string from a plot_object. Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:), allocatable The result string. Derived Types type, public :: plot_object The base type for all plot objects. Type-Bound Procedures procedure\n(get_string_result) , public\n :: get_command_string","tags":"","loc":"module\\fplot_plot_object.html"},{"title":"fplot_plot_polar – FPLOT","text":"Uses fplot_constants fplot_terminal ferror fplot_errors strings fplot_plot fplot_legend fplot_plot_data iso_fortran_env Contents Derived Types plot_polar Derived Types type, public, extends( plot ) :: plot_polar Finalizations Procedures final :: plr_clean_up Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_autoscale =>\n plr_get_autoscale Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n plr_get_cmd Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_radial_limits =>\n plr_get_limits Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_theta_direction =>\n plr_get_theta_direction Function procedure\n , public\n :: get_theta_start_position =>\n plr_get_theta_start Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: initialize =>\n plr_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_autoscale =>\n plr_set_autoscale Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_radial_limits =>\n plr_set_limits Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_theta_direction =>\n plr_set_theta_direction Subroutine procedure\n , public\n :: set_theta_start_position =>\n plr_set_theta_start Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine","tags":"","loc":"module\\fplot_plot_polar.html"},{"title":"fplot_png_terminal – FPLOT","text":"Uses fplot_terminal fplot_constants strings iso_fortran_env Contents Derived Types png_terminal Derived Types type, public, extends( terminal ) :: png_terminal Defines a terminal used for producing PNG outputs. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n png_get_command_string Function procedure\n , public\n :: get_filename =>\n png_get_filename Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n png_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_filename =>\n png_set_filename Subroutine procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_png_terminal.html"},{"title":"fplot_qt_terminal – FPLOT","text":"Uses fplot_terminal iso_fortran_env Contents Derived Types qt_terminal Derived Types type, public, extends( terminal ) :: qt_terminal Defines a terminal that utilizes QT. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n term_get_command_string Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n qt_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_qt_terminal.html"},{"title":"fplot_simplify – FPLOT","text":"Uses fplot_errors ferror iso_fortran_env Contents Interfaces simplify_polyline Interfaces public interface simplify_polyline private function simplify_polyline_2d1(x, y, tol, err) result(ln) Simplifies a 2D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, and the second \ncolumn contains the y-coordinates. private function simplify_polyline_3d1(x, y, z, tol, err) result(ln) Simplifies a 3D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: z An N-element array containing the z-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, the second \ncolumn contains the y-coordinates, and the third column contains \nthe z-coordinates. private function simplify_polyline_mtx(xy, tol, err) result(ln) Simplifies a 2D or 3D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:,:) :: xy An N-by-2 or N-by-3 matrix containing the polyline vertex data. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, the second \ncolumn contains the y-coordinates, and if necessary, the third \ncolumn contains the z-coordinates.","tags":"","loc":"module\\fplot_simplify.html"},{"title":"fplot_surface_plot – FPLOT","text":"Uses ferror fplot_errors strings fplot_plot_3d fplot_legend iso_fortran_env Contents Derived Types surface_plot Derived Types type, public, extends( plot_3d ) :: surface_plot Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_allow_smoothing =>\n surf_get_smooth Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_azimuth =>\n p3d_get_azimuth Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n surf_get_cmd Function procedure\n , public\n :: get_coordinate_system =>\n p3d_get_csys Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_elevation =>\n p3d_get_elevation Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_light_intensity =>\n surf_get_light_intensity Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_contours =>\n surf_get_show_contours Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_show_hidden =>\n surf_get_show_hidden Function procedure\n , public\n :: get_specular_intensity =>\n surf_get_specular_intensity Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_transparency =>\n surf_get_transparency Function procedure\n , public\n :: get_use_lighting =>\n surf_get_use_lighting Function procedure\n , public\n :: get_use_map_view =>\n p3d_get_use_map_view Function procedure\n , public\n :: get_x_axis =>\n p3d_get_x_axis Function procedure\n , public\n :: get_y_axis =>\n p3d_get_y_axis Function procedure\n , public\n :: get_z_axis =>\n p3d_get_z_axis Function procedure\n , public\n :: get_z_intersect_xy =>\n p3d_get_z_axis_intersect Function procedure\n , public\n :: initialize =>\n surf_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_allow_smoothing =>\n surf_set_smooth Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_azimuth =>\n p3d_set_azimuth Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_coordinate_system =>\n p3d_set_csys Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_elevation =>\n p3d_set_elevation Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_light_intensity =>\n surf_set_light_intensity Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_contours =>\n surf_set_show_contours Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_show_hidden =>\n surf_set_show_hidden Subroutine procedure\n , public\n :: set_specular_intensity =>\n surf_set_specular_intensity Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_transparency =>\n surf_set_transparency Subroutine procedure\n , public\n :: set_use_lighting =>\n surf_set_use_lighting Subroutine procedure\n , public\n :: set_use_map_view =>\n p3d_set_use_map_view Subroutine procedure\n , public\n :: set_z_intersect_xy =>\n p3d_set_z_axis_intersect Subroutine","tags":"","loc":"module\\fplot_surface_plot.html"},{"title":"fplot_surface_plot_data – FPLOT","text":"Uses ferror fplot_errors strings fplot_plot_data iso_fortran_env Contents Derived Types surface_plot_data Derived Types type, public, extends( plot_data ) :: surface_plot_data Provides a three-dimensional surface plot data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n surfd_set_data_1 Subroutine procedure\n , public\n :: get_command_string =>\n surfd_get_cmd Function procedure\n , public\n :: get_data_string =>\n surfd_get_data_cmd Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_size =>\n surfd_get_size Function procedure\n , public\n :: get_use_wireframe =>\n surfd_get_wireframe Function procedure\n , public\n :: get_x =>\n surfd_get_x Function procedure\n , public\n :: get_y =>\n surfd_get_y Function procedure\n , public\n :: get_z =>\n surfd_get_z Function procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_use_wireframe =>\n surfd_set_wireframe Subroutine procedure\n , public\n :: set_x =>\n surfd_set_x Subroutine procedure\n , public\n :: set_y =>\n surfd_set_y Subroutine procedure\n , public\n :: set_z =>\n surfd_set_z Subroutine","tags":"","loc":"module\\fplot_surface_plot_data.html"},{"title":"fplot_terminal – FPLOT","text":"Uses fplot_constants strings fplot_plot_object iso_fortran_env Contents Interfaces term_get_string_result Derived Types terminal Interfaces interface public function term_get_string_result(this) result(x) Retrieves a string from a terminal. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The string. Derived Types type, public, extends( plot_object ) :: terminal A GNUPLOT terminal object. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n term_get_command_string Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n(term_get_string_result) , public\n :: get_id_string procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_terminal.html"},{"title":"fplot_triangulations_delaunay_2d – FPLOT","text":"Uses geompack fplot_errors ferror iso_fortran_env Contents Derived Types delaunay_tri_2d Derived Types type, public :: delaunay_tri_2d Provides a container for a 2D Delaunay triangulation. Type-Bound Procedures procedure\n , public\n :: create =>\n d2d_init Subroutine procedure\n , public\n :: find_triangle =>\n d2d_get_tri_with_pt Function procedure\n , public\n :: get_indices =>\n d2d_get_tris Function procedure\n , public\n :: get_point_count =>\n d2d_get_pt_count Function procedure\n , public\n :: get_points_x =>\n d2d_get_x_pts Function procedure\n , public\n :: get_points_y =>\n d2d_get_y_pts Function procedure\n , public\n :: get_triangle_count =>\n d2d_get_tri_count Function","tags":"","loc":"module\\fplot_triangulations_delaunay_2d.html"},{"title":"fplot_tri_surface_plot_data – FPLOT","text":"Uses fplot_plot_data fplot_delaunay_tri_surface strings iso_fortran_env Contents Derived Types tri_surface_plot_data Derived Types type, public, extends( plot_data ) :: tri_surface_plot_data Provides a three-dimensional surface plot data set constructed of\ntriangulated points. Type-Bound Procedures procedure\n , public\n :: define_data =>\n tspd_define_data Subroutine procedure\n , public\n :: get_command_string =>\n tspd_get_cmd Function procedure\n , public\n :: get_data_string =>\n tspd_get_data_cmd Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_use_wireframe =>\n tspd_get_wireframe Function procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_use_wireframe =>\n tspd_set_wireframe Subroutine","tags":"","loc":"module\\fplot_tri_surface_plot_data.html"},{"title":"fplot_vector_field_plot_data – FPLOT","text":"Uses ferror fplot_errors strings fplot_colors fplot_plot_data iso_fortran_env Contents Derived Types vector_field_plot_data Derived Types type, public, extends( plot_data_colored ) :: vector_field_plot_data Defines a two-dimensional vector-field plot data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n vfpd_define_data Subroutine procedure\n , public\n :: get_arrow_size =>\n vfpd_get_arrow_size Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n vfpd_get_cmd Function procedure\n , public\n :: get_data_string =>\n vfpd_get_data_cmd Function procedure\n , public\n :: get_fill_arrow =>\n vfpd_get_fill_arrow Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_use_data_dependent_colors =>\n vfpd_get_use_data_dependent_colors Function procedure\n , public\n :: set_arrow_size =>\n vfpd_set_arrow_size Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_fill_arrow =>\n vfpd_set_fill_arrow Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine","tags":"","loc":"module\\fplot_vector_field_plot_data.html"},{"title":"fplot_windows_terminal – FPLOT","text":"Uses fplot_terminal iso_fortran_env Contents Derived Types windows_terminal Derived Types type, public, extends( terminal ) :: windows_terminal A Windows-specific terminal. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n term_get_command_string Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n wt_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_windows_terminal.html"},{"title":"fplot_wxt_terminal – FPLOT","text":"Uses fplot_terminal iso_fortran_env Contents Derived Types wxt_terminal Derived Types type, public, extends( terminal ) :: wxt_terminal A WXT terminal. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n term_get_command_string Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n wxt_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_wxt_terminal.html"},{"title":"fplot_arrow.f90 – FPLOT","text":"Contents Modules fplot_arrow Source Code fplot_arrow.f90 Source Code module fplot_arrow use iso_fortran_env use fplot_plot_object use fplot_colors use fplot_constants use strings implicit none private public :: plot_arrow type , extends ( plot_object ) :: plot_arrow !! Defines an arrow that can be drawn on a plot. logical , private :: m_visible = . true . !! Visible? real ( real32 ), private , dimension ( 3 ) :: m_tail = [ 0.0 , 0.0 , 0.0 ] !! The x, y, z coordinates of the tail. real ( real32 ), private , dimension ( 3 ) :: m_head = [ 0.0 , 0.0 , 0.0 ] !! The x, y, z coordinates of the head. type ( color ), private :: m_color = CLR_BLACK !! The arrow color. integer ( int32 ), private :: m_linestyle = LINE_SOLID !! The line style. real ( real32 ), private :: m_linewidth = 1.0 !! The line width. integer ( int32 ), private :: m_head_type = ARROW_HEAD !! The head configuration. integer ( int32 ), private :: m_filling = ARROW_FILLED !! Arrow filling. logical , private :: m_front = . true . !! Move to front? real ( real32 ), private :: m_size = 0.375 !! Arrow head size. real ( real32 ), private :: m_angle = 1 0.0 !! Arrow head angle. real ( real32 ), private :: m_backangle = 9 0.0 !! Arrow head back angle. logical , private :: m_use_default_size = . true . !! Use default head size. contains procedure , public :: get_is_visible => par_get_is_visible procedure , public :: set_is_visible => par_set_is_visible procedure , public :: get_tail_location => par_get_tail generic , public :: set_tail_location => par_set_tail_1 , & par_set_tail_2 , par_set_tail_3 procedure , private :: par_set_tail_1 procedure , private :: par_set_tail_2 procedure , private :: par_set_tail_3 procedure , public :: get_head_location => par_get_head generic , public :: set_head_location => par_set_head_1 , & par_set_head_2 , par_set_head_3 procedure , private :: par_set_head_1 procedure , private :: par_set_head_2 procedure , private :: par_set_head_3 procedure , public :: get_color => par_get_color procedure , public :: set_color => par_set_color procedure , public :: get_line_style => par_get_line_style procedure , public :: set_line_style => par_set_line_style procedure , public :: get_line_width => par_get_line_width procedure , public :: set_line_width => par_set_line_width procedure , public :: get_head_type => par_get_head_type procedure , public :: set_head_type => par_set_head_type procedure , public :: get_head_fill => par_get_fill procedure , public :: set_head_fill => par_set_fill procedure , public :: get_move_to_front => par_get_move_to_front procedure , public :: set_move_to_front => par_set_move_to_front procedure , public :: get_head_size => par_get_head_size procedure , public :: set_head_size => par_set_head_size procedure , public :: get_head_angle => par_get_head_angle procedure , public :: set_head_angle => par_set_head_angle procedure , public :: get_head_back_angle => par_get_head_back_angle procedure , public :: set_head_back_angle => par_set_head_back_angle procedure , public :: get_use_default_size => par_get_use_default_size procedure , public :: set_use_default_size => par_set_use_default_size procedure , public :: get_command_string => par_get_cmd end type contains ! ------------------------------------------------------------------------------ pure function par_get_is_visible ( this ) result ( rst ) !! Gets a value determining if the arrow is visible. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. logical :: rst !! True if the arrow is visible; else, false. rst = this % m_visible end function ! -------------------- subroutine par_set_is_visible ( this , x ) !! Sets a value determining if the arrow is visible. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. logical , intent ( in ) :: x !! True if the arrow is visible; else, false. this % m_visible = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_tail ( this ) result ( rst ) !! Gets the coordinates of the arrow's tail. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ), dimension ( 3 ) :: rst !! A 3-element array containing the x, y, and z coordinates of the !! arrow's tail. rst = this % m_tail end function ! -------------------- subroutine par_set_tail_1 ( this , x ) !! Sets the coordinates of the arrow's tail. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x ( 3 ) !! A 3-element array containing the x, y, and z coordinates of the !! arrow's tail. this % m_tail = x end subroutine ! -------------------- subroutine par_set_tail_2 ( this , x , y ) !! Sets the coordinates of the arrow's tail. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The x-coordinate of the arrow's tail. real ( real32 ), intent ( in ) :: y !! !! The y-coordinate of the arrow's tail. this % m_tail = [ x , y , 0.0 ] end subroutine ! -------------------- subroutine par_set_tail_3 ( this , x , y , z ) !! Sets the coordinates of the arrow's tail. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The x-coordinate of the arrow's tail. real ( real32 ), intent ( in ) :: y !! The y-coordinate of the arrow's tail. real ( real32 ), intent ( in ) :: z !! The z-coordinate of the arrow's tail. this % m_tail = [ x , y , z ] end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head ( this ) result ( rst ) !! Gets the coordinates of the arrow's head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ), dimension ( 3 ) :: rst !! A 3-element array containing the x, y, and z coordinates of the !! arrow's head. rst = this % m_head end function ! -------------------- subroutine par_set_head_1 ( this , x ) !! Sets the location of the arrow's head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x ( 3 ) !! A 3-element array containing the x, y, and z coordinates of the !! arrow's head. this % m_head = x end subroutine ! -------------------- subroutine par_set_head_2 ( this , x , y ) !! Sets the location of the arrow's head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The x-coordinate of the arrow's head. real ( real32 ), intent ( in ) :: y !! The y-coordinate of the arrow's head. this % m_head = [ x , y , 0.0 ] end subroutine ! -------------------- subroutine par_set_head_3 ( this , x , y , z ) !! Sets the location of the arrow's head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The x-coordinate of the arrow's head. real ( real32 ), intent ( in ) :: y !! The y-coordinate of the arrow's head. real ( real32 ), intent ( in ) :: z !! The z-coordinate of the arrow's head. this % m_head = [ x , y , z ] end subroutine ! ------------------------------------------------------------------------------ pure function par_get_color ( this ) result ( rst ) !! Gets the color of the arrow. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. type ( color ) :: rst !! The color. rst = this % m_color end function ! -------------------- subroutine par_set_color ( this , x ) !! Sets the color of the arrow. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. type ( color ), intent ( in ) :: x !! The color. this % m_color = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_line_style ( this ) result ( rst ) !! Gets the line style used to draw the arrow. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. integer ( int32 ) :: rst !! The line style. rst = this % m_linestyle end function ! -------------------- subroutine par_set_line_style ( this , x ) !! Sets the line style used to draw the arrow. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. integer ( int32 ), intent ( in ) :: x !! The line style. The value must be one of the following. !! !! - LINE_SOLID !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! If the value is not one of the above, the command is ignored. if ( x == LINE_DASHED . or . & x == LINE_DASH_DOTTED . or . & x == LINE_DASH_DOT_DOT . or . & x == LINE_DOTTED . or . & x == LINE_SOLID ) then ! Only reset the line style if it is a valid type. this % m_linestyle = x end if end subroutine ! ------------------------------------------------------------------------------ pure function par_get_line_width ( this ) result ( rst ) !! Gets the width of the lines used to draw the arrow. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ) :: rst !! The width of the line. rst = this % m_linewidth end function ! -------------------- subroutine par_set_line_width ( this , x ) !! Sets the width of the lines used to draw the arrow. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The width of the line. this % m_linewidth = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head_type ( this ) result ( rst ) !! Gets the type of arrow head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. integer ( int32 ) :: rst !! The arrow head type. rst = this % m_head_type end function ! -------------------- subroutine par_set_head_type ( this , x ) !! Sets the type of arrow head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. integer ( int32 ), intent ( in ) :: x !! The arrow head type. It must be one of the following constants. !! !! - ARROW_HEAD !! !! - ARROW_BACKHEAD !! !! - ARROW_HEADS !! !! - ARROW_NO_HEAD !! !! If the value is not one of the above, the command is ignored. if ( x == ARROW_BACKHEAD . or . & x == ARROW_HEAD . or . & x == ARROW_HEADS . or . & x == ARROW_NO_HEAD & ) then this % m_head_type = x end if end subroutine ! ------------------------------------------------------------------------------ pure function par_get_fill ( this ) result ( rst ) !! Gets a flag denoting the head fill type. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. integer ( int32 ) :: rst !! The flag denoting head fill. rst = this % m_filling end function ! -------------------- subroutine par_set_fill ( this , x ) !! Sets a flag denoting the head fill type. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. integer ( int32 ), intent ( in ) :: x !! The flag denoting head fill. It must be one of the following !! constants. !! !! - ARROW_FILLED !! !! - ARROW_EMPTY !! !! - ARROW_NO_BORDER !! !! - ARROW_NO_FILL !! !! If the value is not one of the above, the command is ignored. if ( x == ARROW_FILLED . or . & x == ARROW_EMPTY . or . & x == ARROW_NO_BORDER . or . & x == ARROW_NO_FILL & ) then this % m_filling = x end if end subroutine ! ------------------------------------------------------------------------------ pure function par_get_move_to_front ( this ) result ( rst ) !! Gets a value determining if the arrow should be moved to the front. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. logical :: rst !! True if the arrow should be moved to the front; else, false. rst = this % m_front end function ! -------------------- subroutine par_set_move_to_front ( this , x ) !! Sets a value determining if the arrow should be moved to the front. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. logical , intent ( in ) :: x !! True if the arrow should be moved to the front; else, false. this % m_front = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head_size ( this ) result ( rst ) !! Gets the size of the arrow head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ) :: rst !! The head size. rst = this % m_size end function ! -------------------- subroutine par_set_head_size ( this , x ) !! Sets the size of the arrow head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The head size. this % m_size = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head_angle ( this ) result ( rst ) !! Gets the angle of the arrow head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ) :: rst !! The angle, in degrees. rst = this % m_angle end function ! -------------------- subroutine par_set_head_angle ( this , x ) !! Sets the angle of the arrow head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The angle, in degrees. this % m_angle = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head_back_angle ( this ) result ( rst ) !! Gets the angle of the back of the arrow head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ) :: rst !! The angle, in degrees. rst = this % m_backangle end function ! -------------------- subroutine par_set_head_back_angle ( this , x ) !! Sets the angle of the back of the arrow head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The angle, in degrees. this % m_backangle = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_use_default_size ( this ) result ( rst ) !! Gets a value determining if arrow head sizing defaults should be used. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. logical :: rst !! True if the defaults should be used; else, false. rst = this % m_use_default_size end function ! -------------------- subroutine par_set_use_default_size ( this , x ) !! Sets a value determining if arrow head sizing defaults should be used. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. logical , intent ( in ) :: x !! True if the defaults should be used; else, false. this % m_use_default_size = x end subroutine ! ------------------------------------------------------------------------------ function par_get_cmd ( this ) result ( rst ) !! Returns the appropriate GNUPLOT command string to establish appropriate !! parameters. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. character ( len = :), allocatable :: rst !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str type ( color ) :: clr real ( real32 ) :: tail ( 3 ), head ( 3 ) ! Quick Return if (. not . this % get_is_visible ()) then rst = \"\" return end if ! Command call str % append ( \"set arrow\" ) ! Position Info tail = this % get_tail_location () head = this % get_head_location () call str % append ( \" from \" ) call str % append ( to_string ( tail ( 1 ))) call str % append ( \",\" ) call str % append ( to_string ( tail ( 2 ))) call str % append ( \",\" ) call str % append ( to_string ( tail ( 3 ))) call str % append ( \" to \" ) call str % append ( to_string ( head ( 1 ))) call str % append ( \",\" ) call str % append ( to_string ( head ( 2 ))) call str % append ( \",\" ) call str % append ( to_string ( head ( 3 ))) ! Head Type select case ( this % get_head_type ()) case ( ARROW_BACKHEAD ) call str % append ( \" backhead\" ) case ( ARROW_HEAD ) call str % append ( \" head\" ) case ( ARROW_HEADS ) call str % append ( \" heads\" ) case ( ARROW_NO_HEAD ) call str % append ( \" nohead\" ) end select if ( this % get_head_type () /= ARROW_NO_HEAD ) then ! Fill Info select case ( this % get_head_fill ()) case ( ARROW_FILLED ) call str % append ( \" filled\" ) case ( ARROW_EMPTY ) call str % append ( \" empty\" ) case ( ARROW_NO_BORDER ) call str % append ( \" noborder\" ) case ( ARROW_NO_FILL ) call str % append ( \" nofilled\" ) end select ! Size if (. not . this % get_use_default_size ()) then call str % append ( \" size \" ) call str % append ( to_string ( this % get_head_size ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_head_angle ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_head_back_angle ())) end if end if ! Front/Back if ( this % get_move_to_front ()) then call str % append ( \" front\" ) else call str % append ( \" back\" ) end if ! Line Color clr = this % get_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Line Width call str % append ( \" lw \" ) call str % append ( to_string ( this % get_line_width ())) ! Line Style call str % append ( \" lt \" ) call str % append ( to_string ( this % get_line_style ())) if ( this % get_line_style () /= LINE_SOLID ) then call str % append ( \" dashtype \" ) call str % append ( to_string ( this % get_line_style ())) end if ! End rst = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ ! pure subroutine par_assign(x, y) ! type(plot_arrow), intent(out) :: x ! class(plot_arrow), intent(in) :: y ! x%m_visible = y%m_visible ! x%m_tail = y%m_tail ! x%m_head = y%m_head ! x%m_color = y%m_color ! x%m_linestyle = y%m_linestyle ! x%m_linewidth = y%m_linewidth ! x%m_head_type = y%m_head_type ! x%m_filling = y%m_filling ! x%m_front = y%m_front ! x%m_size = y%m_size ! x%m_angle = y%m_angle ! x%m_backangle = y%m_backangle ! x%m_use_default_size = y%m_use_default_size ! end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_arrow.f90.html"},{"title":"fplot_colormap.f90 – FPLOT","text":"Contents Modules fplot_colormap Source Code fplot_colormap.f90 Source Code ! fplot_colormap.f90 module fplot_colormap use iso_fortran_env use fplot_plot_object use strings use ferror use fplot_errors use fplot_colors use forcolormap , cmap => Colormap ! avoid conflict with the internally defined colormap type implicit none private public :: cmap public :: colormap public :: cm_get_string_result public :: rainbow_colormap public :: hot_colormap public :: cool_colormap public :: parula_colormap public :: grey_colormap public :: earth_colormap public :: custom_colormap type , abstract , extends ( plot_object ) :: colormap !! A colormap object for a surface plot. character ( len = :), private , allocatable :: m_label !! The label to associate with the colormap. logical , private :: m_horizontal = . false . !! The colormap should be drawn horizontally. logical , private :: m_drawBorder = . true . !! Draw the colormap border. logical , private :: m_showTics = . true . !! Show the tic marks. contains procedure , public :: get_command_string => cm_get_cmd procedure ( cm_get_string_result ), deferred , public :: get_color_string procedure , public :: get_label => cm_get_label procedure , public :: set_label => cm_set_label procedure , public :: get_horizontal => cm_get_horizontal procedure , public :: set_horizontal => cm_set_horizontal procedure , public :: get_draw_border => cm_get_draw_border procedure , public :: set_draw_border => cm_set_draw_border procedure , public :: get_show_tics => cm_get_show_tics procedure , public :: set_show_tics => cm_set_show_tics end type interface function cm_get_string_result ( this ) result ( x ) !! Retrieves a string result from a colormap object. import colormap class ( colormap ), intent ( in ) :: this !! The colormap object. character ( len = :), allocatable :: x !! The string. end function end interface ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: rainbow_colormap !! Defines a rainbow colormap. contains procedure , public :: get_color_string => rcm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: hot_colormap !! Defines a colormap consisting of \"hot\" colors. contains procedure , public :: get_color_string => hcm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: cool_colormap !! Defines a colormap consisting of \"cool\" colors. contains procedure , public :: get_color_string => ccm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: parula_colormap !! Defines a colormap equivalent to the MATLAB parula colormap. contains procedure , public :: get_color_string => pcm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: grey_colormap !! Defines a grey-scaled colormap. contains procedure , public :: get_color_string => gcm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: earth_colormap !! Defines an earthy-colored colormap. contains procedure , public :: get_color_string => ecm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: custom_colormap !! Defines a custom colormap that utilizes the FORCOLORMAP library !! to provide the map. class ( cmap ), private , pointer :: m_map => null () !! The FORCOLORMAP object. contains final :: custom_final procedure , public :: get_color_string => custom_get_clr procedure , public :: set_colormap => custom_set procedure , public :: get_colormap => custom_get end type ! ------------------------------------------------------------------------------ contains ! ****************************************************************************** ! COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function cm_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this colormap object. class ( colormap ), intent ( in ) :: this !! The colormap object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str ! Initialization call str % initialize () ! Palette Definition call str % append ( \"set palette defined (\" ) call str % append ( this % get_color_string ()) call str % append ( \")\" ) if ( len ( this % get_label ()) > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( 'set cblabel \"' ) call str % append ( this % get_label ()) call str % append ( '\"' ) end if ! Orientation if ( this % get_horizontal ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set colorbox horizontal\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set size 0.8,0.8; set origin 0.1,0.2\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set colorbox user origin 0.1,0.175 size 0.8,0.055\" ) if ( len ( this % get_label ()) > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set cblabel offset 0,0.8\" ) end if end if ! Border & Tic Marks if (. not . this % get_draw_border ()) then ! Eliminate the border call str % append ( new_line ( 'a' )) call str % append ( \"set colorbox noborder\" ) ! Hide the tic marks call str % append ( new_line ( 'a' )) call str % append ( \"set cbtic scale 0\" ) else ! Respect the tic mark visibility setting if the border is shown if (. not . this % get_show_tics ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set cbtic scale 0\" ) end if end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function cm_get_label ( this ) result ( rst ) !! Gets the label to associate with the colorbar. class ( colormap ), intent ( in ) :: this !! The colormap object. character ( len = :), allocatable :: rst !! The label. if ( allocated ( this % m_label )) then rst = this % m_label else rst = \"\" end if end function ! -------------------- subroutine cm_set_label ( this , x ) !! Sets the label to associate with the colorbar. class ( colormap ), intent ( inout ) :: this !! The colormap object. character ( len = * ), intent ( in ) :: x !! The label. this % m_label = x end subroutine ! ------------------------------------------------------------------------------ pure function cm_get_horizontal ( this ) result ( rst ) !! Gets a logical value determining if the colormap should be !! drawn horizontally and below the plot. class ( colormap ), intent ( in ) :: this !! The colormap object. logical :: rst !! Returns true if the colormap should be drawn horizontally; !! else, false. rst = this % m_horizontal end function ! -------------------- subroutine cm_set_horizontal ( this , x ) !! Sets a logical value determining if the colormap should be !! drawn horizontally and below the plot. class ( colormap ), intent ( inout ) :: this !! The colormap object. logical , intent ( in ) :: x !! Set to true if the colormap should be drawn horizontally; !! else, false. this % m_horizontal = x end subroutine ! ------------------------------------------------------------------------------ pure function cm_get_draw_border ( this ) result ( rst ) !! Gets a logical value determining if the border should be drawn. class ( colormap ), intent ( in ) :: this !! The colormap object. logical :: rst !! Returns true if the border should be drawn; else, false. rst = this % m_drawBorder end function ! -------------------- subroutine cm_set_draw_border ( this , x ) !! Sets a logical value determining if the border should be drawn. class ( colormap ), intent ( inout ) :: this !! The colormap object. logical , intent ( in ) :: x !! Set to true if the border should be drawn; else, false. this % m_drawBorder = x end subroutine ! ------------------------------------------------------------------------------ pure function cm_get_show_tics ( this ) result ( rst ) !! Gets a logical value determining if the tic marks should be drawn. class ( colormap ), intent ( in ) :: this !! The colormap object. logical :: rst !! Returns true if the tic marks should be drawn; else, false. rst = this % m_showTics end function ! -------------------- subroutine cm_set_show_tics ( this , x ) !! Sets a logical value determining if the tic marks should be drawn. class ( colormap ), intent ( inout ) :: this !! The colormap object. logical , intent ( in ) :: x !! Set to true if the tic marks should be drawn; else, false. this % m_showTics = x end subroutine ! ------------------------------------------------------------------------------ ! TO DO: ! - Set user-defined tic labels & limits (ref: http://gnuplot.sourceforge.net/demo_5.4/cerf.html) ! ****************************************************************************** ! RAINBOW_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function rcm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( rainbow_colormap ), intent ( in ) :: this !! The rainbow_colormap object. character ( len = :), allocatable :: x !! The command string. x = '0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"green\", 4 \"yellow\", ' // & '5 \"orange\", 6 \"red\", 7 \"dark-red\"' end function ! ****************************************************************************** ! HOT_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function hcm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( hot_colormap ), intent ( in ) :: this !! The hot_colormap object. character ( len = :), allocatable :: x !! The command string. x = '0 \"black\", 1 \"red\", 2 \"orange\", 3 \"yellow\", 4 \"white\"' end function ! ****************************************************************************** ! COOL_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function ccm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( cool_colormap ), intent ( in ) :: this !! The cool_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str call str % append ( \"0 '#08589E',\" ) call str % append ( \"1 '#2B8CBE',\" ) call str % append ( \"2 '#4EB3D3',\" ) call str % append ( \"3 '#7BCCC4',\" ) call str % append ( \"4 '#A8DDB5',\" ) call str % append ( \"5 '#CCEBC5',\" ) call str % append ( \"6 '#E0F3DB',\" ) call str % append ( \"7 '#F7FCF0'\" ) x = char ( str % to_string ()) ! x = '0 \"blue\", 1 \"turquoise\", 2 \"light-green\"' end function ! ****************************************************************************** ! PARULA_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function pcm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( parula_colormap ), intent ( in ) :: this !! The parula_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str call str % append ( \"0 '#352a87',\" ) call str % append ( \"1 '#0363e1',\" ) call str % append ( \"2 '#1485d4',\" ) call str % append ( \"3 '#06a7c6',\" ) call str % append ( \"4 '#38b99e',\" ) call str % append ( \"5 '#92bf73',\" ) call str % append ( \"6 '#d9ba56',\" ) call str % append ( \"7 '#fcce2e',\" ) call str % append ( \"8 '#f9fb0e'\" ) x = char ( str % to_string ()) end function ! ****************************************************************************** ! GREY_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function gcm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( grey_colormap ), intent ( in ) :: this !! The grey_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str call str % append ( \"0 '#FFFFFF',\" ) call str % append ( \"1 '#F0F0F0',\" ) call str % append ( \"2 '#D9D9D9',\" ) call str % append ( \"3 '#BDBDBD',\" ) call str % append ( \"4 '#969696',\" ) call str % append ( \"5 '#737373',\" ) call str % append ( \"6 '#525252',\" ) call str % append ( \"7 '#252525'\" ) x = char ( str % to_string ()) end function ! ****************************************************************************** ! EARTH_COLORMAP ! ------------------------------------------------------------------------------ function ecm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( earth_colormap ), intent ( in ) :: this !! The earth_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str call str % append ( \"0 '#8C510A',\" ) call str % append ( \"1 '#BF812D',\" ) call str % append ( \"2 '#DFC27D',\" ) call str % append ( \"3 '#F6E8C3',\" ) call str % append ( \"4 '#D9F0D3',\" ) call str % append ( \"5 '#A6DBA0',\" ) call str % append ( \"6 '#5AAE61',\" ) call str % append ( \"7 '#1B7837'\" ) x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ ! Additional Color Maps: ! https://github.com/Gnuplotting/gnuplot-palettes ! ****************************************************************************** ! ADDED: Jan. 08, 2024 - JAC ! CUSTOM_COLORMAP ! ------------------------------------------------------------------------------ function custom_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( custom_colormap ), intent ( in ) :: this !! The custom_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str integer ( int32 ) :: i , n , r , g , b type ( color ) :: clr if (. not . associated ( this % m_map )) then allocate ( character ( len = 0 ) :: x ) return end if n = this % m_map % get_levels () do i = 0 , n - 1 ! Get the RGB triple call this % m_map % get_RGB ( i , clr % red , clr % green , clr % blue ) ! Append the color information call str % append ( to_string ( i )) call str % append ( \" '#\" ) call str % append ( clr % to_hex_string ()) call str % append ( \"'\" ) if ( i /= n - 1 ) then call str % append ( \",\" ) end if end do x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine custom_set ( this , map , err ) !! Sets the FORCOLORMAP colormap object. class ( custom_colormap ), intent ( inout ) :: this !! The custom_colormap object. class ( cmap ), intent ( in ) :: map !! The FORCOLORMAP colormap object. The custom_colormap object !! stores a copy of this object; therefore, any changes made to !! x after calls to this routine will not impact the behavior of !! the custom_colormap object. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Process if ( associated ( this % m_map )) deallocate ( this % m_map ) allocate ( this % m_map , source = map , stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"custom_set\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ function custom_get ( this ) result ( rst ) !! Gets a pointer to the FORCOLORMAP colormap object. class ( custom_colormap ), intent ( in ) :: this !! The custom_colormap object. class ( cmap ), pointer :: rst !! A pointer to the FORCOLORMAP colormap object. rst => this % m_map end function ! ------------------------------------------------------------------------------ subroutine custom_final ( this ) type ( custom_colormap ), intent ( inout ) :: this !! The custom_colormap object. if ( associated ( this % m_map )) then deallocate ( this % m_map ) nullify ( this % m_map ) end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_colormap.f90.html"},{"title":"fplot_colors.f90 – FPLOT","text":"Contents Modules fplot_colors Source Code fplot_colors.f90 Source Code ! fplot_colors.f90 module fplot_colors use iso_fortran_env implicit none private public :: color public :: operator ( == ) public :: operator ( /= ) public :: CLR_BLACK public :: CLR_WHITE public :: CLR_RED public :: CLR_LIME public :: CLR_BLUE public :: CLR_YELLOW public :: CLR_CYAN public :: CLR_MAGENTA public :: CLR_SILVER public :: CLR_GRAY public :: CLR_MAROON public :: CLR_OLIVE public :: CLR_GREEN public :: CLR_PURPLE public :: CLR_TEAL public :: CLR_NAVY public :: CLR_ORANGE public :: color_list type color !! Describes an RGB color. integer ( int32 ), public :: red = 0 !! The red component of the color (must be between 0 and 255). integer ( int32 ), public :: green = 0 !! The green component of the color (must be between 0 and 255). integer ( int32 ), public :: blue = 255 !! The blue component of the color (must be between 0 and 255). contains procedure , public , pass :: to_hex_string => clr_to_hex_string procedure , public , pass :: copy_from => clr_copy_from end type interface operator ( == ) module procedure :: clr_equals end interface interface operator ( /= ) module procedure :: clr_not_equals end interface type ( color ), parameter :: CLR_BLACK = color ( 0 , 0 , 0 ) !! Black. type ( color ), parameter :: CLR_WHITE = color ( 255 , 255 , 255 ) !! White. type ( color ), parameter :: CLR_RED = color ( 255 , 0 , 0 ) !! Red. type ( color ), parameter :: CLR_LIME = color ( 0 , 255 , 0 ) !! Lime. type ( color ), parameter :: CLR_BLUE = color ( 0 , 0 , 255 ) !! Blue. type ( color ), parameter :: CLR_YELLOW = color ( 255 , 255 , 0 ) !! Yellow. type ( color ), parameter :: CLR_CYAN = color ( 0 , 255 , 255 ) !! Cyan. type ( color ), parameter :: CLR_MAGENTA = color ( 255 , 0 , 255 ) !! Magenta. type ( color ), parameter :: CLR_SILVER = color ( 192 , 192 , 192 ) !! Silver. type ( color ), parameter :: CLR_GRAY = color ( 128 , 128 , 128 ) !! Gray. type ( color ), parameter :: CLR_MAROON = color ( 128 , 0 , 0 ) !! Maroon. type ( color ), parameter :: CLR_OLIVE = color ( 128 , 128 , 0 ) !! Olive. type ( color ), parameter :: CLR_GREEN = color ( 0 , 128 , 0 ) !! Green. type ( color ), parameter :: CLR_PURPLE = color ( 128 , 0 , 128 ) !! Purple. type ( color ), parameter :: CLR_TEAL = color ( 0 , 128 , 128 ) !! Teal. type ( color ), parameter :: CLR_NAVY = color ( 0 , 0 , 128 ) !! Navy. type ( color ), parameter :: CLR_ORANGE = color ( 255 , 165 , 0 ) !! Orange. ! A list of colors that can be cycled through by plotting code type ( color ), parameter , dimension ( 7 ) :: color_list = [ & color ( 0 , int ( 0.447 * 255 ), int ( 0.741 * 255 )), & color ( int ( 0.85 * 255 ), int ( 0.325 * 255 ), int ( 0.098 * 255 )), & color ( int ( 0.929 * 255 ), int ( 0.694 * 255 ), int ( 0.125 * 255 )), & color ( int ( 0.494 * 255 ), int ( 0.184 * 255 ), int ( 0.556 * 255 )), & color ( int ( 0.466 * 255 ), int ( 0.674 * 255 ), int ( 0.188 * 255 )), & color ( int ( 0.301 * 255 ), int ( 0.745 * 255 ), int ( 0.933 * 255 )), & color ( int ( 0.635 * 255 ), int ( 0.078 * 255 ), int ( 0.184 * 255 ))] contains ! ------------------------------------------------------------------------------ pure function clr_to_hex_string ( this ) result ( txt ) !! Returns the color in hexadecimal format. class ( color ), intent ( in ) :: this !! The color object. character ( 6 ) :: txt !! A string containing the hexadecimal equivalent. ! Local Variables integer ( int32 ) :: r , g , b , clr ! Clip each color if necessary if ( this % red < 0 ) then r = 0 else if ( this % red > 255 ) then r = 255 else r = this % red end if if ( this % green < 0 ) then g = 0 else if ( this % green > 255 ) then g = 255 else g = this % green end if if ( this % blue < 0 ) then b = 0 else if ( this % blue > 255 ) then b = 255 else b = this % blue end if ! Build the color information clr = ishft ( r , 16 ) + ishft ( g , 8 ) + b ! Convert the integer to a hexadecimal string write ( txt , '(Z6.6)' ) clr end function ! ------------------------------------------------------------------------------ subroutine clr_copy_from ( this , clr ) !! Copies another color to this color. class ( color ), intent ( inout ) :: this !! The color object. class ( color ), intent ( in ) :: clr !! The color to copy. this % red = clr % red this % green = clr % green this % blue = clr % blue end subroutine ! ****************************************************************************** ! ADDED: JAN. 09, 2024 - JAC ! ------------------------------------------------------------------------------ ! pure subroutine clr_assign(x, y) ! type(color), intent(out) :: x ! class(color), intent(in) :: y ! call x%copy_from(y) ! end subroutine ! ------------------------------------------------------------------------------ pure function clr_equals ( x , y ) result ( rst ) type ( color ), intent ( in ) :: x , y logical :: rst rst = . true . if ( x % red /= y % red . or . & x % green /= y % green . or . & x % blue /= y % blue & ) then rst = . false . end if end function ! ------------------------------------------------------------------------------ pure function clr_not_equals ( x , y ) result ( rst ) type ( color ), intent ( in ) :: x , y logical :: rst rst = . not . clr_equals ( x , y ) end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_colors.f90.html"},{"title":"fplot_constants.f90 – FPLOT","text":"Contents Modules fplot_constants Source Code fplot_constants.f90 Source Code module fplot_constants use iso_fortran_env implicit none ! ****************************************************************************** ! GNUPLOT TERMINAL CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: GNUPLOT_TERMINAL_WIN32 = 1 !! Defines a Win32 terminal. integer ( int32 ), parameter :: GNUPLOT_TERMINAL_WXT = 2 !! Defines a WXT terminal. integer ( int32 ), parameter :: GNUPLOT_TERMINAL_QT = 3 !! Defines a QT terminal. integer ( int32 ), parameter :: GNUPLOT_TERMINAL_PNG = 4 !! Defines a PNG terminal. integer ( int32 ), parameter :: GNUPLOT_TERMINAL_LATEX = 5 !! Defines a LATEX terminal. ! ****************************************************************************** ! MARKER CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: MARKER_PLUS = 1 !! Defines a + data point marker. integer ( int32 ), parameter :: MARKER_X = 2 !! Defines an x data point marker. integer ( int32 ), parameter :: MARKER_ASTERISK = 3 !! Defines an * data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_SQUARE = 4 !! Defines an empty square-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_SQUARE = 5 !! Defines an filled square-shaped data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_CIRCLE = 6 !! Defines an empty circle-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_CIRCLE = 7 !! Defines an filled circle-shaped data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_TRIANGLE = 8 !! Defines an empty triangle-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_TRIANGLE = 9 !! Defines an filled triangle-shaped data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_NABLA = 10 !! Defines an empty nabla-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_NABLA = 11 !! Defines an filled nabla-shaped data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_RHOMBUS = 12 !! Defines an empty rhombus-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_RHOMBUS = 13 !! Defines an filled rhombus-shaped data point marker. ! ****************************************************************************** ! LINE CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: LINE_SOLID = 1 !! Defines a solid line. integer ( int32 ), parameter :: LINE_DASHED = 2 !! Defines a dashed line. integer ( int32 ), parameter :: LINE_DOTTED = 3 !! Defines a dotted line. integer ( int32 ), parameter :: LINE_DASH_DOTTED = 4 !! Defines a dash-dotted line. integer ( int32 ), parameter :: LINE_DASH_DOT_DOT = 5 !! Defines a dash-dot-dotted line. ! ****************************************************************************** ! LEGEND CONSTANTS ! ------------------------------------------------------------------------------ character ( len = * ), parameter :: LEGEND_TOP = \"top\" !! Defines the legend should be placed at the top of the plot. character ( len = * ), parameter :: LEGEND_CENTER = \"center\" !! Defines the legend should be centered on the plot. character ( len = * ), parameter :: LEGEND_LEFT = \"left\" !! Defines the legend should be placed at the left of the plot. character ( len = * ), parameter :: LEGEND_RIGHT = \"right\" !! Defines the legend should be placed at the right of the plot. character ( len = * ), parameter :: LEGEND_BOTTOM = \"bottom\" !! Defines the legend should be placed at the bottom of the plot. character ( len = * ), parameter :: LEGEND_ARRANGE_VERTICALLY = \"vertical\" !! Defines the legend should be arranged such that the column count !! is minimized. character ( len = * ), parameter :: LEGEND_ARRANGE_HORIZONTALLY = \"horizontal\" !! Defines the legend should be arranged such that the row count !! is minimized. ! ****************************************************************************** ! POLAR PLOT CONSTANTS ! ------------------------------------------------------------------------------ character ( len = * ), parameter :: POLAR_THETA_TOP = \"top\" !! States that theta should start at the top of the plot. character ( len = * ), parameter :: POLAR_THETA_RIGHT = \"right\" !! States that theta should start at the right of the plot. character ( len = * ), parameter :: POLAR_THETA_BOTTOM = \"bottom\" !! States that theta should start at the bottom of the plot. character ( len = * ), parameter :: POLAR_THETA_LEFT = \"left\" !! States that theta should start at the left of the plot. character ( len = * ), parameter :: POLAR_THETA_CCW = \"ccw\" !! States that theta should proceed in a counter-clockwise direction. character ( len = * ), parameter :: POLAR_THETA_CW = \"cw\" !! States that theta should proceed in a clockwise direction. ! ****************************************************************************** ! COORDINATE SYSTEM CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: COORDINATES_CARTESIAN = 100 !! Defines a Cartesian coordinate system. integer ( int32 ), parameter :: COORDINATES_SPHERICAL = 101 !! Defines a spherical coordinate system. integer ( int32 ), parameter :: COORDINATES_CYLINDRICAL = 102 !! Defines a cylindrical coordinate system. ! ****************************************************************************** ! ARROW CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: ARROW_NO_HEAD = 0 !! Defines an arrow with no head. integer ( int32 ), parameter :: ARROW_HEAD = 1 !! Defines an arrow with a traditional head. integer ( int32 ), parameter :: ARROW_BACKHEAD = 2 !! Defines an arrow with it's head at it's back end (tail). integer ( int32 ), parameter :: ARROW_HEADS = 3 !! Defines an arrow with a head on both ends. integer ( int32 ), parameter :: ARROW_FILLED = 100 !! Defines a filled arrow head. integer ( int32 ), parameter :: ARROW_EMPTY = 101 !! Defines an empty arrow head. integer ( int32 ), parameter :: ARROW_NO_FILL = 102 !! Defines an arrow head without fill. integer ( int32 ), parameter :: ARROW_NO_BORDER = 103 !! Defines an arrow head with no border. ! ****************************************************************************** ! PLOT DATA CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: PLOTDATA_MAX_NAME_LENGTH = 128 !! Defines the maximum number of characters allowed in a graph label. ! ****************************************************************************** ! PRIVATE/DEFAULT CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: GNUPLOT_DEFAULT_WINDOW_WIDTH = 640 !! The default GNUPLOT window width, in pixels. integer ( int32 ), parameter :: GNUPLOT_DEFAULT_WINDOW_HEIGHT = 420 !! The default GNUPLOT window height, in pixels. integer ( int32 ), parameter :: GNUPLOT_MAX_LABEL_LENGTH = 128 !! Defines the maximum number of characters allowed in a graph label. character ( len = * ), parameter :: GNUPLOT_DEFAULT_FONTNAME = \"Calibri\" !! Defines the default font used by text on the graph. integer ( int32 ), parameter :: GNUPLOT_DEFAULT_FONT_SIZE = 14 !! Defines the default font size used by text on the graph. integer ( int32 ), parameter :: GNUPLOT_MAX_PATH_LENGTH = 256 !! Defines the maximum number of characters allowed in a file path. end module","tags":"","loc":"sourcefile\\fplot_constants.f90.html"},{"title":"fplot_core.f90 – FPLOT","text":"Contents Modules fplot_core Source Code fplot_core.f90 Source Code module fplot_core !! FPLOT is a Fortran library providing a means of interacting with !! [GNUPLOT](http://www.gnuplot.info/) from a Fortran program. The library !! is designed in an object-oriented manner, and as such utilizes language !! features that require a compiler that supports the 2003 standard. !! Additionally, it is expected that Gnuplot is installed on the system !! path. For full functionallity, a minimum of GNUPLOT v5.2 is expected. use fplot_constants use fplot_core_routines use fplot_colors use fplot_plot_object use fplot_plot_data use fplot_plot_axis use fplot_terminal use fplot_windows_terminal use fplot_qt_terminal use fplot_wxt_terminal use fplot_png_terminal use fplot_latex_terminal use fplot_label use fplot_arrow use fplot_legend use fplot_plot_data_2d use fplot_plot_data_3d use fplot_surface_plot_data use fplot_plot_data_error_bars use fplot_plot_data_bar use fplot_plot_data_histogram use fplot_colormap use fplot_filled_plot_data use fplot_triangulations_delaunay_2d use fplot_plot_data_tri_2d use fplot_delaunay_tri_surface use fplot_tri_surface_plot_data use fplot_vector_field_plot_data use fplot_plot use fplot_plot_2d use fplot_plot_3d use fplot_surface_plot use fplot_multiplot use fplot_plot_bar use fplot_plot_polar implicit none private ! FPLOT_CONSTANTS.F90 public :: GNUPLOT_TERMINAL_WIN32 public :: GNUPLOT_TERMINAL_WXT public :: GNUPLOT_TERMINAL_QT public :: GNUPLOT_TERMINAL_PNG public :: GNUPLOT_TERMINAL_LATEX public :: MARKER_PLUS public :: MARKER_X public :: MARKER_ASTERISK public :: MARKER_EMPTY_SQUARE public :: MARKER_FILLED_SQUARE public :: MARKER_EMPTY_CIRCLE public :: MARKER_FILLED_CIRCLE public :: MARKER_EMPTY_TRIANGLE public :: MARKER_FILLED_TRIANGLE public :: MARKER_EMPTY_NABLA public :: MARKER_FILLED_NABLA public :: MARKER_EMPTY_RHOMBUS public :: MARKER_FILLED_RHOMBUS public :: LINE_SOLID public :: LINE_DASHED public :: LINE_DOTTED public :: LINE_DASH_DOTTED public :: LINE_DASH_DOT_DOT public :: LEGEND_CENTER public :: LEGEND_LEFT public :: LEGEND_RIGHT public :: LEGEND_TOP public :: LEGEND_BOTTOM public :: LEGEND_ARRANGE_VERTICALLY public :: LEGEND_ARRANGE_HORIZONTALLY public :: POLAR_THETA_BOTTOM public :: POLAR_THETA_LEFT public :: POLAR_THETA_RIGHT public :: POLAR_THETA_TOP public :: POLAR_THETA_CCW public :: POLAR_THETA_CW public :: PLOTDATA_MAX_NAME_LENGTH public :: COORDINATES_CARTESIAN public :: COORDINATES_SPHERICAL public :: COORDINATES_CYLINDRICAL public :: ARROW_NO_HEAD public :: ARROW_HEAD public :: ARROW_BACKHEAD public :: ARROW_HEADS public :: ARROW_FILLED public :: ARROW_EMPTY public :: ARROW_NO_FILL public :: ARROW_NO_BORDER ! FPLOT_CORE_ROUTINES.F90 public :: linspace public :: logspace public :: meshgrid ! FPLOT_COLORS.F90 public :: color public :: operator ( == ) public :: operator ( /= ) public :: CLR_BLACK public :: CLR_WHITE public :: CLR_RED public :: CLR_LIME public :: CLR_BLUE public :: CLR_YELLOW public :: CLR_CYAN public :: CLR_MAGENTA public :: CLR_SILVER public :: CLR_GRAY public :: CLR_MAROON public :: CLR_OLIVE public :: CLR_GREEN public :: CLR_PURPLE public :: CLR_TEAL public :: CLR_NAVY public :: CLR_ORANGE public :: color_list ! FPLOT_PLOT_OBJECT.F90 public :: plot_object public :: get_string_result ! FPLOT_PLOT_DATA.F90 public :: plot_data public :: pd_get_string_result public :: plot_data_colored public :: scatter_plot_data public :: spd_get_int_value public :: spd_get_string_result public :: spd_get_value public :: spd_set_value ! FPLOT_PLOT_AXIS.F90 public :: plot_axis public :: pa_get_string_result public :: x_axis public :: y_axis public :: y2_axis public :: z_axis ! FPLOT_TERMINAL.F90 public :: terminal public :: term_get_string_result ! FPLOT_WINDOWS_TERMINAL.F90 public :: windows_terminal ! FPLOT_QT_TERMINAL.F90 public :: qt_terminal ! FPLOT_WXT_TERMINAL.F90 public :: wxt_terminal ! FPLOT_PNG_TERMINAL.F90 public :: png_terminal ! FPLOT_LATEX_TERMINAL.F90 public :: latex_terminal ! FPLOT_LABEL.F90 public :: plot_label ! FPLOT_ARROW.F90 public :: plot_arrow ! FPLOT_LEGEND.F90 public :: legend ! FPLOT_PLOT_DATA_2D.F90 public :: plot_data_2d ! FPLOT_PLOT_DATA_3D.F90 public :: plot_data_3d ! FPLOT_SURFACE_PLOT_DATA.F90 public :: surface_plot_data ! FPLOT_PLOT_DATA_ERROR_BARS.F90 public :: plot_data_error_bars ! FPLOT_PLOT_DATA_BAR.F90 public :: plot_data_bar ! FPLOT_PLOT_DATA_HISTOGRAM.F90 public :: plot_data_histogram ! FPLOT_COLORMAP.F90 public :: cmap public :: colormap public :: cm_get_string_result public :: rainbow_colormap public :: hot_colormap public :: cool_colormap public :: parula_colormap public :: grey_colormap public :: earth_colormap public :: custom_colormap ! FPLOT_FILLED_PLOT_DATA.F90 public :: filled_plot_data ! FPLOT_TRIANGULATIONS_DELAUNAY_2D.F90 public :: delaunay_tri_2d ! FPLOT_PLOT_DATA_TRI_2D.F90 public :: plot_data_tri_2d ! FPLOT_DELAUNAY_TRI_SURFACE.F90 public :: delaunay_tri_surface ! FPLOT_TRI_SURFACE_PLOT_DATA.F90 public :: tri_surface_plot_data ! FPLOT_VECTOR_FIELD_PLOT_DATA.F90 public :: vector_field_plot_data ! FPLOT_PLOT.F90 public :: plot ! FPLOT_PLOT_2D.F90 public :: plot_2d ! FPLOT_PLOT_3D.F90 public :: plot_3d ! FPLOT_SURFACE_PLOT.F90 public :: surface_plot ! FPLOT_MULTIPLOT.F90 public :: multiplot ! FPLOT_PLOT_BAR.F90 public :: plot_bar ! FPLOT_PLOT_POLAR.F90 public :: plot_polar end module","tags":"","loc":"sourcefile\\fplot_core.f90.html"},{"title":"fplot_core_routines.f90 – FPLOT","text":"Contents Modules fplot_core_routines Source Code fplot_core_routines.f90 Source Code ! fplot_core_routines.f90 module fplot_core_routines use iso_fortran_env implicit none private public :: linspace public :: logspace public :: meshgrid contains ! ------------------------------------------------------------------------------ pure function linspace ( start , finish , npts ) result ( x ) !! Constructs a linearly spaced array. real ( real64 ), intent ( in ) :: start !! The first value in the array. real ( real64 ), intent ( in ) :: finish !! The last value in the array. integer ( int32 ), intent ( in ) :: npts !! The number of values in the array. real ( real64 ), allocatable , dimension (:) :: x !! The resulting array. ! Local Variables integer ( int32 ) :: i real ( real64 ) :: dx ! Process allocate ( x ( npts )) dx = ( finish - start ) / ( npts - 1.0d0 ) x ( 1 ) = start do i = 2 , npts x ( i ) = x ( i - 1 ) + dx end do end function ! ------------------------------------------------------------------------------ pure function logspace ( start , finish , npts ) result ( x ) !! Construcst a logarithmically spaced array. real ( real64 ), intent ( in ) :: start !! The exponent of the first value in the array. real ( real64 ), intent ( in ) :: finish !! The exponent of the final value in the array. integer ( int32 ), intent ( in ) :: npts !! The number of values in the array. real ( real64 ), allocatable , dimension (:) :: x !! The resulting array. ! Local Variables integer ( int32 ) :: i real ( real64 ) :: dx , exponent ! Process allocate ( x ( npts )) dx = ( finish - start ) / ( npts - 1.0d0 ) exponent = start do i = 1 , npts x ( i ) = 1.0d1 ** exponent exponent = exponent + dx end do end function ! ------------------------------------------------------------------------------ pure function meshgrid ( x , y ) result ( xy ) !! Constructs two matrices (X and Y) from x and y data arrays. real ( real64 ), intent ( in ), dimension (:) :: x !! An M-element array of x data points. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array of y data points. real ( real64 ), allocatable , dimension (:,:,:) :: xy !! An N-by-M-by-2 array containing the x data matrix on the first !! page of the array, and the y data matrix on the second page. ! Local Variables integer ( int32 ) :: i , nx , ny ! Process nx = size ( x ) ny = size ( y ) allocate ( xy ( ny , nx , 2 )) do i = 1 , ny xy ( i ,:, 1 ) = x end do do i = 1 , nx xy (:, i , 2 ) = y end do end function end module","tags":"","loc":"sourcefile\\fplot_core_routines.f90.html"},{"title":"fplot_delaunay_tri_surface.f90 – FPLOT","text":"Contents Modules fplot_delaunay_tri_surface Source Code fplot_delaunay_tri_surface.f90 Source Code ! fplot_delaunay_tri_surface.f90 module fplot_delaunay_tri_surface use iso_fortran_env use ieee_arithmetic use fplot_triangulations_delaunay_2d use fplot_errors use ferror implicit none private public :: delaunay_tri_surface type , extends ( delaunay_tri_2d ) :: delaunay_tri_surface !! Provides a type describing a triangulated surface. real ( real64 ), private , allocatable , dimension (:) :: m_z !! An array of the z-coordinates of each point. contains procedure , public :: define_function_values => dts_define_fcn procedure , public :: get_points_z => dts_get_z generic , public :: evaluate => dts_interp_1 , dts_interp_2 procedure , private :: dts_interp_1 procedure , private :: dts_interp_2 end type contains ! ------------------------------------------------------------------------------ subroutine dts_define_fcn ( this , z , err ) !! Defines the function values that correspond to the x and y !! data points. class ( delaunay_tri_surface ), intent ( inout ) :: this !! The delaunay_tri_surface object. real ( real64 ), intent ( in ), dimension (:) :: z !! An N-element array containing the function values for !! each x and y coordinate. Notice, the x and y coordinates must !! already be defined prior to calling this routine. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = this % get_point_count () ! Input Check if ( n == 0 ) then call errmgr % report_error ( \"dts_define_fcn\" , & \"No x-y coordinates have been defined.\" , & PLOT_INVALID_OPERATION_ERROR ) return end if if ( size ( z ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"dts_define_fcn\" , & \"z\" , n , size ( z )) return end if ! Store the data if ( allocated ( this % m_z )) deallocate ( this % m_z ) allocate ( this % m_z ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"dts_define_fcn\" , flag ) return end if this % m_z = z end subroutine ! ------------------------------------------------------------------------------ pure function dts_get_z ( this ) result ( rst ) !! Gets the z-coordinates of each point. class ( delaunay_tri_surface ), intent ( in ) :: this !! The delaunay_tri_surface object. real ( real64 ), allocatable , dimension (:) :: rst !! An array of the z-coordinates of each point. if ( allocated ( this % m_z )) then rst = this % m_z else allocate ( rst ( 0 )) end if end function ! ------------------------------------------------------------------------------ ! Interpolation Routine - Barycentric Coordinate Approach ! https://www.iue.tuwien.ac.at/phd/nentchev/node25.html ! https://academic.csuohio.edu/duffy_s/CVE_512_11.pdf pure function dts_interp_1 ( this , x , y ) result ( z ) !! Evaluates the function at the requested point by means of !! linear interpolation. class ( delaunay_tri_surface ), intent ( in ) :: this !! The delaunay_tri_surface object. real ( real64 ), intent ( in ) :: x !! The x-coordinate at which to evaluate the function. real ( real64 ), intent ( in ) :: y !! The y-coordinate at which to evaluate the function. real ( real64 ) :: z !! The function value. If the point (x, y) does not lie within the !! range of defined values, then a value of NaN is returned. ! Local Variables integer ( int32 ) :: i , n1 , n2 , n3 real ( real64 ) :: x1 , x2 , x3 , y1 , y2 , y3 , z1 , z2 , z3 integer ( int32 ), allocatable , dimension (:,:) :: indices real ( real64 ), allocatable , dimension (:) :: xc , yc , zc ! Initialization z = ieee_value ( z , ieee_quiet_nan ) indices = this % get_indices () xc = this % get_points_x () yc = this % get_points_y () zc = this % get_points_z () ! Quick Return if ( this % get_triangle_count () == 0 . or . & this % get_point_count () == 0 . or . & size ( zc ) == 0 ) return ! Locate the triangle to which the point (x, y) belongs. If no triangle ! is found, simply return NaN i = this % find_triangle ( x , y ) if ( i == - 1 ) return ! Get the triangle vertices n1 = indices ( i , 1 ) n2 = indices ( i , 2 ) n3 = indices ( i , 3 ) x1 = xc ( n1 ) y1 = yc ( n1 ) z1 = zc ( n1 ) x2 = xc ( n2 ) y2 = yc ( n2 ) z2 = zc ( n2 ) x3 = xc ( n3 ) y3 = yc ( n3 ) z3 = zc ( n3 ) ! Perform the interpolation z = linear_interp ( x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 , x , y ) end function ! -------------------- pure function dts_interp_2 ( this , x , y ) result ( z ) !! Evaluates the function at the requested point by means of !! linear interpolation. class ( delaunay_tri_surface ), intent ( in ) :: this !! The delaunay_tri_surface object. real ( real64 ), intent ( in ), dimension (:) :: x !! The x data coordinates. real ( real64 ), intent ( in ), dimension (:) :: y !! The x data coordinates. real ( real64 ), allocatable , dimension (:) :: z !! The interpolated z coordinate points. If the point (x, y) does !! not lie within the range of defined values, then a value of NaN !! is returned. ! Local Variables integer ( int32 ) :: i , j , n1 , n2 , n3 , nxy real ( real64 ) :: x1 , x2 , x3 , y1 , y2 , y3 , z1 , z2 , z3 , nan integer ( int32 ), allocatable , dimension (:,:) :: indices real ( real64 ), allocatable , dimension (:) :: xc , yc , zc ! Initialization nxy = min ( size ( x ), size ( y )) nan = ieee_value ( nan , ieee_quiet_nan ) allocate ( z ( nxy )) z = nan indices = this % get_indices () xc = this % get_points_x () yc = this % get_points_y () zc = this % get_points_z () ! Quick Return if ( this % get_triangle_count () == 0 . or . & this % get_point_count () == 0 . or . & size ( zc ) == 0 ) return ! Locate the triangle to which the point (x, y) belongs. If no triangle ! is found, simply return NaN do i = 1 , nxy ! Find the index of the triangle j = this % find_triangle ( x ( i ), y ( i )) if ( j == - 1 ) cycle ! Skip if we couldn't find a triangle ! Get the vertices n1 = indices ( j , 1 ) n2 = indices ( j , 2 ) n3 = indices ( j , 3 ) x1 = xc ( n1 ) y1 = yc ( n1 ) z1 = zc ( n1 ) x2 = xc ( n2 ) y2 = yc ( n2 ) z2 = zc ( n2 ) x3 = xc ( n3 ) y3 = yc ( n3 ) z3 = zc ( n3 ) ! Perform the interpolation z ( i ) = linear_interp ( x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 , x ( i ), y ( i )) end do end function ! ------------------------------------------------------------------------------ ! Utilizes linear shape functions to interpolate on a triangle given its ! vertex locations, and the desired interpolation location. Notice, the ! interpolation location is expected to lie within the triangle. This is ! not checked. pure elemental function linear_interp ( x1 , y1 , z1 , x2 , y2 , z2 , x3 , & y3 , z3 , x , y ) result ( z ) real ( real64 ), intent ( in ) :: x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 , x , y real ( real64 ) :: a1 , a2 , a3 , j , z j = ( x2 - x1 ) * y3 + ( x1 - x3 ) * y2 + ( x3 - x2 ) * y1 a1 = ( x2 * y3 - x3 * y2 + ( y2 - y3 ) * x + ( x3 - x2 ) * y ) a2 = ( x3 * y1 - x1 * y3 + ( y3 - y1 ) * x + ( x1 - x3 ) * y ) a3 = ( x1 * y2 - x2 * y1 + ( y1 - y2 ) * x + ( x2 - x1 ) * y ) z = ( a1 * z1 + a2 * z2 + a3 * z3 ) / j end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_delaunay_tri_surface.f90.html"},{"title":"fplot_errors.f90 – FPLOT","text":"Contents Modules fplot_errors Source Code fplot_errors.f90 Source Code module fplot_errors use iso_fortran_env use ferror implicit none ! ****************************************************************************** ! ERROR CODES ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: PLOT_OUT_OF_MEMORY_ERROR = 1000 !! Occurs if there is insufficient memory available for the !! requested operation. integer ( int32 ), parameter :: PLOT_INVALID_INPUT_ERROR = 1001 !! Occurs if an invalid input is provided. integer ( int32 ), parameter :: PLOT_INVALID_OPERATION_ERROR = 1002 !! Occurs if an attempt is made to perform an invalid operation. integer ( int32 ), parameter :: PLOT_ARRAY_SIZE_MISMATCH_ERROR = 1003 !! Occurs if there is an array size mismatch error. integer ( int32 ), parameter :: PLOT_GNUPLOT_FILE_ERROR = 1004 !! Occurs if there is a GNUPLOT file error. contains ! ------------------------------------------------------------------------------ subroutine report_memory_error ( err , fcn , flag ) !! Reports a memory allocation error. class ( errors ), intent ( inout ) :: err !! The error handling object. character ( len = * ), intent ( in ) :: fcn !! The name of the function or subroutine in which the error occurred. integer ( int32 ), intent ( in ) :: flag !! The error flag returned by the system. ! Local Variables character ( len = 256 ) :: msg ! Define the error message write ( 100 , msg ) \"Memory allocation error returning flag \" , flag , \".\" call err % report_error ( fcn , trim ( msg ), PLOT_OUT_OF_MEMORY_ERROR ) ! Formatting 100 format ( A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ subroutine report_file_create_error ( err , fcn , fname , flag ) !! Reports an I/O error related to file creating. class ( errors ), intent ( inout ) :: err !! The error handling object. character ( len = * ), intent ( in ) :: fcn !! The name of the function or subroutine in which the error occurred. character ( len = * ), intent ( in ) :: fname !! The filename. integer ( int32 ), intent ( in ) :: flag !! The error flag returned by the system. ! Local Variables character ( len = 2048 ) :: msg ! Define the error message write ( 100 , msg ) \"File \" , fname , \" could not be created. The error flag \" , & flag , \" was returned.\" call err % report_error ( fcn , trim ( msg ), PLOT_GNUPLOT_FILE_ERROR ) ! Formatting 100 format ( A , A , A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ subroutine report_array_size_mismatch_error ( err , fcn , name , expected , actual ) !! Reports an array size mismatch error. class ( errors ), intent ( inout ) :: err !! The error handling object. character ( len = * ), intent ( in ) :: fcn !! The name of the function or subroutine in which the error occurred. character ( len = * ), intent ( in ) :: name !! The variable name. integer ( int32 ), intent ( in ) :: expected !! The expected array size. integer ( int32 ), intent ( in ) :: actual !! The actual array size. ! Local Variables character ( len = 256 ) :: msg ! Define the message write ( 100 , msg ) \"Array \" , name , \" was found to be of length \" , actual , & \", but was expected to be of length \" , expected , \".\" call err % report_error ( fcn , trim ( msg ), PLOT_ARRAY_SIZE_MISMATCH_ERROR ) ! Formatting 100 format ( A , A , A , I0 , A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ subroutine report_matrix_size_mismatch_error ( err , fcn , name , mexp , nexp , & mact , nact ) !! Reports a matrix size mismatch error. class ( errors ), intent ( inout ) :: err !! The error handling object. character ( len = * ), intent ( in ) :: fcn !! The name of the function or subroutine in which the error occurred. character ( len = * ), intent ( in ) :: name !! The variable name. integer ( int32 ), intent ( in ) :: mexp !! The expected number of rows. integer ( int32 ), intent ( in ) :: nexp !! The expected number of columns. integer ( int32 ), intent ( in ) :: mact !! The actual number of rows. integer ( int32 ), intent ( in ) :: nact !! The actual number of columns. ! Local Variables character ( len = 256 ) :: msg ! Define the error write ( 100 , msg ) \"Matrix \" , name , \" was expected to be of size \" , mexp , & \"-by-\" , nexp , \", but was found to be of size \" , mact , \"-by-\" , nact , \".\" call err % report_error ( fcn , trim ( msg ), PLOT_ARRAY_SIZE_MISMATCH_ERROR ) ! Formatting 100 format ( A , A , A , I0 , A , I0 , A , I0 , A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_errors.f90.html"},{"title":"fplot_filled_plot_data.f90 – FPLOT","text":"Contents Modules fplot_filled_plot_data Source Code fplot_filled_plot_data.f90 Source Code ! fplot_filled_plot_data.f90 module fplot_filled_plot_data use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_colors use ferror use strings implicit none private public :: filled_plot_data type , extends ( plot_data_colored ) :: filled_plot_data !! Defines a two-dimensional filled plot data set. logical , private :: m_useY2 = . false . !! Plot against the secondary y-axis. real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! The data set (column 1 = x, column 2 = y, column 3 = constraint y) contains procedure , public :: get_axes_string => fpd_get_axes_cmd procedure , public :: get_draw_against_y2 => fpd_get_draw_against_y2 procedure , public :: set_draw_against_y2 => fpd_set_draw_against_y2 procedure , public :: get_command_string => fpd_get_cmd procedure , public :: get_data_string => fpd_get_data_cmd procedure , public :: define_data => fpd_define_data end type contains ! ------------------------------------------------------------------------------ function fpd_get_axes_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string defining which axes the data !! is to be plotted against. class ( filled_plot_data ), intent ( in ) :: this !! The filled_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Define which axes the data is to be plotted against if ( this % get_draw_against_y2 ()) then x = \"axes x1y2\" else x = \"axes x1y1\" end if end function ! ------------------------------------------------------------------------------ pure function fpd_get_draw_against_y2 ( this ) result ( x ) !! Gets a value determining if the data should be plotted against !! the secondary y-axis. class ( filled_plot_data ), intent ( in ) :: this !! The filled_plot_data object. logical :: x !! Returns true if the data should be plotted against the secondary !! y-axis; else, false to plot against the primary y-axis. x = this % m_useY2 end function ! -------------------- subroutine fpd_set_draw_against_y2 ( this , x ) !! Sets a value determining if the data should be plotted against !! the secondary y-axis. class ( filled_plot_data ), intent ( inout ) :: this !! The filled_plot_data object. logical , intent ( in ) :: x !! Set to true if the data should be plotted against the secondary !! y-axis; else, false to plot against the primary y-axis. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ function fpd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this !! filled_plot_data object. class ( filled_plot_data ), intent ( in ) :: this !! The filled_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Establish filled data call str % append ( \" with filledcurves\" ) ! Line Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Define the axes structure call str % append ( \" \" ) call str % append ( this % get_axes_string ()) ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function fpd_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data to plot. class ( filled_plot_data ), intent ( in ) :: this !! The filled_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i character ( len = :), allocatable :: nl , delimiter ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) ! Process do i = 1 , size ( this % m_data , 1 ) call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( nl ) end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine fpd_define_data ( this , x , y , yc , err ) !! Defines the data set. class ( filled_plot_data ), intent ( inout ) :: this !! The filled_plot_data object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinate data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinate data. real ( real64 ), intent ( in ), dimension (:) :: yc !! An N-element array containing the constraining curve y !! coordinate data. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables type ( errors ), target :: deferr class ( errors ), pointer :: errmgr integer ( int32 ) :: i , n , flag ! Set up error handling if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking n = size ( x ) if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"fpd_define_data\" , & \"y\" , n , size ( y )) return end if if ( size ( yc ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"fpd_define_data\" , & \"yc\" , n , size ( yc )) return end if ! Allocate space for the data if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 3 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"fpd_define_data\" , flag ) return end if ! Store the data do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = yc ( i ) end do end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_filled_plot_data.f90.html"},{"title":"fplot_label.f90 – FPLOT","text":"Contents Modules fplot_label Source Code fplot_label.f90 Source Code ! fplot_label.f90 module fplot_label use iso_fortran_env use fplot_plot_object use fplot_constants use strings implicit none private public :: plot_label type , extends ( plot_object ) :: plot_label !! Defines a plot label. logical , private :: m_visible = . true . !! Is the label visible? real ( real32 ), private , dimension ( 3 ) :: m_position !! The x, y, and z coordinates of the label. real ( real32 ), private :: m_angle = 0.0 !! The rotation angle of the label. character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_text !! The label text. contains procedure , public :: get_command_string => lbl_get_cmd procedure , public :: get_is_visible => lbl_get_is_visible procedure , public :: set_is_visible => lbl_set_is_visible procedure , public :: get_position => lbl_get_position procedure , public :: set_position => lbl_set_position procedure , public :: get_angle => lbl_get_angle procedure , public :: set_angle => lbl_set_angle procedure , public :: get_text => lbl_get_txt procedure , public :: set_text => lbl_set_txt end type contains ! ------------------------------------------------------------------------------ function lbl_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for the label. class ( plot_label ), intent ( in ) :: this !! The plot_label object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str real ( real32 ) :: pt ( 3 ) ! Initialization call str % initialize () pt = this % get_position () ! If visible, draw the label if ( this % get_is_visible ()) then call str % append ( 'set label \"' ) call str % append ( this % get_text ()) call str % append ( '\"' ) call str % append ( \" at \" ) call str % append ( to_string ( pt ( 1 ))) call str % append ( \",\" ) call str % append ( to_string ( pt ( 2 ))) call str % append ( \",\" ) call str % append ( to_string ( pt ( 3 ))) call str % append ( \" rotate by \" ) call str % append ( to_string ( this % get_angle ())) x = char ( str % to_string ()) end if end function ! ------------------------------------------------------------------------------ pure function lbl_get_is_visible ( this ) result ( x ) !! Gets a value determining if the label is to be drawn. class ( plot_label ), intent ( in ) :: this !! The plot_label object. logical :: x !! Returns true if the label is to be drawn; else, false. x = this % m_visible end function ! -------------------- subroutine lbl_set_is_visible ( this , x ) !! Sets a value determining if the label is to be drawn. class ( plot_label ), intent ( inout ) :: this !! The plot_label object. logical , intent ( in ) :: x !! Set to true if the label is to be drawn; else, false. this % m_visible = x end subroutine ! ------------------------------------------------------------------------------ pure function lbl_get_position ( this ) result ( x ) !! Gets the position of the label in terms of plot coordinates. class ( plot_label ), intent ( in ) :: this !! The plot_label object. real ( real32 ), dimension ( 3 ) :: x !! A 3-element array containing the X, Y, and Z position of the !! label. x = this % m_position end function ! -------------------- subroutine lbl_set_position ( this , x ) !! Sets the position of the label in terms of plot coordinates. class ( plot_label ), intent ( inout ) :: this !! The plot_label object. real ( real32 ), intent ( in ), dimension ( 3 ) :: x !! A 3-element array containing the X, Y, and Z position of the !! label. this % m_position = x end subroutine ! ------------------------------------------------------------------------------ pure function lbl_get_angle ( this ) result ( x ) !! Gets the angle of the label text, in degrees. class ( plot_label ), intent ( in ) :: this !! The plot_label object. real ( real32 ) :: x !! The angle, in degrees. x = this % m_angle end function ! -------------------- subroutine lbl_set_angle ( this , x ) !! Sets the angle of the label text, in degrees. class ( plot_label ), intent ( inout ) :: this !! The plot_label object. real ( real32 ), intent ( in ) :: x !! The angle, in degrees. this % m_angle = x end subroutine ! ------------------------------------------------------------------------------ function lbl_get_txt ( this ) result ( x ) !! Gets the text displayed by the label. class ( plot_label ), intent ( in ) :: this !! The plot_label object. character ( len = :), allocatable :: x !! The text string to display. x = trim ( this % m_text ) end function ! -------------------- subroutine lbl_set_txt ( this , x ) !! Sets the text displayed by the label. class ( plot_label ), intent ( inout ) :: this !! The plot_label object. character ( len = * ), intent ( in ) :: x !! The text string to display. integer ( int32 ) :: n n = min ( len ( x ), PLOTDATA_MAX_NAME_LENGTH ) this % m_text = \"\" this % m_text ( 1 : n ) = x ( 1 : n ) end subroutine ! ****************************************************************************** ! ADDED: JAN. 09, 2024 - JAC ! ------------------------------------------------------------------------------ ! pure subroutine lbl_assign(x, y) ! type(plot_label), intent(out) :: x ! class(plot_label), intent(in) :: y ! x%m_visible = y%m_visible ! x%m_position = y%m_position ! x%m_angle = y%m_angle ! x%m_text = y%m_text ! end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_label.f90.html"},{"title":"fplot_latex_terminal.f90 – FPLOT","text":"Contents Modules fplot_latex_terminal Source Code fplot_latex_terminal.f90 Source Code ! fplot_latex_terminal.f90 module fplot_latex_terminal use iso_fortran_env use fplot_terminal use fplot_constants use strings implicit none private public :: latex_terminal type , extends ( terminal ) :: latex_terminal !! A LATEX terminal. character ( len = 14 ), private :: m_id = \"epslatex color\" !! The terminal ID string character ( len = GNUPLOT_MAX_PATH_LENGTH ), private :: m_fname = \"default.tex\" !! The filename of the file to write. contains procedure , public :: get_filename => tex_get_filename procedure , public :: set_filename => tex_set_filename procedure , public :: get_id_string => tex_get_term_string procedure , public :: get_command_string => tex_get_command_string end type contains ! ------------------------------------------------------------------------------ function tex_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( latex_terminal ), intent ( in ) :: this !! The latex_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function ! ------------------------------------------------------------------------------ function tex_get_filename ( this ) result ( txt ) !! Gets the filename for the output LATEX file. class ( latex_terminal ), intent ( in ) :: this !! The latex_terminal object. character ( len = :), allocatable :: txt !! The filename, including the file extension (.tex). integer ( int32 ) :: n n = len_trim ( this % m_fname ) allocate ( character ( len = n ) :: txt ) txt = trim ( this % m_fname ) end function ! -------------------- subroutine tex_set_filename ( this , txt ) !! Sets the filename for the output LATEX file. class ( latex_terminal ), intent ( inout ) :: this !! The latex_terminal object. character ( len = * ), intent ( in ) :: txt !! The filename, including the file extension (.tex). integer ( int32 ) :: n n = min ( len_trim ( txt ), GNUPLOT_MAX_PATH_LENGTH ) this % m_fname = \"\" if ( n /= 0 ) then this % m_fname ( 1 : n ) = txt ( 1 : n ) else this % m_fname = \"default.tex\" end if end subroutine ! ------------------------------------------------------------------------------ function tex_get_command_string ( this ) result ( x ) !! Returns the appropriate GNUPLOT command string to establish !! appropriate parameters. class ( latex_terminal ), intent ( in ) :: this !! The latex_terminal object. character ( len = :), allocatable :: x !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str ! Process call str % initialize () call str % append ( \"set term epslatex color \" ) call str % append ( \" font \" ) call str % append ( '\"' ) call str % append ( this % get_font_name ()) call str % append ( ',' ) call str % append ( to_string ( this % get_font_size ())) call str % append ( '\"' ) call str % append ( \" size \" ) call str % append ( to_string ( this % get_window_width ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_window_height ())) call str % append ( new_line ( 'a' )) call str % append ( \"set output \" ) call str % append ( '\"' ) call str % append ( this % get_filename ()) call str % append ( '\"' ) x = char ( str % to_string ()) end function end module","tags":"","loc":"sourcefile\\fplot_latex_terminal.f90.html"},{"title":"fplot_legend.f90 – FPLOT","text":"Contents Modules fplot_legend Source Code fplot_legend.f90 Source Code ! fplot_legend.f90 module fplot_legend use iso_fortran_env use fplot_plot_object use fplot_constants use strings implicit none private public :: legend type , extends ( plot_object ) :: legend !! Defines a legend object. logical , private :: m_inside = . true . !! Inside or outside the axes? logical , private :: m_box = . true . !! Box around? character ( len = 20 ), private :: m_horzPosition = LEGEND_RIGHT !! Horizontal position. character ( len = 20 ), private :: m_vertPosition = LEGEND_TOP !! Verical position. logical , private :: m_show = . false . !! Is visible? character ( len = 20 ), private :: m_layout = LEGEND_ARRANGE_VERTICALLY !! Determines the legend layout. logical , private :: m_opaque = . true . !! Opaque background? contains procedure , public :: get_draw_inside_axes => leg_get_inside procedure , public :: set_draw_inside_axes => leg_set_inside procedure , public :: get_draw_border => leg_get_box procedure , public :: set_draw_border => leg_set_box procedure , public :: get_horizontal_position => leg_get_horz_pos procedure , public :: set_horizontal_position => leg_set_horz_pos procedure , public :: get_vertical_position => leg_get_vert_pos procedure , public :: set_vertical_position => leg_set_vert_pos procedure , public :: get_is_visible => leg_get_visible procedure , public :: set_is_visible => leg_set_visible procedure , public :: get_command_string => leg_get_command_txt procedure , public :: get_layout => leg_get_layout procedure , public :: set_layout => leg_set_layout procedure , public :: get_is_opaque => leg_get_opaque procedure , public :: set_is_opaque => leg_set_opaque end type contains ! ------------------------------------------------------------------------------ pure function leg_get_inside ( this ) result ( x ) !! Gets a value determining if the legend should be drawn inside !! or outside the axes border. class ( legend ), intent ( in ) :: this !! The legend object. logical :: x !! True to draw inside the axes border; else, false for outside. x = this % m_inside end function ! --------------------- subroutine leg_set_inside ( this , x ) !! Sets a value determining if the legend should be drawn inside !! or outside the axes border. class ( legend ), intent ( inout ) :: this !! The legend object. logical , intent ( in ) :: x !! True to draw inside the axes border; else, false for outside. this % m_inside = x end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_box ( this ) result ( x ) !! Gets a value determining if the legend should have a border. class ( legend ), intent ( in ) :: this !! The legend object. logical :: x !! True if the legend should have a border; else, false. x = this % m_box end function ! --------------------- subroutine leg_set_box ( this , x ) !! Sets a value determining if the legend should have a border. class ( legend ), intent ( inout ) :: this !! The legend object. logical , intent ( in ) :: x !! True if the legend should have a border; else, false. this % m_box = x end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_horz_pos ( this ) result ( x ) !! Gets the horizontal position of the legend. class ( legend ), intent ( in ) :: this !! The legend object. character ( len = :), allocatable :: x !! The horizontal position of the legend (LEGEND_LEFT, !! LEGEND_CENTER, or LEGEND_RIGHT). integer ( int32 ) :: n n = len_trim ( this % m_horzPosition ) allocate ( character ( len = n ) :: x ) x = trim ( this % m_horzPosition ) end function ! --------------------- subroutine leg_set_horz_pos ( this , x ) !! Sets the horizontal position of the legend. class ( legend ), intent ( inout ) :: this !! The legend object. character ( len = * ), intent ( in ) :: x !! The horizontal position of the legend. The parameter must be !! set to one of the following: LEGEND_LEFT, LEGEND_CENTER, or !! LEGEND_RIGHT. If not, the default LEGEND_RIGHT will be used. this % m_horzPosition = x if ( x /= LEGEND_LEFT . and . x /= LEGEND_RIGHT . and . x /= LEGEND_CENTER ) & this % m_horzPosition = LEGEND_RIGHT end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_vert_pos ( this ) result ( x ) !! Gets the vertical position of the legend. class ( legend ), intent ( in ) :: this !! The legend object. character ( len = :), allocatable :: x !! The vertical position of the legend (LEGEND_TOP, !! LEGEND_CENTER, or LEGEND_BOTTOM). integer ( int32 ) :: n n = len_trim ( this % m_vertPosition ) allocate ( character ( len = n ) :: x ) x = trim ( this % m_vertPosition ) end function ! --------------------- subroutine leg_set_vert_pos ( this , x ) !! Sets the vertical position of the legend. class ( legend ), intent ( inout ) :: this !! The legend object. character ( len = * ), intent ( in ) :: x !! The vertical position of the legend. The parameter must be !! set to one of the following: LEGEND_TOP, LEGEND_CENTER, or !! LEGEND_BOTTOM. If not, the default LEGEND_TOP will be used. this % m_vertPosition = x if ( x /= LEGEND_TOP . and . x /= LEGEND_CENTER . and . x /= LEGEND_BOTTOM ) & this % m_vertPosition = LEGEND_TOP end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_visible ( this ) result ( x ) !! Gets a value determining if the legend is visible. class ( legend ), intent ( in ) :: this !! The legend object. logical :: x !! True if the legend is visible; else, false. x = this % m_show end function ! --------------------- subroutine leg_set_visible ( this , x ) !! Sets a value determining if the legend is visible. class ( legend ), intent ( inout ) :: this !! The legend object. logical , intent ( in ) :: x !! True if the legend is visible; else, false. this % m_show = x end subroutine ! ------------------------------------------------------------------------------ function leg_get_command_txt ( this ) result ( txt ) !! Gets the command string defining the legend properties. class ( legend ), intent ( in ) :: this !! The legend object. character ( len = :), allocatable :: txt !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str ! Process call str % initialize () ! Visible? if (. not . this % get_is_visible ()) then txt = \"set key off\" return end if ! Inside vs Outside & Position if ( this % get_draw_inside_axes ()) then call str % append ( \"set key inside\" ) else call str % append ( \"set key outside\" ) end if call str % append ( \" \" ) call str % append ( this % get_vertical_position ()) call str % append ( \" \" ) call str % append ( this % get_horizontal_position ()) ! Border call str % append ( new_line ( 'a' )) if ( this % get_draw_border ()) then ! call str%append(\"set key box opaque\") call str % append ( \"set key box\" ) else call str % append ( \"set key nobox\" ) end if ! Layout call str % append ( new_line ( 'a' )) call str % append ( \"set key \" ) call str % append ( this % get_layout ()) ! Opaque call str % append ( new_line ( 'a' )) call str % append ( \"set key \" ) if ( this % get_is_opaque ()) then call str % append ( \"opaque\" ) else call str % append ( \"noopaque\" ) end if ! End txt = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function leg_get_layout ( this ) result ( rst ) !! Gets the layout of the legend. class ( legend ), intent ( in ) :: this !! The legend object. character ( len = :), allocatable :: rst !! The layout type, either LEGEND_ARRANGE_VERTICALLY or !! LEGEND_ARRANGE_HORIZONTALLY. rst = trim ( this % m_layout ) end function ! --------------------- subroutine leg_set_layout ( this , x ) !! Sets the layout of the legend. class ( legend ), intent ( inout ) :: this !! The legend object. character ( len = * ), intent ( in ) :: x !! The layout type, either LEGEND_ARRANGE_VERTICALLY or !! LEGEND_ARRANGE_HORIZONTALLY. if ( x == LEGEND_ARRANGE_HORIZONTALLY . or . & x == LEGEND_ARRANGE_VERTICALLY ) & then this % m_layout = x end if end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_opaque ( this ) result ( rst ) !! Gets a value determining if the legend is to be opaque. class ( legend ), intent ( in ) :: this !! The legend object. logical :: rst !! True if the legend is to be opaque; else, false. rst = this % m_opaque end function ! --------------------- subroutine leg_set_opaque ( this , x ) !! Sets a value determining if the legend is to be opaque. class ( legend ), intent ( inout ) :: this !! The legend object. logical :: x !! True if the legend is to be opaque; else, false. this % m_opaque = x end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_legend.f90.html"},{"title":"fplot_multiplot.f90 – FPLOT","text":"Contents Modules fplot_multiplot Source Code fplot_multiplot.f90 Source Code ! fplot_multiplot.f90 module fplot_multiplot use iso_fortran_env use fplot_plot_object use fplot_plot use fplot_terminal use fplot_windows_terminal use fplot_qt_terminal use fplot_wxt_terminal use fplot_png_terminal use fplot_latex_terminal use fplot_constants use fplot_errors use collections use ferror use strings implicit none private public :: multiplot type , extends ( plot_object ) :: multiplot !! Defines a multi-plot layout. type ( list ), private :: m_plots !! The collection of plot objects. integer ( int32 ), private :: m_rows = 0 !! The number of rows of plots. integer ( int32 ), private :: m_cols = 0 !! The number of columns of plots. character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_title !! The page title. logical , private :: m_hasTitle = . false . !! Has a title? class ( terminal ), pointer :: m_terminal => null () !! The GNUPLOT terminal object to target. contains final :: mp_clean procedure , public :: get_command_string => mp_get_command procedure , public :: initialize => mp_init procedure , public :: get_row_count => mp_get_rows procedure , public :: get_column_count => mp_get_cols procedure , public :: get_plot_count => mp_get_count procedure , public :: get_title => mp_get_title procedure , public :: set_title => mp_set_title procedure , public :: draw => mp_draw procedure , public :: get => mp_get procedure , public :: set => mp_set procedure , public :: is_title_defined => mp_has_title procedure , public :: get_terminal => mp_get_term procedure , public :: save_file => mp_save procedure , public :: get_font_name => mp_get_font procedure , public :: set_font_name => mp_set_font procedure , public :: get_font_size => mp_get_font_size procedure , public :: set_font_size => mp_set_font_size end type contains ! ------------------------------------------------------------------------------ function mp_get_command ( this ) result ( x ) !! Gets the GNUPLOT commands for this object. class ( multiplot ), intent ( in ) :: this !! The multiplot object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , m , n class ( plot ), pointer :: ptr ! Initialization call str % initialize () m = this % get_row_count () n = this % get_column_count () ! Set up the multiplot call str % append ( \"set multiplot layout \" ) call str % append ( to_string ( m )) call str % append ( \",\" ) call str % append ( to_string ( n )) call str % append ( \" columnsfirst\" ) if ( this % is_title_defined ()) then call str % append ( \" title \" ) call str % append ( '\"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if call str % append ( new_line ( 'a' )) ! Write commands for each plot object do j = 1 , n do i = 1 , m ptr => this % get ( i , j ) call str % append ( new_line ( 'a' )) call str % append ( ptr % get_command_string ()) end do end do ! Close out the multiplot call str % append ( new_line ( 'a' )) call str % append ( \"unset multiplot\" ) ! Get the string x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine mp_init ( this , m , n , term , err ) !! Initializes the multiplot object. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. integer ( int32 ), intent ( in ) :: m !! The number of rows of plots. integer ( int32 ), intent ( in ) :: n !! The number of columns of plots. integer ( 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. ! Local Variables integer ( int32 ) :: flag , t , i class ( errors ), pointer :: errmgr type ( errors ), target :: deferr type ( wxt_terminal ), pointer :: wxt type ( windows_terminal ), pointer :: win type ( qt_terminal ), pointer :: qt type ( png_terminal ), pointer :: png type ( latex_terminal ), pointer :: latex ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if if ( present ( term )) then t = term else t = GNUPLOT_TERMINAL_WXT end if ! Process call this % m_plots % clear () this % m_rows = m this % m_cols = n flag = 0 ! Populate the list with a dummy variable at the outset. This allows ! the list to be appropriately sized so the user may use the \"set\" ! subroutine appropriately do i = 1 , m * n call this % m_plots % push ( i ) end do ! Define the terminal if ( associated ( this % m_terminal )) deallocate ( this % m_terminal ) select case ( t ) case ( GNUPLOT_TERMINAL_PNG ) allocate ( png , stat = flag ) this % m_terminal => png case ( GNUPLOT_TERMINAL_QT ) allocate ( qt , stat = flag ) this % m_terminal => qt case ( GNUPLOT_TERMINAL_WIN32 ) allocate ( win , stat = flag ) this % m_terminal => win case ( GNUPLOT_TERMINAL_LATEX ) allocate ( latex , stat = flag ) this % m_terminal => latex case default ! WXT is the default allocate ( wxt , stat = flag ) this % m_terminal => wxt end select ! Error Checking if ( flag /= 0 ) then call report_memory_error ( errmgr , \"mp_init\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ subroutine mp_clean ( this ) !! Cleans up resources held by the multiplot object. type ( multiplot ), intent ( inout ) :: this !! The multiplot object. if ( associated ( this % m_terminal )) deallocate ( this % m_terminal ) nullify ( this % m_terminal ) end subroutine ! ------------------------------------------------------------------------------ pure function mp_get_rows ( this ) result ( x ) !! Gets the number of rows of plots. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ) :: x !! The row count. x = this % m_rows end function ! -------------------- pure function mp_get_cols ( this ) result ( x ) !! Gets the number of columns of plots. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ) :: x !! The column count. x = this % m_cols end function ! -------------------- pure function mp_get_count ( this ) result ( x ) !! Gets the total number of plots. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ) :: x !! The plot count. x = this % m_plots % count () end function ! ------------------------------------------------------------------------------ function mp_get_title ( this ) result ( x ) !! Gets the multiplot's title. class ( multiplot ), intent ( in ) :: this !! The multiplot object. character ( len = :), allocatable :: x !! The title. x = this % m_title end function ! -------------------- subroutine mp_set_title ( this , x ) !! Sets the multiplot's title. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. character ( len = * ), intent ( in ) :: x !! The title. ! Local Variables integer ( int32 ) :: n ! Process n = min ( len ( x ), PLOTDATA_MAX_NAME_LENGTH ) this % m_title = \"\" if ( n /= 0 ) then this % m_title ( 1 : n ) = x ( 1 : n ) this % m_hasTitle = . true . else this % m_hasTitle = . false . end if end subroutine ! ------------------------------------------------------------------------------ subroutine mp_draw ( this , persist , err ) !! Launches GNUPLOT and draws the multiplot per the current state of !! the command list. 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. ! Parameters character ( len = * ), parameter :: fname = \"temp_gnuplot_file.plt\" ! Local Variables logical :: p integer ( int32 ) :: fid , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr character ( len = 256 ) :: errmsg class ( terminal ), pointer :: term ! Initialization if ( present ( persist )) then p = persist else p = . true . end if if ( present ( err )) then errmgr => err else errmgr => deferr end if term => this % get_terminal () ! Open the file for writing, and write the contents to file open ( newunit = fid , file = fname , iostat = flag ) if ( flag > 0 ) then call report_file_create_error ( errmgr , \"mp_draw\" , fname , flag ) return end if write ( fid , '(A)' ) term % get_command_string () write ( fid , '(A)' ) new_line ( 'a' ) write ( fid , '(A)' ) this % get_command_string () close ( fid ) ! Launch GNUPLOT if ( p ) then call execute_command_line ( \"gnuplot --persist \" // fname ) else call execute_command_line ( \"gnuplot \" // fname ) end if ! Clean up by deleting the file open ( newunit = fid , file = fname ) close ( fid , status = \"delete\" ) 100 format ( A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ function mp_get ( this , i , j ) result ( x ) !! Gets the requested plot object. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ), intent ( in ) :: i !! The row index of the plot to retrieve. integer ( int32 ), intent ( in ) :: j !! The column index of the plot to retrieve. class ( plot ), pointer :: x !! A pointer to the plot object. ! Local Variables class ( * ), pointer :: item integer ( int32 ) :: ind ! Process ind = this % m_rows * ( j - 1 ) + i item => this % m_plots % get ( ind ) select type ( item ) class is ( plot ) x => item class default nullify ( x ) end select end function ! -------------------- subroutine mp_set ( this , i , j , x ) !! Replaces the specified plot. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. integer ( int32 ), intent ( in ) :: i !! The row index of the plot to replace. integer ( int32 ), intent ( in ) :: j !! The column index of the plot to replace. class ( plot ), intent ( in ) :: x !! The new plot. ! Local Variables integer ( int32 ) :: ind ! Process ind = this % m_rows * ( j - 1 ) + i call this % m_plots % set ( ind , x ) end subroutine ! ------------------------------------------------------------------------------ pure function mp_has_title ( this ) result ( x ) !! Gets a value determining if a title has been defined for the !! multiplot object. class ( multiplot ), intent ( in ) :: this !! The multiplot object. logical :: x !! Returns true if a title has been defined for this multiplot; !! else, returns false. x = this % m_hasTitle end function ! ------------------------------------------------------------------------------ function mp_get_term ( this ) result ( x ) !! Gets the GNUPLOT terminal object. class ( multiplot ), intent ( in ) :: this !! The multiplot object. class ( terminal ), pointer :: x !! A pointer to the terminal object. x => this % m_terminal end function ! ------------------------------------------------------------------------------ subroutine mp_save ( this , fname , err ) !! Saves a GNUPLOT command file. 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. ! Local Variables integer ( int32 ) :: fid , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr class ( terminal ), pointer :: term ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if term => this % get_terminal () ! Open the file for writing, and write the contents to file open ( newunit = fid , file = fname , iostat = flag ) if ( flag > 0 ) then call report_file_create_error ( errmgr , \"mp_save\" , fname , flag ) return end if write ( fid , '(A)' ) term % get_command_string () write ( fid , '(A)' ) new_line ( 'a' ) write ( fid , '(A)' ) this % get_command_string () close ( fid ) end subroutine ! ------------------------------------------------------------------------------ function mp_get_font ( this ) result ( x ) !! Gets the name of the font used for plot text. class ( multiplot ), intent ( in ) :: this !! The multiplot object. character ( len = :), allocatable :: x !! The font name. class ( terminal ), pointer :: term term => this % get_terminal () x = term % get_font_name () end function ! -------------------- subroutine mp_set_font ( this , x ) !! Sets the name of the font used for plot text. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. character ( len = * ), intent ( in ) :: x !! The font name. class ( terminal ), pointer :: term term => this % get_terminal () call term % set_font_name ( x ) end subroutine ! ------------------------------------------------------------------------------ function mp_get_font_size ( this ) result ( x ) !! Gets the size of the font used by the plot. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ) :: x !! The font size. class ( terminal ), pointer :: term term => this % get_terminal () x = term % get_font_size () end function ! -------------------- subroutine mp_set_font_size ( this , x ) !! Sets the size of the font used by the plot. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. integer ( int32 ), intent ( in ) :: x !! The font size. class ( terminal ), pointer :: term term => this % get_terminal () call term % set_font_size ( x ) end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_multiplot.f90.html"},{"title":"fplot_plot.f90 – FPLOT","text":"Contents Modules fplot_plot Source Code fplot_plot.f90 Source Code ! fplot_plot.f90 module fplot_plot use iso_fortran_env use fplot_plot_object use fplot_plot_data use fplot_terminal use fplot_windows_terminal use fplot_qt_terminal use fplot_wxt_terminal use fplot_png_terminal use fplot_latex_terminal use fplot_colormap use fplot_colors use fplot_errors use fplot_constants use fplot_legend use fplot_label use fplot_arrow use ferror use strings use collections implicit none private public :: plot type , extends ( plot_object ) :: plot !! Defines the basic GNUPLOT plot. character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_title = \"\" !! The plot title. logical , private :: m_hasTitle = . false . !! Has a title? class ( terminal ), private , pointer :: m_terminal => null () !! The GNUPLOT terminal object to target. type ( list ), private :: m_data !! A collection of plot_data items to plot. type ( legend ), private , pointer :: m_legend => null () !! The legend. logical , private :: m_showGrid = . true . !! Show grid lines? logical , private :: m_ticsIn = . true . !! Point tic marks in? logical , private :: m_drawBorder = . true . !! Draw the border? type ( list ), private :: m_labels ! Added 6/22/2018, JAC !! A collection of plot_label items to draw. integer ( int32 ), private :: m_colorIndex = 1 !! The color index to use for automatic line coloring for scatter plots. logical , private :: m_axisEqual = . false . !! Determines if the axes should be scaled proportionally. class ( colormap ), private , pointer :: m_colormap !! The colormap. logical , private :: m_showColorbar = . true . !! Show the colorbar? type ( list ), private :: m_arrows ! Added 1/3/2024, JAC !! A collection of plot_arrow items to draw. contains procedure , public :: free_resources => plt_clean_up procedure , public :: initialize => plt_init procedure , public :: get_title => plt_get_title procedure , public :: set_title => plt_set_title procedure , public :: is_title_defined => plt_has_title procedure , public :: get_legend => plt_get_legend procedure , public :: get_count => plt_get_count procedure , public :: push => plt_push_data procedure , public :: pop => plt_pop_data procedure , public :: clear_all => plt_clear_all procedure , public :: get => plt_get procedure , public :: set => plt_set procedure , public :: get_terminal => plt_get_term procedure , public :: get_show_gridlines => plt_get_show_grid procedure , public :: set_show_gridlines => plt_set_show_grid procedure , public :: draw => plt_draw procedure , public :: save_file => plt_save procedure , public :: get_font_name => plt_get_font procedure , public :: set_font_name => plt_set_font procedure , public :: get_font_size => plt_get_font_size procedure , public :: set_font_size => plt_set_font_size procedure , public :: get_tics_inward => plt_get_tics_in procedure , public :: set_tics_inward => plt_set_tics_in procedure , public :: get_draw_border => plt_get_draw_border procedure , public :: set_draw_border => plt_set_draw_border procedure , public :: push_label => plt_push_label procedure , public :: pop_label => plt_pop_label procedure , public :: get_label => plt_get_label procedure , public :: set_label => plt_set_label procedure , public :: get_label_count => plt_get_label_count procedure , public :: clear_all_labels => plt_clear_labels procedure , public :: get_axis_equal => plt_get_axis_equal procedure , public :: set_axis_equal => plt_set_axis_equal procedure , public :: get_colormap => plt_get_colormap procedure , public :: set_colormap => plt_set_colormap procedure , public :: get_show_colorbar => plt_get_show_colorbar procedure , public :: set_show_colorbar => plt_set_show_colorbar procedure , public :: get_command_string => plt_get_cmd procedure , public :: push_arrow => plt_push_arrow procedure , public :: pop_arrow => plt_pop_arrow procedure , public :: get_arrow => plt_get_arrow procedure , public :: set_arrow => plt_set_arrow procedure , public :: get_arrow_count => plt_get_arrow_count procedure , public :: clear_arrows => plt_clear_arrows end type contains ! ------------------------------------------------------------------------------ subroutine plt_clean_up ( this ) !! Cleans up resources held by the plot object. Inheriting !! classes are expected to call this routine to free internally held !! resources. class ( plot ), intent ( inout ) :: this !! The plot object. if ( associated ( this % m_terminal )) then deallocate ( this % m_terminal ) nullify ( this % m_terminal ) end if if ( associated ( this % m_legend )) then deallocate ( this % m_legend ) nullify ( this % m_legend ) end if if ( associated ( this % m_colormap )) then deallocate ( this % m_colormap ) nullify ( this % m_colormap ) end if end subroutine ! ------------------------------------------------------------------------------ subroutine plt_init ( this , term , fname , err ) !! Initializes the plot object. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag , t class ( errors ), pointer :: errmgr type ( errors ), target :: deferr type ( wxt_terminal ), pointer :: wxt type ( windows_terminal ), pointer :: win type ( qt_terminal ), pointer :: qt type ( png_terminal ), pointer :: png type ( latex_terminal ), pointer :: latex ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if if ( present ( term )) then t = term else t = GNUPLOT_TERMINAL_WXT end if ! Process flag = 0 if ( associated ( this % m_terminal )) deallocate ( this % m_terminal ) select case ( t ) case ( GNUPLOT_TERMINAL_PNG ) allocate ( png , stat = flag ) if ( present ( fname )) call png % set_filename ( fname ) this % m_terminal => png case ( GNUPLOT_TERMINAL_QT ) allocate ( qt , stat = flag ) this % m_terminal => qt case ( GNUPLOT_TERMINAL_WIN32 ) allocate ( win , stat = flag ) this % m_terminal => win case ( GNUPLOT_TERMINAL_LATEX ) allocate ( latex , stat = flag ) if ( present ( fname )) call latex % set_filename ( fname ) this % m_terminal => latex case default ! WXT is the default allocate ( wxt , stat = flag ) this % m_terminal => wxt end select ! Establish the colormap nullify ( this % m_colormap ) if ( flag == 0 . and . . not . associated ( this % m_legend )) then allocate ( this % m_legend , stat = flag ) end if ! Error Checking if ( flag /= 0 ) then call report_memory_error ( errmgr , \"plt_init\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ function plt_get_title ( this ) result ( txt ) !! Gets the plot's title. class ( plot ), intent ( in ) :: this !! The plot object. character ( len = :), allocatable :: txt !! The title. integer ( int32 ) :: n n = len_trim ( this % m_title ) allocate ( character ( len = n ) :: txt ) txt = trim ( this % m_title ) end function ! -------------------- subroutine plt_set_title ( this , txt ) !! Sets the plot's title. class ( plot ), intent ( inout ) :: this !! The plot object. character ( len = * ), intent ( in ) :: txt !! The title. integer :: n n = min ( len_trim ( txt ), PLOTDATA_MAX_NAME_LENGTH ) this % m_title = \"\" if ( n /= 0 ) then this % m_title ( 1 : n ) = txt ( 1 : n ) this % m_hasTitle = . true . else this % m_hasTitle = . false . end if end subroutine ! ------------------------------------------------------------------------------ pure function plt_has_title ( this ) result ( x ) !! Gets a value determining if a title has been defined for the plot !! object. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if a title has been defined for this plot; else, !! returns false. x = this % m_hasTitle end function ! ------------------------------------------------------------------------------ function plt_get_legend ( this ) result ( x ) !! Gets the plot's legend object. class ( plot ), intent ( in ) :: this !! The plot object. type ( legend ), pointer :: x !! A pointer to the legend object. x => this % m_legend end function ! ------------------------------------------------------------------------------ pure function plt_get_count ( this ) result ( x ) !! Gets the number of stored plot_data objects. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ) :: x !! The number of plot_data objects. x = this % m_data % count () end function ! ------------------------------------------------------------------------------ subroutine plt_push_data ( this , x , err ) !! Pushes a plot_data object onto the stack. class ( plot ), intent ( inout ) :: this !! The plot object. class ( plot_data ), intent ( inout ) :: x !! The plot_data object. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Index the color tracking index if the type is of plot_data_colored select type ( x ) class is ( plot_data_colored ) call x % set_color_index ( this % m_colorIndex ) if ( this % m_colorIndex == size ( color_list )) then this % m_colorIndex = 1 else this % m_colorIndex = this % m_colorIndex + 1 end if end select ! Store the object call this % m_data % push ( x , err = err ) end subroutine ! ------------------------------------------------------------------------------ subroutine plt_pop_data ( this ) !! Pops the last plot_data object from the stack. class ( plot ), intent ( inout ) :: this !! The plot object. ! Process call this % m_data % pop () end subroutine ! ------------------------------------------------------------------------------ subroutine plt_clear_all ( this ) !! Removes all plot_data objects from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. ! Process this % m_colorIndex = 1 call this % m_data % clear () end subroutine ! ------------------------------------------------------------------------------ function plt_get ( this , i ) result ( x ) !! Gets a pointer to the requested plot_data object. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_data object. class ( plot_data ), pointer :: x !! A pointer to the requested plot_data object. ! Local Variables class ( * ), pointer :: item ! Process item => this % m_data % get ( i ) select type ( item ) class is ( plot_data ) x => item class default nullify ( x ) end select end function ! -------------------- subroutine plt_set ( this , i , x ) !! Sets the requested plot_data object into the plot. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_data object. class ( plot_data ), intent ( in ) :: x !! The plot_data object. call this % m_data % set ( i , x ) end subroutine ! ------------------------------------------------------------------------------ function plt_get_term ( this ) result ( x ) !! Gets the GNUPLOT terminal object. class ( plot ), intent ( in ) :: this !! The plot object. class ( terminal ), pointer :: x !! A pointer to the GNUPLOT terminal object. x => this % m_terminal end function ! ------------------------------------------------------------------------------ pure function plt_get_show_grid ( this ) result ( x ) !! Gets a flag determining if the grid lines should be shown. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if the grid lines should be shown; else, false. x = this % m_showGrid end function ! -------------------- subroutine plt_set_show_grid ( this , x ) !! Sets a flag determining if the grid lines should be shown. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the grid lines should be shown; else, false. this % m_showGrid = x end subroutine ! ------------------------------------------------------------------------------ subroutine plt_draw ( this , persist , err ) !! Launches GNUPLOT and draws the plot per the current state of !! the command list. class ( plot ), intent ( in ) :: this !! The 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. ! Parameters character ( len = * ), parameter :: fname = \"temp_gnuplot_file.plt\" ! Local Variables logical :: p integer ( int32 ) :: fid , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr class ( terminal ), pointer :: term ! Initialization if ( present ( persist )) then p = persist else p = . true . end if if ( present ( err )) then errmgr => err else errmgr => deferr end if term => this % get_terminal () ! Open the file for writing, and write the contents to file open ( newunit = fid , file = fname , iostat = flag ) if ( flag > 0 ) then call report_file_create_error ( errmgr , \"plt_draw\" , fname , flag ) return end if write ( fid , '(A)' ) term % get_command_string () write ( fid , '(A)' ) new_line ( 'a' ) write ( fid , '(A)' ) this % get_command_string () close ( fid ) ! Launch GNUPLOT if ( p ) then call execute_command_line ( \"gnuplot --persist \" // fname ) else call execute_command_line ( \"gnuplot \" // fname ) end if ! Clean up by deleting the file open ( newunit = fid , file = fname ) close ( fid , status = \"delete\" ) end subroutine ! ------------------------------------------------------------------------------ subroutine plt_save ( this , fname , err ) !! Saves a GNUPLOT command file. class ( plot ), intent ( in ) :: this !! The plot object. character ( len = * ), intent ( in ) :: fname !! The filename. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: fid , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr class ( terminal ), pointer :: term ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if term => this % get_terminal () ! Open the file for writing, and write the contents to file open ( newunit = fid , file = fname , iostat = flag ) if ( flag > 0 ) then call report_file_create_error ( errmgr , \"plt_save\" , fname , flag ) return end if write ( fid , '(A)' ) term % get_command_string () write ( fid , '(A)' ) new_line ( 'a' ) write ( fid , '(A)' ) this % get_command_string () close ( fid ) end subroutine ! ------------------------------------------------------------------------------ function plt_get_font ( this ) result ( x ) !! Gets the name of the font used for plot text. class ( plot ), intent ( in ) :: this !! The plot object. character ( len = :), allocatable :: x !! The font name. class ( terminal ), pointer :: term term => this % get_terminal () x = term % get_font_name () end function ! -------------------- subroutine plt_set_font ( this , x ) !! Sets the name of the font used for plot text. class ( plot ), intent ( inout ) :: this !! The plot object. character ( len = * ), intent ( in ) :: x !! The font name. class ( terminal ), pointer :: term term => this % get_terminal () call term % set_font_name ( x ) end subroutine ! ------------------------------------------------------------------------------ function plt_get_font_size ( this ) result ( x ) !! Gets the size of the font used by the plot. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ) :: x !! The size of the font, in points. class ( terminal ), pointer :: term term => this % get_terminal () x = term % get_font_size () end function ! -------------------- subroutine plt_set_font_size ( this , x ) !! Sets the size of the font used by the plot. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: x !! The font size, in points. If a value of zero is provided, !! the font size is reset to its default value; or, if a negative !! value is provided, the absolute value of the supplied value is !! utilized. class ( terminal ), pointer :: term term => this % get_terminal () call term % set_font_size ( x ) end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_tics_in ( this ) result ( x ) !! Gets a value determining if the axis tic marks should point inwards. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if the tic marks should point inwards; else, false !! if the tic marks should point outwards. x = this % m_ticsIn end function ! -------------------- subroutine plt_set_tics_in ( this , x ) !! Sets a value determining if the axis tic marks should point inwards. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the tic marks should point inwards; else, false !! if the tic marks should point outwards. this % m_ticsIn = x end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_draw_border ( this ) result ( x ) !! Gets a value determining if the border should be drawn. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if the border should be drawn; else, false. x = this % m_drawBorder end function ! -------------------- subroutine plt_set_draw_border ( this , x ) !! Sets a value determining if the border should be drawn. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the border should be drawn; else, false. this % m_drawBorder = x end subroutine ! ****************************************************************************** ! ADDED: JUNE 22, 2018 - JAC ! ------------------------------------------------------------------------------ subroutine plt_push_label ( this , lbl , err ) !! Adds a label to the plot. class ( plot ), intent ( inout ) :: this !! The plot object. class ( plot_label ), intent ( in ) :: lbl !! The plot label. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Process call this % m_labels % push ( lbl , err = err ) end subroutine ! ------------------------------------------------------------------------------ subroutine plt_pop_label ( this ) !! Removes the last label from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. call this % m_labels % pop () end subroutine ! ------------------------------------------------------------------------------ function plt_get_label ( this , i ) result ( x ) !! Gets the requested plot_label from the plot. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_label object to retrieve. class ( plot_label ), pointer :: x !! A pointer to the requested plot_label object. ! Local Variables class ( * ), pointer :: item ! Process item => this % m_labels % get ( i ) select type ( item ) class is ( plot_label ) x => item class default nullify ( x ) end select end function ! -------------------- subroutine plt_set_label ( this , i , x ) !! Sets the specified plot_label object. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_label to replace. class ( plot_label ), intent ( in ) :: x !! The new plot_label object. call this % m_labels % set ( i , x ) end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_label_count ( this ) result ( x ) !! Gets the number of plot_label objects belonging to the plot. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ) :: x !! The number of plot_label objects. x = this % m_labels % count () end function ! ------------------------------------------------------------------------------ subroutine plt_clear_labels ( this ) !! Clears all plot_label objects from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. call this % m_labels % clear () end subroutine ! ****************************************************************************** ! ADDED: SEPT. 25, 2020 - JAC ! ------------------------------------------------------------------------------ pure function plt_get_axis_equal ( this ) result ( rst ) !! Gets a flag determining if the axes should be equally scaled. class ( plot ), intent ( in ) :: this !! The plot object. logical :: rst !! Returns true if the axes should be scaled equally; else, false. rst = this % m_axisEqual end function ! -------------------- subroutine plt_set_axis_equal ( this , x ) !! Sets a flag determining if the axes should be equally scaled. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the axes should be scaled equally; else, false. this % m_axisEqual = x end subroutine ! ****************************************************************************** ! ADDED: OCT. 8, 2020 - JAC ! ------------------------------------------------------------------------------ function plt_get_colormap ( this ) result ( x ) !! Gets a pointer to the colormap object. class ( plot ), intent ( in ) :: this !! The plot object. class ( colormap ), pointer :: x !! A pointer to the colormap object. If no colormap is defined, a !! null pointer is returned. x => this % m_colormap end function ! -------------------- subroutine plt_set_colormap ( this , x , err ) !! Sets the colormap object. class ( plot ), intent ( inout ) :: this !! The plot object. class ( colormap ), intent ( in ) :: x !! The colormap object. Notice, a copy of this object is !! stored, and the plot object then manages the lifetime of the !! copy. class ( errors ), intent ( inout ), optional , target :: err !! An error handler object. ! Local Variables integer ( int32 ) :: flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Process if ( associated ( this % m_colormap )) deallocate ( this % m_colormap ) allocate ( this % m_colormap , stat = flag , source = x ) if ( flag /= 0 ) then call errmgr % report_error ( \"surf_set_colormap\" , & \"Insufficient memory available.\" , PLOT_OUT_OF_MEMORY_ERROR ) return end if end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_show_colorbar ( this ) result ( x ) !! Gets a value determining if the colorbar should be shown. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if the colorbar should be drawn; else, false. x = this % m_showColorbar end function ! -------------------- subroutine plt_set_show_colorbar ( this , x ) !! Sets a value determining if the colorbar should be shown. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the colorbar should be drawn; else, false. this % m_showColorbar = x end subroutine ! ------------------------------------------------------------------------------ function plt_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot object. class ( plot ), intent ( in ) :: this !! The plot object. character ( len = :), allocatable :: x !! The command string. ! Local Variables integer ( int32 ) :: i type ( string_builder ) :: str class ( colormap ), pointer :: clr class ( plot_arrow ), pointer :: arrow class ( plot_label ), pointer :: lbl ! Initialization call str % initialize () ! Define the colormap clr => this % get_colormap () if ( associated ( clr )) then call str % append ( new_line ( 'a' )) call str % append ( clr % get_command_string ()) end if ! Show the colorbar if (. not . this % get_show_colorbar ()) then call str % append ( new_line ( 'a' )) call str % append ( \"unset colorbox\" ) end if ! Arrows do i = 1 , this % get_arrow_count () arrow => this % get_arrow ( i ) if (. not . associated ( arrow )) cycle call str % append ( new_line ( 'a' )) call str % append ( arrow % get_command_string ()) end do ! Labels do i = 1 , this % get_label_count () lbl => this % get_label ( i ) if (. not . associated ( lbl )) cycle call str % append ( new_line ( 'a' )) call str % append ( lbl % get_command_string ()) end do ! End x = char ( str % to_string ()) end function ! ****************************************************************************** ! ADDED: 1/3/2024 - JAC ! ------------------------------------------------------------------------------ subroutine plt_push_arrow ( this , x , err ) !! Pushes a new @ref plot_arrow object onto the plot. class ( plot ), intent ( inout ) :: this !! The plot object. class ( plot_arrow ), intent ( in ) :: x !! The plot_arrow object. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. call this % m_arrows % push ( x , manage = . true ., err = err ) end subroutine ! ------------------------------------------------------------------------------ subroutine plt_pop_arrow ( this ) !! Pops the last plot_arrow object from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. call this % m_arrows % pop () end subroutine ! ------------------------------------------------------------------------------ function plt_get_arrow ( this , i ) result ( rst ) !! Gets a pointer to the requested plot_arrow object. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_arrow to retrieve. class ( plot_arrow ), pointer :: rst !! The plot_arrow object to retrieve. class ( * ), pointer :: ptr ptr => this % m_arrows % get ( i ) select type ( ptr ) class is ( plot_arrow ) rst => ptr class default nullify ( rst ) end select end function ! ------------------------------------------------------------------------------ subroutine plt_set_arrow ( this , i , x ) !! Sets a plot_arrow into the plot. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_arrow object to replace. class ( plot_arrow ), intent ( in ) :: x !! The new plot_arrow object. call this % m_arrows % set ( i , x ) end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_arrow_count ( this ) result ( rst ) !! Gets the number of plot_arrow objects held by the plot object. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ) :: rst !! The plot_arrow objects count. rst = this % m_arrows % count () end function ! ------------------------------------------------------------------------------ subroutine plt_clear_arrows ( this ) !! Clears all plot_arrow objects from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. call this % m_arrows % clear () end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot.f90.html"},{"title":"fplot_plot_2d.f90 – FPLOT","text":"Contents Modules fplot_plot_2d Source Code fplot_plot_2d.f90 Source Code ! fplot_plot_2d.f90 module fplot_plot_2d use iso_fortran_env use fplot_plot_data use fplot_plot use fplot_errors use fplot_plot_axis use fplot_legend use ferror use strings implicit none private public :: plot_2d type , extends ( plot ) :: plot_2d !! A plot object defining a 2D plot. type ( x_axis ), private , pointer :: m_xAxis => null () !! The x-axis. type ( y_axis ), private , pointer :: m_yAxis => null () !! The y-axis. type ( y2_axis ), private , pointer :: m_y2Axis => null () !! The secondary y-axis. logical , private :: m_useY2 = . false . !! Display the secondary y axis? logical , private :: m_set2square = . false . !! Set to square scaling. contains final :: p2d_clean_up procedure , public :: initialize => p2d_init procedure , public :: get_command_string => p2d_get_cmd procedure , public :: get_x_axis => p2d_get_x_axis procedure , public :: get_y_axis => p2d_get_y_axis procedure , public :: get_y2_axis => p2d_get_y2_axis procedure , public :: get_use_y2_axis => p2d_get_use_y2 procedure , public :: set_use_y2_axis => p2d_set_use_y2 procedure , public :: get_square_axes => p2d_get_square_axes procedure , public :: set_square_axes => p2d_set_square_axes end type contains ! ------------------------------------------------------------------------------ subroutine p2d_clean_up ( this ) !! Cleans up resources held by the plot_2d object. type ( plot_2d ), intent ( inout ) :: this !! The plot_2d object. call this % free_resources () if ( associated ( this % m_xAxis )) then deallocate ( this % m_xAxis ) nullify ( this % m_xAxis ) end if if ( associated ( this % m_yAxis )) then deallocate ( this % m_yAxis ) nullify ( this % m_yAxis ) end if if ( associated ( this % m_y2Axis )) then deallocate ( this % m_y2Axis ) nullify ( this % m_y2Axis ) end if end subroutine ! ------------------------------------------------------------------------------ subroutine p2d_init ( this , term , fname , err ) !! Initializes the plot_2d object. class ( plot_2d ), intent ( inout ) :: this !! The plot_2d object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Initialize the base class ! call plt_init(this, term, fname, errmgr) call this % plot % initialize ( term , fname , errmgr ) if ( errmgr % has_error_occurred ()) return ! Process flag = 0 if (. not . associated ( this % m_xAxis )) then allocate ( this % m_xAxis , stat = flag ) end if if ( flag == 0 . and . . not . associated ( this % m_yAxis )) then allocate ( this % m_yAxis , stat = flag ) end if if ( flag == 0 . and . . not . associated ( this % m_y2Axis )) then allocate ( this % m_y2Axis , stat = flag ) end if ! Error Checking if ( flag /= 0 ) then call report_memory_error ( errmgr , \"p2d_init\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ function p2d_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot_2d object. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , n class ( plot_data ), pointer :: ptr class ( plot_axis ), pointer :: axis , xAxis , yAxis type ( legend ), pointer :: leg ! class(plot_label), pointer :: lbl ! Initialization call str % initialize () ! Call the base routine call str % append ( this % plot % get_command_string ()) ! Grid if ( this % get_show_gridlines ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set grid\" ) end if ! Title n = len_trim ( this % get_title ()) if ( n > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( 'set title \"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if ! Axes call str % append ( new_line ( 'a' )) xAxis => this % get_x_axis () if ( associated ( xAxis )) call str % append ( xAxis % get_command_string ()) call str % append ( new_line ( 'a' )) yAxis => this % get_y_axis () if ( associated ( yAxis )) call str % append ( yAxis % get_command_string ()) ! Secondary Axes if ( this % get_use_y2_axis ()) then call str % append ( new_line ( 'a' )) axis => this % get_y2_axis () if ( associated ( axis )) then call str % append ( axis % get_command_string ()) call str % append ( new_line ( 'a' )) call str % append ( \"set y2tics\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set ytics nomirror\" ) end if end if ! Tic Marks if (. not . this % get_tics_inward ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set tics out\" ) end if if ( xAxis % get_zero_axis ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set xtics axis\" ) end if if ( yAxis % get_zero_axis ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set ytics axis\" ) end if ! Border call str % append ( new_line ( 'a' )) call str % append ( \"set border back\" ) if ( this % get_draw_border ()) then n = 31 else n = 0 if (. not . xAxis % get_zero_axis ()) n = n + 1 if (. not . yAxis % get_zero_axis ()) n = n + 2 call str % append ( new_line ( 'a' )) call str % append ( \"set xtics nomirror\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set ytics nomirror\" ) if ( this % get_use_y2_axis ()) then n = n + 8 end if end if call str % append ( new_line ( 'a' )) if ( n > 0 ) then call str % append ( \"set border \" ) call str % append ( to_string ( n )) else call str % append ( \"unset border\" ) end if ! Scaling if ( this % get_axis_equal ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set view equal xy\" ) end if if ( this % get_square_axes ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set size square\" ) end if ! Legend call str % append ( new_line ( 'a' )) leg => this % get_legend () if ( associated ( leg )) call str % append ( leg % get_command_string ()) ! ! Labels ! do i = 1, this%get_label_count() ! lbl => this%get_label(i) ! if (.not.associated(lbl)) cycle ! call str%append(new_line('a')) ! call str%append(lbl%get_command_string()) ! end do ! Define the plot function and data formatting commands n = this % get_count () call str % append ( new_line ( 'a' )) call str % append ( \"plot \" ) do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( ptr % get_command_string ()) if ( i /= n ) call str % append ( \", \" ) end do ! Define the data to plot do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( new_line ( 'a' )) call str % append ( ptr % get_data_string ()) call str % append ( \"e\" ) ! if (i /= n) then ! call str%append(\"e\") ! end if end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function p2d_get_x_axis ( this ) result ( ptr ) !! Gets the x-axis object. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. class ( plot_axis ), pointer :: ptr !! A pointer to the x-axis object. ptr => this % m_xAxis end function ! ------------------------------------------------------------------------------ function p2d_get_y_axis ( this ) result ( ptr ) !! Gets the y-axis object. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. class ( plot_axis ), pointer :: ptr !! A pointer to the y-axis object. ptr => this % m_yAxis end function ! ------------------------------------------------------------------------------ function p2d_get_y2_axis ( this ) result ( ptr ) !! Gets the secondary y-axis object. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. class ( plot_axis ), pointer :: ptr !! A pointer to the secondary y-axis object. ptr => this % m_y2Axis end function ! ------------------------------------------------------------------------------ pure function p2d_get_use_y2 ( this ) result ( x ) !! Gets a flag determining if the secondary y-axis should be !! displayed. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. logical :: x !! Returns true if the axis should be displayed; else, false. x = this % m_useY2 end function ! -------------------- subroutine p2d_set_use_y2 ( this , x ) !! Sets a flag determining if the secondary y-axis should be !! displayed. class ( plot_2d ), intent ( inout ) :: this !! The plot_2d object. logical , intent ( in ) :: x !! Set to true if the axis should be displayed; else, false. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ pure function p2d_get_square_axes ( this ) result ( rst ) !! Gets a logical flag determining if the axes size should be squared !! off. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. logical :: rst !! Returns true if the axes are to be sized to a square; else, !! false. rst = this % m_set2square end function ! -------------------- subroutine p2d_set_square_axes ( this , x ) !! Sets a logical flag determining if the axes size should be !! squared off. class ( plot_2d ), intent ( inout ) :: this !! The plot_2d object. logical , intent ( in ) :: x !! Set to true if the axes are to be sized to a square; else, !! false. this % m_set2square = x end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_2d.f90.html"},{"title":"fplot_plot_3d.f90 – FPLOT","text":"Contents Modules fplot_plot_3d Source Code fplot_plot_3d.f90 Source Code ! fplot_plot_3d.f90 module fplot_plot_3d use iso_fortran_env use fplot_plot use fplot_errors use fplot_plot_axis use fplot_constants use fplot_plot_data use fplot_legend use ferror use strings implicit none private public :: plot_3d type , extends ( plot ) :: plot_3d !! A plot object defining a 3D plot. type ( x_axis ), private , pointer :: m_xAxis => null () !! The x-axis. type ( y_axis ), private , pointer :: m_yAxis => null () !! The y-axis. type ( z_axis ), private , pointer :: m_zAxis => null () !! The z-axis. real ( real64 ), private :: m_elevation = 6 0.0d0 !! The elevation angle. real ( real64 ), private :: m_azimuth = 3 0.0d0 !! The azimuth. logical , private :: m_zIntersect = . true . !! Z-axis intersect X-Y plane? logical , private :: m_setMap = . false . !! Set map projection. integer ( int32 ), private :: m_csys = COORDINATES_CARTESIAN !! Plot coordinate system. contains final :: p3d_clean_up procedure , public :: initialize => p3d_init procedure , public :: get_command_string => p3d_get_cmd procedure , public :: get_x_axis => p3d_get_x_axis procedure , public :: get_y_axis => p3d_get_y_axis procedure , public :: get_z_axis => p3d_get_z_axis procedure , public :: get_elevation => p3d_get_elevation procedure , public :: set_elevation => p3d_set_elevation procedure , public :: get_azimuth => p3d_get_azimuth procedure , public :: set_azimuth => p3d_set_azimuth procedure , public :: get_z_intersect_xy => p3d_get_z_axis_intersect procedure , public :: set_z_intersect_xy => p3d_set_z_axis_intersect procedure , public :: get_use_map_view => p3d_get_use_map_view procedure , public :: set_use_map_view => p3d_set_use_map_view procedure , public :: get_coordinate_system => p3d_get_csys procedure , public :: set_coordinate_system => p3d_set_csys end type contains ! ------------------------------------------------------------------------------ subroutine p3d_clean_up ( this ) !! Cleans up resources held by the plot_3d object. type ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. call this % free_resources () if ( associated ( this % m_xAxis )) then deallocate ( this % m_xAxis ) nullify ( this % m_xAxis ) end if if ( associated ( this % m_yAxis )) then deallocate ( this % m_yAxis ) nullify ( this % m_yAxis ) end if if ( associated ( this % m_zAxis )) then deallocate ( this % m_zAxis ) nullify ( this % m_zAxis ) end if end subroutine ! ------------------------------------------------------------------------------ subroutine p3d_init ( this , term , fname , err ) !! Initializes the plot_3d object. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Initialize the base class ! call plt_init(this, term, fname, errmgr) call this % plot % initialize ( term , fname , errmgr ) if ( errmgr % has_error_occurred ()) return ! Process flag = 0 if (. not . associated ( this % m_xAxis )) then allocate ( this % m_xAxis , stat = flag ) end if if ( flag == 0 . and . . not . associated ( this % m_yAxis )) then allocate ( this % m_yAxis , stat = flag ) end if if ( flag == 0 . and . . not . associated ( this % m_zAxis )) then allocate ( this % m_zAxis , stat = flag ) end if ! Error Checking if ( flag /= 0 ) then call report_memory_error ( errmgr , \"p3d_init\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ function p3d_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot_3d object. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , n class ( plot_data ), pointer :: ptr class ( plot_axis ), pointer :: xAxis , yAxis , zAxis type ( legend ), pointer :: leg ! class(plot_label), pointer :: lbl ! Initialization call str % initialize () ! Call the base routine call str % append ( this % plot % get_command_string ()) ! Grid if ( this % get_show_gridlines ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set grid\" ) end if ! Title n = len_trim ( this % get_title ()) if ( n > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( 'set title \"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if ! Axes call str % append ( new_line ( 'a' )) xAxis => this % get_x_axis () if ( associated ( xAxis )) call str % append ( xAxis % get_command_string ()) call str % append ( new_line ( 'a' )) yAxis => this % get_y_axis () if ( associated ( yAxis )) call str % append ( yAxis % get_command_string ()) call str % append ( new_line ( 'a' )) zAxis => this % get_z_axis () if ( associated ( zAxis )) call str % append ( zAxis % get_command_string ()) ! Tic Marks if (. not . this % get_tics_inward ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set tics out\" ) end if if ( xAxis % get_zero_axis () . or . yAxis % get_zero_axis () . or . & zAxis % get_zero_axis ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set tics axis\" ) end if ! Border if ( this % get_draw_border ()) then n = 31 else n = 0 if (. not . xAxis % get_zero_axis ()) n = n + 1 if (. not . yAxis % get_zero_axis ()) n = n + 4 if (. not . zAxis % get_zero_axis ()) n = n + 16 call str % append ( new_line ( 'a' )) call str % append ( \"set xtics nomirror\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set ytics nomirror\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set ztics nomirror\" ) end if call str % append ( new_line ( 'a' )) if ( n > 0 ) then call str % append ( \"set border \" ) call str % append ( to_string ( n )) else call str % append ( \"unset border\" ) end if ! Force the z-axis to move to the x-y plane if ( this % get_z_intersect_xy ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set ticslevel 0\" ) end if ! Scaling if ( this % get_axis_equal ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set view equal xyz\" ) end if ! Legend call str % append ( new_line ( 'a' )) leg => this % get_legend () if ( associated ( leg )) call str % append ( leg % get_command_string ()) ! ! Labels ! do i = 1, this%get_label_count() ! lbl => this%get_label(i) ! if (.not.associated(lbl)) cycle ! call str%append(new_line('a')) ! call str%append(lbl%get_command_string()) ! end do ! Orientation call str % append ( new_line ( 'a' )) call str % append ( \"set view \" ) if ( this % get_use_map_view ()) then call str % append ( \"map\" ) else call str % append ( to_string ( this % get_elevation ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_azimuth ())) end if ! Coordinate system if ( this % get_coordinate_system () == COORDINATES_CYLINDRICAL ) then call str % append ( new_line ( 'a' )) call str % append ( \"set mapping cylindrical\" ) else if ( this % get_coordinate_system () == COORDINATES_SPHERICAL ) then call str % append ( new_line ( 'a' )) call str % append ( \"set mapping spherical\" ) end if ! Define the plot function and data formatting commands n = this % get_count () call str % append ( new_line ( 'a' )) call str % append ( \"splot \" ) do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( ptr % get_command_string ()) if ( i /= n ) call str % append ( \", \" ) end do ! Define the data to plot do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( new_line ( 'a' )) call str % append ( ptr % get_data_string ()) call str % append ( \"e\" ) ! if (i /= n) then ! call str%append(\"e\") ! end if end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function p3d_get_x_axis ( this ) result ( ptr ) !! Gets the x-axis object. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. class ( plot_axis ), pointer :: ptr !! A pointer to the x-axis object. ptr => this % m_xAxis end function ! ------------------------------------------------------------------------------ function p3d_get_y_axis ( this ) result ( ptr ) !! Gets the y-axis object. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. class ( plot_axis ), pointer :: ptr !! A pointer to the y-axis object. ptr => this % m_yAxis end function ! ------------------------------------------------------------------------------ function p3d_get_z_axis ( this ) result ( ptr ) !! Gets the z-axis object. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. class ( plot_axis ), pointer :: ptr !! A pointer to the z-axis object. ptr => this % m_zAxis end function ! ------------------------------------------------------------------------------ pure function p3d_get_elevation ( this ) result ( x ) !! Gets the plot elevation angle. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. real ( real64 ) :: x !! The elevation angle, in degrees. x = this % m_elevation end function ! -------------------- subroutine p3d_set_elevation ( this , x ) !! Sets the plot elevation angle. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. real ( real64 ), intent ( in ) :: x !! The elevation angle, in degrees. this % m_elevation = x end subroutine ! ------------------------------------------------------------------------------ pure function p3d_get_azimuth ( this ) result ( x ) !! Gets the plot azimuth angle. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. real ( real64 ) :: x !! The azimuth angle, in degrees. x = this % m_azimuth end function ! -------------------- subroutine p3d_set_azimuth ( this , x ) !! Sets the plot azimuth angle. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. real ( real64 ), intent ( in ) :: x !! The azimuth angle, in degrees. this % m_azimuth = x end subroutine ! ------------------------------------------------------------------------------ pure function p3d_get_z_axis_intersect ( this ) result ( x ) !! Gets a value determining if the z-axis should intersect the !! x-y plane. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. logical :: x !! Returns true if the z-axis should intersect the x-y plane; else, !! false to allow the z-axis to float. x = this % m_zIntersect end function ! -------------------- subroutine p3d_set_z_axis_intersect ( this , x ) !! Sets a value determining if the z-axis should intersect the !! x-y plane. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. logical , intent ( in ) :: x !! Set to true if the z-axis should intersect the x-y plane; else, !! false to allow the z-axis to float. this % m_zIntersect = x end subroutine ! ADDED March 29, 2023 - JAC ! ------------------------------------------------------------------------------ pure function p3d_get_use_map_view ( this ) result ( rst ) !! Gets a value determining if the view should be set to a 2D !! map view. If true, the azimuth and elevation terms are ignored. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. logical :: rst !! Returns true if the map view will be used; else, false. rst = this % m_setMap end function ! -------------------- subroutine p3d_set_use_map_view ( this , x ) !! Sets a value determining if the view should be set to a 2D !! map view. If true, the azimuth and elevation terms are ignored. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. logical , intent ( in ) :: x !! Seturns true if the map view will be used; else, false. this % m_setMap = x end subroutine ! ADDED Sept. 15, 2023 - JAC ! ------------------------------------------------------------------------------ pure function p3d_get_csys ( this ) result ( rst ) !! Gets a value determining the coordinate system. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. integer ( int32 ) :: rst !! The coordinate system ID, which must be one of the following. !! !! - COORDINATES_CARTESIAN !! !! - COORDINATES_CYLINDRICAL !! !! - COORDINATES_SPHERICAL rst = this % m_csys end function ! -------------------- subroutine p3d_set_csys ( this , x ) !! Sets a value determining the coordinate system. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. integer ( int32 ), intent ( in ) :: x !! The coordinate system ID, which must be one of the following. !! !! - COORDINATES_CARTESIAN !! !! - COORDINATES_CYLINDRICAL !! !! - COORDINATES_SPHERICAL if ( x /= COORDINATES_CARTESIAN . and . & x /= COORDINATES_CYLINDRICAL . and . & x /= COORDINATES_SPHERICAL ) & then ! Set to default as the input is nonsensical this % m_csys = COORDINATES_CARTESIAN else this % m_csys = x end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_3d.f90.html"},{"title":"fplot_plot_axis.f90 – FPLOT","text":"Contents Modules fplot_plot_axis Source Code fplot_plot_axis.f90 Source Code ! fplot_plot_axis.f90 module fplot_plot_axis use iso_fortran_env use fplot_plot_object use fplot_constants use strings implicit none private public :: plot_axis public :: pa_get_string_result public :: x_axis public :: y_axis public :: y2_axis public :: z_axis type , abstract , extends ( plot_object ) :: plot_axis private logical :: m_hasTitle = . false . !! Has a title? character ( len = PLOTDATA_MAX_NAME_LENGTH ) :: m_title = \"\" !! Axis title. logical :: m_autoscale = . true . !! Autoscale? real ( real64 ), dimension ( 2 ) :: m_limits = [ 0.0d0 , 1.0d0 ] !! Display limits. logical :: m_logScale = . false . !! Log scaled? logical :: m_zeroAxis = . false . !! Has a zero axis? real ( real32 ) :: m_axisWidth = 1.0 !! The width, in pixels, of the zero-axis line. logical :: m_defaultTicLabels = . true . !! Use default tic label format? character ( len = PLOTDATA_MAX_NAME_LENGTH ) :: m_ticLabelFmt = \"%g\" !! The tic lablel format. contains procedure , public :: get_title => pa_get_title procedure , public :: set_title => pa_set_title procedure , public :: is_title_defined => pa_has_title procedure , public :: get_autoscale => pa_get_autoscale procedure , public :: set_autoscale => pa_set_autoscale procedure , public :: get_limits => pa_get_axis_limits procedure , public :: set_limits => pa_set_axis_limits procedure , public :: get_is_log_scaled => pa_get_log_scale procedure , public :: set_is_log_scaled => pa_set_log_scale procedure , public :: get_command_string => pa_get_cmd_string procedure , public :: get_zero_axis => pa_get_zero_axis procedure , public :: set_zero_axis => pa_set_zero_axis procedure , public :: get_zero_axis_line_width => pa_get_zero_axis_width procedure , public :: set_zero_axis_line_width => pa_set_zero_axis_width procedure ( pa_get_string_result ), deferred , public :: get_id_string procedure , public :: get_use_default_tic_label_format => & pa_get_use_dft_tic_lbl_fmt procedure , public :: set_use_default_tic_label_format => & pa_set_use_dft_tic_lbl_fmt procedure , public :: get_tic_label_format => pa_get_tic_label_fmt procedure , public :: set_tic_label_format => pa_set_tic_label_fmt end type interface function pa_get_string_result ( this ) result ( x ) !! Retrieves a string from a plot_axis. import plot_axis class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: x !! The string. end function end interface type , extends ( plot_axis ) :: x_axis !! Defines an x-axis object. character , private :: m_id = \"x\" !! The ID character. contains procedure , public :: get_id_string => xa_get_id end type type , extends ( plot_axis ) :: y_axis !! Defines a y-axis object. character , private :: m_id = \"y\" !! The ID character. contains procedure , public :: get_id_string => ya_get_id end type type , extends ( plot_axis ) :: y2_axis !! Defines a secondary y-axis object. character ( len = 2 ), private :: m_id = \"y2\" !! The ID character. contains procedure , public :: get_id_string => y2a_get_id end type type , extends ( plot_axis ) :: z_axis !! Defines a z-axis object. character , private :: m_id = \"z\" !! The ID character. contains procedure , public :: get_id_string => za_get_id end type contains ! ------------------------------------------------------------------------------ function pa_get_title ( this ) result ( txt ) !! Gets the axis title. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: txt !! The title. integer ( int32 ) :: n n = len_trim ( this % m_title ) allocate ( character ( len = n ) :: txt ) txt = trim ( this % m_title ) end function ! -------------------- subroutine pa_set_title ( this , txt ) !! Sets the axis title. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. character ( len = * ), intent ( in ) :: txt !! The title. ! Local Variables integer ( int32 ) :: n ! Process n = min ( len_trim ( txt ), PLOTDATA_MAX_NAME_LENGTH ) this % m_title = \"\" if ( n /= 0 ) then this % m_title ( 1 : n ) = txt ( 1 : n ) this % m_hasTitle = . true . else this % m_hasTitle = . false . end if end subroutine ! ------------------------------------------------------------------------------ pure function pa_has_title ( this ) result ( x ) !! Gets a value determining if a title has been defined for this axis. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true if a title has been defined; else, false. x = this % m_hasTitle end function ! ------------------------------------------------------------------------------ pure function pa_get_autoscale ( this ) result ( x ) !! Gets a value determining if the axis should be automatically scaled !! to fit the data. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true if the axis should be automatically scaled; else, !! false. x = this % m_autoscale end function ! -------------------- subroutine pa_set_autoscale ( this , x ) !! Sets a value determining if the axis should be automatically scaled !! to fit the data. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true if the axis should be automatically scaled; else, !! set to false. this % m_autoscale = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_axis_limits ( this ) result ( x ) !! Gets the axis display limits, assuming autoscaling is not !! active for this axis. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. real ( real64 ), dimension ( 2 ) :: x !! A two-element array containing the limits as follows: !! [lower, upper]. x ( 1 ) = minval ( this % m_limits ) x ( 2 ) = maxval ( this % m_limits ) end function ! -------------------- subroutine pa_set_axis_limits ( this , lower , upper ) !! Gets the axis display limits, assuming autoscaling is not !! active for this axis. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. real ( real64 ), intent ( in ) :: lower !! The lower display limit. real ( real64 ), intent ( in ) :: upper !! The upper display limit. this % m_limits ( 1 ) = min ( lower , upper ) this % m_limits ( 2 ) = max ( lower , upper ) end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_log_scale ( this ) result ( x ) !! Gets a logical value defining if the axis should be log scaled. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true if log scaling is applied to the axis; else, false. x = this % m_logScale end function ! -------------------- subroutine pa_set_log_scale ( this , x ) !! Sets a logical value defining if the axis should be log scaled. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true if log scaling is applied to the axis; else, false. this % m_logScale = x end subroutine ! ------------------------------------------------------------------------------ function pa_get_cmd_string ( this ) result ( txt ) !! Returns the appropriate GNUPLOT command string to define the !! plot_axis properties. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: txt !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str character ( len = :), allocatable :: axis , fmt real ( real64 ) :: lim ( 2 ) ! Process axis = this % get_id_string () fmt = this % get_tic_label_format () lim = this % get_limits () call str % initialize () ! Formatting if (. not . this % get_use_default_tic_label_format ()) then call str % append ( \"set format \" ) call str % append ( axis ) call str % append ( '\"' ) call str % append ( fmt ) call str % append ( '\"' ) call str % append ( new_line ( 'a' )) end if ! Axis Limits if ( this % get_autoscale ()) then call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"range [*:*]\" ) else call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"range [\" ) call str % append ( to_string ( lim ( 1 ))) call str % append ( \":\" ) call str % append ( to_string ( lim ( 2 ))) call str % append ( \"]\" ) end if ! Titles call str % append ( new_line ( 'a' )) if ( this % is_title_defined ()) then call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"label \" ) call str % append ( '\"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) else call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"label \" ) call str % append ( '\"\"' ) end if ! Scaling call str % append ( new_line ( 'a' )) if ( this % get_is_log_scaled ()) then call str % append ( \"set log \" ) call str % append ( axis ) else call str % append ( \"unset log \" ) call str % append ( axis ) end if ! Zero Axis if ( this % get_zero_axis ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set \" ) call str % append ( this % get_id_string ()) call str % append ( \"zeroaxis linestyle -1 linewidth \" ) call str % append ( to_string ( this % get_zero_axis_line_width ())) end if ! Output txt = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function pa_get_zero_axis ( this ) result ( x ) !! Gets a value determining if the axis should be drawn through !! zero of opposing axes. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true to draw as a zero axis; else, set to false. x = this % m_zeroAxis end function ! -------------------- subroutine pa_set_zero_axis ( this , x ) !! Sets a value determining if the axis should be drawn through !! zero of opposing axes. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true to draw as a zero axis; else, set to false. this % m_zeroAxis = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_zero_axis_width ( this ) result ( x ) !! Gets the width of the line used to represent the zero axis line, if !! active. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. real ( real32 ) :: x !! The width of the line, in pixels. x = this % m_axisWidth end function ! -------------------- subroutine pa_set_zero_axis_width ( this , x ) !! Sets the width of the line used to represent the zero axis line, if !! active. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. real ( real32 ), intent ( in ) :: x !! The width of the line, in pixels. this % m_axisWidth = x end subroutine ! ADDED March 29, 2023 - JAC ! ------------------------------------------------------------------------------ pure function pa_get_use_dft_tic_lbl_fmt ( this ) result ( rst ) !! Gets a value determining if the default tic label format will be !! used. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: rst !! Returns true if the default tic label format will be used; else, !! false. rst = this % m_defaultTicLabels end function ! -------------------- subroutine pa_set_use_dft_tic_lbl_fmt ( this , x ) !! Sets a value determining if the default tic label format will be !! used. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true if the default tic label format will be used; else, !! false. this % m_defaultTicLabels = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_tic_label_fmt ( this ) result ( rst ) !! Gets the tic label format. The format string can be any format !! string accepted by the C command 'printf.' class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: rst !! The tic label format string. rst = trim ( this % m_ticLabelFmt ) end function ! -------------------- subroutine pa_set_tic_label_fmt ( this , x ) !! Sets the tic label format. The format string can be any format !! string accepted by the C command 'printf.' class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. character ( len = * ), intent ( in ) :: x !! The tic label format string. this % m_ticLabelFmt = x end subroutine ! ****************************************************************************** ! X_AXIS MEMBERS ! ------------------------------------------------------------------------------ function xa_get_id ( this ) result ( x ) !! Gets the axis identification string. class ( x_axis ), intent ( in ) :: this !! The x_axis object. character ( len = :), allocatable :: x !! The identification string. x = this % m_id end function ! ****************************************************************************** ! Y_AXIS MEMBERS ! ------------------------------------------------------------------------------ function ya_get_id ( this ) result ( x ) !! Gets the axis identification string. class ( y_axis ), intent ( in ) :: this !! The y_axis object. character ( len = :), allocatable :: x !! The identification string. x = this % m_id end function ! ****************************************************************************** ! Y2_AXIS MEMBERS ! ------------------------------------------------------------------------------ function y2a_get_id ( this ) result ( x ) !! Gets the axis identification string. class ( y2_axis ), intent ( in ) :: this !! The y2_axis object. character ( len = :), allocatable :: x !! The identification string. x = this % m_id end function ! ****************************************************************************** ! Z_AXIS MEMBERS ! ------------------------------------------------------------------------------ function za_get_id ( this ) result ( x ) !! Gets the axis identification string. class ( z_axis ), intent ( in ) :: this !! The z_axis object. character ( len = :), allocatable :: x !! The identification string. x = this % m_id end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_axis.f90.html"},{"title":"fplot_plot_bar.f90 – FPLOT","text":"Contents Modules fplot_plot_bar Source Code fplot_plot_bar.f90 Source Code ! fplot_plot_bar.f90 module fplot_plot_bar use iso_fortran_env use fplot_plot_2d use strings implicit none private public :: plot_bar type , extends ( plot_2d ) :: plot_bar !! Defines a 2D plot tailored towards bar plotting. real ( real32 ), private :: m_barWidth = 0.75d0 !! A relative scaling of the width of a single bar. The value !! must be between 0 and 1 with 1 being full width. contains procedure , public :: get_bar_width => pb_get_bar_width procedure , public :: set_bar_width => pb_set_bar_width procedure , public :: get_command_string => pb_get_cmd end type contains ! ------------------------------------------------------------------------------ pure function pb_get_bar_width ( this ) result ( x ) !! Gets the bar width scaling factor. class ( plot_bar ), intent ( in ) :: this !! The plot_bar object. real ( real32 ) :: x !! The scaling factor. x = this % m_barWidth end function ! ------------------------------------------------------------------------------ subroutine pb_set_bar_width ( this , x ) !! Sets the bar width scaling factor. class ( plot_bar ), intent ( inout ) :: this !! The plot_bar object. real ( real32 ), intent ( in ) :: x !! The scaling factor. The value must be in the set [0, 1]; else, the !! value will be shifted accordingly. if ( x > 1.0 ) then this % m_barWidth = 1.0 else if ( x < 0.0 ) then this % m_barWidth = 0.0 else this % m_barWidth = x end if end subroutine ! ------------------------------------------------------------------------------ function pb_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT commands required to draw the plot. class ( plot_bar ), intent ( in ) :: this !! The plot_bar object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str ! Initialization call str % initialize () ! Box Width call str % append ( new_line ( 'a' )) call str % append ( \"set boxwidth \" ) call str % append ( to_string ( this % get_bar_width ())) call str % append ( \" relative\" ) ! Call the base routine to establish the remainder of the plot call str % append ( this % plot_2d % get_command_string ()) ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ ! TO DO YET: ! - clustering ! - stacking ! - lighting end module","tags":"","loc":"sourcefile\\fplot_plot_bar.f90.html"},{"title":"fplot_plot_data.f90 – FPLOT","text":"Contents Modules fplot_plot_data Source Code fplot_plot_data.f90 Source Code ! fplot_plot_data.f90 module fplot_plot_data use iso_fortran_env use fplot_plot_object use fplot_constants use fplot_colors use strings use ferror use fplot_errors implicit none private public :: plot_data public :: pd_get_string_result public :: plot_data_colored public :: scatter_plot_data public :: spd_get_int_value public :: spd_get_string_result public :: spd_get_value public :: spd_set_value type , abstract , extends ( plot_object ) :: plot_data !! A container for plot data. private character ( len = PLOTDATA_MAX_NAME_LENGTH ) :: m_name = \"\" !! The name to associate with the data set. contains procedure , public :: get_name => pd_get_name procedure , public :: set_name => pd_set_name procedure ( pd_get_string_result ), deferred , public :: get_data_string end type interface function pd_get_string_result ( this ) result ( x ) !! Retrieves a string from a plot_data object. import plot_data class ( plot_data ), intent ( in ) :: this !! The plot_data object. character ( len = :), allocatable :: x !! The string. end function end interface type , abstract , extends ( plot_data ) :: plot_data_colored !! Defines a colored plot data set. private type ( color ) :: m_color = CLR_BLUE !! The line color. logical :: m_useAutoColor = . true . !! Let the object choose colors automatically? integer ( int32 ) :: m_colorIndex = 1 !! The color index to use, assuming we're using auto color contains procedure , public :: get_line_color => pdc_get_line_color procedure , public :: set_line_color => pdc_set_line_color procedure , public :: get_color_index => pdc_get_color_index procedure , public :: set_color_index => pdc_set_color_index end type type , abstract , extends ( plot_data_colored ) :: scatter_plot_data !! A plot_data object for describing scatter plot data sets. private logical :: m_drawLine = . true . !! Draw a line connecting the dots? logical :: m_drawMarkers = . false . !! Draw the markers? integer ( int32 ) :: m_markerFrequency = 1 !! Marker frequency. real ( real32 ) :: m_lineWidth = 1.0 !! Line width. integer ( int32 ) :: m_lineStyle = LINE_SOLID !! Line style. integer ( int32 ) :: m_markerType = MARKER_FILLED_CIRCLE !! Marker type. real ( real32 ) :: m_markerSize = 0.5 !! Marker size multiplier. logical :: m_simplifyData = . true . !! True if large data sets should be simplified before sending to !! GNUPLOT. real ( real64 ) :: m_simplifyFactor = 1.0d-3 !! A scaling factor used to establish the simplification tolerance. !! The simplification tolerance is established by multiplying this !! factor by the range in the dependent variable data. logical :: m_dataDependentColors = . false . !! Determines if the data should utilize data-dependent colors. logical :: m_filledCurve = . false . !! Fill the curve? logical :: m_useVariableSizePoints = . false . !! Use variable size data points? contains procedure , public :: get_command_string => spd_get_cmd procedure , public :: get_line_width => spd_get_line_width procedure , public :: set_line_width => spd_set_line_width procedure , public :: get_line_style => spd_get_line_style procedure , public :: set_line_style => spd_set_line_style procedure , public :: get_draw_line => spd_get_draw_line procedure , public :: set_draw_line => spd_set_draw_line procedure , public :: get_draw_markers => spd_get_draw_markers procedure , public :: set_draw_markers => spd_set_draw_markers procedure , public :: get_marker_style => spd_get_marker_style procedure , public :: set_marker_style => spd_set_marker_style procedure , public :: get_marker_scaling => spd_get_marker_scaling procedure , public :: set_marker_scaling => spd_set_marker_scaling procedure , public :: get_marker_frequency => spd_get_marker_frequency procedure , public :: set_marker_frequency => spd_set_marker_frequency procedure ( spd_get_int_value ), deferred , public :: get_count procedure ( spd_get_value ), deferred , public :: get_x procedure ( spd_set_value ), deferred , public :: set_x procedure ( spd_get_value ), deferred , public :: get_y procedure ( spd_set_value ), deferred , public :: set_y procedure ( spd_get_string_result ), deferred , public :: get_axes_string procedure , public :: get_simplify_data => spd_get_simplify_data procedure , public :: set_simplify_data => spd_set_simplify_data procedure , public :: get_simplification_factor => spd_get_simplify_factor procedure , public :: set_simplification_factor => spd_set_simplify_factor procedure , public :: get_use_data_dependent_colors => & spd_get_data_dependent_colors procedure , public :: set_use_data_dependent_colors => & spd_set_data_dependent_colors procedure , public :: get_fill_curve => spd_get_filled procedure , public :: set_fill_curve => spd_set_filled procedure , public :: get_use_variable_size_points => spd_get_use_var_point_size procedure , public :: set_use_variable_size_points => spd_set_use_var_point_size end type interface pure function spd_get_value ( this , index ) result ( x ) !! Gets an indexed value from the scatter_plot_data object. use , intrinsic :: iso_fortran_env , only : int32 , real64 import scatter_plot_data class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: index !! The index. real ( real64 ) :: x !! The value. end function subroutine spd_set_value ( this , index , x ) !! Sets an indexed value from the scatter_plot_data object. use , intrinsic :: iso_fortran_env , only : int32 , real64 import scatter_plot_data class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: index !! The index. real ( real64 ), intent ( in ) :: x !! The value. end subroutine pure function spd_get_int_value ( this ) result ( x ) !! Gets an integer value from the scatter_plot_data object. use , intrinsic :: iso_fortran_env , only : int32 import scatter_plot_data class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ) :: x !! The value. end function function spd_get_string_result ( this ) result ( x ) !! Gets a string value from the scatter_plot_data object. import scatter_plot_data class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. character ( len = :), allocatable :: x !! The string. end function end interface contains ! ------------------------------------------------------------------------------ pure function pd_get_name ( this ) result ( txt ) !! Gets the name to associate with this data set. class ( plot_data ), intent ( in ) :: this !! The plot_data object. character ( len = :), allocatable :: txt !! The name. txt = trim ( this % m_name ) end function ! -------------------- subroutine pd_set_name ( this , txt ) !! Sets the name to associate with this data set. class ( plot_data ), intent ( inout ) :: this !! The plot_data object. character ( len = * ), intent ( in ) :: txt !! The name. integer ( int32 ) :: n n = min ( len ( txt ), PLOTDATA_MAX_NAME_LENGTH ) this % m_name = \"\" if ( n /= 0 ) then this % m_name ( 1 : n ) = txt ( 1 : n ) end if end subroutine ! ****************************************************************************** ! PLOT_DATA_COLORED ! ------------------------------------------------------------------------------ pure function pdc_get_line_color ( this ) result ( x ) !! Gets the object color. class ( plot_data_colored ), intent ( in ) :: this !! The plot_data_colored object. type ( color ) :: x !! The color. if ( this % m_useAutoColor ) then x = color_list ( this % get_color_index ()) else x = this % m_color end if end function ! -------------------- subroutine pdc_set_line_color ( this , x ) !! Sets the object color. class ( plot_data_colored ), intent ( inout ) :: this !! The plot_data_colored object. type ( color ), intent ( in ) :: x !! The color. this % m_color = x this % m_useAutoColor = . false . end subroutine ! ------------------------------------------------------------------------------ pure function pdc_get_color_index ( this ) result ( x ) !! Gets the color index. class ( plot_data_colored ), intent ( in ) :: this !! The plot_data_colored object. integer ( int32 ) :: x !! The index value. x = this % m_colorIndex end function ! -------------------- subroutine pdc_set_color_index ( this , x ) !! Sets the color index. class ( plot_data_colored ), intent ( inout ) :: this !! The plot_data_colored object. integer ( int32 ), intent ( in ) :: x !! The index value. this % m_colorIndex = x end subroutine ! ****************************************************************************** ! SCATTER_PLOT_DATA ! ------------------------------------------------------------------------------ function spd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this !! scatter_plot_data object. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Lines, points, or filled if ( this % get_fill_curve ()) then call str % append ( \" with filledcurves\" ) else if ( this % get_draw_line () . and . this % get_draw_markers ()) then call str % append ( \" with linespoints\" ) else if (. not . this % get_draw_line () . and . this % get_draw_markers ()) then call str % append ( \" with points\" ) else call str % append ( \" with lines\" ) end if end if ! Line Width call str % append ( \" lw \" ) call str % append ( to_string ( this % get_line_width ())) ! Line Color if ( this % get_use_data_dependent_colors ()) then ! http://www.gnuplotting.org/using-a-palette-as-line-color/ call str % append ( \" lc palette\" ) else clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) end if ! Define other properties specific to the lines and points if ( this % get_draw_line ()) then call str % append ( \" lt \" ) call str % append ( to_string ( this % get_line_style ())) if ( this % get_line_style () /= LINE_SOLID ) then call str % append ( \" dashtype \" ) call str % append ( to_string ( this % get_line_style ())) end if end if if ( this % get_draw_markers ()) then call str % append ( \" pi \" ) call str % append ( to_string ( this % get_marker_frequency ())) call str % append ( \" pt \" ) call str % append ( to_string ( this % get_marker_style ())) call str % append ( \" ps \" ) if ( this % get_use_variable_size_points ()) then call str % append ( \"variable\" ) else call str % append ( to_string ( this % get_marker_scaling ())) end if end if ! Define the axes structure call str % append ( \" \" ) call str % append ( this % get_axes_string ()) ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function spd_get_line_width ( this ) result ( x ) !! Gets the width of the line, in pixels. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. real ( real32 ) :: x !! The line width. x = this % m_lineWidth end function ! -------------------- subroutine spd_set_line_width ( this , x ) !! Sets the width of the line, in pixels. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. real ( real32 ), intent ( in ) :: x !! The line width. this % m_lineWidth = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_line_style ( this ) result ( x ) !! Gets the line style. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ) :: x !! The line style. The line style must be one of the following. !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! - LINE_SOLID x = this % m_lineStyle end function ! -------------------- subroutine spd_set_line_style ( this , x ) !! Sets the line style. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: x !! The line style. The line style must be one of the following. !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! - LINE_SOLID if ( x == LINE_DASHED . or . & x == LINE_DASH_DOTTED . or . & x == LINE_DASH_DOT_DOT . or . & x == LINE_DOTTED . or . & x == LINE_SOLID ) then ! Only reset the line style if it is a valid type. this % m_lineStyle = x end if end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_draw_line ( this ) result ( x ) !! Gets a value determining if a line should be drawn. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: x !! Returns true if the line should be drawn; else, false. x = this % m_drawLine end function ! -------------------- subroutine spd_set_draw_line ( this , x ) !! Sets a value determining if a line should be drawn. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! Set to true if the line should be drawn; else, false. this % m_drawLine = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_draw_markers ( this ) result ( x ) !! Gets a value determining if data point markers should be drawn. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: x !! Returns true if the markers should be drawn; else, false. x = this % m_drawMarkers end function ! -------------------- subroutine spd_set_draw_markers ( this , x ) !! Sets a value determining if data point markers should be drawn. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! Set to true if the markers should be drawn; else, false. this % m_drawMarkers = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_marker_style ( this ) result ( x ) !! Gets the marker style. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ) :: x !! The marker type. The marker type must be one of the following: !! !! - MARKER_ASTERISK !! !! - MARKER_EMPTY_CIRCLE !! !! - MARKER_EMPTY_NABLA !! !! - MARKER_EMPTY_RHOMBUS !! !! - MARKER_EMPTY_SQUARE !! !! - MARKER_EMPTY_TRIANGLE !! !! - MARKER_FILLED_CIRCLE !! !! - MARKER_FILLED_NABLA !! !! - MARKER_FILLED_RHOMBUS !! !! - MARKER_FILLED_SQUARE !! !! - MARKER_FILLED_TRIANGLE !! !! - MARKER_PLUS !! !! - MARKER_X x = this % m_markerType end function ! -------------------- subroutine spd_set_marker_style ( this , x ) !! Sets the marker style. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: x !! The marker type. The marker type must be one of the following: !! !! - MARKER_ASTERISK !! !! - MARKER_EMPTY_CIRCLE !! !! - MARKER_EMPTY_NABLA !! !! - MARKER_EMPTY_RHOMBUS !! !! - MARKER_EMPTY_SQUARE !! !! - MARKER_EMPTY_TRIANGLE !! !! - MARKER_FILLED_CIRCLE !! !! - MARKER_FILLED_NABLA !! !! - MARKER_FILLED_RHOMBUS !! !! - MARKER_FILLED_SQUARE !! !! - MARKER_FILLED_TRIANGLE !! !! - MARKER_PLUS !! !! - MARKER_X if ( x == MARKER_ASTERISK . or . & x == MARKER_EMPTY_CIRCLE . or . & x == MARKER_EMPTY_NABLA . or . & x == MARKER_EMPTY_RHOMBUS . or . & x == MARKER_EMPTY_SQUARE . or . & x == MARKER_EMPTY_TRIANGLE . or . & x == MARKER_FILLED_CIRCLE . or . & x == MARKER_FILLED_NABLA . or . & x == MARKER_FILLED_RHOMBUS . or . & x == MARKER_FILLED_SQUARE . or . & x == MARKER_FILLED_TRIANGLE . or . & x == MARKER_PLUS . or . & x == MARKER_X ) then ! Only alter the value if the marker is a known type this % m_markerType = x end if end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_marker_scaling ( this ) result ( x ) !! Gets the marker scaling. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. real ( real32 ) :: x !! The scaling factor. x = this % m_markerSize end function ! -------------------- subroutine spd_set_marker_scaling ( this , x ) !! Sets the marker scaling. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. real ( real32 ), intent ( in ) :: x !! The scaling factor. this % m_markerSize = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_marker_frequency ( this ) result ( x ) !! Gets the marker frequency. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ) :: x !! The marker frequency. x = this % m_markerFrequency end function ! -------------------- subroutine spd_set_marker_frequency ( this , x ) !! Sets the marker frequency. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: x !! The marker frequency. this % m_markerFrequency = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_simplify_data ( this ) result ( x ) !! Gets a value determining if the stored data should be !! simplified (reduced) before passing to GNUPLOT. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: x !! True if the data should be simplified prior to sending !! to GNUPLOT; else, false to leave the data alone. x = this % m_simplifyData end function ! -------------------- subroutine spd_set_simplify_data ( this , x ) !! Sets a value determining if the stored data should be !! simplified (reduced) before passing to GNUPLOT. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! True if the data should be simplified prior to sending !! to GNUPLOT; else, false to leave the data alone. this % m_simplifyData = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_simplify_factor ( this ) result ( x ) !! Gets a factor used to establish the simplification tolerance. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. real ( real64 ) :: x !! The scaling factor. x = this % m_simplifyFactor end function ! -------------------- subroutine spd_set_simplify_factor ( this , x ) !! Sets a factor used to establish the simplification tolerance. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. real ( real64 ), intent ( in ) :: x !! The scaling factor. this % m_simplifyFactor = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_data_dependent_colors ( this ) result ( rst ) !! Gets a value determing if data-dependent colors should be used. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: rst !! True if data-dependent colors should be used; else, false. rst = this % m_dataDependentColors end function ! -------------------- subroutine spd_set_data_dependent_colors ( this , x ) !! Sets a value determing if data-dependent colors should be used. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! True if data-dependent colors should be used; else, false. this % m_dataDependentColors = x end subroutine ! ****************************************************************************** ! ADDED: JUNE 28, 2021 - JAC ! ------------------------------------------------------------------------------ pure function spd_get_filled ( this ) result ( rst ) !! Gets a logical value determining if a filled curve should be drawn. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: rst !! True if the curve should be filled; else, false. rst = this % m_filledCurve end function ! -------------------- subroutine spd_set_filled ( this , x ) !! Sets a logical value determining if a filled curve should be drawn. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! True if the curve should be filled; else, false. this % m_filledCurve = x end subroutine ! ****************************************************************************** ! ADDED: JAN 12, 2024 - JAC ! ------------------------------------------------------------------------------ pure function spd_get_use_var_point_size ( this ) result ( rst ) !! Gets a logical value determining if variable sized data points !! should be used. The default is false, such that points will be of !! a constant size. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: rst !! True if variable size points should be used; else, false. rst = this % m_useVariableSizePoints end function ! -------------------- subroutine spd_set_use_var_point_size ( this , x ) !! Sets a logical value determining if variable sized data points !! should be used. The default is false, such that points will be of !! a constant size. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! True if variable size points should be used; else, false. this % m_useVariableSizePoints = x end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data.f90.html"},{"title":"fplot_plot_data_2d.f90 – FPLOT","text":"Contents Modules fplot_plot_data_2d Source Code fplot_plot_data_2d.f90 Source Code module fplot_plot_data_2d use iso_fortran_env use fplot_plot_data use fplot_simplify use fplot_errors use ferror use strings implicit none private public :: plot_data_2d type , extends ( scatter_plot_data ) :: plot_data_2d !! Defines a two-dimensional plot data set. real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! An N-by-2 matrix containing the x and y data points. !> Draw against the secondary y axis? logical , private :: m_useY2 = . false . !! Draw against the secondary y axis? contains procedure , public :: get_axes_string => pd2d_get_axes_cmd procedure , public :: get_data_string => pd2d_get_data_cmd procedure , public :: get_count => pd2d_get_data_count procedure , public :: get_x => pd2d_get_x_data procedure , public :: set_x => pd2d_set_x_data procedure , public :: get_y => pd2d_get_y_data procedure , public :: set_y => pd2d_set_y_data procedure , public :: get_draw_against_y2 => pd2d_get_draw_against_y2 procedure , public :: set_draw_against_y2 => pd2d_set_draw_against_y2 generic , public :: define_data => pd2d_set_data_1 , pd2d_set_data_2 procedure :: pd2d_set_data_1 procedure :: pd2d_set_data_2 procedure , public :: get_x_data => pd2d_get_x_array procedure , public :: get_y_data => pd2d_get_y_array procedure , public :: get_color_data => pd2d_get_c_array procedure , public :: get_point_size_data => pd2d_get_ps_array end type contains ! ------------------------------------------------------------------------------ function pd2d_get_axes_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string defining which axes the data !! is to be plotted against. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. character ( len = :), allocatable :: x !! The command string. ! Define which axes the data is to be plotted against if ( this % get_draw_against_y2 ()) then x = \"axes x1y2\" else x = \"axes x1y1\" end if end function ! ------------------------------------------------------------------------------ function pd2d_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data !! to plot. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i character :: delimiter , nl real ( real64 ), allocatable , dimension (:) :: xv , yv , cv , ps real ( real64 ), allocatable , dimension (:,:) :: pts real ( real64 ) :: tol , maxy , miny , eps logical :: usecolors , usevarpoints ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) usecolors = this % get_use_data_dependent_colors () usevarpoints = this % get_use_variable_size_points () ! Process xv = this % get_x_data () yv = this % get_y_data () if ( usecolors . and . usevarpoints ) then cv = this % get_color_data () ps = this % get_point_size_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( ps ( i ))) call str % append ( delimiter ) call str % append ( to_string ( cv ( i ))) call str % append ( nl ) end do else if ( usecolors . and . . not . usevarpoints ) then cv = this % get_color_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( cv ( i ))) call str % append ( nl ) end do else if (. not . usecolors . and . usevarpoints ) then ps = this % get_point_size_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( ps ( i ))) call str % append ( nl ) end do else if ( this % get_simplify_data ()) then maxy = maxval ( yv ) miny = minval ( yv ) tol = abs ( this % get_simplification_factor () * ( maxy - miny )) eps = 1 0.0d0 * epsilon ( eps ) if ( tol < eps ) tol = eps pts = simplify_polyline ( xv , yv , tol ) do i = 1 , size ( pts , 1 ) call str % append ( to_string ( pts ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( pts ( i , 2 ))) call str % append ( nl ) end do else do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( nl ) end do end if end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function pd2d_get_data_count ( this ) result ( x ) !! Gets the number of data points. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. integer ( int32 ) :: x !! The number of data points. if ( allocated ( this % m_data )) then x = size ( this % m_data , 1 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pd2d_get_x_data ( this , index ) result ( x ) !! Gets the requested X data point. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 1 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd2d_set_x_data ( this , index , x ) !! Sets the requested X data point. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 1 ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pd2d_get_y_data ( this , index ) result ( x ) !! Gets the requested Y data point. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 2 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd2d_set_y_data ( this , index , x ) !! Sets the requested Y data point. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 2 ) = x end if end subroutine ! ------------------------------------------------------------------------------ subroutine pd2d_set_data_1 ( this , x , y , c , ps , err ) !! Defines the data set to plot. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinate data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinate data. real ( real64 ), intent ( in ), dimension (:), optional :: c !! An N-element array defining how color should vary with the !! current colormap for each value. real ( real64 ), intent ( in ), dimension (:), optional :: ps !! An N-element array defining the size of each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error-handling object. ! Local Variables integer ( int32 ) :: i , n , flag , ncols class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) ncols = 2 if ( present ( c )) ncols = ncols + 1 if ( present ( ps )) ncols = ncols + 1 if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pd2d_set_data_1\" , & \"y\" , n , size ( y )) return end if if ( present ( c )) then if ( size ( c ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pd2d_set_data_1\" , \"c\" , n , size ( c )) return end if end if if ( present ( ps )) then if ( size ( ps ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pd2d_set_data_1\" , \"ps\" , n , size ( ps )) return end if end if ! Process if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , ncols ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pd2d_set_data_1\" , flag ) return end if ! if (present(c)) then ! call this%set_use_data_dependent_colors(.true.) ! do concurrent (i = 1:n) ! this%m_data(i, 1) = x(i) ! this%m_data(i, 2) = y(i) ! this%m_data(i, 3) = c(i) ! end do ! else ! call this%set_use_data_dependent_colors(.false.) ! do concurrent (i = 1:n) ! this%m_data(i, 1) = x(i) ! this%m_data(i, 2) = y(i) ! end do ! end if if ( present ( c ) . and . present ( ps )) then call this % set_use_data_dependent_colors (. true .) call this % set_use_variable_size_points (. true .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = ps ( i ) this % m_data ( i , 4 ) = c ( i ) end do else if ( present ( c ) . and . . not . present ( ps )) then call this % set_use_data_dependent_colors (. true .) call this % set_use_variable_size_points (. false .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = c ( i ) end do else if (. not . present ( c ) . and . present ( ps )) then call this % set_use_data_dependent_colors (. false .) call this % set_use_variable_size_points (. true .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = ps ( i ) end do else call this % set_use_data_dependent_colors (. false .) call this % set_use_variable_size_points (. false .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) end do end if end subroutine ! ------------------------------------------------------------------------------ pure function pd2d_get_draw_against_y2 ( this ) result ( x ) !! Gets a value determining if the data should be plotted against !! the secondary y-axis. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. logical :: x !! Returns true if the data should be plotted against the secondary !! y-axis; else, false to plot against the primary y-axis. x = this % m_useY2 end function ! -------------------- subroutine pd2d_set_draw_against_y2 ( this , x ) !! Sets a value determining if the data should be plotted against !! the secondary y-axis. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. logical , intent ( in ) :: x !! Set to true if the data should be plotted against the !! secondary y-axis; else, false to plot against the primary y-axis. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ subroutine pd2d_set_data_2 ( this , y , err ) !! Defines the data set to plot. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y-coordinate data. This !! data will be plotted against its own index. class ( errors ), intent ( inout ), optional , target :: err !! An error-handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( y ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Process if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 2 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pd2d_set_data_2\" , flag ) return end if do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = real ( i , real64 ) this % m_data ( i , 2 ) = y ( i ) end do end subroutine ! ------------------------------------------------------------------------------ function pd2d_get_x_array ( this ) result ( x ) !! Gets the stored X data array. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 1 ) end if end function ! ------------------------------------------------------------------------------ function pd2d_get_y_array ( this ) result ( x ) !! Gets the stored Y data array. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 2 ) end if end function ! ****************************************************************************** ! ADDED: OCT. 8, 2020 - JAC ! ------------------------------------------------------------------------------ function pd2d_get_c_array ( this ) result ( x ) !! Gets the stored color scaling data array. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then if ( size ( this % m_data , 2 ) == 3 ) then x = this % m_data (:, 3 ) else if ( size ( this % m_data , 2 ) == 4 ) then x = this % m_data (:, 4 ) end if end if end function ! ****************************************************************************** ! ADDED: JAN. 12, 2024 - JAC ! ------------------------------------------------------------------------------ function pd2d_get_ps_array ( this ) result ( x ) !! Gets the stored point size data array. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then if ( size ( this % m_data , 2 ) > 2 ) then x = this % m_data (:, 3 ) end if end if end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_2d.f90.html"},{"title":"fplot_plot_data_3d.f90 – FPLOT","text":"Contents Modules fplot_plot_data_3d Source Code fplot_plot_data_3d.f90 Source Code module fplot_plot_data_3d use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_simplify use ferror use strings implicit none private public :: plot_data_3d type , extends ( scatter_plot_data ) :: plot_data_3d !! Defines a three-dimensional plot data set. real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! An N-by-3 matrix containing the x, y, and z data points. contains procedure , public :: get_count => pd3d_get_data_count procedure , public :: get_x => pd3d_get_x_data procedure , public :: set_x => pd3d_set_x_data procedure , public :: get_y => pd3d_get_y_data procedure , public :: set_y => pd3d_set_y_data procedure , public :: get_z => pd3d_get_z_data procedure , public :: set_z => pd3d_set_z_data procedure , public :: get_axes_string => pd3d_get_axes_cmd procedure , public :: get_data_string => pd3d_get_data_cmd procedure , public :: define_data => pd3d_set_data_1 procedure , public :: get_x_data => pd3d_get_x_array procedure , public :: get_y_data => pd3d_get_y_array procedure , public :: get_z_data => pd3d_get_z_array procedure , public :: get_color_data => pd3d_get_c_array procedure , public :: get_point_size_data => pd3d_get_c_array end type contains ! ------------------------------------------------------------------------------ pure function pd3d_get_data_count ( this ) result ( x ) !! Gets the number of data points. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. integer ( int32 ) :: x !! The number of data points. if ( allocated ( this % m_data )) then x = size ( this % m_data , 1 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pd3d_get_x_data ( this , index ) result ( x ) !! Gets the requested X data point. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 1 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd3d_set_x_data ( this , index , x ) !! Sets the requested X data point. class ( plot_data_3d ), intent ( inout ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 1 ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pd3d_get_y_data ( this , index ) result ( x ) !! Gets the requested Y data point. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 2 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd3d_set_y_data ( this , index , x ) !! Sets the requested Y data point. class ( plot_data_3d ), intent ( inout ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 2 ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pd3d_get_z_data ( this , index ) result ( x ) !! Gets the requested Z data point. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 3 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd3d_set_z_data ( this , index , x ) !! Sets the requested Z data point. class ( plot_data_3d ), intent ( inout ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 3 ) = x end if end subroutine ! ------------------------------------------------------------------------------ function pd3d_get_axes_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string defining which axes the data !! is to be plotted against. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. character ( len = :), allocatable :: x !! The command string. ! Output x = \"\" end function ! ------------------------------------------------------------------------------ function pd3d_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data to plot. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i character :: delimiter , nl real ( real64 ), allocatable , dimension (:) :: xv , yv , zv , cv , ps real ( real64 ), allocatable , dimension (:,:) :: pts real ( real64 ) :: tol , maxz , minz , eps logical :: usecolors , usevarpoints ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) usecolors = this % get_use_data_dependent_colors () usevarpoints = this % get_use_variable_size_points () ! Process xv = this % get_x_data () yv = this % get_y_data () zv = this % get_z_data () if ( usecolors . and . usevarpoints ) then cv = this % get_color_data () ps = this % get_point_size_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( zv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( ps ( i ))) call str % append ( delimiter ) call str % append ( to_string ( cv ( i ))) call str % append ( nl ) end do else if ( usecolors . and . . not . usevarpoints ) then cv = this % get_color_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( zv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( cv ( i ))) call str % append ( nl ) end do else if (. not . usecolors . and . usevarpoints ) then ps = this % get_point_size_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( zv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( ps ( i ))) call str % append ( nl ) end do else if ( this % get_simplify_data ()) then maxz = maxval ( zv ) minz = minval ( zv ) tol = abs ( this % get_simplification_factor () * ( maxz - minz )) eps = 1 0.0d0 * epsilon ( eps ) if ( tol < eps ) tol = eps pts = simplify_polyline ( xv , yv , zv , tol ) do i = 1 , size ( pts , 1 ) call str % append ( to_string ( pts ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( pts ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( pts ( i , 3 ))) call str % append ( nl ) end do else do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( zv ( i ))) call str % append ( nl ) end do end if end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine pd3d_set_data_1 ( this , x , y , z , c , ps , err ) !! Defines the data set. class ( plot_data_3d ), intent ( inout ) :: this !! The plot_data_3d object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinate data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinate data. real ( real64 ), intent ( in ), dimension (:) :: z !! An N-element array containing the z coordinate data. real ( real64 ), intent ( in ), dimension (:), optional :: c !! An N-element array defining how color should vary with the !! current colormap for each value. real ( real64 ), intent ( in ), dimension (:), optional :: ps !! An N-element array defining the size of each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag , ncols class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) ncols = 3 if ( present ( c )) ncols = ncols + 1 if ( present ( ps )) ncols = ncols + 1 if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pd3d_set_data_1\" , & \"y\" , n , size ( y )) return end if if ( size ( z ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pd3d_set_data_1\" , & \"z\" , n , size ( z )) return end if if ( present ( c )) then if ( size ( c ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pd3d_set_data_1\" , \"c\" , n , size ( c )) return end if end if if ( present ( ps )) then if ( size ( ps ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pd3d_set_data_1\" , \"ps\" , n , size ( ps )) end if end if ! Process if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , ncols ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pd3d_set_data_1\" , flag ) return end if if ( present ( c ) . and . present ( ps )) then call this % set_use_data_dependent_colors (. true .) call this % set_use_variable_size_points (. true .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = z ( i ) this % m_data ( i , 4 ) = ps ( i ) this % m_data ( i , 5 ) = c ( i ) end do else if ( present ( c ) . and . . not . present ( ps )) then call this % set_use_data_dependent_colors (. true .) call this % set_use_variable_size_points (. false .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = z ( i ) this % m_data ( i , 4 ) = c ( i ) end do else if (. not . present ( c ) . and . present ( ps )) then call this % set_use_data_dependent_colors (. false .) call this % set_use_variable_size_points (. true .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = z ( i ) this % m_data ( i , 4 ) = ps ( i ) end do else call this % set_use_data_dependent_colors (. false .) call this % set_use_variable_size_points (. false .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = z ( i ) end do end if end subroutine ! ------------------------------------------------------------------------------ function pd3d_get_x_array ( this ) result ( x ) !! Gets the stored X data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 1 ) end if end function ! ------------------------------------------------------------------------------ function pd3d_get_y_array ( this ) result ( x ) !! Gets the stored Y data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 2 ) end if end function ! ------------------------------------------------------------------------------ function pd3d_get_z_array ( this ) result ( x ) !! Gets the stored Z data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 3 ) end if end function ! ****************************************************************************** ! ADDED: OCT. 9, 2020 - JAC ! ------------------------------------------------------------------------------ function pd3d_get_c_array ( this ) result ( x ) !! Gets the stored color scaling data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then if ( size ( this % m_data , 2 ) == 4 ) then x = this % m_data (:, 4 ) else if ( size ( this % m_data , 2 ) == 5 ) then x = this % m_data (:, 5 ) end if end if end function ! ****************************************************************************** ! ADDED: JAN. 12, 2020 - JAC ! ------------------------------------------------------------------------------ function pd3d_get_ps_array ( this ) result ( x ) !! Gets the stored point scaling data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then if ( size ( this % m_data , 2 ) > 3 ) then x = this % m_data (:, 4 ) end if end if end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_3d.f90.html"},{"title":"fplot_plot_data_bar.f90 – FPLOT","text":"Contents Modules fplot_plot_data_bar Source Code fplot_plot_data_bar.f90 Source Code ! fplot_plot_data_bar.f90 module fplot_plot_data_bar use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_colors use strings use ferror implicit none private public :: plot_data_bar type , extends ( plot_data_colored ) :: plot_data_bar !! Defines a data set tailored to bar charts. type ( string ), private , allocatable , dimension (:) :: m_axisLabels !! An array containing axis labels to associate with each bar. real ( real64 ), private , allocatable , dimension (:,:) :: m_barData !! An array of data defining each bar - the matrix contains !! multiple columns to allow multiple bars per label. logical , private :: m_useAxisLabels = . true . !! Determines if the axis labels should be used - only applicable !! if there is existing data stored in m_axisLabels & m_axisLabels !! is the same size as m_barData. logical , private :: m_useY2 = . false . !! Draw against the secondary y axis? logical , private :: m_filled = . true . !! Determines if each bar is filled. real ( real32 ), private :: m_alpha = 1.0 !! The alpha value (transparency) for each bar. contains procedure , public :: get_count => pdb_get_count procedure , public :: get => pdb_get_data procedure , public :: set => pdb_set_data procedure , public :: get_data => pdb_get_data_set procedure , public :: get_label => pdb_get_label procedure , public :: set_label => pdb_set_label procedure , public :: get_use_labels => pdb_get_use_labels procedure , public :: set_use_labels => pdb_set_use_labels procedure , public :: get_command_string => pdb_get_cmd procedure , public :: get_data_string => pdb_get_data_cmd procedure , public :: get_axes_string => pdb_get_axes_cmd procedure , public :: get_bar_per_label_count => pdb_get_col_count procedure , public :: get_draw_against_y2 => pdb_get_use_y2 procedure , public :: set_draw_against_y2 => pdb_set_use_y2 procedure , public :: get_is_filled => pdb_get_is_filled procedure , public :: set_is_filled => pdb_set_is_filled procedure , public :: get_transparency => pdb_get_alpha procedure , public :: set_transparency => pdb_set_alpha generic , public :: define_data => pdb_set_data_1 , pdb_set_data_2 , & pdb_set_data_3 procedure , private :: pdb_set_data_1 procedure , private :: pdb_set_data_2 procedure , private :: pdb_set_data_3 procedure , public :: set_data_1 => pdb_set_data_1_core procedure , public :: set_data_2 => pdb_set_data_2_core procedure , public :: set_data_3 => pdb_set_data_3_core end type contains ! ------------------------------------------------------------------------------ pure function pdb_get_count ( this ) result ( x ) !! Gets the number of stored data points. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ) :: x !! The number of stored data points. if ( allocated ( this % m_barData )) then x = size ( this % m_barData , 1 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pdb_get_data ( this , index , col ) result ( x ) !! Gets the requested data point. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ), intent ( in ) :: index !! The data point index. integer ( int32 ), intent ( in ) :: col !! The column index. real ( real64 ) :: x !! The value. if ( allocated ( this % m_barData )) then x = this % m_barData ( index , col ) else x = 0.0d0 end if end function ! ------------------------------------------------------------------------------ subroutine pdb_set_data ( this , index , col , x ) !! Replaces the requested data point. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. integer ( int32 ), intent ( in ) :: index !! The data point index. integer ( int32 ), intent ( in ) :: col !! The column index. real ( real64 ), intent ( in ) :: x !! The new value. if ( allocated ( this % m_barData )) then this % m_barData ( index , col ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pdb_get_data_set ( this , col ) result ( x ) !! Gets the requested data set. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ), intent ( in ) :: col !! The column index. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the data set. if ( allocated ( this % m_barData )) then x = this % m_barData (:, col ) else allocate ( x ( 0 )) end if end function ! ------------------------------------------------------------------------------ pure function pdb_get_label ( this , index ) result ( x ) !! Gets the axis label associated with a specific data set. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ), intent ( in ) :: index !! The index of the data set. character ( len = :), allocatable :: x !! The label. if ( allocated ( this % m_axisLabels )) then x = char ( this % m_axisLabels ( index )) else x = \"\" end if end function ! ------------------------------------------------------------------------------ subroutine pdb_set_label ( this , index , txt ) !! Sets the axis label for a specific data set. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. integer ( int32 ) :: index !! The index of the data set. character ( len = * ), intent ( in ) :: txt !! The label. if ( allocated ( this % m_axisLabels )) then this % m_axisLabels ( index ) = txt end if end subroutine ! ------------------------------------------------------------------------------ pure function pdb_get_use_labels ( this ) result ( x ) !! Gets a value determining if labels are used to identify the data. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. logical :: x !! Returns true if labels are used; else, false. x = this % m_useAxisLabels end function ! ------------------------------------------------------------------------------ subroutine pdb_set_use_labels ( this , x ) !! Sets a value determining if labels are used to identify the data. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. logical , intent ( in ) :: x !! Set to true if labels are used; else, false. this % m_useAxisLabels = x end subroutine ! ------------------------------------------------------------------------------ function pdb_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for this object. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n , ncols type ( color ) :: clr ! Initialization call str % initialize () ! Starting off... call str % append ( ' \"-\" ' ) ! Tic Labels if ( this % get_use_labels () . and . allocated ( this % m_barData ) . and . & allocated ( this % m_axisLabels )) then ncols = size ( this % m_barData , 2 ) if ( ncols == 1 ) then call str % append ( \" using 2:xtic(1) \" ) else call str % append ( \" using 2:\" ) call str % append ( to_string ( ncols )) call str % append ( \":xtic(1) \" ) end if end if ! Enforce a box plot call str % append ( \" with boxes \" ) ! Filled? if ( this % get_is_filled ()) then call str % append ( \" fill solid \" ) else call str % append ( \" fill empty \" ) end if ! Transparency call str % append ( to_string ( this % get_transparency ())) ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' notitle' ) end if ! Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Define the axes structure call str % append ( \" \" ) call str % append ( this % get_axes_string ()) ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pdb_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string defining the data for this object. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , nbars , ncols character :: delimiter , nl ! Initialization call str % initialize () delimiter = achar ( 9 ) nl = new_line ( nl ) nbars = this % get_count () ncols = this % get_bar_per_label_count () ! Process if ( this % get_use_labels () . and . allocated ( this % m_axisLabels ) . and . & allocated ( this % m_barData )) then do i = 1 , nbars call str % append ( char ( this % m_axisLabels ( i ))) call str % append ( delimiter ) do j = 1 , ncols call str % append ( to_string ( this % get ( i , j ))) if ( j /= nbars ) call str % append ( delimiter ) end do call str % append ( nl ) end do else do i = 1 , nbars do j = 1 , ncols call str % append ( to_string ( this % get ( i , j ))) if ( j /= nbars ) call str % append ( delimiter ) end do call str % append ( nl ) end do end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pdb_get_axes_cmd ( this ) result ( x ) !! Gets the GNUPLOT command defining which axes to plot against. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. character ( len = :), allocatable :: x !! The command string. ! Define which axes the data is to be plotted against if ( this % get_draw_against_y2 ()) then x = \"axes x1y2\" else x = \"axes x1y1\" end if end function ! ------------------------------------------------------------------------------ pure function pdb_get_col_count ( this ) result ( x ) !! Gets the number of data sets (columns). class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ) :: x !! The count. if ( allocated ( this % m_barData )) then x = size ( this % m_barData , 2 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pdb_get_use_y2 ( this ) result ( x ) !! Gets a value determining if the data should be plotted against a !! secondary y-axis. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. logical :: x !! Returns true to plot against a secondary y-axis; else, false. x = this % m_useY2 end function ! ------------------------------------------------------------------------------ subroutine pdb_set_use_y2 ( this , x ) !! Sets a value determining if the data should be plotted against a !! secondary y-axis. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. logical , intent ( in ) :: x !! Set to true to plot against a secondary y-axis; else, false. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_1 ( this , x , err ) !! Defines a single data set. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real64 ), intent ( in ), dimension (:) :: x !! The data to plot. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Process call this % set_data_1 ( x , err ) end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_2 ( this , labels , x , err ) !! Defines data along with associated axis labels. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. class ( string ), intent ( in ), dimension (:) :: labels !! The axis labels to associate with the data. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Process call this % set_data_2 ( labels , x , err ) end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_3 ( this , labels , x , fmt , err ) !! Defines data along with labels and formatting information. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real64 ), intent ( in ), dimension (:) :: labels !! The axis labels to associate with the data. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. character ( len = * ), intent ( in ), optional :: fmt !! The format string for the labels (e.g. '(I0)', etc.). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Process call this % set_data_3 ( labels , x , fmt , err ) end subroutine ! ------------------------------------------------------------------------------ pure function pdb_get_is_filled ( this ) result ( x ) !! Gets a value determining if each bar is filled. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. logical :: x !! Returns true if the bars are to be filled; else, false. x = this % m_filled end function ! ------------------------------------------------------------------------------ subroutine pdb_set_is_filled ( this , x ) !! Sets a value determining if each bar is filled. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. logical , intent ( in ) :: x !! Set to true if the bars are to be filled; else, false. this % m_filled = x end subroutine ! ------------------------------------------------------------------------------ pure function pdb_get_alpha ( this ) result ( x ) !! Gets the alpha (transparency) for the bar color. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. real ( real32 ) :: x !! The alpha value ([0, 1]). x = this % m_alpha end function ! ------------------------------------------------------------------------------ subroutine pdb_set_alpha ( this , x ) !! Gets the alpha (transparency) for the bar color. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real32 ), intent ( in ) :: x !! The alpha value ([0, 1]). if ( x > 1.0 ) then this % m_alpha = 1.0 else if ( x < 0.0 ) then this % m_alpha = 0.0 else this % m_alpha = x end if end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_1_core ( this , x , err ) !! Defines the data set. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: n , flag ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x ) ! Process if ( allocated ( this % m_axisLabels )) deallocate ( this % m_axisLabels ) if ( allocated ( this % m_barData )) deallocate ( this % m_barData ) allocate ( this % m_barData ( n , 1 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdb_set_data_1_core\" , flag ) return end if this % m_barData (:, 1 ) = x end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_2_core ( this , labels , x , err ) ! Arguments class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. class ( string ), intent ( in ), dimension (:) :: labels !! The axis labels. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: n , flag ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x ) ! Input Check if ( size ( labels ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pdb_set_data_2_core\" , & \"labels\" , n , size ( labels )) return end if ! Process if ( allocated ( this % m_axisLabels )) deallocate ( this % m_axisLabels ) if ( allocated ( this % m_barData )) deallocate ( this % m_barData ) allocate ( this % m_barData ( n , 1 ), stat = flag ) if ( flag == 0 ) allocate ( this % m_axisLabels ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdb_set_data_2_core\" , flag ) return end if this % m_barData (:, 1 ) = x this % m_axisLabels = labels end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_3_core ( this , labels , x , fmt , err ) ! Arguments class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real64 ), intent ( in ), dimension (:) :: labels !! The axis labels. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. character ( len = * ), intent ( in ), optional :: fmt !! The format string for the labels (e.g. '(I0)', etc.). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: i , n , flag type ( string ), allocatable , dimension (:) :: lbls ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x ) ! Input Check if ( size ( labels ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pdb_set_data_3_core\" , & \"labels\" , n , size ( labels )) return end if ! Convert the numeric labels to strings allocate ( lbls ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdb_set_data_3_core\" , flag ) return end if do i = 1 , n lbls ( i ) = to_string ( labels ( i ), fmt ) end do ! Store the data if ( allocated ( this % m_axisLabels )) deallocate ( this % m_axisLabels ) if ( allocated ( this % m_barData )) deallocate ( this % m_barData ) allocate ( this % m_barData ( n , 1 ), stat = flag ) if ( flag == 0 ) allocate ( this % m_axisLabels ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdb_set_data_3_core\" , flag ) return end if this % m_barData (:, 1 ) = x this % m_axisLabels = lbls end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_bar.f90.html"},{"title":"fplot_plot_data_error_bars.f90 – FPLOT","text":"Contents Modules fplot_plot_data_error_bars Source Code fplot_plot_data_error_bars.f90 Source Code ! fplot_plot_data_error_bars.f90 module fplot_plot_data_error_bars use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_colors use ferror use strings implicit none private public :: plot_data_error_bars type , extends ( plot_data_colored ) :: plot_data_error_bars !! Defines a 2D error-bar based data set. logical , private :: m_xBars = . false . !! Display x error bars? logical , private :: m_yBars = . false . !! Display y error bars? real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! A matrix containing the raw and error data. Column 1 is for the !! x coordinate, column 2 for the y coordinate, and the remaining !! columns are for the error data (x, then y if applicable). logical , private :: m_box = . false . !! Display an error box for the case where x and y errors are !! defined. logical , private :: m_range = . false . !! Plot error bars using a defined range vs. a +/- value. contains procedure , public :: get_command_string => pde_get_cmd procedure , public :: get_data_string => pde_get_data_cmd generic , public :: define_x_error_data => pde_define_x_err , & pde_define_x_err_lim generic , public :: define_y_error_data => pde_define_y_err , & pde_define_y_err_lim generic , public :: define_xy_error_data => pde_define_xy_err , & pde_define_xy_err_lim procedure , public :: get_plot_x_error_bars => pde_get_plot_x_err procedure , public :: get_plot_y_error_bars => pde_get_plot_y_err procedure , public :: get_count => pde_get_count procedure , public :: get_use_error_box => pde_get_box procedure , public :: set_use_error_box => pde_set_box procedure , public :: get_use_range => pde_get_use_range procedure :: pde_define_x_err procedure :: pde_define_y_err procedure :: pde_define_xy_err procedure :: pde_define_x_err_lim procedure :: pde_define_y_err_lim procedure :: pde_define_xy_err_lim end type contains ! ------------------------------------------------------------------------------ function pde_get_cmd ( this ) result ( cmd ) !! Gets the appropriate GNUPLOT command string for the object. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. character ( len = :), allocatable :: cmd !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Error Bars if ( this % get_plot_x_error_bars () . and . this % get_plot_y_error_bars ()) then if ( this % get_use_error_box ()) then call str % append ( \" w boxxyerr\" ) else call str % append ( \" w xyerr\" ) end if else if ( this % get_plot_x_error_bars () . and . . not . this % get_plot_y_error_bars ()) then call str % append ( \" w xerr\" ) else if (. not . this % get_plot_x_error_bars () . and . this % get_plot_y_error_bars ()) then call str % append ( \" w yerr\" ) end if ! Output cmd = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pde_get_data_cmd ( this ) result ( cmd ) !! Gets the appropriate GNUPLOT commands to plot the data itself. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. character ( len = :), allocatable :: cmd !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , n character :: delimiter , nl ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) n = this % get_count () ! Process if ( this % get_plot_x_error_bars () . and . this % get_plot_y_error_bars ()) then if ( this % get_use_range ()) then do i = 1 , n call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 4 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 5 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 6 ))) call str % append ( nl ) end do else do i = 1 , n call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 4 ))) call str % append ( nl ) end do end if else if ( this % get_use_range ()) then do i = 1 , n call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 4 ))) call str % append ( nl ) end do else do i = 1 , n call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( nl ) end do end if end if ! if (this%get_plot_x_error_bars() .and. this%get_plot_y_error_bars()) then ! do i = 1, n ! call str%append(to_string(this%m_data(i, 1))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 2))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 3))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 4))) ! call str%append(nl) ! end do ! else ! do i = 1, n ! call str%append(to_string(this%m_data(i, 1))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 2))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 3))) ! call str%append(nl) ! end do ! end if ! End cmd = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine pde_define_x_err ( this , x , y , xerr , err ) !! Defines the x error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: xerr !! An N-element array containing the x errors at each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_x_err\" , & \"y\" , n , size ( y )) return end if if ( size ( xerr ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_x_err\" , & \"xerr\" , n , size ( xerr )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 3 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_x_err\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = xerr ( i ) end do this % m_xBars = . true . this % m_range = . false . end subroutine ! ------------------------------------------------------------------------------ subroutine pde_define_y_err ( this , x , y , yerr , err ) !! Defines the y error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: yerr !! An N-element array containing the y errors at each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_y_err\" , & \"y\" , n , size ( y )) return end if if ( size ( yerr ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_y_err\" , & \"yerr\" , n , size ( yerr )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 3 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_y_err\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = yerr ( i ) end do this % m_yBars = . true . this % m_range = . false . end subroutine ! ------------------------------------------------------------------------------ subroutine pde_define_xy_err ( this , x , y , xerr , yerr , err ) !! Defines x and y error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: xerr !! An N-element array containing the x errors at each data point. real ( real64 ), intent ( in ), dimension (:) :: yerr !! An N-element array containing the y errors at each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_xy_err\" , & \"y\" , n , size ( y )) return end if if ( size ( xerr ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_xy_err\" , & \"xerr\" , n , size ( xerr )) return end if if ( size ( yerr ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_xy_err\" , & \"yerr\" , n , size ( yerr )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 4 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_xy_err\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = xerr ( i ) this % m_data ( i , 4 ) = yerr ( i ) end do this % m_xBars = . true . this % m_yBars = . true . this % m_range = . false . end subroutine ! ------------------------------------------------------------------------------ pure function pde_get_plot_x_err ( this ) result ( x ) !! Checks to see if the x error bar data has been defined, and as !! a result, if the x error data is to be plotted. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. logical :: x !! Returns true if the x error bars are to be plotted; else, false. x = this % m_xBars end function ! ------------------------------------------------------------------------------ pure function pde_get_plot_y_err ( this ) result ( x ) !! Checks to see if the y error bar data has been defined, and as !! a result, if the x error data is to be plotted. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. logical :: x !! Returns true if the y error bars are to be plotted; else, false. x = this % m_yBars end function ! ------------------------------------------------------------------------------ pure function pde_get_count ( this ) result ( x ) !! Gets the number of stored data points. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. integer ( int32 ) :: x !! The number of data points. if ( allocated ( this % m_data )) then x = size ( this % m_data , 1 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pde_get_box ( this ) result ( x ) !! Checks to see if the x and y error boxes should be utilized. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. logical :: x !! Returns true if the error boxes are to be plotted; else, !! false. Notice, the error boxes are only utilized if there is !! both x and y error data defined, regardless of the value of this !! property. x = this % m_box end function ! -------------------- subroutine pde_set_box ( this , x ) !! Deterimines if the x and y error boxes should be utilized. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. logical , intent ( in ) :: x !! Set to true if the error boxes are to be plotted; else, !! false. Notice, the error boxes are only utilized if there is !! both x and y error data defined, regardless of the value of this !! property. this % m_box = x end subroutine ! ------------------------------------------------------------------------------ pure function pde_get_use_range ( this ) result ( x ) !! Gets a value determining if a defined range is being used !! to define the error bar extremes. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. logical :: x !! True if a defined range is being used; else, false. x = this % m_range end function ! ------------------------------------------------------------------------------ subroutine pde_define_x_err_lim ( this , x , y , xmin , xmax , err ) !! Defines the x error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: xmin !! An N-element array containing the minimum x values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: xmax !! An N-element array containing the maximum x values at each data !! point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_x_err_lim\" , \"y\" , n , size ( y )) return end if if ( size ( xmin ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_x_err_lim\" , \"xmin\" , n , size ( xmin )) return end if if ( size ( xmax ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_x_err_lim\" , \"xmax\" , n , size ( xmax )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 4 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_x_err_lim\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = xmin ( i ) this % m_data ( i , 4 ) = xmax ( i ) end do this % m_xBars = . true . this % m_range = . true . end subroutine ! ------------------------------------------------------------------------------ subroutine pde_define_y_err_lim ( this , x , y , ymin , ymax , err ) !! Defines the y error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: ymin !! An N-element array containing the minimum y values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: ymax !! An N-element array containing the maximum y values at each data !! point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_y_err_lim\" , \"y\" , n , size ( y )) return end if if ( size ( ymin ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_y_err_lim\" , \"ymin\" , n , size ( ymin )) return end if if ( size ( ymax ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_y_err_lim\" , \"ymax\" , n , size ( ymax )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 4 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_y_err_lim\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = ymin ( i ) this % m_data ( i , 4 ) = ymax ( i ) end do this % m_yBars = . true . this % m_range = . true . end subroutine ! ------------------------------------------------------------------------------ subroutine pde_define_xy_err_lim ( this , x , y , xmin , xmax , ymin , & ymax , err ) !! Defines the x and y error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: xmin !! An N-element array containing the minimum x values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: xmax !! An N-element array containing the maximum x values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: ymin !! An N-element array containing the minimum y values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: ymax !! An N-element array containing the maximum x values at each data !! point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"y\" , n , size ( y )) return end if if ( size ( xmin ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"xmin\" , n , size ( xmin )) return end if if ( size ( xmax ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"xmax\" , n , size ( xmax )) return end if if ( size ( ymin ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"ymin\" , n , size ( ymin )) return end if if ( size ( ymax ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"ymax\" , n , size ( ymax )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 6 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_xy_err_lim\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = xmin ( i ) this % m_data ( i , 4 ) = xmax ( i ) this % m_data ( i , 5 ) = ymin ( i ) this % m_data ( i , 6 ) = ymax ( i ) end do this % m_xBars = . true . this % m_yBars = . true . this % m_range = . true . end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_error_bars.f90.html"},{"title":"fplot_plot_data_histogram.f90 – FPLOT","text":"Contents Modules fplot_plot_data_histogram Source Code fplot_plot_data_histogram.f90 Source Code ! fplot_plot_data_histogram.f90 module fplot_plot_data_histogram use iso_fortran_env use fplot_plot_data_bar use fplot_errors use ferror use strings implicit none private public :: plot_data_histogram type , extends ( plot_data_bar ) :: plot_data_histogram !! A container for plotting data in the form of a histogram. integer ( int32 ), private :: m_binCount = 10 !! The number of bins. character ( len = :), private , allocatable :: m_numberFmt !! The numerical label format string. contains procedure , public :: get_bin_count => pdh_get_bin_count procedure , public :: set_bin_count => pdh_set_bin_count procedure , public :: bin_data => pdh_bin_data procedure , public :: get_extreme_values => pdh_get_extremes procedure , public :: get_number_format => pdh_get_num_fmt procedure , public :: set_number_format => pdh_set_num_fmt procedure , public :: set_data_1 => pdh_set_data_1 procedure , public :: set_data_2 => pdh_set_data_2 procedure , public :: set_data_3 => pdh_set_data_3 end type contains ! ------------------------------------------------------------------------------ pure function pdh_get_bin_count ( this ) result ( x ) !! Gets the number of bins. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. integer ( int32 ) :: x !! The bin count. x = this % m_binCount end function ! ------------------------------------------------------------------------------ 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. class ( plot_data_histogram ), intent ( inout ) :: this !! The plot_data_histogram object. integer ( int32 ), intent ( in ) :: x !! The bin count. this % m_binCount = x end subroutine ! ------------------------------------------------------------------------------ function pdh_bin_data ( this , x , err ) result ( bx ) !! Bins the supplied data set. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set to bin. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. real ( real64 ), allocatable , dimension (:,:) :: bx !! The binned data. ! Local Variables real ( real64 ) :: maxX , minX , width , val integer ( int32 ) :: i , j , flag , n , nbins real ( real64 ), allocatable , dimension (:,:) :: ranges class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x ) nbins = this % get_bin_count () ! Get the max and min of the entire data set maxX = maxval ( x ) minX = minval ( x ) width = ( maxX - minX ) / ( nbins - 1.0 ) ! Allocate space for the output allocate ( bx ( nbins , 2 ), stat = flag ) if ( flag == 0 ) allocate ( ranges ( nbins , 2 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdh_bin_data\" , flag ) return end if bx = 0.0d0 ! Define each range ranges ( 1 ,:) = [ minX , minX + width ] do i = 2 , nbins ranges ( i , 1 ) = ranges ( i - 1 , 2 ) ranges ( i , 2 ) = ranges ( i , 1 ) + width end do ! Construct the bins do i = 1 , n val = x ( i ) do j = 1 , nbins if (( val >= ranges ( j , 1 )) . and . ( val <= ranges ( j , 2 ))) then bx ( j , 1 ) = bx ( j , 1 ) + 1.0d0 ! Counter exit ! Exit the inner do loop end if end do end do ! Now compute the center of each bin - store in column 2 of bx bx (:, 2 ) = 0.5d0 * ( ranges (:, 1 ) + ranges (:, 2 )) end function ! ------------------------------------------------------------------------------ pure function pdh_get_extremes ( this ) result ( x ) !! Returns the extreme values in the data set. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. real ( real64 ), dimension ( 2 ) :: x !! A two-element array containing the minimum and maximum values, in !! that order. ! Local Variables integer ( int32 ) :: i , j , nrows , ncols real ( real64 ) :: maxX , minX , val logical :: check ! Initialization nrows = this % get_count () ncols = this % get_bar_per_label_count () check = . true . ! Process do j = 1 , ncols do i = 1 , nrows val = this % get ( i , j ) if ( check ) then maxX = val minX = val check = . false . else if ( val > maxX ) maxX = val if ( val < minX ) minX = val end if end do end do ! End x = [ minX , maxX ] end function ! ------------------------------------------------------------------------------ subroutine pdh_set_data_1 ( this , x , err ) !! Defines the data set. class ( plot_data_histogram ), intent ( inout ) :: this !! The plot_data_histogram object. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables real ( real64 ), allocatable , dimension (:,:) :: bx class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Bin the data bx = this % bin_data ( x , errmgr ) if ( errmgr % has_error_occurred ()) return ! Call the base routine to store the data - use the average values to ! establish labels for the x-axis call this % plot_data_bar % set_data_3 ( bx (:, 2 ), bx (:, 1 ), & this % get_number_format (), errmgr ) end subroutine ! ------------------------------------------------------------------------------ subroutine pdh_set_data_2 ( this , labels , x , err ) !! Defines the data set with associated axis labels. class ( plot_data_histogram ), intent ( inout ) :: this !! The plot_data_histogram object. class ( string ), intent ( in ), dimension (:) :: labels !! The axis labels. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables real ( real64 ), allocatable , dimension (:,:) :: bx class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Ensure the labels array is the same size as the number of bins if ( size ( labels ) /= this % get_bin_count ()) then call report_array_size_mismatch_error ( errmgr , \"pdh_set_data_2\" , & \"labels\" , this % get_bin_count (), size ( labels )) return end if ! Call the base routine to store the data call this % plot_data_bar % set_data_2 ( labels , bx (:, 1 ), errmgr ) end subroutine ! ------------------------------------------------------------------------------ subroutine pdh_set_data_3 ( this , labels , x , fmt , err ) !! Defines the data set with associated axis labels with a specific format. class ( plot_data_histogram ), intent ( inout ) :: this !! The plot_data_histogram object. real ( real64 ), intent ( in ), dimension (:) :: labels !! The axis labels. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. character ( len = * ), intent ( in ), optional :: fmt !! The format string for the labels (e.g. '(I0)', etc.). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables real ( real64 ), allocatable , dimension (:,:) :: bx class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Ensure the labels array is the same size as the number of bins if ( size ( labels ) /= this % get_bin_count ()) then call report_array_size_mismatch_error ( errmgr , \"pdh_set_data_3\" , & \"labels\" , this % get_bin_count (), size ( labels )) return end if ! Call the base routine to store the data call this % plot_data_bar % set_data_3 ( labels , bx (:, 1 ), fmt , errmgr ) end subroutine ! ------------------------------------------------------------------------------ pure function pdh_get_num_fmt ( this ) result ( x ) !! Gets the numerical format string used for the labels. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. character ( len = :), allocatable :: x !! The format string. if ( allocated ( this % m_numberFmt )) then x = this % m_numberFmt else x = \"(F6.2)\" end if end function ! ------------------------------------------------------------------------------ subroutine pdh_set_num_fmt ( this , x ) !! Sets the numerical format string used for the labels. class ( plot_data_histogram ), intent ( inout ) :: this !! The plot_data_histogram object. character ( len = * ), intent ( in ) :: x !! The format string (e.g. \"(F6.2)\"). this % m_numberFmt = x end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_histogram.f90.html"},{"title":"fplot_plot_data_tri_2d.f90 – FPLOT","text":"Contents Modules fplot_plot_data_tri_2d Source Code fplot_plot_data_tri_2d.f90 Source Code ! fplot_plot_data_tri_2d.f90 module fplot_plot_data_tri_2d use iso_fortran_env use fplot_plot_data use fplot_constants use fplot_triangulations_delaunay_2d use fplot_colors use strings implicit none private public :: plot_data_tri_2d type , extends ( plot_data_colored ) :: plot_data_tri_2d !! Defines a 2D triangulated data set. real ( real64 ), private , allocatable , dimension (:) :: m_x !! An array of the x-coordinates of each point. real ( real64 ), private , allocatable , dimension (:) :: m_y !! An array of the y-coordinates of each point. integer ( int32 ), private , allocatable , dimension (:,:) :: m_indices !! A 3-column matrix containing the indices of each triangle's !! vertex. real ( real32 ), private :: m_lineWidth = 1.0 !! The line width. integer ( int32 ), private :: m_lineStyle = LINE_SOLID !! The line style contains procedure , public :: get_data_string => pdt2d_get_data_cmd procedure , public :: get_command_string => pdt2d_get_cmd procedure , public :: define_data => pdt2d_define_data procedure , public :: get_line_width => pdt2d_get_line_width procedure , public :: set_line_width => pdt2d_set_line_width procedure , public :: get_line_style => pdt2d_get_line_style procedure , public :: set_line_style => pdt2d_set_line_style end type contains ! ------------------------------------------------------------------------------ module function pdt2d_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string describing the data to plot. class ( plot_data_tri_2d ), intent ( in ) :: this !! The plot_data_tri_2d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , n character :: delimiter , nl ! Initialization call str % initialize () n = size ( this % m_indices , 1 ) delimiter = achar ( 9 ) nl = new_line ( nl ) ! Process ! https://stackoverflow.com/questions/42784369/drawing-triangular-mesh-using-gnuplot ! http://www.gnuplot.info/faq/faq.html#x1-530005.10 ! https://codeyarns.com/2011/01/25/gnuplot-plotting-a-3d-triangulation/ do i = 1 , n ! Line 1-2 ! Vertex 1 j = this % m_indices ( i , 1 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Vertex 2 j = this % m_indices ( i , 2 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Line 2-3 ! Vertex 2 call str % append ( nl ) j = this % m_indices ( i , 2 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Vertex 3 j = this % m_indices ( i , 3 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Line 3-1 ! Vertex 3 call str % append ( nl ) j = this % m_indices ( i , 3 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Vertex 1 j = this % m_indices ( i , 1 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Add in the two blank lines if ( i /= n ) then call str % append ( nl ) call str % append ( nl ) end if end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ module function pdt2d_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for the object. class ( plot_data_tri_2d ), intent ( in ) :: this !! The plot_data_tri_2d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Lines call str % append ( \" with lines\" ) ! Line Width call str % append ( \" lw \" ) call str % append ( to_string ( this % get_line_width ())) ! Line Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Line Style call str % append ( \" lt \" ) call str % append ( to_string ( this % get_line_style ())) if ( this % get_line_style () /= LINE_SOLID ) then call str % append ( \" dashtype \" ) call str % append ( to_string ( this % get_line_style ())) end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ module subroutine pdt2d_define_data ( this , tri ) !! Defines the data to plot. class ( plot_data_tri_2d ), intent ( inout ) :: this !! The plot_data_tri_2d object. class ( delaunay_tri_2d ), intent ( in ) :: tri !! The triangulation data to plot. ! Process if ( allocated ( this % m_x )) deallocate ( this % m_x ) if ( allocated ( this % m_y )) deallocate ( this % m_y ) if ( allocated ( this % m_indices )) deallocate ( this % m_indices ) this % m_x = tri % get_points_x () this % m_y = tri % get_points_y () this % m_indices = tri % get_indices () end subroutine ! ------------------------------------------------------------------------------ pure module function pdt2d_get_line_width ( this ) result ( rst ) !! Gets the width of the lines used to draw the triangulation. class ( plot_data_tri_2d ), intent ( in ) :: this !! The plot_data_tri_2d object. real ( real32 ) :: rst !! The line width. rst = this % m_lineWidth end function ! -------------------- module subroutine pdt2d_set_line_width ( this , x ) !! Sets the width of the lines used to draw the triangulation. class ( plot_data_tri_2d ), intent ( inout ) :: this !! The plot_data_tri_2d object. real ( real32 ), intent ( in ) :: x !! The line width. if ( x <= 0.0d0 ) then this % m_lineWidth = 1.0d0 else this % m_lineWidth = x end if end subroutine ! ------------------------------------------------------------------------------ pure module function pdt2d_get_line_style ( this ) result ( rst ) !! Gets the line style. class ( plot_data_tri_2d ), intent ( in ) :: this !! The plot_data_tri_2d object. integer ( int32 ) :: rst !! The line style. The line style must be one of the following !! constants. !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! - LINE_SOLID rst = this % m_lineStyle end function ! -------------------- module subroutine pdt2d_set_line_style ( this , x ) !! Sets the line style. class ( plot_data_tri_2d ), intent ( inout ) :: this !! The plot_data_tri_2d object. integer ( int32 ), intent ( in ) :: x !! The line style. The line style must be one of the following !! constants. !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! - LINE_SOLID if ( x == LINE_DASHED . or . & x == LINE_DASH_DOTTED . or . & x == LINE_DASH_DOT_DOT . or . & x == LINE_DOTTED . or . & x == LINE_SOLID ) then ! Only reset the line style if it is a valid type. this % m_lineStyle = x end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_tri_2d.f90.html"},{"title":"fplot_plot_object.f90 – FPLOT","text":"Contents Modules fplot_plot_object Source Code fplot_plot_object.f90 Source Code module fplot_plot_object use iso_fortran_env implicit none type , abstract :: plot_object !! The base type for all plot objects. contains procedure ( get_string_result ), deferred , public :: get_command_string end type interface function get_string_result ( this ) result ( x ) !! Returns a string from a plot_object. import plot_object class ( plot_object ), intent ( in ) :: this !! The plot_object object. character ( len = :), allocatable :: x !! The result string. end function end interface end module","tags":"","loc":"sourcefile\\fplot_plot_object.f90.html"},{"title":"fplot_plot_polar.f90 – FPLOT","text":"Contents Modules fplot_plot_polar Source Code fplot_plot_polar.f90 Source Code ! fplot_polar.f90 module fplot_plot_polar use iso_fortran_env use fplot_plot use fplot_terminal use fplot_errors use fplot_constants use fplot_legend use fplot_plot_data use ferror use strings implicit none private public :: plot_polar type , extends ( plot ) :: plot_polar private !> @brief Allow the plot to autoscale? logical :: m_autoscale = . true . !> @brief The minimum radius value - only applicable if m_autoscale is !! false. real ( real64 ) :: m_minrad = 0.0d0 !> @brief The maximum radius value - only applicable if m_autoscale is !! false. real ( real64 ) :: m_maxrad = 1.0d0 !> @brief The location for theta = 0 character ( len = :), allocatable :: m_thetaStart !> @brief The direction for theta character ( len = :), allocatable :: m_thetaDirection contains final :: plr_clean_up procedure , public :: initialize => plr_init procedure , public :: get_command_string => plr_get_cmd procedure , public :: get_autoscale => plr_get_autoscale procedure , public :: set_autoscale => plr_set_autoscale procedure , public :: get_radial_limits => plr_get_limits procedure , public :: set_radial_limits => plr_set_limits procedure , public :: get_theta_start_position => plr_get_theta_start procedure , public :: set_theta_start_position => plr_set_theta_start procedure , public :: get_theta_direction => plr_get_theta_direction procedure , public :: set_theta_direction => plr_set_theta_direction end type contains ! ------------------------------------------------------------------------------ subroutine plr_clean_up ( this ) !! Cleans up resources held by the plot_polar object. type ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. call this % free_resources () end subroutine ! ------------------------------------------------------------------------------ subroutine plr_init ( this , term , fname , err ) !! Initializes the plot_polar object. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Initialize the base class ! call plt_init(this, term, fname, errmgr) call this % plot % initialize ( term , fname , errmgr ) if ( errmgr % has_error_occurred ()) return ! Initialize the rest of the object this % m_thetaStart = POLAR_THETA_RIGHT this % m_thetaDirection = POLAR_THETA_CCW end subroutine ! ------------------------------------------------------------------------------ function plr_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot_polar object. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. character ( len = :), allocatable :: x !! The command string. ! Local Variables integer ( int32 ) :: i , n type ( string_builder ) :: str type ( legend ), pointer :: leg real ( real64 ) :: lim ( 2 ) ! class(plot_label), pointer :: lbl class ( plot_data ), pointer :: ptr ! Initialization call str % initialize () ! Call the base routine call str % append ( this % plot % get_command_string ()) ! Polar-Specific Settings call str % append ( new_line ( 'a' )) call str % append ( \"unset border\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set polar\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set size square\" ) call str % append ( new_line ( 'a' )) call str % append ( \"unset xtics\" ) call str % append ( new_line ( 'a' )) call str % append ( \"unset ytics\" ) call str % append ( new_line ( 'a' )) call str % append ( 'set ttics 0, 30 format \"%g\".GPVAL_DEGREE_SIGN' ) call str % append ( new_line ( 'a' )) call str % append ( \"set mttics 3\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set theta \" ) call str % append ( this % get_theta_start_position ()) call str % append ( \" \" ) call str % append ( this % get_theta_direction ()) ! Radial Limits if (. not . this % get_autoscale ()) then lim = this % get_radial_limits () call str % append ( new_line ( 'a' )) call str % append ( \"set rrange [\" ) call str % append ( to_string ( lim ( 1 ))) call str % append ( \":\" ) call str % append ( to_string ( lim ( 2 ))) call str % append ( \"]\" ) end if ! Grid if ( this % get_show_gridlines ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set grid r polar\" ) end if ! Title n = len_trim ( this % get_title ()) if ( n > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( 'set title \"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if ! Border call str % append ( new_line ( 'a' )) if ( this % get_draw_border ()) then call str % append ( \"set border polar\" ) else call str % append ( \"set border 0\" ) end if ! Legend call str % append ( new_line ( 'a' )) leg => this % get_legend () if ( associated ( leg )) call str % append ( leg % get_command_string ()) ! ! Labels ! do i = 1, this%get_label_count() ! lbl => this%get_label(i) ! if (.not.associated(lbl)) cycle ! call str%append(new_line('a')) ! call str%append(lbl%get_command_string()) ! end do ! Define the plot function and data formatting commands n = this % get_count () call str % append ( new_line ( 'a' )) call str % append ( \"plot \" ) do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( ptr % get_command_string ()) if ( i /= n ) call str % append ( \", \" ) end do ! Define the data to plot do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( new_line ( 'a' )) call str % append ( ptr % get_data_string ()) call str % append ( \"e\" ) end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function plr_get_autoscale ( this ) result ( rst ) !! Gets a logical value determining if the axis should be !! automatically scaled to fit the data. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. logical :: rst !! Returns true if the plot will autoscale; else, false. rst = this % m_autoscale end function ! -------------------- subroutine plr_set_autoscale ( this , x ) !! Sets a logical value determining if the axis should be !! automatically scaled to fit the data. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. logical , intent ( in ) :: x !! Set to true if the plot will autoscale; else, false. this % m_autoscale = x end subroutine ! ------------------------------------------------------------------------------ pure function plr_get_limits ( this ) result ( rst ) !! Gets the radial axis limits if autoscaling is inactive. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. real ( real64 ) :: rst ( 2 ) !! A 2-element array containing the minimum and maximum limit !! values in that order. rst = [ this % m_minrad , this % m_maxrad ] end function ! -------------------- subroutine plr_set_limits ( this , x ) !! Sets the radial axis limits if autoscaling is inactive. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. real ( real64 ), intent ( in ) :: x ( 2 ) !! A 2-element array containing the minimum and maximum limit !! values in that order. this % m_minrad = minval ( x ) this % m_maxrad = maxval ( x ) end subroutine ! ------------------------------------------------------------------------------ pure function plr_get_theta_start ( this ) result ( rst ) !! Gets the position for \\theta = 0. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. character ( len = :), allocatable :: rst !! The starting position. It is one of the following flags. !! !! - POLAR_THETA_BOTTOM !! !! - POLAR_THETA_TOP !! !! - POLAR_THETA_RIGHT !! !! - POLAR_THETA_LEFT rst = this % m_thetaStart end function ! -------------------- subroutine plr_set_theta_start ( this , x ) !! Sets the position for \\theta = 0. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. character ( len = * ), intent ( in ) :: x !! The starting position. It is one of the following flags. !! !! - POLAR_THETA_BOTTOM !! !! - POLAR_THETA_TOP !! !! - POLAR_THETA_RIGHT !! !! - POLAR_THETA_LEFT if ( x /= POLAR_THETA_BOTTOM . and . & x /= POLAR_THETA_TOP . and . & x /= POLAR_THETA_LEFT . and . & x /= POLAR_THETA_RIGHT ) & then ! Reset to default this % m_thetaStart = POLAR_THETA_RIGHT else this % m_thetaStart = x end if end subroutine ! ------------------------------------------------------------------------------ pure function plr_get_theta_direction ( this ) result ( rst ) !! Gets the \\theta direction. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. character ( len = :), allocatable :: rst !! The direction. It is one of the following flags. !! !! - POLAR_THETA_CCW !! !! - POLAR_THETA_CW rst = this % m_thetaDirection end function ! -------------------- subroutine plr_set_theta_direction ( this , x ) !! Sets the \\theta direction. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. character ( len = * ), intent ( in ) :: x !! The direction. It is one of the following flags. !! !! - POLAR_THETA_CCW !! !! - POLAR_THETA_CW if ( x /= POLAR_THETA_CCW . and . x /= POLAR_THETA_CW ) then ! Reset to default this % m_thetaDirection = POLAR_THETA_CCW else this % m_thetaDirection = x end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_polar.f90.html"},{"title":"fplot_png_terminal.f90 – FPLOT","text":"Contents Modules fplot_png_terminal Source Code fplot_png_terminal.f90 Source Code ! fplot_png_terminal.f90 module fplot_png_terminal use iso_fortran_env use strings use fplot_terminal use fplot_constants implicit none private public :: png_terminal type , extends ( terminal ) :: png_terminal !! Defines a terminal used for producing PNG outputs. character ( len = 3 ), private :: m_id = \"png\" !! The terminal ID string character ( len = GNUPLOT_MAX_PATH_LENGTH ), private :: m_fname = \"default.png\" !! The filename of the PNG file to write. contains procedure , public :: get_filename => png_get_filename procedure , public :: set_filename => png_set_filename procedure , public :: get_id_string => png_get_term_string procedure , public :: get_command_string => png_get_command_string end type contains ! ------------------------------------------------------------------------------ function png_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( png_terminal ), intent ( in ) :: this !! The png_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function ! ------------------------------------------------------------------------------ function png_get_filename ( this ) result ( txt ) !! Gets the filename for the output PNG file. class ( png_terminal ), intent ( in ) :: this !! The png_terminal object. character ( len = :), allocatable :: txt !! The filename, including the file extension (.png). integer ( int32 ) :: n n = len_trim ( this % m_fname ) allocate ( character ( len = n ) :: txt ) txt = trim ( this % m_fname ) end function ! -------------------- subroutine png_set_filename ( this , txt ) !!Sets the filename for the output PNG file. class ( png_terminal ), intent ( inout ) :: this !! The png_terminal object. character ( len = * ), intent ( in ) :: txt !! The filename, including the file extension (.png). integer ( int32 ) :: n n = min ( len_trim ( txt ), GNUPLOT_MAX_PATH_LENGTH ) this % m_fname = \"\" if ( n /= 0 ) then this % m_fname ( 1 : n ) = txt ( 1 : n ) else this % m_fname = \"default.png\" end if end subroutine ! ------------------------------------------------------------------------------ function png_get_command_string ( this ) result ( x ) !! Returns the appropriate GNUPLOT command string to establish !! appropriate parameters. class ( png_terminal ), intent ( in ) :: this !! The png_terminal object. character ( len = :), allocatable :: x !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str ! Process call str % initialize () call str % append ( \"set term pngcairo enhanced \" ) call str % append ( \" font \" ) call str % append ( '\"' ) call str % append ( this % get_font_name ()) call str % append ( ',' ) call str % append ( to_string ( this % get_font_size ())) call str % append ( '\"' ) call str % append ( \" size \" ) call str % append ( to_string ( this % get_window_width ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_window_height ())) call str % append ( new_line ( 'a' )) call str % append ( \"set output \" ) call str % append ( '\"' ) call str % append ( this % get_filename ()) call str % append ( '\"' ) x = char ( str % to_string ()) end function end module","tags":"","loc":"sourcefile\\fplot_png_terminal.f90.html"},{"title":"fplot_qt_terminal.f90 – FPLOT","text":"Contents Modules fplot_qt_terminal Source Code fplot_qt_terminal.f90 Source Code ! fplot_qt_terminal.f90 module fplot_qt_terminal use iso_fortran_env use fplot_terminal implicit none private public :: qt_terminal type , extends ( terminal ) :: qt_terminal !! Defines a terminal that utilizes QT. character ( len = 2 ), private :: m_id = \"qt\" !! The terminal ID string contains procedure , public :: get_id_string => qt_get_term_string end type contains function qt_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( qt_terminal ), intent ( in ) :: this !! The qt_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function end module","tags":"","loc":"sourcefile\\fplot_qt_terminal.f90.html"},{"title":"fplot_simplify.f90 – FPLOT","text":"Contents Modules fplot_simplify Source Code fplot_simplify.f90 Source Code ! fplot_simplify.f90 ! References: ! - https://www.codeproject.com/Articles/114797/Polyline-Simplification ! - https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm module fplot_simplify use iso_fortran_env use ferror use fplot_errors implicit none private public :: simplify_polyline interface simplify_polyline module procedure :: simplify_polyline_2d1 module procedure :: simplify_polyline_3d1 module procedure :: simplify_polyline_mtx end interface contains function simplify_polyline_2d1 ( x , y , tol , err ) result ( ln ) !! Simplifies a 2D polyline by removing points too close to !! discern given a specified tolerance. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ) :: tol !! The distance tolerance to use when simplifying the polyline. !! This value must be positive, and larger than machine epsilon. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. real ( real64 ), allocatable , dimension (:,:) :: ln !! A matrix containing the simplified polyline vertices. The first !! column of the matrix contains the x-coordinates, and the second !! column contains the y-coordinates. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: n real ( real64 ) :: eps ! Initialization n = size ( x ) eps = epsilon ( eps ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"simplify_polyline_2d1\" , \"y\" , n , size ( y )) return end if if ( tol < eps ) then call errmgr % report_error ( \"simplify_polyline_2d1\" , & \"The tolerance value is either negative or less \" // & \"than machine precision.\" , PLOT_INVALID_INPUT_ERROR ) return end if ! Process ln = radial_distance_2d ( x , y , tol , err ) end function function simplify_polyline_3d1 ( x , y , z , tol , err ) result ( ln ) !! Simplifies a 3D polyline by removing points too close to !! discern given a specified tolerance. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ), dimension (:) :: z !! An N-element array containing the z-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ) :: tol !! The distance tolerance to use when simplifying the polyline. !! This value must be positive, and larger than machine epsilon. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. real ( real64 ), allocatable , dimension (:,:) :: ln !! A matrix containing the simplified polyline vertices. The first !! column of the matrix contains the x-coordinates, the second !! column contains the y-coordinates, and the third column contains !! the z-coordinates. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: n real ( real64 ) :: eps ! Initialization n = size ( x ) eps = epsilon ( eps ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"simplify_polyline_3d1\" , \"y\" , n , size ( y )) return end if if ( size ( z ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"simplify_polyline_3d1\" , \"z\" , n , size ( z )) return end if if ( tol < eps ) then call errmgr % report_error ( \"simplify_polyline_3d1\" , & \"The tolerance value is either negative or less \" // & \"than machine precision.\" , PLOT_INVALID_INPUT_ERROR ) return end if ! Process ln = radial_distance_3d ( x , y , z , tol , errmgr ) end function function simplify_polyline_mtx ( xy , tol , err ) result ( ln ) !! Simplifies a 2D or 3D polyline by removing points too close to !! discern given a specified tolerance. real ( real64 ), intent ( in ), dimension (:,:) :: xy !! An N-by-2 or N-by-3 matrix containing the polyline vertex data. real ( real64 ), intent ( in ) :: tol !! The distance tolerance to use when simplifying the polyline. !! This value must be positive, and larger than machine epsilon. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. real ( real64 ), allocatable , dimension (:,:) :: ln !! A matrix containing the simplified polyline vertices. The first !! column of the matrix contains the x-coordinates, the second !! column contains the y-coordinates, and if necessary, the third !! column contains the z-coordinates. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Ensure there are at least 2 columns of data in XY if ( size ( xy , 2 ) < 2 ) then call report_matrix_size_mismatch_error ( errmgr , & \"simplify_polyline_mtx\" , \"xy\" , size ( xy , 1 ), 2 , size ( xy , 1 ), & size ( xy , 2 )) return end if ! Process if ( size ( xy , 2 ) == 2 ) then ln = simplify_polyline_2d1 ( xy (:, 1 ), xy (:, 2 ), tol , errmgr ) else ln = simplify_polyline_3d1 ( xy (:, 1 ), xy (:, 2 ), xy (:, 3 ), tol , errmgr ) end if end function function radial_distance_2d ( x , y , tol , err ) result ( pts ) ! Arguments real ( real64 ), intent ( in ), dimension (:) :: x , y real ( real64 ), intent ( in ) :: tol class ( errors ), intent ( inout ) :: err real ( real64 ), allocatable , dimension (:,:) :: pts ! Local Variables integer ( int32 ) :: i , j , n , nvalid , flag logical , allocatable , dimension (:) :: valid real ( real64 ) :: r , xref , yref ! Initialization n = size ( x ) if ( n == 0 ) return i = 2 xref = x ( 1 ) yref = y ( 1 ) nvalid = 1 ! Local Memory Allocation allocate ( valid ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( err , \"radial_distance_2d\" , flag ) return end if valid ( 1 ) = . true . ! Cycle through and determine which points to keep do if ( i > n ) exit r = pythag2 ( x ( i ), y ( i ), xref , yref ) if ( r < tol ) then ! The point is too close, reject it valid ( i ) = . false . else ! The point is outside the tolerance, and is OK valid ( i ) = . true . nvalid = nvalid + 1 ! Move the reference point xref = x ( i ) yref = y ( i ) end if i = i + 1 end do ! Allocate space, and collect all valid points allocate ( pts ( nvalid , 2 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( err , \"radial_distance_2d\" , flag ) return end if j = 1 do i = 1 , n if ( valid ( i )) then pts ( j , 1 ) = x ( i ) pts ( j , 2 ) = y ( i ) j = j + 1 end if end do end function function radial_distance_3d ( x , y , z , tol , err ) result ( pts ) ! Arguments real ( real64 ), intent ( in ), dimension (:) :: x , y , z real ( real64 ), intent ( in ) :: tol class ( errors ), intent ( inout ) :: err real ( real64 ), allocatable , dimension (:,:) :: pts ! Local Variables integer ( int32 ) :: i , j , n , nvalid , flag logical , allocatable , dimension (:) :: valid real ( real64 ) :: r , xref , yref , zref ! Initialization n = size ( x ) if ( n == 0 ) return i = 2 xref = x ( 1 ) yref = y ( 1 ) zref = z ( 1 ) nvalid = 1 ! Local Memory Allocation allocate ( valid ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( err , \"radial_distance_3d\" , flag ) return end if valid ( 1 ) = . true . ! Cycle through and determine which points to keep do if ( i > n ) exit r = pythag3 ( x ( i ), y ( i ), z ( i ), xref , yref , zref ) if ( r < tol ) then ! The point is too close, reject it valid ( i ) = . false . else ! The point is outside the tolerance, and is OK valid ( i ) = . true . nvalid = nvalid + 1 ! Move the reference point xref = x ( i ) yref = y ( i ) zref = z ( i ) end if i = i + 1 end do ! Allocate space, and collect all valid points allocate ( pts ( nvalid , 3 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( err , \"radial_distance_3d\" , flag ) return end if j = 1 do i = 1 , n if ( valid ( i )) then pts ( j , 1 ) = x ( i ) pts ( j , 2 ) = y ( i ) pts ( j , 3 ) = z ( i ) j = j + 1 end if end do end function pure function pythag2 ( x , y , xo , yo ) result ( r ) ! Arguments real ( real64 ), intent ( in ) :: x , y , xo , yo real ( real64 ) :: r ! Local Variables real ( real64 ) :: w , xabs , yabs ! Process xabs = abs ( x - xo ) yabs = abs ( y - yo ) w = max ( xabs , yabs ) if ( w < epsilon ( w )) then r = xabs + yabs else r = w * sqrt (( xabs / w ) ** 2 + ( yabs / w ) ** 2 ) end if end function pure function pythag3 ( x , y , z , xo , yo , zo ) result ( r ) ! Arguments real ( real64 ), intent ( in ) :: x , y , z , xo , yo , zo real ( real64 ) :: r ! Local Variables real ( real64 ) :: w , xabs , yabs , zabs ! Process xabs = abs ( x - xo ) yabs = abs ( y - yo ) zabs = abs ( z - zo ) w = max ( xabs , yabs , zabs ) if ( w < epsilon ( w )) then r = xabs + yabs + zabs else r = w * sqrt (( xabs / w ) ** 2 + ( yabs / w ) ** 2 + ( zabs / w ) ** 2 ) end if end function end module","tags":"","loc":"sourcefile\\fplot_simplify.f90.html"},{"title":"fplot_surface_plot.f90 – FPLOT","text":"Contents Modules fplot_surface_plot Source Code fplot_surface_plot.f90 Source Code ! fplot_surface_plot.f90 module fplot_surface_plot use iso_fortran_env use fplot_plot_3d use fplot_errors use fplot_legend use ferror use strings implicit none private public :: surface_plot type , extends ( plot_3d ) :: surface_plot logical , private :: m_showHidden = . false . !! Show hidden lines? logical , private :: m_smooth = . true . !! Smooth the surface? logical , private :: m_contour = . false . !! Show a contour plot as well as the surface plot? logical , private :: m_useLighting = . false . !! Use lighting? real ( real32 ), private :: m_lightIntensity = 0.5 !! Lighting intensity (0 - 1) - default is 0.5 real ( real32 ), private :: m_specular = 0.5 !! Specular highlight intensity (0 - 1). real ( real32 ), private :: m_transparency = 1.0 !! Defines the translucency value. Must exist on (0, 1]. contains procedure , public :: initialize => surf_init procedure , public :: get_show_hidden => surf_get_show_hidden procedure , public :: set_show_hidden => surf_set_show_hidden procedure , public :: get_command_string => surf_get_cmd procedure , public :: get_allow_smoothing => surf_get_smooth procedure , public :: set_allow_smoothing => surf_set_smooth procedure , public :: get_show_contours => surf_get_show_contours procedure , public :: set_show_contours => surf_set_show_contours procedure , public :: get_use_lighting => surf_get_use_lighting procedure , public :: set_use_lighting => surf_set_use_lighting procedure , public :: get_light_intensity => surf_get_light_intensity procedure , public :: set_light_intensity => surf_set_light_intensity procedure , public :: get_specular_intensity => surf_get_specular_intensity procedure , public :: set_specular_intensity => surf_set_specular_intensity procedure , public :: get_transparency => surf_get_transparency procedure , public :: set_transparency => surf_set_transparency end type contains ! ------------------------------------------------------------------------------ subroutine surf_init ( this , term , fname , err ) !! Initializes the surface_plot object. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables type ( legend ), pointer :: lgnd ! Initialize the base class call this % plot_3d % initialize ( term , fname , err ) ! Do not display the legend lgnd => this % get_legend () call lgnd % set_is_visible (. false .) end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_show_hidden ( this ) result ( x ) !! Gets a value indicating if hidden lines should be shown. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. logical :: x !! Returns true if hidden lines should be shown; else, false. x = this % m_showHidden end function ! ------------------------------------------------------------------------------ subroutine surf_set_show_hidden ( this , x ) !! Sets a value indicating if hidden lines should be shown. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. logical , intent ( in ) :: x !! Set to true if hidden lines should be shown; else, false. this % m_showHidden = x end subroutine ! ------------------------------------------------------------------------------ function surf_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot_3d !! object. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str ! class(colormap), pointer :: clr ! Initialization call str % initialize () ! Call the base routine call str % append ( this % plot % get_command_string ()) ! Hidden Stuff call str % append ( new_line ( 'a' )) if ( this % get_show_hidden ()) then call str % append ( \"unset hidden3d\" ) else call str % append ( \"set hidden3d\" ) end if ! Define the colormap ! clr => this%get_colormap() ! if (associated(clr)) then ! call str%append(new_line('a')) ! call str%append(clr%get_command_string()) ! end if ! Allow for smoothing interpolation if ( this % get_allow_smoothing ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set pm3d interpolate 0,0\" ) end if ! Draw a contour plot as well? if ( this % get_show_contours ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set contour\" ) end if ! Show colorbar ! if (.not.this%get_show_colorbar()) then ! call str%append(new_line('a')) ! call str%append(\"unset colorbox\") ! end if ! Lighting if ( this % get_use_lighting ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set pm3d lighting primary \" ) call str % append ( to_string ( this % get_light_intensity ())) call str % append ( \" specular \" ) call str % append ( to_string ( this % get_specular_intensity ())) end if ! Translucent if ( this % get_transparency () < 1.0 . and . this % get_transparency () > 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set style fill transparent solid \" ) call str % append ( to_string ( this % get_transparency ())) end if ! Call the base class to define the rest of the plot commands call str % append ( new_line ( 'a' )) call str % append ( this % plot_3d % get_command_string ()) ! Output x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ ! module function surf_get_colormap(this) result(x) ! class(surface_plot), intent(in) :: this ! class(colormap), pointer :: x ! x => this%m_colormap ! end function ! ! -------------------- ! module subroutine surf_set_colormap(this, x, err) ! ! Arguments ! class(surface_plot), intent(inout) :: this ! class(colormap), intent(in) :: x ! class(errors), intent(inout), optional, target :: err ! ! Local Variables ! integer(int32) :: flag ! class(errors), pointer :: errmgr ! type(errors), target :: deferr ! ! Initialization ! if (present(err)) then ! errmgr => err ! else ! errmgr => deferr ! end if ! ! Process ! if (associated(this%m_colormap)) deallocate(this%m_colormap) ! allocate(this%m_colormap, stat = flag, source = x) ! if (flag /= 0) then ! call errmgr%report_error(\"surf_set_colormap\", & ! \"Insufficient memory available.\", PLOT_OUT_OF_MEMORY_ERROR) ! return ! end if ! end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_smooth ( this ) result ( x ) !! Gets a value determining if the plotted surfaces should be !! smoothed. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. logical :: x !! Returns true if the surface should be smoothed; else, false. x = this % m_smooth end function ! -------------------- subroutine surf_set_smooth ( this , x ) !! Sets a value determining if the plotted surfaces should be !! smoothed. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. logical , intent ( in ) :: x !! Set to true if the surface should be smoothed; else, false. this % m_smooth = x end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_show_contours ( this ) result ( x ) !! Gets a value determining if a contour plot should be drawn in !! conjunction with the surface plot. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. logical :: x !! Returns true if the contour plot should be drawn; else, false to !! only draw the surface. x = this % m_contour end function ! -------------------- subroutine surf_set_show_contours ( this , x ) !! Sets a value determining if a contour plot should be drawn in !! conjunction with the surface plot. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. logical , intent ( in ) :: x !! Set to true if the contour plot should be drawn; else, false to !! only draw the surface. this % m_contour = x end subroutine ! ------------------------------------------------------------------------------ ! pure module function surf_get_show_colorbar(this) result(x) ! class(surface_plot), intent(in) :: this ! logical :: x ! x = this%m_showColorbar ! end function ! ! -------------------- ! module subroutine surf_set_show_colorbar(this, x) ! class(surface_plot), intent(inout) :: this ! logical, intent(in) :: x ! this%m_showColorbar = x ! end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_use_lighting ( this ) result ( x ) !! Gets a value indicating if lighting, beyond the ambient !! light source, is to be used. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. logical :: x !! True if lighting should be used; else, false. x = this % m_useLighting end function ! -------------------- subroutine surf_set_use_lighting ( this , x ) !! Sets a value indicating if lighting, beyond the ambient !! light source, is to be used. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. logical , intent ( in ) :: x !! True if lighting should be used; else, false. this % m_useLighting = x end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_light_intensity ( this ) result ( x ) !! Gets the ratio of the strength of the light source relative !! to the ambient light. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. real ( real32 ) :: x !! The light intensity ratio. x = this % m_lightIntensity end function ! -------------------- subroutine surf_set_light_intensity ( this , x ) !! Sets the ratio of the strength of the light source relative !! to the ambient light. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. real ( real32 ), intent ( in ) :: x !! The light intensity ratio. The value must exist in the !! set [0, 1]; else, it will be clipped to lie within the range. if ( x < 0.0 ) then this % m_lightIntensity = 0.0 else if ( x > 1.0 ) then this % m_lightIntensity = 1.0 else this % m_lightIntensity = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_specular_intensity ( this ) result ( x ) !! Gets the ratio of the strength of the specular light source !! relative to the ambient light. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. real ( real32 ) :: x !! The specular light intensity ratio. x = this % m_specular end function ! -------------------- subroutine surf_set_specular_intensity ( this , x ) !! Sets the ratio of the strength of the specular light source !! relative to the ambient light. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. real ( real32 ), intent ( in ) :: x !! The specular light intensity ratio. The value must exist in the !! set [0, 1]; else, it will be clipped to lie within the range. if ( x < 0.0 ) then this % m_specular = 0.0 else if ( x > 1.0 ) then this % m_specular = 1.0 else this % m_specular = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_transparency ( this ) result ( x ) !! Gets a factor defining the transparency of plotted surfaces. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. real ( real32 ) :: x !! A value existing on the set (0 1] defining the level of !! transparency. A value of 1 indicates a fully opaque surface. x = this % m_transparency end function ! -------------------- subroutine surf_set_transparency ( this , x ) !! Sets a factor defining the transparency of plotted surfaces. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. real ( real32 ), intent ( in ) :: x !! A value existing on the set (0 1] defining the level of !! transparency. A value of 1 indicates a fully opaque surface. !! Any values supplied outside of the set are clipped to fit within !! (0 1]. if ( x > 1.0 ) then this % m_transparency = 1.0 else if ( x <= 0.0 ) then this % m_transparency = 0.1 else this % m_transparency = x end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_surface_plot.f90.html"},{"title":"fplot_surface_plot_data.f90 – FPLOT","text":"Contents Modules fplot_surface_plot_data Source Code fplot_surface_plot_data.f90 Source Code module fplot_surface_plot_data use iso_fortran_env use fplot_plot_data use ferror use fplot_errors use strings implicit none private public :: surface_plot_data type , extends ( plot_data ) :: surface_plot_data !! Provides a three-dimensional surface plot data set. real ( real64 ), private , allocatable , dimension (:,:) :: m_x !! Stores the x-coordinate data real ( real64 ), private , allocatable , dimension (:,:) :: m_y !! Stores the y-coordinate data real ( real64 ), private , allocatable , dimension (:,:) :: m_z !! Stores the z-coordinate data logical , private :: m_wireframe = . false . !! Set to true to display a wireframe of the surface; else, just a !! smooth surface will be drawn contains procedure , public :: get_size => surfd_get_size procedure , public :: get_x => surfd_get_x procedure , public :: set_x => surfd_set_x procedure , public :: get_y => surfd_get_y procedure , public :: set_y => surfd_set_y procedure , public :: get_z => surfd_get_z procedure , public :: set_z => surfd_set_z procedure , public :: get_use_wireframe => surfd_get_wireframe procedure , public :: set_use_wireframe => surfd_set_wireframe procedure , public :: get_command_string => surfd_get_cmd procedure , public :: get_data_string => surfd_get_data_cmd procedure , public :: define_data => surfd_set_data_1 end type contains ! ------------------------------------------------------------------------------ pure function surfd_get_size ( this , dim ) result ( x ) !! Gets the size of the stored data set. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: dim !! The dimension of interest. Notice, data is stored as a !! 2D matrix (i.e. only 1 and 2 are valid inputs). integer ( int32 ) :: x !! The size of the requested dimension. if ( allocated ( this % m_x )) then x = size ( this % m_x , dim ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function surfd_get_x ( this , i , j ) result ( x ) !! Gets the requested X data point. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ) :: x !! The value. if ( allocated ( this % m_x )) then x = this % m_x ( i , j ) else x = 0.0d0 end if end function ! -------------------- subroutine surfd_set_x ( this , i , j , x ) !! Sets the requested X data point. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ), intent ( in ) :: x !! The value. if ( allocated ( this % m_x )) then this % m_x ( i , j ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surfd_get_y ( this , i , j ) result ( x ) !! Gets the requested Y data point. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ) :: x !! The value. if ( allocated ( this % m_y )) then x = this % m_y ( i , j ) else x = 0.0d0 end if end function ! -------------------- subroutine surfd_set_y ( this , i , j , x ) !! Sets the requested Y data point. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ), intent ( in ) :: x !! The value. if ( allocated ( this % m_y )) then this % m_y ( i , j ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surfd_get_z ( this , i , j ) result ( x ) !! Gets the requested Z data point. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ) :: x !! The value. if ( allocated ( this % m_z )) then x = this % m_z ( i , j ) else x = 0.0d0 end if end function ! -------------------- subroutine surfd_set_z ( this , i , j , x ) !! Sets the requested Z data point. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ), intent ( in ) :: x !! The value. if ( allocated ( this % m_z )) then this % m_z ( i , j ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surfd_get_wireframe ( this ) result ( x ) !! Gets a value determining if a wireframe mesh should be displayed. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. logical :: x !! Returns true if a wireframe mesh should be displayed; else, !! false to display a solid surface. x = this % m_wireframe end function ! -------------------- subroutine surfd_set_wireframe ( this , x ) !! Sets a value determining if a wireframe mesh should be displayed. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. logical , intent ( in ) :: x !! Set to true if a wireframe mesh should be displayed; else, !! false to display a solid surface. this % m_wireframe = x end subroutine ! ------------------------------------------------------------------------------ function surfd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this surface_plot_data !! object. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! PM3D or wireframe? if ( this % get_use_wireframe ()) then call str % append ( \" with lines\" ) else call str % append ( \" with pm3d\" ) end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function surfd_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data to plot. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. character ( len = :), allocatable :: x !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , m , n character :: delimiter , nl ! Initialization call str % initialize () m = this % get_size ( 1 ) n = this % get_size ( 2 ) delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) ! Process do j = 1 , n do i = 1 , m call str % append ( to_string ( this % get_x ( i , j ))) call str % append ( delimiter ) call str % append ( to_string ( this % get_y ( i , j ))) call str % append ( delimiter ) call str % append ( to_string ( this % get_z ( i , j ))) call str % append ( nl ) end do if ( j /= n ) call str % append ( nl ) end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine surfd_set_data_1 ( this , x , y , z , err ) !! Defines the data set. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. real ( real64 ), intent ( in ), dimension (:,:) :: x !! An M-by-N matrix containing the x-coordinate data. real ( real64 ), intent ( in ), dimension (:,:) :: y !! An M-by-N matrix containing the y-coordinate data. real ( real64 ), intent ( in ), dimension (:,:) :: z !! An M-by-N matrix containing the z-coordinate data. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , j , m , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization m = size ( x , 1 ) n = size ( x , 2 ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y , 1 ) /= m . or . size ( y , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"surfd_set_data_1\" , & \"y\" , m , n , size ( y , 1 ), size ( y , 2 )) return end if if ( size ( z , 1 ) /= m . or . size ( z , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"surfd_set_data_1\" , & \"z\" , m , n , size ( z , 1 ), size ( z , 2 )) return end if ! Process if ( allocated ( this % m_x )) deallocate ( this % m_x ) if ( allocated ( this % m_y )) deallocate ( this % m_y ) if ( allocated ( this % m_z )) deallocate ( this % m_z ) allocate ( this % m_x ( m , n ), stat = flag ) if ( flag == 0 ) allocate ( this % m_y ( m , n ), stat = flag ) if ( flag == 0 ) allocate ( this % m_z ( m , n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"surfd_set_data_1\" , flag ) return end if do concurrent ( j = 1 : n ) do i = 1 , m this % m_x ( i , j ) = x ( i , j ) this % m_y ( i , j ) = y ( i , j ) this % m_z ( i , j ) = z ( i , j ) end do end do end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_surface_plot_data.f90.html"},{"title":"fplot_terminal.f90 – FPLOT","text":"Contents Modules fplot_terminal Source Code fplot_terminal.f90 Source Code ! fplot_terminal.f90 module fplot_terminal use iso_fortran_env use fplot_plot_object use fplot_constants use strings implicit none private public :: terminal public :: term_get_string_result type , abstract , extends ( plot_object ) :: terminal !! A GNUPLOT terminal object. private integer ( int32 ) :: m_windowHeight = GNUPLOT_DEFAULT_WINDOW_HEIGHT !! The window height, in pixels. integer ( int32 ) :: m_windowWidth = GNUPLOT_DEFAULT_WINDOW_WIDTH !! The window width, in pixels. integer ( int32 ) :: m_termID = 0 !! The terminal ID number. character ( len = GNUPLOT_MAX_LABEL_LENGTH ) :: m_title = \"\" !! The plot window title. logical :: m_hasTitle = . false . !! Determines if the plot title is defined. character ( len = GNUPLOT_MAX_LABEL_LENGTH ) :: m_fontName = & GNUPLOT_DEFAULT_FONTNAME !! The font used by the graph. integer ( int32 ) :: m_fontSize = GNUPLOT_DEFAULT_FONT_SIZE !! The size of the font used by the graph. contains procedure , public :: get_window_width => term_get_window_width procedure , public :: set_window_width => term_set_window_width procedure , public :: get_window_height => term_get_window_height procedure , public :: set_window_height => term_set_window_height procedure , public :: get_command_string => term_get_command_string procedure , public :: get_plot_window_number => & term_get_plot_window_number procedure , public :: set_plot_window_number => & term_set_plot_window_number procedure , public :: get_title => term_get_title procedure , public :: set_title => term_set_title procedure , public :: get_font_name => term_get_font_name procedure , public :: set_font_name => term_set_font_name procedure , public :: get_font_size => term_get_font_size procedure , public :: set_font_size => term_set_font_size procedure ( term_get_string_result ), deferred , public :: get_id_string end type interface function term_get_string_result ( this ) result ( x ) !! Retrieves a string from a terminal. import terminal class ( terminal ), intent ( in ) :: this !! The terminal object. character ( len = :), allocatable :: x !! The string. end function end interface contains ! ------------------------------------------------------------------------------ pure function term_get_window_width ( this ) result ( x ) !! Gets the width of the plot window. class ( terminal ), intent ( in ) :: this !! The terminal object. integer :: x !! The width of the plot window. x = this % m_windowWidth end function ! -------------------- subroutine term_set_window_width ( this , x ) !! Sets the width of the plot window. class ( terminal ), intent ( inout ) :: this !! The terminal object. integer , intent ( in ) :: x !! The width of the plot window. if ( x == 0 ) then this % m_windowWidth = GNUPLOT_DEFAULT_WINDOW_WIDTH else this % m_windowWidth = abs ( x ) end if end subroutine ! ------------------------------------------------------------------------------ pure function term_get_window_height ( this ) result ( x ) !! Gets the height of the plot window. class ( terminal ), intent ( in ) :: this !! The terminal object. integer :: x !! The height of the plot window. x = this % m_windowHeight end function ! -------------------- subroutine term_set_window_height ( this , x ) !! Sets the height of the plot window. class ( terminal ), intent ( inout ) :: this !! The terminal object. integer , intent ( in ) :: x !! The height of the plot window. if ( x == 0 ) then this % m_windowHeight = GNUPLOT_DEFAULT_WINDOW_HEIGHT else this % m_windowHeight = abs ( x ) end if end subroutine ! ------------------------------------------------------------------------------ pure function term_get_plot_window_number ( this ) result ( x ) !! Gets the targeted plot window number. class ( terminal ), intent ( in ) :: this !! The terminal object. integer ( int32 ) :: x !! The plot window number. x = this % m_termID end function ! -------------------- subroutine term_set_plot_window_number ( this , x ) !! Sets the targeted plot window number. class ( terminal ), intent ( inout ) :: this !! The terminal object. integer ( int32 ), intent ( in ) :: x !! The plot window number. this % m_termID = x end subroutine ! ------------------------------------------------------------------------------ function term_get_title ( this ) result ( str ) !! Gets the plot window's title. class ( terminal ), intent ( in ) :: this !! The terminal object. character ( len = :), allocatable :: str !! The title. integer ( int32 ) :: n n = len_trim ( str ) allocate ( character ( len = n ) :: str ) str = trim ( this % m_title ) end function ! -------------------- subroutine term_set_title ( this , txt ) !! Sets the plot window's title. class ( terminal ), intent ( inout ) :: this !! The terminal object. character ( len = * ), intent ( in ) :: txt !! The title. integer ( int32 ) :: n n = min ( len_trim ( txt ), GNUPLOT_MAX_LABEL_LENGTH ) this % m_title = \"\" if ( n /= 0 ) then this % m_title ( 1 : n ) = txt ( 1 : n ) this % m_hasTitle = . true . else this % m_hasTitle = . false . end if end subroutine ! ------------------------------------------------------------------------------ function term_get_font_name ( this ) result ( name ) !! Gets the name of the font used for text displayed by the graph. class ( terminal ), intent ( in ) :: this !! The terminal object. character ( len = :), allocatable :: name !! The font name. integer ( int32 ) :: n n = len_trim ( this % m_fontName ) allocate ( character ( len = n ) :: name ) name = trim ( this % m_fontName ) end function ! -------------------- subroutine term_set_font_name ( this , name ) !! Sets the name of the font used for text displayed by the graph. class ( terminal ), intent ( inout ) :: this !! The terminal object. character ( len = * ), intent ( in ) :: name !! The font name. integer ( int32 ) :: n n = min ( len_trim ( name ), GNUPLOT_MAX_LABEL_LENGTH ) this % m_fontName = \"\" if ( n == 0 ) then this % m_fontName = GNUPLOT_DEFAULT_FONTNAME else this % m_fontName ( 1 : n ) = name ( 1 : n ) end if end subroutine ! ------------------------------------------------------------------------------ pure function term_get_font_size ( this ) result ( sz ) !! Gets the size of the font used by the graph. class ( terminal ), intent ( in ) :: this !! The terminal object. integer ( int32 ) :: sz !! The font size, in points. sz = this % m_fontSize end function ! -------------------- subroutine term_set_font_size ( this , sz ) !! Sets the size of the font used by the graph. class ( terminal ), intent ( inout ) :: this !! The terminal object. integer ( int32 ), intent ( in ) :: sz !! The font size, in points. if ( sz == 0 ) then this % m_fontSize = GNUPLOT_DEFAULT_FONT_SIZE else this % m_fontSize = abs ( sz ) end if end subroutine ! ------------------------------------------------------------------------------ function term_get_command_string ( this ) result ( x ) !! Returns the appropriate GNUPLOT command string to establish !! appropriate parameters. class ( terminal ), intent ( in ) :: this !! The terminal object. character ( len = :), allocatable :: x !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str ! Process call str % initialize () call str % append ( \"set term \" ) call str % append ( this % get_id_string ()) call str % append ( \" enhanced \" ) call str % append ( to_string ( this % get_plot_window_number ())) call str % append ( \" font \" ) call str % append ( '\"' ) call str % append ( this % get_font_name ()) call str % append ( ',' ) call str % append ( to_string ( this % get_font_size ())) call str % append ( '\"' ) call str % append ( \" size \" ) call str % append ( to_string ( this % get_window_width ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_window_height ())) if ( this % m_hasTitle ) then call str % append ( ' title \"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_terminal.f90.html"},{"title":"fplot_triangulations_delaunay_2d.f90 – FPLOT","text":"Contents Modules fplot_triangulations_delaunay_2d Source Code fplot_triangulations_delaunay_2d.f90 Source Code module fplot_triangulations_delaunay_2d use iso_fortran_env use geompack use ferror use fplot_errors implicit none private public :: delaunay_tri_2d type delaunay_tri_2d !! Provides a container for a 2D Delaunay triangulation. real ( real64 ), private , allocatable , dimension (:) :: m_x !! An array of the x-coordinates of each point. real ( real64 ), private , allocatable , dimension (:) :: m_y !! An array of the y-coordinates of each point. integer ( int32 ), private , allocatable , dimension (:,:) :: m_indices !! A 3-column matrix containing the indices of each triangle's !! vertex. contains procedure , public :: create => d2d_init procedure , public :: get_point_count => d2d_get_pt_count procedure , public :: get_triangle_count => d2d_get_tri_count procedure , public :: get_points_x => d2d_get_x_pts procedure , public :: get_points_y => d2d_get_y_pts procedure , public :: get_indices => d2d_get_tris procedure , public :: find_triangle => d2d_get_tri_with_pt end type contains ! ------------------------------------------------------------------------------ subroutine d2d_init ( this , x , y , err ) !! Creates an unconstrained 2D Delaunay triangulation given a !! set of x-y points. class ( delaunay_tri_2d ), intent ( inout ) :: this !! The delaunay_tri_2d object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x-coordinates of each !! data point. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y-coordinates of each !! data point. class ( errors ), intent ( inout ), target , optional :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: i , npts , ntri , flag real ( real64 ), allocatable , dimension (:,:) :: nodexy integer ( int32 ), allocatable , dimension (:,:) :: trinode , trinbr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if npts = size ( x ) ! Input Check if ( size ( y ) /= npts ) then call report_array_size_mismatch_error ( errmgr , \"d2d_init\" , \"y\" , & npts , size ( y )) return end if ! Clean up incase of an existing triangulation if ( allocated ( this % m_x )) deallocate ( this % m_x ) if ( allocated ( this % m_y )) deallocate ( this % m_y ) if ( allocated ( this % m_indices )) deallocate ( this % m_indices ) ! Allocate workspace arrays for the triangulation allocate ( nodexy ( 2 , npts ), stat = flag ) if ( flag == 0 ) allocate ( trinode ( 3 , 2 * npts ), stat = flag ) if ( flag == 0 ) allocate ( trinbr ( 3 , 2 * npts ), stat = flag ) if ( flag /= 0 ) go to 100 ! Generate the points list do i = 1 , npts nodexy ( 1 , i ) = x ( i ) nodexy ( 2 , i ) = y ( i ) end do ! Compute the triangulation call r8tris2 ( npts , nodexy , ntri , trinode , trinbr ) ! Populate the remainder of the object allocate ( this % m_x ( npts ), stat = flag ) if ( flag == 0 ) allocate ( this % m_y ( npts ), stat = flag ) if ( flag == 0 ) allocate ( this % m_indices ( ntri , 3 ), stat = flag ) do i = 1 , npts this % m_x ( i ) = nodexy ( 1 , i ) this % m_y ( i ) = nodexy ( 2 , i ) end do do i = 1 , ntri this % m_indices ( i ,:) = trinode (:, i ) end do ! End return ! Memory Error Handler 100 continue call report_memory_error ( errmgr , \"d2d_init\" , flag ) return end subroutine ! ------------------------------------------------------------------------------ pure function d2d_get_pt_count ( this ) result ( rst ) !! Gets the number of points in the triangulation. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. integer ( int32 ) :: rst !! The number of points in the triangulation. if ( allocated ( this % m_x )) then rst = size ( this % m_x ) else rst = 0 end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_tri_count ( this ) result ( rst ) !! Gets the number of triangles in the triangulation. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. integer ( int32 ) :: rst !! The number of triangles in the triangulation. if ( allocated ( this % m_indices )) then rst = size ( this % m_indices , 1 ) else rst = 0 end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_x_pts ( this ) result ( rst ) !! Gets the x-coordinates of each point. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. real ( real64 ), allocatable , dimension (:) :: rst !! An array of the x-coordinates of each point. if ( allocated ( this % m_x )) then rst = this % m_x else allocate ( rst ( 0 )) end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_y_pts ( this ) result ( rst ) !! Gets the y-coordinates of each point. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. real ( real64 ), allocatable , dimension (:) :: rst !! An array of the y-coordinates of each point. if ( allocated ( this % m_y )) then rst = this % m_y else allocate ( rst ( 0 )) end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_tris ( this ) result ( rst ) !! Gets a list of the indices of each triangle vertex. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. integer ( int32 ), allocatable , dimension (:,:) :: rst !! An N-by-3 matrix with each column containing the index of the !! vertex of each triangle where N is the number of triangles. if ( allocated ( this % m_indices )) then rst = this % m_indices else allocate ( rst ( 0 , 0 )) end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_tri_with_pt ( this , x , y ) result ( rst ) !! Finds the triangle that contains the specified point. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. real ( real64 ), intent ( in ) :: x !! The x-coordinate of the point. real ( real64 ), intent ( in ) :: y !! The y-coordinate of the point. integer ( int32 ) :: rst !! Returns the index of the triangle containing the specified !! point. If no triangle contains the specified point, a value of !! -1 is returned. ! Local Variables integer ( int32 ) :: i , j real ( real64 ) :: x1 , y1 , x2 , y2 , x3 , y3 logical :: check ! Initialization rst = - 1 ! Process do i = 1 , this % get_triangle_count () j = this % m_indices ( i , 1 ) x1 = this % m_x ( j ) y1 = this % m_y ( j ) j = this % m_indices ( i , 2 ) x2 = this % m_x ( j ) y2 = this % m_y ( j ) j = this % m_indices ( i , 3 ) x3 = this % m_x ( j ) y3 = this % m_y ( j ) check = point_inside_triangle ( x1 , y1 , x2 , y2 , x3 , y3 , x , y ) if ( check ) then rst = i end if end do end function ! ------------------------------------------------------------------------------ ! Determine if a point lies within a triangle. ! https://stackoverflow.com/questions/2049582/how-to-determine-if-a-point-is-in-a-2d-triangle ! https://en.wikipedia.org/wiki/Barycentric_coordinate_system pure elemental function point_inside_triangle ( x1 , y1 , x2 , y2 , x3 , y3 , & x , y ) result ( rst ) ! Arguments real ( real64 ), intent ( in ) :: x1 , y1 , x2 , y2 , x3 , y3 , x , y logical :: rst ! Local Variables real ( real64 ) :: lambda1 , lambda2 , dT ! Initialization dT = ( y2 - y3 ) * ( x1 - x3 ) + ( x3 - x2 ) * ( y1 - y3 ) lambda1 = (( y2 - y3 ) * ( x - x3 ) + ( x3 - x2 ) * ( y - y3 )) / dT lambda2 = (( y3 - y1 ) * ( x - x3 ) + ( x1 - x3 ) * ( y - y3 )) / dT ! The point is within the triangle if: ! 0 <= lambda1 <= 1 ! 0 <= lambda2 <= 1 ! 0 <= lambda1 + lambda2 <= 1 rst = ( lambda1 <= 1.0d0 . and . lambda1 >= 0.0d0 ) . and . & ( lambda2 <= 1.0d0 . and . lambda2 >= 0.0d0 ) . and . & ( lambda1 + lambda2 >= 0.0d0 . and . lambda1 + lambda2 <= 1.0d0 ) end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_triangulations_delaunay_2d.f90.html"},{"title":"fplot_tri_surface_plot_data.f90 – FPLOT","text":"Contents Modules fplot_tri_surface_plot_data Source Code fplot_tri_surface_plot_data.f90 Source Code ! fplot_tri_surface_plot_data.f90 module fplot_tri_surface_plot_data use iso_fortran_env use fplot_plot_data use fplot_delaunay_tri_surface use strings implicit none private public :: tri_surface_plot_data type , extends ( plot_data ) :: tri_surface_plot_data !! Provides a three-dimensional surface plot data set constructed of !! triangulated points. real ( real64 ), private , allocatable , dimension (:) :: m_x !! An array of the x-coordinates of each point. real ( real64 ), private , allocatable , dimension (:) :: m_y !! An array of the y-coordinates of each point. real ( real64 ), private , allocatable , dimension (:) :: m_z !! An array of the z-coordinates of each point. integer ( int32 ), private , allocatable , dimension (:,:) :: m_indices !! A 3-column matrix containing the indices of each triangle's !! vertex. logical , private :: m_wireframe = . true . !! Determines if the surface should be drawn as a wireframe. contains procedure , public :: get_data_string => tspd_get_data_cmd procedure , public :: get_command_string => tspd_get_cmd procedure , public :: get_use_wireframe => tspd_get_wireframe procedure , public :: set_use_wireframe => tspd_set_wireframe procedure , public :: define_data => tspd_define_data end type contains ! ------------------------------------------------------------------------------ function tspd_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for representing the data. class ( tri_surface_plot_data ), intent ( in ) :: this !! The tri_surface_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , n character :: delimiter , nl ! Initialization call str % initialize () n = size ( this % m_indices , 1 ) delimiter = achar ( 9 ) nl = new_line ( nl ) ! Process ! https://stackoverflow.com/questions/42784369/drawing-triangular-mesh-using-gnuplot ! http://www.gnuplot.info/faq/faq.html#x1-530005.10 do i = 1 , n ! Line 1-2 ! Vertex 1 j = this % m_indices ( i , 1 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Vertex 2 j = this % m_indices ( i , 2 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Line 2-3 ! Vertex 2 call str % append ( nl ) j = this % m_indices ( i , 2 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Vertex 3 j = this % m_indices ( i , 3 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Line 3-1 ! Vertex 3 call str % append ( nl ) j = this % m_indices ( i , 3 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Vertex 1 j = this % m_indices ( i , 1 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Add in the two blank lines if ( i /= n ) then call str % append ( nl ) call str % append ( nl ) end if end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function tspd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for the object. class ( tri_surface_plot_data ), intent ( in ) :: this !! The tri_surface_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! PM3D or wireframe? if ( this % get_use_wireframe ()) then call str % append ( \" with lines\" ) else call str % append ( \" with pm3d\" ) end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function tspd_get_wireframe ( this ) result ( rst ) !! Gets a value determining if a wireframe mesh should be displayed. class ( tri_surface_plot_data ), intent ( in ) :: this !! The tri_surface_plot_data object. logical :: rst !! Returns true if the plot is to be drawn as a wireframe; else, !! false to draw as a surface. rst = this % m_wireframe end function ! ------------------------------------------------------------------------------ subroutine tspd_set_wireframe ( this , x ) !! Sets a value determining if a wireframe mesh should be displayed. class ( tri_surface_plot_data ), intent ( inout ) :: this !! The tri_surface_plot_data object. logical , intent ( in ) :: x !! Set to true if the plot is to be drawn as a wireframe; else, !! false to draw as a surface. this % m_wireframe = x end subroutine ! ------------------------------------------------------------------------------ subroutine tspd_define_data ( this , tri ) !! Defines the data to plot. class ( tri_surface_plot_data ), intent ( inout ) :: this !! The tri_surface_plot_data object. class ( delaunay_tri_surface ), intent ( in ) :: tri !! The triangulation to plot. ! Process if ( allocated ( this % m_x )) deallocate ( this % m_x ) if ( allocated ( this % m_y )) deallocate ( this % m_y ) if ( allocated ( this % m_z )) deallocate ( this % m_z ) if ( allocated ( this % m_indices )) deallocate ( this % m_indices ) this % m_x = tri % get_points_x () this % m_y = tri % get_points_y () this % m_z = tri % get_points_z () this % m_indices = tri % get_indices () end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_tri_surface_plot_data.f90.html"},{"title":"fplot_vector_field_plot_data.f90 – FPLOT","text":"Contents Modules fplot_vector_field_plot_data Source Code fplot_vector_field_plot_data.f90 Source Code ! fplot_vector_field_plot_data.f90 ! REF: ! http://www.gnuplotting.org/vector-field-from-data-file/ ! http://gnuplot.sourceforge.net/demo_5.4/vector.html ! http://www.gnuplot.info/docs_5.4/Gnuplot_5_4.pdf (pg 79) module fplot_vector_field_plot_data use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_colors use ferror use strings implicit none private public :: vector_field_plot_data type , extends ( plot_data_colored ) :: vector_field_plot_data !! Defines a two-dimensional vector-field plot data set. real ( real64 ), private , allocatable , dimension (:,:,:) :: m_data !! An M-by-N-by-4 array containing the x, y, dx, and dy plot !! data points. Optionally, a 5th page can be added to define the !! color for each arrow. real ( real64 ), private :: m_arrowSize = 1.0d0 !! The vector size (scaling factor). logical , private :: m_filledHeads = . false . !! Fill the arrow heads? contains procedure , public :: get_data_string => vfpd_get_data_cmd procedure , public :: get_command_string => vfpd_get_cmd procedure , public :: define_data => vfpd_define_data procedure , public :: get_arrow_size => vfpd_get_arrow_size procedure , public :: set_arrow_size => vfpd_set_arrow_size procedure , public :: get_fill_arrow => vfpd_get_fill_arrow procedure , public :: set_fill_arrow => vfpd_set_fill_arrow procedure , public :: get_use_data_dependent_colors => & vfpd_get_use_data_dependent_colors end type contains ! ------------------------------------------------------------------------------ function vfpd_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data to plot. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , m , n character :: delimiter , nl real ( real64 ) :: scaling ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) scaling = this % get_arrow_size () ! Fix later m = size ( this % m_data , 1 ) n = size ( this % m_data , 2 ) ! Need a quick return in the event no data exists ! Process if ( this % get_use_data_dependent_colors ()) then do j = 1 , n do i = 1 , m ! ORDER: X, Y, DX, DY call str % append ( to_string ( this % m_data ( i , j , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , j , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( scaling * this % m_data ( i , j , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( scaling * this % m_data ( i , j , 4 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , j , 5 ))) call str % append ( nl ) end do end do else do j = 1 , n do i = 1 , m ! ORDER: X, Y, DX, DY call str % append ( to_string ( this % m_data ( i , j , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , j , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( scaling * this % m_data ( i , j , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( scaling * this % m_data ( i , j , 4 ))) call str % append ( nl ) end do end do end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function vfpd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this !! vector_field_plot_data object. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Property Definition call str % append ( \" with vectors\" ) if ( this % get_fill_arrow ()) then call str % append ( \" filled head\" ) end if if ( this % get_use_data_dependent_colors ()) then call str % append ( \" lc palette\" ) else clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine vfpd_define_data ( this , x , y , dx , dy , c , err ) !! Defines the data set. class ( vector_field_plot_data ), intent ( inout ) :: this !! The vector_field_plot_data object. real ( real64 ), intent ( in ), dimension (:,:) :: x !! An M-by-N matrix containing the x-locations of each arrow's !! origin. real ( real64 ), intent ( in ), dimension (:,:) :: y !! An M-by-N matrix containing the y-locations of each arrow's !! origin. real ( real64 ), intent ( in ), dimension (:,:) :: dx !! An M-by-N matrix containing the x-direction of each arrow. real ( real64 ), intent ( in ), dimension (:,:) :: dy !! An M-by-N matrix containing the y-direction of each arrow. real ( real64 ), intent ( in ), dimension (:,:), optional :: c !! An optional M-by-N matrix containing information on how to color !! the arrows. The colors are determined by the active colormap. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , j , m , n , flag type ( errors ), target :: deferr class ( errors ), pointer :: errmgr character ( len = 256 ) :: errmsg ! Set up error handling if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking m = size ( x , 1 ) n = size ( x , 2 ) if ( size ( y , 1 ) /= m . or . size ( y , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"vfpd_define_data\" , & \"y\" , m , n , size ( y , 1 ), size ( y , 2 )) return end if if ( size ( dx , 1 ) /= m . or . size ( dx , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"vfpd_define_data\" , & \"dx\" , m , n , size ( dx , 1 ), size ( dx , 2 )) return end if if ( size ( dy , 1 ) /= m . or . size ( dy , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"vfpd_define_data\" , & \"dy\" , m , n , size ( dy , 1 ), size ( dy , 2 )) return end if if ( present ( c )) then if ( size ( c , 1 ) /= m . or . size ( c , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , & \"vfpd_define_data\" , \"c\" , m , n , size ( c , 1 ), size ( c , 2 )) return end if end if ! Allocate space for the data if ( allocated ( this % m_data )) deallocate ( this % m_data ) if ( present ( c )) then allocate ( this % m_data ( m , n , 5 ), stat = flag ) else allocate ( this % m_data ( m , n , 4 ), stat = flag ) end if if ( flag /= 0 ) then call report_memory_error ( errmgr , \"vfpd_define_data\" , flag ) return end if ! Store the data if ( present ( c )) then do concurrent ( j = 1 : n ) do i = 1 , m this % m_data ( i , j , 1 ) = x ( i , j ) this % m_data ( i , j , 2 ) = y ( i , j ) this % m_data ( i , j , 3 ) = dx ( i , j ) this % m_data ( i , j , 4 ) = dy ( i , j ) this % m_data ( i , j , 5 ) = c ( i , j ) end do end do else do concurrent ( j = 1 : n ) do i = 1 , m this % m_data ( i , j , 1 ) = x ( i , j ) this % m_data ( i , j , 2 ) = y ( i , j ) this % m_data ( i , j , 3 ) = dx ( i , j ) this % m_data ( i , j , 4 ) = dy ( i , j ) end do end do end if ! End return end subroutine ! ------------------------------------------------------------------------------ pure function vfpd_get_arrow_size ( this ) result ( rst ) !! Gets the scaling factor used to determine the arrow size. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. real ( real64 ) :: rst !! The scaling factor. rst = this % m_arrowSize end function ! -------------------- subroutine vfpd_set_arrow_size ( this , x ) !! Sets the scaling factor used to determine the arrow size. class ( vector_field_plot_data ), intent ( inout ) :: this !! The vector_field_plot_data object. real ( real64 ), intent ( in ) :: x !! The scaling factor. this % m_arrowSize = x end subroutine ! ------------------------------------------------------------------------------ pure function vfpd_get_fill_arrow ( this ) result ( rst ) !! Gets a value determining if the arrow heads should be filled. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. logical :: rst !! True if the arrow heads should be filled; else, false. rst = this % m_filledHeads end function ! -------------------- subroutine vfpd_set_fill_arrow ( this , x ) !! Sets a value determining if the arrow heads should be filled. class ( vector_field_plot_data ), intent ( inout ) :: this !! The vector_field_plot_data object. logical , intent ( in ) :: x !! True if the arrow heads should be filled; else, false. this % m_filledHeads = x end subroutine ! ------------------------------------------------------------------------------ pure function vfpd_get_use_data_dependent_colors ( this ) result ( rst ) !! Gets a value indicating if data-dependent coloring should be !! used. This is defined by supplying information on how to scale the !! coloring when calling define_data. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. logical :: rst !! Returns true if data-dependent coloring is being used; else, !! false. rst = . false . if (. not . allocated ( this % m_data )) return rst = size ( this % m_data , 3 ) >= 5 end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_vector_field_plot_data.f90.html"},{"title":"fplot_windows_terminal.f90 – FPLOT","text":"Contents Modules fplot_windows_terminal Source Code fplot_windows_terminal.f90 Source Code ! fplot_windows_terminal.f90 module fplot_windows_terminal use iso_fortran_env use fplot_terminal implicit none private public :: windows_terminal type , extends ( terminal ) :: windows_terminal !! A Windows-specific terminal. character ( len = 3 ), private :: m_id = \"win\" !! The terminal ID string contains procedure , public :: get_id_string => wt_get_term_string end type contains function wt_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( windows_terminal ), intent ( in ) :: this !! The windows_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function end module","tags":"","loc":"sourcefile\\fplot_windows_terminal.f90.html"},{"title":"fplot_wxt_terminal.f90 – FPLOT","text":"Contents Modules fplot_wxt_terminal Source Code fplot_wxt_terminal.f90 Source Code ! fplot_wxt_terminal.f90 module fplot_wxt_terminal use iso_fortran_env use fplot_terminal implicit none private public :: wxt_terminal type , extends ( terminal ) :: wxt_terminal !! A WXT terminal. character ( len = 3 ), private :: m_id = \"wxt\" !! The terminal ID string contains procedure , public :: get_id_string => wxt_get_term_string end type contains function wxt_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( wxt_terminal ), intent ( in ) :: this !! The wxt_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function end module","tags":"","loc":"sourcefile\\fplot_wxt_terminal.f90.html"}]} \ No newline at end of file +var tipuesearch = {"pages":[{"title":" FPLOT ","text":"FPLOT Developer Info Jason Christopherson","tags":"home","loc":"index.html"},{"title":"plot_arrow – FPLOT ","text":"type, public, extends( plot_object ) :: plot_arrow Defines an arrow that can be drawn on a plot. Contents Type-Bound Procedures get_color get_command_string get_head_angle get_head_back_angle get_head_fill get_head_location get_head_size get_head_type get_is_visible get_line_style get_line_width get_move_to_front get_tail_location get_use_default_size set_color set_head_angle set_head_back_angle set_head_fill set_head_location set_head_size set_head_type set_is_visible set_line_style set_line_width set_move_to_front set_tail_location set_use_default_size Type-Bound Procedures procedure, public :: get_color => par_get_color private pure function par_get_color(this) result(rst) Gets the color of the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value type( color ) The color. procedure, public :: get_command_string => par_get_cmd private function par_get_cmd(this) result(rst) Returns the appropriate GNUPLOT command string to establish appropriate \nparameters. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_head_angle => par_get_head_angle private pure function par_get_head_angle(this) result(rst) Gets the angle of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32) The angle, in degrees. procedure, public :: get_head_back_angle => par_get_head_back_angle private pure function par_get_head_back_angle(this) result(rst) Gets the angle of the back of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32) The angle, in degrees. procedure, public :: get_head_fill => par_get_fill private pure function par_get_fill(this) result(rst) Gets a flag denoting the head fill type. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value integer(kind=int32) The flag denoting head fill. procedure, public :: get_head_location => par_get_head private pure function par_get_head(this) result(rst) Gets the coordinates of the arrow's head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32), dimension(3) A 3-element array containing the x, y, and z coordinates of the\narrow's head. procedure, public :: get_head_size => par_get_head_size private pure function par_get_head_size(this) result(rst) Gets the size of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32) The head size. procedure, public :: get_head_type => par_get_head_type private pure function par_get_head_type(this) result(rst) Gets the type of arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value integer(kind=int32) The arrow head type. procedure, public :: get_is_visible => par_get_is_visible private pure function par_get_is_visible(this) result(rst) Gets a value determining if the arrow is visible. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value logical True if the arrow is visible; else, false. procedure, public :: get_line_style => par_get_line_style private pure function par_get_line_style(this) result(rst) Gets the line style used to draw the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value integer(kind=int32) The line style. procedure, public :: get_line_width => par_get_line_width private pure function par_get_line_width(this) result(rst) Gets the width of the lines used to draw the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32) The width of the line. procedure, public :: get_move_to_front => par_get_move_to_front private pure function par_get_move_to_front(this) result(rst) Gets a value determining if the arrow should be moved to the front. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value logical True if the arrow should be moved to the front; else, false. procedure, public :: get_tail_location => par_get_tail private pure function par_get_tail(this) result(rst) Gets the coordinates of the arrow's tail. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value real(kind=real32), dimension(3) A 3-element array containing the x, y, and z coordinates of the \narrow's tail. procedure, public :: get_use_default_size => par_get_use_default_size private pure function par_get_use_default_size(this) result(rst) Gets a value determining if arrow head sizing defaults should be used. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(in) :: this The plot_arrow object. Return Value logical True if the defaults should be used; else, false. procedure, public :: set_color => par_set_color private subroutine par_set_color(this, x) Sets the color of the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. type( color ), intent(in) :: x The color. procedure, public :: set_head_angle => par_set_head_angle private subroutine par_set_head_angle(this, x) Sets the angle of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The angle, in degrees. procedure, public :: set_head_back_angle => par_set_head_back_angle private subroutine par_set_head_back_angle(this, x) Sets the angle of the back of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The angle, in degrees. procedure, public :: set_head_fill => par_set_fill private subroutine par_set_fill(this, x) Sets a flag denoting the head fill type. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. integer(kind=int32), intent(in) :: x The flag denoting head fill. It must be one of the following \nconstants. ARROW_FILLED ARROW_EMPTY ARROW_NO_BORDER ARROW_NO_FILL If the value is not one of the above, the command is ignored. generic, public :: set_head_location => par_set_head_1, par_set_head_2, par_set_head_3 private subroutine par_set_head_1(this, x) Sets the location of the arrow's head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x (3) A 3-element array containing the x, y, and z coordinates of the\narrow's head. private subroutine par_set_head_2(this, x, y) Sets the location of the arrow's head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The x-coordinate of the arrow's head. real(kind=real32), intent(in) :: y The y-coordinate of the arrow's head. private subroutine par_set_head_3(this, x, y, z) Sets the location of the arrow's head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The x-coordinate of the arrow's head. real(kind=real32), intent(in) :: y The y-coordinate of the arrow's head. real(kind=real32), intent(in) :: z The z-coordinate of the arrow's head. procedure, public :: set_head_size => par_set_head_size private subroutine par_set_head_size(this, x) Sets the size of the arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The head size. procedure, public :: set_head_type => par_set_head_type private subroutine par_set_head_type(this, x) Sets the type of arrow head. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. integer(kind=int32), intent(in) :: x The arrow head type. It must be one of the following constants. ARROW_HEAD ARROW_BACKHEAD ARROW_HEADS ARROW_NO_HEAD If the value is not one of the above, the command is ignored. procedure, public :: set_is_visible => par_set_is_visible private subroutine par_set_is_visible(this, x) Sets a value determining if the arrow is visible. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. logical, intent(in) :: x True if the arrow is visible; else, false. procedure, public :: set_line_style => par_set_line_style private subroutine par_set_line_style(this, x) Sets the line style used to draw the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. integer(kind=int32), intent(in) :: x The line style. The value must be one of the following. LINE_SOLID LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED If the value is not one of the above, the command is ignored. procedure, public :: set_line_width => par_set_line_width private subroutine par_set_line_width(this, x) Sets the width of the lines used to draw the arrow. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The width of the line. procedure, public :: set_move_to_front => par_set_move_to_front private subroutine par_set_move_to_front(this, x) Sets a value determining if the arrow should be moved to the front. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. logical, intent(in) :: x True if the arrow should be moved to the front; else, false. generic, public :: set_tail_location => par_set_tail_1, par_set_tail_2, par_set_tail_3 private subroutine par_set_tail_1(this, x) Sets the coordinates of the arrow's tail. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x (3) A 3-element array containing the x, y, and z coordinates of the \narrow's tail. private subroutine par_set_tail_2(this, x, y) Sets the coordinates of the arrow's tail. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The x-coordinate of the arrow's tail. real(kind=real32), intent(in) :: y !! The y-coordinate of the arrow's tail. private subroutine par_set_tail_3(this, x, y, z) Sets the coordinates of the arrow's tail. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. real(kind=real32), intent(in) :: x The x-coordinate of the arrow's tail. real(kind=real32), intent(in) :: y The y-coordinate of the arrow's tail. real(kind=real32), intent(in) :: z The z-coordinate of the arrow's tail. procedure, public :: set_use_default_size => par_set_use_default_size private subroutine par_set_use_default_size(this, x) Sets a value determining if arrow head sizing defaults should be used. Arguments Type Intent Optional Attributes Name class( plot_arrow ), intent(inout) :: this The plot_arrow object. logical, intent(in) :: x True if the defaults should be used; else, false.","tags":"","loc":"type\\plot_arrow.html"},{"title":"colormap – FPLOT ","text":"type, public, abstract, extends( plot_object ) :: colormap A colormap object for a surface plot. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure( cm_get_string_result ), public, deferred :: get_color_string function cm_get_string_result(this) result(x) Prototype Retrieves a string result from a colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\colormap.html"},{"title":"cool_colormap – FPLOT ","text":"type, public, extends( colormap ) :: cool_colormap Defines a colormap consisting of \"cool\" colors. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => ccm_get_clr private function ccm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( cool_colormap ), intent(in) :: this The cool_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\cool_colormap.html"},{"title":"custom_colormap – FPLOT ","text":"type, public, extends( colormap ) :: custom_colormap Defines a custom colormap that utilizes the FORCOLORMAP library\nto provide the map. Contents Finalization Procedures custom_final Type-Bound Procedures get_color_string get_colormap get_command_string get_draw_border get_horizontal get_label get_show_tics set_colormap set_draw_border set_horizontal set_label set_show_tics Finalization Procedures final :: custom_final private subroutine custom_final(this) Arguments Type Intent Optional Attributes Name type( custom_colormap ), intent(inout) :: this The custom_colormap object. Type-Bound Procedures procedure, public :: get_color_string => custom_get_clr private function custom_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( custom_colormap ), intent(in) :: this The custom_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_colormap => custom_get private function custom_get(this) result(rst) Gets a pointer to the FORCOLORMAP colormap object. Arguments Type Intent Optional Attributes Name class( custom_colormap ), intent(in) :: this The custom_colormap object. Return Value class(cmap), pointer A pointer to the FORCOLORMAP colormap object. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_colormap => custom_set private subroutine custom_set(this, map, err) Sets the FORCOLORMAP colormap object. Arguments Type Intent Optional Attributes Name class( custom_colormap ), intent(inout) :: this The custom_colormap object. class(cmap), intent(in) :: map The FORCOLORMAP colormap object. The custom_colormap object \nstores a copy of this object; therefore, any changes made to \nx after calls to this routine will not impact the behavior of \nthe custom_colormap object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\custom_colormap.html"},{"title":"earth_colormap – FPLOT ","text":"type, public, extends( colormap ) :: earth_colormap Defines an earthy-colored colormap. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => ecm_get_clr private function ecm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( earth_colormap ), intent(in) :: this The earth_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\earth_colormap.html"},{"title":"grey_colormap – FPLOT ","text":"type, public, extends( colormap ) :: grey_colormap Defines a grey-scaled colormap. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => gcm_get_clr private function gcm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( grey_colormap ), intent(in) :: this The grey_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\grey_colormap.html"},{"title":"hot_colormap – FPLOT ","text":"type, public, extends( colormap ) :: hot_colormap Defines a colormap consisting of \"hot\" colors. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => hcm_get_clr private function hcm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( hot_colormap ), intent(in) :: this The hot_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\hot_colormap.html"},{"title":"parula_colormap – FPLOT ","text":"type, public, extends( colormap ) :: parula_colormap Defines a colormap equivalent to the MATLAB parula colormap. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => pcm_get_clr private function pcm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( parula_colormap ), intent(in) :: this The parula_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\parula_colormap.html"},{"title":"rainbow_colormap – FPLOT ","text":"type, public, extends( colormap ) :: rainbow_colormap Defines a rainbow colormap. Contents Type-Bound Procedures get_color_string get_command_string get_draw_border get_horizontal get_label get_show_tics set_draw_border set_horizontal set_label set_show_tics Type-Bound Procedures procedure, public :: get_color_string => rcm_get_clr private function rcm_get_clr(this) result(x) Gets the GNUPLOT string defining the color distribution. Arguments Type Intent Optional Attributes Name class( rainbow_colormap ), intent(in) :: this The rainbow_colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_command_string => cm_get_cmd private function cm_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_border => cm_get_draw_border private pure function cm_get_draw_border(this) result(rst) Gets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_horizontal => cm_get_horizontal private pure function cm_get_horizontal(this) result(rst) Gets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: get_label => cm_get_label private pure function cm_get_label(this) result(rst) Gets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The label. procedure, public :: get_show_tics => cm_get_show_tics private pure function cm_get_show_tics(this) result(rst) Gets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value logical Returns true if the tic marks should be drawn; else, false. procedure, public :: set_draw_border => cm_set_draw_border private subroutine cm_set_draw_border(this, x) Sets a logical value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_horizontal => cm_set_horizontal private subroutine cm_set_horizontal(this, x) Sets a logical value determining if the colormap should be\ndrawn horizontally and below the plot. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the colormap should be drawn horizontally;\nelse, false. procedure, public :: set_label => cm_set_label private subroutine cm_set_label(this, x) Sets the label to associate with the colorbar. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. character(len=*), intent(in) :: x The label. procedure, public :: set_show_tics => cm_set_show_tics private subroutine cm_set_show_tics(this, x) Sets a logical value determining if the tic marks should be drawn. Arguments Type Intent Optional Attributes Name class( colormap ), intent(inout) :: this The colormap object. logical, intent(in) :: x Set to true if the tic marks should be drawn; else, false.","tags":"","loc":"type\\rainbow_colormap.html"},{"title":"color – FPLOT ","text":"type, public :: color Describes an RGB color. Contents Variables alpha blue green red Type-Bound Procedures copy_from to_hex_string Components Type Visibility Attributes Name Initial integer(kind=int32), public :: alpha = 0 The alpha component of the color (must be between 0 and 255).\nNotice, 0 is fully opaque and 255 is fully transparent. integer(kind=int32), public :: blue = 255 The blue component of the color (must be between 0 and 255). integer(kind=int32), public :: green = 0 The green component of the color (must be between 0 and 255). integer(kind=int32), public :: red = 0 The red component of the color (must be between 0 and 255). Type-Bound Procedures procedure, public, pass :: copy_from => clr_copy_from private subroutine clr_copy_from(this, clr) Copies another color to this color. Arguments Type Intent Optional Attributes Name class( color ), intent(inout) :: this The color object. class( color ), intent(in) :: clr The color to copy. procedure, public, pass :: to_hex_string => clr_to_hex_string private pure function clr_to_hex_string(this) result(txt) Returns the color in hexadecimal format. Arguments Type Intent Optional Attributes Name class( color ), intent(in) :: this The color object. Return Value character(len=8) A string containing the hexadecimal equivalent.","tags":"","loc":"type\\color.html"},{"title":"delaunay_tri_surface – FPLOT ","text":"type, public, extends( delaunay_tri_2d ) :: delaunay_tri_surface Provides a type describing a triangulated surface. Contents Type-Bound Procedures create define_function_values evaluate find_triangle get_indices get_point_count get_points_x get_points_y get_points_z get_triangle_count Type-Bound Procedures procedure, public :: create => d2d_init private subroutine d2d_init(this, x, y, err) Creates an unconstrained 2D Delaunay triangulation given a \nset of x-y points. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(inout) :: this The delaunay_tri_2d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of each\ndata point. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of each\ndata point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: define_function_values => dts_define_fcn private subroutine dts_define_fcn(this, z, err) Defines the function values that correspond to the x and y\ndata points. Arguments Type Intent Optional Attributes Name class( delaunay_tri_surface ), intent(inout) :: this The delaunay_tri_surface object. real(kind=real64), intent(in), dimension(:) :: z An N-element array containing the function values for\neach x and y coordinate. Notice, the x and y coordinates must \nalready be defined prior to calling this routine. class(errors), intent(inout), optional, target :: err An error handling object. generic, public :: evaluate => dts_interp_1, dts_interp_2 private pure function dts_interp_1(this, x, y) result(z) Evaluates the function at the requested point by means of \nlinear interpolation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_surface ), intent(in) :: this The delaunay_tri_surface object. real(kind=real64), intent(in) :: x The x-coordinate at which to evaluate the function. real(kind=real64), intent(in) :: y The y-coordinate at which to evaluate the function. Return Value real(kind=real64) The function value. If the point (x, y) does not lie within the \nrange of defined values, then a value of NaN is returned. private pure function dts_interp_2(this, x, y) result(z) Evaluates the function at the requested point by means of \nlinear interpolation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_surface ), intent(in) :: this The delaunay_tri_surface object. real(kind=real64), intent(in), dimension(:) :: x The x data coordinates. real(kind=real64), intent(in), dimension(:) :: y The x data coordinates. Return Value real(kind=real64), allocatable, dimension(:) The interpolated z coordinate points. If the point (x, y) does \nnot lie within the range of defined values, then a value of NaN \nis returned. procedure, public :: find_triangle => d2d_get_tri_with_pt private pure function d2d_get_tri_with_pt(this, x, y) result(rst) Finds the triangle that contains the specified point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. real(kind=real64), intent(in) :: x The x-coordinate of the point. real(kind=real64), intent(in) :: y The y-coordinate of the point. Return Value integer(kind=int32) Returns the index of the triangle containing the specified\npoint. If no triangle contains the specified point, a value of\n-1 is returned. procedure, public :: get_indices => d2d_get_tris private pure function d2d_get_tris(this) result(rst) Gets a list of the indices of each triangle vertex. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32), allocatable, dimension(:,:) An N-by-3 matrix with each column containing the index of the\nvertex of each triangle where N is the number of triangles. procedure, public :: get_point_count => d2d_get_pt_count private pure function d2d_get_pt_count(this) result(rst) Gets the number of points in the triangulation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32) The number of points in the triangulation. procedure, public :: get_points_x => d2d_get_x_pts private pure function d2d_get_x_pts(this) result(rst) Gets the x-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value real(kind=real64), allocatable, dimension(:) An array of the x-coordinates of each point. procedure, public :: get_points_y => d2d_get_y_pts private pure function d2d_get_y_pts(this) result(rst) Gets the y-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value real(kind=real64), allocatable, dimension(:) An array of the y-coordinates of each point. procedure, public :: get_points_z => dts_get_z private pure function dts_get_z(this) result(rst) Gets the z-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_surface ), intent(in) :: this The delaunay_tri_surface object. Return Value real(kind=real64), allocatable, dimension(:) An array of the z-coordinates of each point. procedure, public :: get_triangle_count => d2d_get_tri_count private pure function d2d_get_tri_count(this) result(rst) Gets the number of triangles in the triangulation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32) The number of triangles in the triangulation.","tags":"","loc":"type\\delaunay_tri_surface.html"},{"title":"filled_plot_data – FPLOT ","text":"type, public, extends( plot_data_colored ) :: filled_plot_data Defines a two-dimensional filled plot data set. Contents Type-Bound Procedures define_data get_axes_string get_color_index get_command_string get_data_string get_draw_against_y2 get_line_color get_name set_color_index set_draw_against_y2 set_line_color set_name Type-Bound Procedures procedure, public :: define_data => fpd_define_data private subroutine fpd_define_data(this, x, y, yc, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(inout) :: this The filled_plot_data object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinate data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinate data. real(kind=real64), intent(in), dimension(:) :: yc An N-element array containing the constraining curve y \ncoordinate data. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get_axes_string => fpd_get_axes_cmd private function fpd_get_axes_cmd(this) result(x) Gets the GNUPLOT command string defining which axes the data\nis to be plotted against. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(in) :: this The filled_plot_data object. Return Value character(len=:), allocatable The command string. 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 Intent Optional 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 => fpd_get_cmd private function fpd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nfilled_plot_data object. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(in) :: this The filled_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => fpd_get_data_cmd private function fpd_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data to plot. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(in) :: this The filled_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_against_y2 => fpd_get_draw_against_y2 private pure function fpd_get_draw_against_y2(this) result(x) Gets a value determining if the data should be plotted against\nthe secondary y-axis. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(in) :: this The filled_plot_data object. Return Value logical Returns true if the data should be plotted against the secondary\ny-axis; else, false to plot against the primary y-axis. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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 => fpd_set_draw_against_y2 private subroutine fpd_set_draw_against_y2(this, x) Sets a value determining if the data should be plotted against\nthe secondary y-axis. Arguments Type Intent Optional Attributes Name class( filled_plot_data ), intent(inout) :: this The filled_plot_data object. logical, intent(in) :: x Set to true if the data should be plotted against the secondary\ny-axis; else, false to plot against the primary y-axis. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\filled_plot_data.html"},{"title":"plot_label – FPLOT ","text":"type, public, extends( plot_object ) :: plot_label Defines a plot label. Contents Type-Bound Procedures get_angle get_command_string get_is_visible get_position get_text set_angle set_is_visible set_position set_text Type-Bound Procedures procedure, public :: get_angle => lbl_get_angle private pure function lbl_get_angle(this) result(x) Gets the angle of the label text, in degrees. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value real(kind=real32) The angle, in degrees. procedure, public :: get_command_string => lbl_get_cmd private function lbl_get_cmd(this) result(x) Gets the GNUPLOT command string for the label. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value character(len=:), allocatable The command string. procedure, public :: get_is_visible => lbl_get_is_visible private pure function lbl_get_is_visible(this) result(x) Gets a value determining if the label is to be drawn. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value logical Returns true if the label is to be drawn; else, false. procedure, public :: get_position => lbl_get_position private pure function lbl_get_position(this) result(x) Gets the position of the label in terms of plot coordinates. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value real(kind=real32), dimension(3) A 3-element array containing the X, Y, and Z position of the \nlabel. procedure, public :: get_text => lbl_get_txt private function lbl_get_txt(this) result(x) Gets the text displayed by the label. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(in) :: this The plot_label object. Return Value character(len=:), allocatable The text string to display. procedure, public :: set_angle => lbl_set_angle private subroutine lbl_set_angle(this, x) Sets the angle of the label text, in degrees. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(inout) :: this The plot_label object. real(kind=real32), intent(in) :: x The angle, in degrees. procedure, public :: set_is_visible => lbl_set_is_visible private subroutine lbl_set_is_visible(this, x) Sets a value determining if the label is to be drawn. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(inout) :: this The plot_label object. logical, intent(in) :: x Set to true if the label is to be drawn; else, false. procedure, public :: set_position => lbl_set_position private subroutine lbl_set_position(this, x) Sets the position of the label in terms of plot coordinates. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(inout) :: this The plot_label object. real(kind=real32), intent(in), dimension(3) :: x A 3-element array containing the X, Y, and Z position of the \nlabel. procedure, public :: set_text => lbl_set_txt private subroutine lbl_set_txt(this, x) Sets the text displayed by the label. Arguments Type Intent Optional Attributes Name class( plot_label ), intent(inout) :: this The plot_label object. character(len=*), intent(in) :: x The text string to display.","tags":"","loc":"type\\plot_label.html"},{"title":"latex_terminal – FPLOT ","text":"type, public, extends( terminal ) :: latex_terminal A LATEX terminal. Contents Type-Bound Procedures get_command_string get_filename get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_filename set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => tex_get_command_string private function tex_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( latex_terminal ), intent(in) :: this The latex_terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_filename => tex_get_filename private function tex_get_filename(this) result(txt) Gets the filename for the output LATEX file. Arguments Type Intent Optional Attributes Name class( latex_terminal ), intent(in) :: this The latex_terminal object. Return Value character(len=:), allocatable The filename, including the file extension (.tex). procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => tex_get_term_string private function tex_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( latex_terminal ), intent(in) :: this The latex_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_filename => tex_set_filename private subroutine tex_set_filename(this, txt) Sets the filename for the output LATEX file. Arguments Type Intent Optional Attributes Name class( latex_terminal ), intent(inout) :: this The latex_terminal object. character(len=*), intent(in) :: txt The filename, including the file extension (.tex). procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\latex_terminal.html"},{"title":"legend – FPLOT ","text":"type, public, extends( plot_object ) :: legend Defines a legend object. Contents Type-Bound Procedures get_command_string get_draw_border get_draw_inside_axes get_horizontal_position get_is_opaque get_is_visible get_layout get_vertical_position set_draw_border set_draw_inside_axes set_horizontal_position set_is_opaque set_is_visible set_layout set_vertical_position Type-Bound Procedures procedure, public :: get_command_string => leg_get_command_txt private function leg_get_command_txt(this) result(txt) Gets the command string defining the legend properties. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_draw_border => leg_get_box private pure function leg_get_box(this) result(x) Gets a value determining if the legend should have a border. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value logical True if the legend should have a border; else, false. procedure, public :: get_draw_inside_axes => leg_get_inside private pure function leg_get_inside(this) result(x) Gets a value determining if the legend should be drawn inside\nor outside the axes border. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value logical True to draw inside the axes border; else, false for outside. procedure, public :: get_horizontal_position => leg_get_horz_pos private pure function leg_get_horz_pos(this) result(x) Gets the horizontal position of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value character(len=:), allocatable The horizontal position of the legend (LEGEND_LEFT,\nLEGEND_CENTER, or LEGEND_RIGHT). procedure, public :: get_is_opaque => leg_get_opaque private pure function leg_get_opaque(this) result(rst) Gets a value determining if the legend is to be opaque. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value logical True if the legend is to be opaque; else, false. procedure, public :: get_is_visible => leg_get_visible private pure function leg_get_visible(this) result(x) Gets a value determining if the legend is visible. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value logical True if the legend is visible; else, false. procedure, public :: get_layout => leg_get_layout private pure function leg_get_layout(this) result(rst) Gets the layout of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value character(len=:), allocatable The layout type, either LEGEND_ARRANGE_VERTICALLY or \nLEGEND_ARRANGE_HORIZONTALLY. procedure, public :: get_vertical_position => leg_get_vert_pos private pure function leg_get_vert_pos(this) result(x) Gets the vertical position of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(in) :: this The legend object. Return Value character(len=:), allocatable The vertical position of the legend (LEGEND_TOP,\nLEGEND_CENTER, or LEGEND_BOTTOM). procedure, public :: set_draw_border => leg_set_box private subroutine leg_set_box(this, x) Sets a value determining if the legend should have a border. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. logical, intent(in) :: x True if the legend should have a border; else, false. procedure, public :: set_draw_inside_axes => leg_set_inside private subroutine leg_set_inside(this, x) Sets a value determining if the legend should be drawn inside\nor outside the axes border. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. logical, intent(in) :: x True to draw inside the axes border; else, false for outside. procedure, public :: set_horizontal_position => leg_set_horz_pos private subroutine leg_set_horz_pos(this, x) Sets the horizontal position of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. character(len=*), intent(in) :: x The horizontal position of the legend. The parameter must be\nset to one of the following: LEGEND_LEFT, LEGEND_CENTER, or\nLEGEND_RIGHT. If not, the default LEGEND_RIGHT will be used. procedure, public :: set_is_opaque => leg_set_opaque private subroutine leg_set_opaque(this, x) Sets a value determining if the legend is to be opaque. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. logical :: x True if the legend is to be opaque; else, false. procedure, public :: set_is_visible => leg_set_visible private subroutine leg_set_visible(this, x) Sets a value determining if the legend is visible. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. logical, intent(in) :: x True if the legend is visible; else, false. procedure, public :: set_layout => leg_set_layout private subroutine leg_set_layout(this, x) Sets the layout of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. character(len=*), intent(in) :: x The layout type, either LEGEND_ARRANGE_VERTICALLY or \nLEGEND_ARRANGE_HORIZONTALLY. procedure, public :: set_vertical_position => leg_set_vert_pos private subroutine leg_set_vert_pos(this, x) Sets the vertical position of the legend. Arguments Type Intent Optional Attributes Name class( legend ), intent(inout) :: this The legend object. character(len=*), intent(in) :: x The vertical position of the legend. The parameter must be\nset to one of the following: LEGEND_TOP, LEGEND_CENTER, or\nLEGEND_BOTTOM. If not, the default LEGEND_TOP will be used.","tags":"","loc":"type\\legend.html"},{"title":"multiplot – FPLOT ","text":"type, public, extends( plot_object ) :: multiplot Defines a multi-plot layout. Contents Variables m_terminal Finalization Procedures mp_clean Type-Bound Procedures draw get get_column_count get_command_string get_font_name get_font_size get_plot_count get_row_count get_terminal get_title initialize is_title_defined save_file set set_font_name set_font_size set_title 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 Intent Optional 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\nthe command list. Arguments Type Intent Optional 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\nto 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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, width, height, err) Initializes the multiplot object. Arguments Type Intent Optional 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 \ndefault 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 :: 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\nmultiplot object. Arguments Type Intent Optional Attributes Name class( multiplot ), intent(in) :: this The multiplot object. Return Value logical Returns true if a title has been defined for this multiplot; \nelse, returns false. procedure, public :: save_file => mp_save private subroutine mp_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional Attributes Name class( multiplot ), intent(inout) :: this The multiplot object. character(len=*), intent(in) :: x The title.","tags":"","loc":"type\\multiplot.html"},{"title":"plot – FPLOT ","text":"type, public, extends( plot_object ) :: plot Defines the basic GNUPLOT plot. Contents Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_axis_equal get_bottom_margin get_colormap get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count get_left_margin get_legend get_right_margin get_show_colorbar get_show_gridlines get_terminal get_tics_inward get_title get_top_margin initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_axis_equal set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label set_left_margin set_right_margin set_show_colorbar set_show_gridlines set_tics_inward set_title set_top_margin Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_bottom_margin => plt_get_bottom_margin private pure function plt_get_bottom_margin(this) result(x) Gets the bottom margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => plt_get_cmd private function plt_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_left_margin => plt_get_left_margin private pure function plt_get_left_margin(this) result(x) Gets the left margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_right_margin => plt_get_right_margin private pure function plt_get_right_margin(this) result(x) Gets the right margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_top_margin => plt_get_top_margin private pure function plt_get_top_margin(this) result(x) Gets the top margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: initialize => plt_init private subroutine plt_init(this, term, fname, err) Initializes the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\nThe default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_bottom_margin => plt_set_bottom_margin private subroutine plt_set_bottom_margin(this, x) Sets the bottom margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_left_margin => plt_set_left_margin private subroutine plt_set_left_margin(this, x) Sets the left margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_right_margin => plt_set_right_margin private subroutine plt_set_right_margin(this, x) Sets the right margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_top_margin => plt_set_top_margin private subroutine plt_set_top_margin(this, x) Sets the top margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used.","tags":"","loc":"type\\plot.html"},{"title":"plot_2d – FPLOT ","text":"type, public, extends( plot ) :: plot_2d A plot object defining a 2D plot. Contents Finalization Procedures p2d_clean_up Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_axis_equal get_bottom_margin get_colormap get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count get_left_margin get_legend get_right_margin get_show_colorbar get_show_gridlines get_square_axes get_terminal get_tics_inward get_title get_top_margin get_use_y2_axis get_x_axis get_y2_axis get_y_axis initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_axis_equal set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label set_left_margin set_right_margin set_show_colorbar set_show_gridlines set_square_axes set_tics_inward set_title set_top_margin set_use_y2_axis Finalization Procedures final :: p2d_clean_up private subroutine p2d_clean_up(this) Cleans up resources held by the plot_2d object. Arguments Type Intent Optional Attributes Name type( plot_2d ), intent(inout) :: this The plot_2d object. Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_bottom_margin => plt_get_bottom_margin private pure function plt_get_bottom_margin(this) result(x) Gets the bottom margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => p2d_get_cmd private function p2d_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot_2d object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_left_margin => plt_get_left_margin private pure function plt_get_left_margin(this) result(x) Gets the left margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_right_margin => plt_get_right_margin private pure function plt_get_right_margin(this) result(x) Gets the right margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_square_axes => p2d_get_square_axes private pure function p2d_get_square_axes(this) result(rst) Gets a logical flag determining if the axes size should be squared\noff. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value logical Returns true if the axes are to be sized to a square; else,\nfalse. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_top_margin => plt_get_top_margin private pure function plt_get_top_margin(this) result(x) Gets the top margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_use_y2_axis => p2d_get_use_y2 private pure function p2d_get_use_y2(this) result(x) Gets a flag determining if the secondary y-axis should be\ndisplayed. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value logical Returns true if the axis should be displayed; else, false. procedure, public :: get_x_axis => p2d_get_x_axis private function p2d_get_x_axis(this) result(ptr) Gets the x-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the x-axis object. procedure, public :: get_y2_axis => p2d_get_y2_axis private function p2d_get_y2_axis(this) result(ptr) Gets the secondary y-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the secondary y-axis object. procedure, public :: get_y_axis => p2d_get_y_axis private function p2d_get_y_axis(this) result(ptr) Gets the y-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the y-axis object. procedure, public :: initialize => p2d_init private subroutine p2d_init(this, term, fname, err) Initializes the plot_2d object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_bottom_margin => plt_set_bottom_margin private subroutine plt_set_bottom_margin(this, x) Sets the bottom margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_left_margin => plt_set_left_margin private subroutine plt_set_left_margin(this, x) Sets the left margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_right_margin => plt_set_right_margin private subroutine plt_set_right_margin(this, x) Sets the right margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_square_axes => p2d_set_square_axes private subroutine p2d_set_square_axes(this, x) Sets a logical flag determining if the axes size should be\nsquared off. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. logical, intent(in) :: x Set to true if the axes are to be sized to a square; else,\nfalse. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_top_margin => plt_set_top_margin private subroutine plt_set_top_margin(this, x) Sets the top margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_use_y2_axis => p2d_set_use_y2 private subroutine p2d_set_use_y2(this, x) Sets a flag determining if the secondary y-axis should be\ndisplayed. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. logical, intent(in) :: x Set to true if the axis should be displayed; else, false.","tags":"","loc":"type\\plot_2d.html"},{"title":"plot_3d – FPLOT ","text":"type, public, extends( plot ) :: plot_3d A plot object defining a 3D plot. Contents Finalization Procedures p3d_clean_up Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_axis_equal get_azimuth get_bottom_margin get_colormap get_command_string get_coordinate_system get_count get_draw_border get_elevation get_font_name get_font_size get_label get_label_count get_left_margin get_legend get_right_margin get_show_colorbar get_show_gridlines get_terminal get_tics_inward get_title get_top_margin get_use_map_view get_x_axis get_y_axis get_z_axis get_z_intersect_xy initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_axis_equal set_azimuth set_bottom_margin set_colormap set_coordinate_system set_draw_border set_elevation set_font_name set_font_size set_label set_left_margin set_right_margin set_show_colorbar set_show_gridlines set_tics_inward set_title set_top_margin set_use_map_view set_z_intersect_xy Finalization Procedures final :: p3d_clean_up private subroutine p3d_clean_up(this) Cleans up resources held by the plot_3d object. Arguments Type Intent Optional Attributes Name type( plot_3d ), intent(inout) :: this The plot_3d object. Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_azimuth => p3d_get_azimuth private pure function p3d_get_azimuth(this) result(x) Gets the plot azimuth angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value real(kind=real64) The azimuth angle, in degrees. procedure, public :: get_bottom_margin => plt_get_bottom_margin private pure function plt_get_bottom_margin(this) result(x) Gets the bottom margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => p3d_get_cmd private function p3d_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot_3d object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_coordinate_system => p3d_get_csys private pure function p3d_get_csys(this) result(rst) Gets a value determining the coordinate system. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value integer(kind=int32) The coordinate system ID, which must be one of the following. COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_elevation => p3d_get_elevation private pure function p3d_get_elevation(this) result(x) Gets the plot elevation angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value real(kind=real64) The elevation angle, in degrees. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_left_margin => plt_get_left_margin private pure function plt_get_left_margin(this) result(x) Gets the left margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_right_margin => plt_get_right_margin private pure function plt_get_right_margin(this) result(x) Gets the right margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_top_margin => plt_get_top_margin private pure function plt_get_top_margin(this) result(x) Gets the top margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_use_map_view => p3d_get_use_map_view private pure function p3d_get_use_map_view(this) result(rst) Gets a value determining if the view should be set to a 2D\nmap view. If true, the azimuth and elevation terms are ignored. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value logical Returns true if the map view will be used; else, false. procedure, public :: get_x_axis => p3d_get_x_axis private function p3d_get_x_axis(this) result(ptr) Gets the x-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the x-axis object. procedure, public :: get_y_axis => p3d_get_y_axis private function p3d_get_y_axis(this) result(ptr) Gets the y-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the y-axis object. procedure, public :: get_z_axis => p3d_get_z_axis private function p3d_get_z_axis(this) result(ptr) Gets the z-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the z-axis object. procedure, public :: get_z_intersect_xy => p3d_get_z_axis_intersect private pure function p3d_get_z_axis_intersect(this) result(x) Gets a value determining if the z-axis should intersect the\nx-y plane. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value logical Returns true if the z-axis should intersect the x-y plane; else,\nfalse to allow the z-axis to float. procedure, public :: initialize => p3d_init private subroutine p3d_init(this, term, fname, err) Initializes the plot_3d object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_azimuth => p3d_set_azimuth private subroutine p3d_set_azimuth(this, x) Sets the plot azimuth angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. real(kind=real64), intent(in) :: x The azimuth angle, in degrees. procedure, public :: set_bottom_margin => plt_set_bottom_margin private subroutine plt_set_bottom_margin(this, x) Sets the bottom margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_coordinate_system => p3d_set_csys private subroutine p3d_set_csys(this, x) Sets a value determining the coordinate system. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. integer(kind=int32), intent(in) :: x The coordinate system ID, which must be one of the following. COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_elevation => p3d_set_elevation private subroutine p3d_set_elevation(this, x) Sets the plot elevation angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. real(kind=real64), intent(in) :: x The elevation angle, in degrees. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_left_margin => plt_set_left_margin private subroutine plt_set_left_margin(this, x) Sets the left margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_right_margin => plt_set_right_margin private subroutine plt_set_right_margin(this, x) Sets the right margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_top_margin => plt_set_top_margin private subroutine plt_set_top_margin(this, x) Sets the top margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_use_map_view => p3d_set_use_map_view private subroutine p3d_set_use_map_view(this, x) Sets a value determining if the view should be set to a 2D\nmap view. If true, the azimuth and elevation terms are ignored. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. logical, intent(in) :: x Seturns true if the map view will be used; else, false. procedure, public :: set_z_intersect_xy => p3d_set_z_axis_intersect private subroutine p3d_set_z_axis_intersect(this, x) Sets a value determining if the z-axis should intersect the\nx-y plane. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. logical, intent(in) :: x Set to true if the z-axis should intersect the x-y plane; else,\nfalse to allow the z-axis to float.","tags":"","loc":"type\\plot_3d.html"},{"title":"plot_axis – FPLOT ","text":"type, public, abstract, extends( plot_object ) :: plot_axis Defines a plot axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_offset_tics get_show_tic_labels get_tic_label_alignment get_tic_label_angle get_tic_label_format get_tic_label_rotation_origin get_tic_label_x_offset get_tic_label_y_offset get_title get_title_x_offset get_title_y_offset get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_offset_tics set_show_tic_labels set_tic_label_alignment set_tic_label_angle set_tic_label_format set_tic_label_rotation_origin set_tic_label_x_offset set_tic_label_y_offset set_title set_title_x_offset set_title_y_offset set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure( pa_get_string_result ), public, deferred :: get_id_string function pa_get_string_result(this) result(x) Prototype Retrieves a string from a plot_axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_offset_tics => pa_get_offset_tics private pure function pa_get_offset_tics(this) result(x) Gets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to offset the tics; else, set to false. procedure, public :: get_show_tic_labels => pa_get_show_tic_labels private pure function pa_get_show_tic_labels(this) result(x) Gets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to show tic labels; else, set to false. procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment private pure function pa_get_tic_label_alignment(this) result(x) Gets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: get_tic_label_angle => pa_get_tic_label_angle private pure function pa_get_tic_label_angle(this) result(x) Gets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The tic label angle, in degrees. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin private pure function pa_get_tic_rotation_origin(this) result(x) Gets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset private pure function pa_get_tic_x_offset(this) result(x) Gets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label x-offset, in characters. procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset private pure function pa_get_tic_y_offset(this) result(x) Gets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label y-offset, in characters. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_title_x_offset => pa_get_title_x_offset private pure function pa_get_title_x_offset(this) result(x) Gets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title x-offset, in characters. procedure, public :: get_title_y_offset => pa_get_title_y_offset private pure function pa_get_title_y_offset(this) result(x) Gets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title y-offset, in characters. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_offset_tics => pa_set_offset_tics private subroutine pa_set_offset_tics(this, x) Sets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to offset the tics; else, set to false. procedure, public :: set_show_tic_labels => pa_set_show_tic_labels private subroutine pa_set_show_tic_labels(this, x) Sets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to show tic labels; else, set to false. procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment private subroutine pa_set_tic_label_alignment(this, x) Sets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: set_tic_label_angle => pa_set_tic_label_angle private subroutine pa_set_tic_label_angle(this, x) Sets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The tic label angle, in degrees. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin private subroutine pa_set_tic_rotation_origin(this, x) Sets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset private subroutine pa_set_tic_x_offset(this, x) Sets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label x-offset, in characters. procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset private subroutine pa_set_tic_y_offset(this, x) Sets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label y-offset, in characters. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_title_x_offset => pa_set_title_x_offset private subroutine pa_set_title_x_offset(this, x) Sets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title x-offset, in characters. procedure, public :: set_title_y_offset => pa_set_title_y_offset private subroutine pa_set_title_y_offset(this, x) Sets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title y-offset, in characters. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\plot_axis.html"},{"title":"x_axis – FPLOT ","text":"type, public, extends( plot_axis ) :: x_axis Defines an x-axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_offset_tics get_show_tic_labels get_tic_label_alignment get_tic_label_angle get_tic_label_format get_tic_label_rotation_origin get_tic_label_x_offset get_tic_label_y_offset get_title get_title_x_offset get_title_y_offset get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_offset_tics set_show_tic_labels set_tic_label_alignment set_tic_label_angle set_tic_label_format set_tic_label_rotation_origin set_tic_label_x_offset set_tic_label_y_offset set_title set_title_x_offset set_title_y_offset set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_id_string => xa_get_id private function xa_get_id(this) result(x) Gets the axis identification string. Arguments Type Intent Optional Attributes Name class( x_axis ), intent(in) :: this The x_axis object. Return Value character(len=:), allocatable The identification string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_offset_tics => pa_get_offset_tics private pure function pa_get_offset_tics(this) result(x) Gets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to offset the tics; else, set to false. procedure, public :: get_show_tic_labels => pa_get_show_tic_labels private pure function pa_get_show_tic_labels(this) result(x) Gets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to show tic labels; else, set to false. procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment private pure function pa_get_tic_label_alignment(this) result(x) Gets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: get_tic_label_angle => pa_get_tic_label_angle private pure function pa_get_tic_label_angle(this) result(x) Gets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The tic label angle, in degrees. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin private pure function pa_get_tic_rotation_origin(this) result(x) Gets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset private pure function pa_get_tic_x_offset(this) result(x) Gets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label x-offset, in characters. procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset private pure function pa_get_tic_y_offset(this) result(x) Gets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label y-offset, in characters. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_title_x_offset => pa_get_title_x_offset private pure function pa_get_title_x_offset(this) result(x) Gets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title x-offset, in characters. procedure, public :: get_title_y_offset => pa_get_title_y_offset private pure function pa_get_title_y_offset(this) result(x) Gets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title y-offset, in characters. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_offset_tics => pa_set_offset_tics private subroutine pa_set_offset_tics(this, x) Sets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to offset the tics; else, set to false. procedure, public :: set_show_tic_labels => pa_set_show_tic_labels private subroutine pa_set_show_tic_labels(this, x) Sets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to show tic labels; else, set to false. procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment private subroutine pa_set_tic_label_alignment(this, x) Sets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: set_tic_label_angle => pa_set_tic_label_angle private subroutine pa_set_tic_label_angle(this, x) Sets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The tic label angle, in degrees. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin private subroutine pa_set_tic_rotation_origin(this, x) Sets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset private subroutine pa_set_tic_x_offset(this, x) Sets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label x-offset, in characters. procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset private subroutine pa_set_tic_y_offset(this, x) Sets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label y-offset, in characters. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_title_x_offset => pa_set_title_x_offset private subroutine pa_set_title_x_offset(this, x) Sets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title x-offset, in characters. procedure, public :: set_title_y_offset => pa_set_title_y_offset private subroutine pa_set_title_y_offset(this, x) Sets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title y-offset, in characters. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\x_axis.html"},{"title":"y2_axis – FPLOT ","text":"type, public, extends( plot_axis ) :: y2_axis Defines a secondary y-axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_offset_tics get_show_tic_labels get_tic_label_alignment get_tic_label_angle get_tic_label_format get_tic_label_rotation_origin get_tic_label_x_offset get_tic_label_y_offset get_title get_title_x_offset get_title_y_offset get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_offset_tics set_show_tic_labels set_tic_label_alignment set_tic_label_angle set_tic_label_format set_tic_label_rotation_origin set_tic_label_x_offset set_tic_label_y_offset set_title set_title_x_offset set_title_y_offset set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_id_string => y2a_get_id private function y2a_get_id(this) result(x) Gets the axis identification string. Arguments Type Intent Optional Attributes Name class( y2_axis ), intent(in) :: this The y2_axis object. Return Value character(len=:), allocatable The identification string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_offset_tics => pa_get_offset_tics private pure function pa_get_offset_tics(this) result(x) Gets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to offset the tics; else, set to false. procedure, public :: get_show_tic_labels => pa_get_show_tic_labels private pure function pa_get_show_tic_labels(this) result(x) Gets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to show tic labels; else, set to false. procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment private pure function pa_get_tic_label_alignment(this) result(x) Gets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: get_tic_label_angle => pa_get_tic_label_angle private pure function pa_get_tic_label_angle(this) result(x) Gets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The tic label angle, in degrees. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin private pure function pa_get_tic_rotation_origin(this) result(x) Gets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset private pure function pa_get_tic_x_offset(this) result(x) Gets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label x-offset, in characters. procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset private pure function pa_get_tic_y_offset(this) result(x) Gets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label y-offset, in characters. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_title_x_offset => pa_get_title_x_offset private pure function pa_get_title_x_offset(this) result(x) Gets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title x-offset, in characters. procedure, public :: get_title_y_offset => pa_get_title_y_offset private pure function pa_get_title_y_offset(this) result(x) Gets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title y-offset, in characters. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_offset_tics => pa_set_offset_tics private subroutine pa_set_offset_tics(this, x) Sets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to offset the tics; else, set to false. procedure, public :: set_show_tic_labels => pa_set_show_tic_labels private subroutine pa_set_show_tic_labels(this, x) Sets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to show tic labels; else, set to false. procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment private subroutine pa_set_tic_label_alignment(this, x) Sets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: set_tic_label_angle => pa_set_tic_label_angle private subroutine pa_set_tic_label_angle(this, x) Sets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The tic label angle, in degrees. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin private subroutine pa_set_tic_rotation_origin(this, x) Sets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset private subroutine pa_set_tic_x_offset(this, x) Sets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label x-offset, in characters. procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset private subroutine pa_set_tic_y_offset(this, x) Sets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label y-offset, in characters. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_title_x_offset => pa_set_title_x_offset private subroutine pa_set_title_x_offset(this, x) Sets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title x-offset, in characters. procedure, public :: set_title_y_offset => pa_set_title_y_offset private subroutine pa_set_title_y_offset(this, x) Sets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title y-offset, in characters. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\y2_axis.html"},{"title":"y_axis – FPLOT ","text":"type, public, extends( plot_axis ) :: y_axis Defines a y-axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_offset_tics get_show_tic_labels get_tic_label_alignment get_tic_label_angle get_tic_label_format get_tic_label_rotation_origin get_tic_label_x_offset get_tic_label_y_offset get_title get_title_x_offset get_title_y_offset get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_offset_tics set_show_tic_labels set_tic_label_alignment set_tic_label_angle set_tic_label_format set_tic_label_rotation_origin set_tic_label_x_offset set_tic_label_y_offset set_title set_title_x_offset set_title_y_offset set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_id_string => ya_get_id private function ya_get_id(this) result(x) Gets the axis identification string. Arguments Type Intent Optional Attributes Name class( y_axis ), intent(in) :: this The y_axis object. Return Value character(len=:), allocatable The identification string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_offset_tics => pa_get_offset_tics private pure function pa_get_offset_tics(this) result(x) Gets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to offset the tics; else, set to false. procedure, public :: get_show_tic_labels => pa_get_show_tic_labels private pure function pa_get_show_tic_labels(this) result(x) Gets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to show tic labels; else, set to false. procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment private pure function pa_get_tic_label_alignment(this) result(x) Gets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: get_tic_label_angle => pa_get_tic_label_angle private pure function pa_get_tic_label_angle(this) result(x) Gets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The tic label angle, in degrees. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin private pure function pa_get_tic_rotation_origin(this) result(x) Gets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset private pure function pa_get_tic_x_offset(this) result(x) Gets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label x-offset, in characters. procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset private pure function pa_get_tic_y_offset(this) result(x) Gets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label y-offset, in characters. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_title_x_offset => pa_get_title_x_offset private pure function pa_get_title_x_offset(this) result(x) Gets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title x-offset, in characters. procedure, public :: get_title_y_offset => pa_get_title_y_offset private pure function pa_get_title_y_offset(this) result(x) Gets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title y-offset, in characters. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_offset_tics => pa_set_offset_tics private subroutine pa_set_offset_tics(this, x) Sets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to offset the tics; else, set to false. procedure, public :: set_show_tic_labels => pa_set_show_tic_labels private subroutine pa_set_show_tic_labels(this, x) Sets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to show tic labels; else, set to false. procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment private subroutine pa_set_tic_label_alignment(this, x) Sets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: set_tic_label_angle => pa_set_tic_label_angle private subroutine pa_set_tic_label_angle(this, x) Sets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The tic label angle, in degrees. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin private subroutine pa_set_tic_rotation_origin(this, x) Sets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset private subroutine pa_set_tic_x_offset(this, x) Sets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label x-offset, in characters. procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset private subroutine pa_set_tic_y_offset(this, x) Sets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label y-offset, in characters. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_title_x_offset => pa_set_title_x_offset private subroutine pa_set_title_x_offset(this, x) Sets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title x-offset, in characters. procedure, public :: set_title_y_offset => pa_set_title_y_offset private subroutine pa_set_title_y_offset(this, x) Sets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title y-offset, in characters. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\y_axis.html"},{"title":"z_axis – FPLOT ","text":"type, public, extends( plot_axis ) :: z_axis Defines a z-axis object. Contents Type-Bound Procedures get_autoscale get_command_string get_id_string get_is_log_scaled get_limits get_offset_tics get_show_tic_labels get_tic_label_alignment get_tic_label_angle get_tic_label_format get_tic_label_rotation_origin get_tic_label_x_offset get_tic_label_y_offset get_title get_title_x_offset get_title_y_offset get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width is_title_defined set_autoscale set_is_log_scaled set_limits set_offset_tics set_show_tic_labels set_tic_label_alignment set_tic_label_angle set_tic_label_format set_tic_label_rotation_origin set_tic_label_x_offset set_tic_label_y_offset set_title set_title_x_offset set_title_y_offset set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width Type-Bound Procedures procedure, public :: get_autoscale => pa_get_autoscale private pure function pa_get_autoscale(this) result(x) Gets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the axis should be automatically scaled; else, \nfalse. procedure, public :: get_command_string => pa_get_cmd_string private function pa_get_cmd_string(this) result(txt) Returns the appropriate GNUPLOT command string to define the\nplot_axis properties. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_id_string => za_get_id private function za_get_id(this) result(x) Gets the axis identification string. Arguments Type Intent Optional Attributes Name class( z_axis ), intent(in) :: this The z_axis object. Return Value character(len=:), allocatable The identification string. procedure, public :: get_is_log_scaled => pa_get_log_scale private pure function pa_get_log_scale(this) result(x) Gets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if log scaling is applied to the axis; else, false. procedure, public :: get_limits => pa_get_axis_limits private pure function pa_get_axis_limits(this) result(x) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real64), dimension(2) A two-element array containing the limits as follows:\n[lower, upper]. procedure, public :: get_offset_tics => pa_get_offset_tics private pure function pa_get_offset_tics(this) result(x) Gets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to offset the tics; else, set to false. procedure, public :: get_show_tic_labels => pa_get_show_tic_labels private pure function pa_get_show_tic_labels(this) result(x) Gets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to show tic labels; else, set to false. procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment private pure function pa_get_tic_label_alignment(this) result(x) Gets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: get_tic_label_angle => pa_get_tic_label_angle private pure function pa_get_tic_label_angle(this) result(x) Gets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The tic label angle, in degrees. procedure, public :: get_tic_label_format => pa_get_tic_label_fmt private pure function pa_get_tic_label_fmt(this) result(rst) Gets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label format string. procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin private pure function pa_get_tic_rotation_origin(this) result(x) Gets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset private pure function pa_get_tic_x_offset(this) result(x) Gets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label x-offset, in characters. procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset private pure function pa_get_tic_y_offset(this) result(x) Gets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The tic label y-offset, in characters. procedure, public :: get_title => pa_get_title private function pa_get_title(this) result(txt) Gets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The title. procedure, public :: get_title_x_offset => pa_get_title_x_offset private pure function pa_get_title_x_offset(this) result(x) Gets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title x-offset, in characters. procedure, public :: get_title_y_offset => pa_get_title_y_offset private pure function pa_get_title_y_offset(this) result(x) Gets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value integer(kind=int32) The axis title y-offset, in characters. procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) Gets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if the default tic label format will be used; else, \nfalse. procedure, public :: get_zero_axis => pa_get_zero_axis private pure function pa_get_zero_axis(this) result(x) Gets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true to draw as a zero axis; else, set to false. procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width private pure function pa_get_zero_axis_width(this) result(x) Gets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value real(kind=real32) The width of the line, in pixels. procedure, public :: is_title_defined => pa_has_title private pure function pa_has_title(this) result(x) Gets a value determining if a title has been defined for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value logical Returns true if a title has been defined; else, false. procedure, public :: set_autoscale => pa_set_autoscale private subroutine pa_set_autoscale(this, x) Sets a value determining if the axis should be automatically scaled\nto fit the data. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the axis should be automatically scaled; else, \nset to false. procedure, public :: set_is_log_scaled => pa_set_log_scale private subroutine pa_set_log_scale(this, x) Sets a logical value defining if the axis should be log scaled. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if log scaling is applied to the axis; else, false. procedure, public :: set_limits => pa_set_axis_limits private subroutine pa_set_axis_limits(this, lower, upper) Gets the axis display limits, assuming autoscaling is not\nactive for this axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real64), intent(in) :: lower The lower display limit. real(kind=real64), intent(in) :: upper The upper display limit. procedure, public :: set_offset_tics => pa_set_offset_tics private subroutine pa_set_offset_tics(this, x) Sets a value determining if the tics should be offset. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to offset the tics; else, set to false. procedure, public :: set_show_tic_labels => pa_set_show_tic_labels private subroutine pa_set_show_tic_labels(this, x) Sets a value determining if tic labels should be shown. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to show tic labels; else, set to false. procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment private subroutine pa_set_tic_label_alignment(this, x) Sets the tic label alignment. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label alignment. The tic label alignment must be one of \nthe following: GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_RIGHT procedure, public :: set_tic_label_angle => pa_set_tic_label_angle private subroutine pa_set_tic_label_angle(this, x) Sets the tic label angle, in degrees. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The tic label angle, in degrees. procedure, public :: set_tic_label_format => pa_set_tic_label_fmt private subroutine pa_set_tic_label_fmt(this, x) Sets the tic label format. The format string can be any format \nstring accepted by the C command 'printf.' Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label format string. procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin private subroutine pa_set_tic_rotation_origin(this, x) Sets the tic label rotation origin. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: x The tic label rotation origin. The tic label rotation origin\nmust be one of the following: GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_CENTER procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset private subroutine pa_set_tic_x_offset(this, x) Sets the tic label x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label x-offset, in characters. procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset private subroutine pa_set_tic_y_offset(this, x) Sets the tic label y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The tic label y-offset, in characters. procedure, public :: set_title => pa_set_title private subroutine pa_set_title(this, txt) Sets the axis title. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. character(len=*), intent(in) :: txt The title. procedure, public :: set_title_x_offset => pa_set_title_x_offset private subroutine pa_set_title_x_offset(this, x) Sets the axis title x-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title x-offset, in characters. procedure, public :: set_title_y_offset => pa_set_title_y_offset private subroutine pa_set_title_y_offset(this, x) Sets the axis title y-offset, in characters. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. integer(kind=int32), intent(in) :: x The axis title y-offset, in characters. procedure, public :: set_use_default_tic_label_format => pa_set_use_dft_tic_lbl_fmt private subroutine pa_set_use_dft_tic_lbl_fmt(this, x) Sets a value determining if the default tic label format will be \nused. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true if the default tic label format will be used; else, \nfalse. procedure, public :: set_zero_axis => pa_set_zero_axis private subroutine pa_set_zero_axis(this, x) Sets a value determining if the axis should be drawn through\nzero of opposing axes. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. logical, intent(in) :: x Set to true to draw as a zero axis; else, set to false. procedure, public :: set_zero_axis_line_width => pa_set_zero_axis_width private subroutine pa_set_zero_axis_width(this, x) Sets the width of the line used to represent the zero axis line, if \nactive. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(inout) :: this The plot_axis object. real(kind=real32), intent(in) :: x The width of the line, in pixels.","tags":"","loc":"type\\z_axis.html"},{"title":"plot_bar – FPLOT ","text":"type, public, extends( plot_2d ) :: plot_bar Defines a 2D plot tailored towards bar plotting. Contents Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_axis_equal get_bar_width get_bottom_margin get_colormap get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count get_left_margin get_legend get_right_margin get_show_colorbar get_show_gridlines get_square_axes get_terminal get_tics_inward get_title get_top_margin get_use_y2_axis get_x_axis get_y2_axis get_y_axis initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_axis_equal set_bar_width set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label set_left_margin set_right_margin set_show_colorbar set_show_gridlines set_square_axes set_tics_inward set_title set_top_margin set_use_y2_axis Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_bar_width => pb_get_bar_width private pure function pb_get_bar_width(this) result(x) Gets the bar width scaling factor. Arguments Type Intent Optional Attributes Name class( plot_bar ), intent(in) :: this The plot_bar object. Return Value real(kind=real32) The scaling factor. procedure, public :: get_bottom_margin => plt_get_bottom_margin private pure function plt_get_bottom_margin(this) result(x) Gets the bottom margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => pb_get_cmd private function pb_get_cmd(this) result(x) Gets the GNUPLOT commands required to draw the plot. Arguments Type Intent Optional Attributes Name class( plot_bar ), intent(in) :: this The plot_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_left_margin => plt_get_left_margin private pure function plt_get_left_margin(this) result(x) Gets the left margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_right_margin => plt_get_right_margin private pure function plt_get_right_margin(this) result(x) Gets the right margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_square_axes => p2d_get_square_axes private pure function p2d_get_square_axes(this) result(rst) Gets a logical flag determining if the axes size should be squared\noff. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value logical Returns true if the axes are to be sized to a square; else,\nfalse. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_top_margin => plt_get_top_margin private pure function plt_get_top_margin(this) result(x) Gets the top margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_use_y2_axis => p2d_get_use_y2 private pure function p2d_get_use_y2(this) result(x) Gets a flag determining if the secondary y-axis should be\ndisplayed. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value logical Returns true if the axis should be displayed; else, false. procedure, public :: get_x_axis => p2d_get_x_axis private function p2d_get_x_axis(this) result(ptr) Gets the x-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the x-axis object. procedure, public :: get_y2_axis => p2d_get_y2_axis private function p2d_get_y2_axis(this) result(ptr) Gets the secondary y-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the secondary y-axis object. procedure, public :: get_y_axis => p2d_get_y_axis private function p2d_get_y_axis(this) result(ptr) Gets the y-axis object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(in) :: this The plot_2d object. Return Value class( plot_axis ), pointer A pointer to the y-axis object. procedure, public :: initialize => p2d_init private subroutine p2d_init(this, term, fname, err) Initializes the plot_2d object. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_bar_width => pb_set_bar_width private subroutine pb_set_bar_width(this, x) Sets the bar width scaling factor. Arguments Type Intent Optional Attributes Name class( plot_bar ), intent(inout) :: this The plot_bar object. real(kind=real32), intent(in) :: x The scaling factor. The value must be in the set [0, 1]; else, the\nvalue will be shifted accordingly. procedure, public :: set_bottom_margin => plt_set_bottom_margin private subroutine plt_set_bottom_margin(this, x) Sets the bottom margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_left_margin => plt_set_left_margin private subroutine plt_set_left_margin(this, x) Sets the left margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_right_margin => plt_set_right_margin private subroutine plt_set_right_margin(this, x) Sets the right margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_square_axes => p2d_set_square_axes private subroutine p2d_set_square_axes(this, x) Sets a logical flag determining if the axes size should be\nsquared off. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. logical, intent(in) :: x Set to true if the axes are to be sized to a square; else,\nfalse. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_top_margin => plt_set_top_margin private subroutine plt_set_top_margin(this, x) Sets the top margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_use_y2_axis => p2d_set_use_y2 private subroutine p2d_set_use_y2(this, x) Sets a flag determining if the secondary y-axis should be\ndisplayed. Arguments Type Intent Optional Attributes Name class( plot_2d ), intent(inout) :: this The plot_2d object. logical, intent(in) :: x Set to true if the axis should be displayed; else, false.","tags":"","loc":"type\\plot_bar.html"},{"title":"plot_data – FPLOT ","text":"type, public, abstract, extends( plot_object ) :: plot_data A container for plot data. Contents Type-Bound Procedures get_command_string get_data_string get_name set_name Type-Bound Procedures procedure( get_string_result ), public, deferred :: get_command_string function get_string_result(this) result(x) Prototype Returns a string from a plot_object. Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:), allocatable The result string. procedure( pd_get_string_result ), public, deferred :: get_data_string function pd_get_string_result(this) result(x) Prototype Retrieves a string from a plot_data object. Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The string. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\plot_data.html"},{"title":"plot_data_colored – FPLOT ","text":"type, public, abstract, extends( plot_data ) :: plot_data_colored Defines a colored plot data set. Contents Type-Bound Procedures get_color_index get_command_string get_data_string get_line_color get_name set_color_index set_line_color set_name Type-Bound Procedures 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value integer(kind=int32) The index value. procedure( get_string_result ), public, deferred :: get_command_string function get_string_result(this) result(x) Prototype Returns a string from a plot_object. Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:), allocatable The result string. procedure( pd_get_string_result ), public, deferred :: get_data_string function pd_get_string_result(this) result(x) Prototype Retrieves a string from a plot_data object. Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The string. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\plot_data_colored.html"},{"title":"scatter_plot_data – FPLOT ","text":"type, public, abstract, extends( plot_data_colored ) :: scatter_plot_data A plot_data object for describing scatter plot data sets. Contents Type-Bound Procedures get_axes_string get_color_index get_command_string get_count get_data_string get_draw_line get_draw_markers get_fill_curve get_line_color get_line_style get_line_width get_marker_frequency get_marker_scaling get_marker_style get_name get_simplification_factor get_simplify_data get_use_data_dependent_colors get_use_variable_size_points get_x get_y set_color_index set_draw_line set_draw_markers set_fill_curve set_line_color set_line_style set_line_width set_marker_frequency set_marker_scaling set_marker_style set_name set_simplification_factor set_simplify_data set_use_data_dependent_colors set_use_variable_size_points set_x set_y Type-Bound Procedures procedure( spd_get_string_result ), public, deferred :: get_axes_string function spd_get_string_result(this) result(x) Prototype Gets a string value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The string. 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 Intent Optional 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 => spd_get_cmd private function spd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nscatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The command string. procedure( spd_get_int_value ), public, deferred :: get_count pure function spd_get_int_value(this) result(x) Prototype Gets an integer value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The value. procedure( pd_get_string_result ), public, deferred :: get_data_string function pd_get_string_result(this) result(x) Prototype Retrieves a string from a plot_data object. Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The string. procedure, public :: get_draw_line => spd_get_draw_line private pure function spd_get_draw_line(this) result(x) Gets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the line should be drawn; else, false. procedure, public :: get_draw_markers => spd_get_draw_markers private pure function spd_get_draw_markers(this) result(x) Gets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the markers should be drawn; else, false. procedure, public :: get_fill_curve => spd_get_filled private pure function spd_get_filled(this) result(rst) Gets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the curve should be filled; else, false. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. procedure, public :: get_line_style => spd_get_line_style private pure function spd_get_line_style(this) result(x) Gets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: get_line_width => spd_get_line_width private pure function spd_get_line_width(this) result(x) Gets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The line width. procedure, public :: get_marker_frequency => spd_get_marker_frequency private pure function spd_get_marker_frequency(this) result(x) Gets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker frequency. procedure, public :: get_marker_scaling => spd_get_marker_scaling private pure function spd_get_marker_scaling(this) result(x) Gets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The scaling factor. procedure, public :: get_marker_style => spd_get_marker_style private pure function spd_get_marker_style(this) result(x) Gets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_simplification_factor => spd_get_simplify_factor private pure function spd_get_simplify_factor(this) result(x) Gets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real64) The scaling factor. procedure, public :: get_simplify_data => spd_get_simplify_data private pure function spd_get_simplify_data(this) result(x) Gets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: get_use_data_dependent_colors => spd_get_data_dependent_colors private pure function spd_get_data_dependent_colors(this) result(rst) Gets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if data-dependent colors should be used; else, false. procedure, public :: get_use_variable_size_points => spd_get_use_var_point_size private pure function spd_get_use_var_point_size(this) result(rst) Gets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if variable size points should be used; else, false. procedure( spd_get_value ), public, deferred :: get_x pure function spd_get_value(this, index) result(x) Prototype Gets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. Return Value real(kind=real64) The value. procedure( spd_get_value ), public, deferred :: get_y pure function spd_get_value(this, index) result(x) Prototype Gets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. Return Value real(kind=real64) The value. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line => spd_set_draw_line private subroutine spd_set_draw_line(this, x) Sets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the line should be drawn; else, false. procedure, public :: set_draw_markers => spd_set_draw_markers private subroutine spd_set_draw_markers(this, x) Sets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the markers should be drawn; else, false. procedure, public :: set_fill_curve => spd_set_filled private subroutine spd_set_filled(this, x) Sets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the curve should be filled; else, false. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional Attributes Name class( plot_data_colored ), intent(inout) :: this The plot_data_colored object. type( color ), intent(in) :: x The color. procedure, public :: set_line_style => spd_set_line_style private subroutine spd_set_line_style(this, x) Sets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: set_line_width => spd_set_line_width private subroutine spd_set_line_width(this, x) Sets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The line width. procedure, public :: set_marker_frequency => spd_set_marker_frequency private subroutine spd_set_marker_frequency(this, x) Sets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker frequency. procedure, public :: set_marker_scaling => spd_set_marker_scaling private subroutine spd_set_marker_scaling(this, x) Sets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The scaling factor. procedure, public :: set_marker_style => spd_set_marker_style private subroutine spd_set_marker_style(this, x) Sets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_simplification_factor => spd_set_simplify_factor private subroutine spd_set_simplify_factor(this, x) Sets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real64), intent(in) :: x The scaling factor. procedure, public :: set_simplify_data => spd_set_simplify_data private subroutine spd_set_simplify_data(this, x) Sets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: set_use_data_dependent_colors => spd_set_data_dependent_colors private subroutine spd_set_data_dependent_colors(this, x) Sets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if data-dependent colors should be used; else, false. procedure, public :: set_use_variable_size_points => spd_set_use_var_point_size private subroutine spd_set_use_var_point_size(this, x) Sets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if variable size points should be used; else, false. procedure( spd_set_value ), public, deferred :: set_x subroutine spd_set_value(this, index, x) Prototype Sets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. real(kind=real64), intent(in) :: x The value. procedure( spd_set_value ), public, deferred :: set_y subroutine spd_set_value(this, index, x) Prototype Sets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. real(kind=real64), intent(in) :: x The value.","tags":"","loc":"type\\scatter_plot_data.html"},{"title":"plot_data_2d – FPLOT ","text":"type, public, extends( scatter_plot_data ) :: plot_data_2d Defines a two-dimensional plot data set. Contents Type-Bound Procedures define_data get_axes_string get_color_data get_color_index get_command_string get_count get_data_string get_draw_against_y2 get_draw_line get_draw_markers get_fill_curve get_line_color get_line_style get_line_width get_marker_frequency get_marker_scaling get_marker_style get_name get_point_size_data get_simplification_factor get_simplify_data get_use_data_dependent_colors get_use_variable_size_points get_x get_x_data get_y get_y_data pd2d_set_data_1 pd2d_set_data_2 set_color_index set_draw_against_y2 set_draw_line set_draw_markers set_fill_curve set_line_color set_line_style set_line_width set_marker_frequency set_marker_scaling set_marker_style set_name set_simplification_factor set_simplify_data set_use_data_dependent_colors set_use_variable_size_points set_x set_y Type-Bound Procedures generic, public :: define_data => pd2d_set_data_1 , pd2d_set_data_2 private subroutine pd2d_set_data_1(this, x, y, c, ps, err) Defines the data set to plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinate data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinate data. real(kind=real64), intent(in), optional, dimension(:) :: c An N-element array defining how color should vary with the \ncurrent colormap for each value. real(kind=real64), intent(in), optional, dimension(:) :: ps An N-element array defining the size of each data point. class(errors), intent(inout), optional, target :: err An error-handling object. private subroutine pd2d_set_data_2(this, y, err) Defines the data set to plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinate data. This\ndata will be plotted against its own index. class(errors), intent(inout), optional, target :: err An error-handling object. procedure, public :: get_axes_string => pd2d_get_axes_cmd private function pd2d_get_axes_cmd(this) result(x) Gets the GNUPLOT command string defining which axes the data\nis to be plotted against. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_color_data => pd2d_get_c_array private function pd2d_get_c_array(this) result(x) Gets the stored color scaling data array. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. 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 Intent Optional 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 => spd_get_cmd private function spd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nscatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pd2d_get_data_count private pure function pd2d_get_data_count(this) result(x) Gets the number of data points. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value integer(kind=int32) The number of data points. procedure, public :: get_data_string => pd2d_get_data_cmd private function pd2d_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data\nto plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_against_y2 => pd2d_get_draw_against_y2 private pure function pd2d_get_draw_against_y2(this) result(x) Gets a value determining if the data should be plotted against\nthe secondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value logical Returns true if the data should be plotted against the secondary\ny-axis; else, false to plot against the primary y-axis. procedure, public :: get_draw_line => spd_get_draw_line private pure function spd_get_draw_line(this) result(x) Gets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the line should be drawn; else, false. procedure, public :: get_draw_markers => spd_get_draw_markers private pure function spd_get_draw_markers(this) result(x) Gets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the markers should be drawn; else, false. procedure, public :: get_fill_curve => spd_get_filled private pure function spd_get_filled(this) result(rst) Gets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the curve should be filled; else, false. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. procedure, public :: get_line_style => spd_get_line_style private pure function spd_get_line_style(this) result(x) Gets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: get_line_width => spd_get_line_width private pure function spd_get_line_width(this) result(x) Gets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The line width. procedure, public :: get_marker_frequency => spd_get_marker_frequency private pure function spd_get_marker_frequency(this) result(x) Gets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker frequency. procedure, public :: get_marker_scaling => spd_get_marker_scaling private pure function spd_get_marker_scaling(this) result(x) Gets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The scaling factor. procedure, public :: get_marker_style => spd_get_marker_style private pure function spd_get_marker_style(this) result(x) Gets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_point_size_data => pd2d_get_ps_array private function pd2d_get_ps_array(this) result(x) Gets the stored point size data array. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_simplification_factor => spd_get_simplify_factor private pure function spd_get_simplify_factor(this) result(x) Gets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real64) The scaling factor. procedure, public :: get_simplify_data => spd_get_simplify_data private pure function spd_get_simplify_data(this) result(x) Gets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: get_use_data_dependent_colors => spd_get_data_dependent_colors private pure function spd_get_data_dependent_colors(this) result(rst) Gets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if data-dependent colors should be used; else, false. procedure, public :: get_use_variable_size_points => spd_get_use_var_point_size private pure function spd_get_use_var_point_size(this) result(rst) Gets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if variable size points should be used; else, false. procedure, public :: get_x => pd2d_get_x_data private pure function pd2d_get_x_data(this, index) result(x) Gets the requested X data point. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_x_data => pd2d_get_x_array private function pd2d_get_x_array(this) result(x) Gets the stored X data array. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_y => pd2d_get_y_data private pure function pd2d_get_y_data(this, index) result(x) Gets the requested Y data point. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_y_data => pd2d_get_y_array private function pd2d_get_y_array(this) result(x) Gets the stored Y data array. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(in) :: this The plot_data_2d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public, :: pd2d_set_data_1 private subroutine pd2d_set_data_1(this, x, y, c, ps, err) Defines the data set to plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinate data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinate data. real(kind=real64), intent(in), optional, dimension(:) :: c An N-element array defining how color should vary with the \ncurrent colormap for each value. real(kind=real64), intent(in), optional, dimension(:) :: ps An N-element array defining the size of each data point. class(errors), intent(inout), optional, target :: err An error-handling object. procedure, public, :: pd2d_set_data_2 private subroutine pd2d_set_data_2(this, y, err) Defines the data set to plot. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinate data. This\ndata will be plotted against its own index. class(errors), intent(inout), optional, target :: err An error-handling object. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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 => pd2d_set_draw_against_y2 private subroutine pd2d_set_draw_against_y2(this, x) Sets a value determining if the data should be plotted against\nthe secondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. logical, intent(in) :: x Set to true if the data should be plotted against the\nsecondary y-axis; else, false to plot against the primary y-axis. procedure, public :: set_draw_line => spd_set_draw_line private subroutine spd_set_draw_line(this, x) Sets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the line should be drawn; else, false. procedure, public :: set_draw_markers => spd_set_draw_markers private subroutine spd_set_draw_markers(this, x) Sets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the markers should be drawn; else, false. procedure, public :: set_fill_curve => spd_set_filled private subroutine spd_set_filled(this, x) Sets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the curve should be filled; else, false. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional Attributes Name class( plot_data_colored ), intent(inout) :: this The plot_data_colored object. type( color ), intent(in) :: x The color. procedure, public :: set_line_style => spd_set_line_style private subroutine spd_set_line_style(this, x) Sets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: set_line_width => spd_set_line_width private subroutine spd_set_line_width(this, x) Sets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The line width. procedure, public :: set_marker_frequency => spd_set_marker_frequency private subroutine spd_set_marker_frequency(this, x) Sets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker frequency. procedure, public :: set_marker_scaling => spd_set_marker_scaling private subroutine spd_set_marker_scaling(this, x) Sets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The scaling factor. procedure, public :: set_marker_style => spd_set_marker_style private subroutine spd_set_marker_style(this, x) Sets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_simplification_factor => spd_set_simplify_factor private subroutine spd_set_simplify_factor(this, x) Sets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real64), intent(in) :: x The scaling factor. procedure, public :: set_simplify_data => spd_set_simplify_data private subroutine spd_set_simplify_data(this, x) Sets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: set_use_data_dependent_colors => spd_set_data_dependent_colors private subroutine spd_set_data_dependent_colors(this, x) Sets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if data-dependent colors should be used; else, false. procedure, public :: set_use_variable_size_points => spd_set_use_var_point_size private subroutine spd_set_use_var_point_size(this, x) Sets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if variable size points should be used; else, false. procedure, public :: set_x => pd2d_set_x_data private subroutine pd2d_set_x_data(this, index, x) Sets the requested X data point. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point. procedure, public :: set_y => pd2d_set_y_data private subroutine pd2d_set_y_data(this, index, x) Sets the requested Y data point. Arguments Type Intent Optional Attributes Name class( plot_data_2d ), intent(inout) :: this The plot_data_2d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point.","tags":"","loc":"type\\plot_data_2d.html"},{"title":"plot_data_3d – FPLOT ","text":"type, public, extends( scatter_plot_data ) :: plot_data_3d Defines a three-dimensional plot data set. Contents Type-Bound Procedures define_data get_axes_string get_color_data get_color_index get_command_string get_count get_data_string get_draw_line get_draw_markers get_fill_curve get_line_color get_line_style get_line_width get_marker_frequency get_marker_scaling get_marker_style get_name get_point_size_data get_simplification_factor get_simplify_data get_use_data_dependent_colors get_use_variable_size_points get_x get_x_data get_y get_y_data get_z get_z_data set_color_index set_draw_line set_draw_markers set_fill_curve set_line_color set_line_style set_line_width set_marker_frequency set_marker_scaling set_marker_style set_name set_simplification_factor set_simplify_data set_use_data_dependent_colors set_use_variable_size_points set_x set_y set_z Type-Bound Procedures procedure, public :: define_data => pd3d_set_data_1 private subroutine pd3d_set_data_1(this, x, y, z, c, ps, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(inout) :: this The plot_data_3d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinate data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinate data. real(kind=real64), intent(in), dimension(:) :: z An N-element array containing the z coordinate data. real(kind=real64), intent(in), optional, dimension(:) :: c An N-element array defining how color should vary with the \ncurrent colormap for each value. real(kind=real64), intent(in), optional, dimension(:) :: ps An N-element array defining the size of each data point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get_axes_string => pd3d_get_axes_cmd private function pd3d_get_axes_cmd(this) result(x) Gets the GNUPLOT command string defining which axes the data\nis to be plotted against. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_color_data => pd3d_get_c_array private function pd3d_get_c_array(this) result(x) Gets the stored color scaling data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. 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 Intent Optional 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 => spd_get_cmd private function spd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nscatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pd3d_get_data_count private pure function pd3d_get_data_count(this) result(x) Gets the number of data points. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value integer(kind=int32) The number of data points. procedure, public :: get_data_string => pd3d_get_data_cmd private function pd3d_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data to plot. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_line => spd_get_draw_line private pure function spd_get_draw_line(this) result(x) Gets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the line should be drawn; else, false. procedure, public :: get_draw_markers => spd_get_draw_markers private pure function spd_get_draw_markers(this) result(x) Gets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical Returns true if the markers should be drawn; else, false. procedure, public :: get_fill_curve => spd_get_filled private pure function spd_get_filled(this) result(rst) Gets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the curve should be filled; else, false. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. procedure, public :: get_line_style => spd_get_line_style private pure function spd_get_line_style(this) result(x) Gets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: get_line_width => spd_get_line_width private pure function spd_get_line_width(this) result(x) Gets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The line width. procedure, public :: get_marker_frequency => spd_get_marker_frequency private pure function spd_get_marker_frequency(this) result(x) Gets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker frequency. procedure, public :: get_marker_scaling => spd_get_marker_scaling private pure function spd_get_marker_scaling(this) result(x) Gets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real32) The scaling factor. procedure, public :: get_marker_style => spd_get_marker_style private pure function spd_get_marker_style(this) result(x) Gets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_point_size_data => pd3d_get_c_array private function pd3d_get_c_array(this) result(x) Gets the stored color scaling data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_simplification_factor => spd_get_simplify_factor private pure function spd_get_simplify_factor(this) result(x) Gets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value real(kind=real64) The scaling factor. procedure, public :: get_simplify_data => spd_get_simplify_data private pure function spd_get_simplify_data(this) result(x) Gets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: get_use_data_dependent_colors => spd_get_data_dependent_colors private pure function spd_get_data_dependent_colors(this) result(rst) Gets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if data-dependent colors should be used; else, false. procedure, public :: get_use_variable_size_points => spd_get_use_var_point_size private pure function spd_get_use_var_point_size(this) result(rst) Gets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value logical True if variable size points should be used; else, false. procedure, public :: get_x => pd3d_get_x_data private pure function pd3d_get_x_data(this, index) result(x) Gets the requested X data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_x_data => pd3d_get_x_array private function pd3d_get_x_array(this) result(x) Gets the stored X data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_y => pd3d_get_y_data private pure function pd3d_get_y_data(this, index) result(x) Gets the requested Y data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_y_data => pd3d_get_y_array private function pd3d_get_y_array(this) result(x) Gets the stored Y data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: get_z => pd3d_get_z_data private pure function pd3d_get_z_data(this, index) result(x) Gets the requested Z data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to retrieve. Return Value real(kind=real64) The requested data point. procedure, public :: get_z_data => pd3d_get_z_array private function pd3d_get_z_array(this) result(x) Gets the stored Z data array. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(in) :: this The plot_data_3d object. Return Value real(kind=real64), allocatable, dimension(:) A copy of the stored data array. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line => spd_set_draw_line private subroutine spd_set_draw_line(this, x) Sets a value determining if a line should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the line should be drawn; else, false. procedure, public :: set_draw_markers => spd_set_draw_markers private subroutine spd_set_draw_markers(this, x) Sets a value determining if data point markers should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x Set to true if the markers should be drawn; else, false. procedure, public :: set_fill_curve => spd_set_filled private subroutine spd_set_filled(this, x) Sets a logical value determining if a filled curve should be drawn. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the curve should be filled; else, false. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional Attributes Name class( plot_data_colored ), intent(inout) :: this The plot_data_colored object. type( color ), intent(in) :: x The color. procedure, public :: set_line_style => spd_set_line_style private subroutine spd_set_line_style(this, x) Sets the line style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The line style. The line style must be one of the following. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: set_line_width => spd_set_line_width private subroutine spd_set_line_width(this, x) Sets the width of the line, in pixels. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The line width. procedure, public :: set_marker_frequency => spd_set_marker_frequency private subroutine spd_set_marker_frequency(this, x) Sets the marker frequency. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker frequency. procedure, public :: set_marker_scaling => spd_set_marker_scaling private subroutine spd_set_marker_scaling(this, x) Sets the marker scaling. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real32), intent(in) :: x The scaling factor. procedure, public :: set_marker_style => spd_set_marker_style private subroutine spd_set_marker_style(this, x) Sets the marker style. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: x The marker type. The marker type must be one of the following: MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_simplification_factor => spd_set_simplify_factor private subroutine spd_set_simplify_factor(this, x) Sets a factor used to establish the simplification tolerance. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. real(kind=real64), intent(in) :: x The scaling factor. procedure, public :: set_simplify_data => spd_set_simplify_data private subroutine spd_set_simplify_data(this, x) Sets a value determining if the stored data should be\nsimplified (reduced) before passing to GNUPLOT. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if the data should be simplified prior to sending\nto GNUPLOT; else, false to leave the data alone. procedure, public :: set_use_data_dependent_colors => spd_set_data_dependent_colors private subroutine spd_set_data_dependent_colors(this, x) Sets a value determing if data-dependent colors should be used. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if data-dependent colors should be used; else, false. procedure, public :: set_use_variable_size_points => spd_set_use_var_point_size private subroutine spd_set_use_var_point_size(this, x) Sets a logical value determining if variable sized data points\nshould be used. The default is false, such that points will be of\na constant size. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. logical, intent(in) :: x True if variable size points should be used; else, false. procedure, public :: set_x => pd3d_set_x_data private subroutine pd3d_set_x_data(this, index, x) Sets the requested X data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(inout) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point. procedure, public :: set_y => pd3d_set_y_data private subroutine pd3d_set_y_data(this, index, x) Sets the requested Y data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(inout) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point. procedure, public :: set_z => pd3d_set_z_data private subroutine pd3d_set_z_data(this, index, x) Sets the requested Z data point. Arguments Type Intent Optional Attributes Name class( plot_data_3d ), intent(inout) :: this The plot_data_3d object. integer(kind=int32), intent(in) :: index The index of the data point to replace. real(kind=real64), intent(in) :: x The data point.","tags":"","loc":"type\\plot_data_3d.html"},{"title":"plot_data_bar – FPLOT ","text":"type, public, extends( plot_data_colored ) :: plot_data_bar Defines a data set tailored to bar charts. Contents Type-Bound Procedures define_data get get_axes_string get_bar_per_label_count get_color_index get_command_string get_count get_data get_data_string get_draw_against_y2 get_is_filled get_label get_line_color get_name get_transparency get_use_labels set set_color_index set_data_1 set_data_2 set_data_3 set_draw_against_y2 set_is_filled set_label set_line_color set_name set_transparency set_use_labels Type-Bound Procedures generic, public :: define_data => pdb_set_data_1, pdb_set_data_2, pdb_set_data_3 private subroutine pdb_set_data_1(this, x, err) Defines a single data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: x The data to plot. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pdb_set_data_2(this, labels, x, err) Defines data along with associated axis labels. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. class(string), intent(in), dimension(:) :: labels The axis labels to associate with the data. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pdb_set_data_3(this, labels, x, fmt, err) Defines data along with labels and formatting information. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: labels The axis labels to associate with the data. real(kind=real64), intent(in), dimension(:) :: x The data set. character(len=*), intent(in), optional :: fmt The format string for the labels (e.g. '(I0)', etc.). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get => pdb_get_data private pure function pdb_get_data(this, index, col) result(x) Gets the requested data point. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The data point index. integer(kind=int32), intent(in) :: col The column index. Return Value real(kind=real64) The value. procedure, public :: get_axes_string => pdb_get_axes_cmd private function pdb_get_axes_cmd(this) result(x) Gets the GNUPLOT command defining which axes to plot against. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_bar_per_label_count => pdb_get_col_count private pure function pdb_get_col_count(this) result(x) Gets the number of data sets (columns). Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value integer(kind=int32) The 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 Intent Optional 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 => pdb_get_cmd private function pdb_get_cmd(this) result(x) Gets the GNUPLOT command string for this object. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pdb_get_count private pure function pdb_get_count(this) result(x) Gets the number of stored data points. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value integer(kind=int32) The number of stored data points. procedure, public :: get_data => pdb_get_data_set private pure function pdb_get_data_set(this, col) result(x) Gets the requested data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: col The column index. Return Value real(kind=real64), allocatable, dimension(:) A copy of the data set. procedure, public :: get_data_string => pdb_get_data_cmd private function pdb_get_data_cmd(this) result(x) Gets the GNUPLOT command string defining the data for this object. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_draw_against_y2 => pdb_get_use_y2 private pure function pdb_get_use_y2(this) result(x) Gets a value determining if the data should be plotted against a\nsecondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true to plot against a secondary y-axis; else, false. procedure, public :: get_is_filled => pdb_get_is_filled private pure function pdb_get_is_filled(this) result(x) Gets a value determining if each bar is filled. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true if the bars are to be filled; else, false. procedure, public :: get_label => pdb_get_label private pure function pdb_get_label(this, index) result(x) Gets the axis label associated with a specific data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The index of the data set. Return Value character(len=:), allocatable The label. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_transparency => pdb_get_alpha private pure function pdb_get_alpha(this) result(x) Gets the alpha (transparency) for the bar color. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value real(kind=real32) The alpha value ([0, 1]). procedure, public :: get_use_labels => pdb_get_use_labels private pure function pdb_get_use_labels(this) result(x) Gets a value determining if labels are used to identify the data. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(in) :: this The plot_data_bar object. Return Value logical Returns true if labels are used; else, false. procedure, public :: set => pdb_set_data private subroutine pdb_set_data(this, index, col, x) Replaces the requested data point. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. integer(kind=int32), intent(in) :: index The data point index. integer(kind=int32), intent(in) :: col The column index. real(kind=real64), intent(in) :: x The new value. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_data_1 => pdb_set_data_1_core private subroutine pdb_set_data_1_core(this, x, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_data_2 => pdb_set_data_2_core private subroutine pdb_set_data_2_core(this, labels, x, err) Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. class(string), intent(in), dimension(:) :: labels The axis labels. real(kind=real64), intent(in), dimension(:) :: x The data set. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_data_3 => pdb_set_data_3_core private subroutine pdb_set_data_3_core(this, labels, x, fmt, err) Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real64), intent(in), dimension(:) :: labels The axis labels. real(kind=real64), intent(in), dimension(:) :: x The data set. character(len=*), intent(in), optional :: fmt The format string for the labels (e.g. '(I0)', etc.). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_draw_against_y2 => pdb_set_use_y2 private subroutine pdb_set_use_y2(this, x) Sets a value determining if the data should be plotted against a\nsecondary y-axis. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true to plot against a secondary y-axis; else, false. procedure, public :: set_is_filled => pdb_set_is_filled private subroutine pdb_set_is_filled(this, x) Sets a value determining if each bar is filled. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true if the bars are to be filled; else, false. procedure, public :: set_label => pdb_set_label private subroutine pdb_set_label(this, index, txt) Sets the axis label for a specific data set. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. integer(kind=int32) :: index The index of the data set. character(len=*), intent(in) :: txt The label. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_transparency => pdb_set_alpha private subroutine pdb_set_alpha(this, x) Gets the alpha (transparency) for the bar color. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. real(kind=real32), intent(in) :: x The alpha value ([0, 1]). procedure, public :: set_use_labels => pdb_set_use_labels private subroutine pdb_set_use_labels(this, x) Sets a value determining if labels are used to identify the data. Arguments Type Intent Optional Attributes Name class( plot_data_bar ), intent(inout) :: this The plot_data_bar object. logical, intent(in) :: x Set to true if labels are used; else, false.","tags":"","loc":"type\\plot_data_bar.html"},{"title":"plot_data_error_bars – FPLOT ","text":"type, public, extends( plot_data_colored ) :: plot_data_error_bars Defines a 2D error-bar based data set. Contents Type-Bound Procedures define_x_error_data define_xy_error_data define_y_error_data get_color_index get_command_string get_count get_data_string get_line_color get_name get_plot_x_error_bars get_plot_y_error_bars get_use_error_box get_use_range pde_define_x_err pde_define_x_err_lim pde_define_xy_err pde_define_xy_err_lim pde_define_y_err pde_define_y_err_lim set_color_index set_line_color set_name set_use_error_box Type-Bound Procedures generic, public :: define_x_error_data => pde_define_x_err , pde_define_x_err_lim private subroutine pde_define_x_err(this, x, y, xerr, err) Defines the x error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xerr An N-element array containing the x errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pde_define_x_err_lim(this, x, y, xmin, xmax, err) Defines the x error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xmin An N-element array containing the minimum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: xmax An N-element array containing the maximum x values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. generic, public :: define_xy_error_data => pde_define_xy_err , pde_define_xy_err_lim private subroutine pde_define_xy_err(this, x, y, xerr, yerr, err) Defines x and y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xerr An N-element array containing the x errors at each data point. real(kind=real64), intent(in), dimension(:) :: yerr An N-element array containing the y errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pde_define_xy_err_lim(this, x, y, xmin, xmax, ymin, ymax, err) Defines the x and y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xmin An N-element array containing the minimum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: xmax An N-element array containing the maximum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymin An N-element array containing the minimum y values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymax An N-element array containing the maximum x values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. generic, public :: define_y_error_data => pde_define_y_err , pde_define_y_err_lim private subroutine pde_define_y_err(this, x, y, yerr, err) Defines the y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: yerr An N-element array containing the y errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. private subroutine pde_define_y_err_lim(this, x, y, ymin, ymax, err) Defines the y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: ymin An N-element array containing the minimum y values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymax An N-element array containing the maximum y values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. 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 Intent Optional 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 => pde_get_cmd private function pde_get_cmd(this) result(cmd) Gets the appropriate GNUPLOT command string for the object. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => pde_get_count private pure function pde_get_count(this) result(x) Gets the number of stored data points. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value integer(kind=int32) The number of data points. procedure, public :: get_data_string => pde_get_data_cmd private function pde_get_data_cmd(this) result(cmd) Gets the appropriate GNUPLOT commands to plot the data itself. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value character(len=:), allocatable The command string. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_plot_x_error_bars => pde_get_plot_x_err private pure function pde_get_plot_x_err(this) result(x) Checks to see if the x error bar data has been defined, and as\na result, if the x error data is to be plotted. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value logical Returns true if the x error bars are to be plotted; else, false. procedure, public :: get_plot_y_error_bars => pde_get_plot_y_err private pure function pde_get_plot_y_err(this) result(x) Checks to see if the y error bar data has been defined, and as\na result, if the x error data is to be plotted. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value logical Returns true if the y error bars are to be plotted; else, false. procedure, public :: get_use_error_box => pde_get_box private pure function pde_get_box(this) result(x) Checks to see if the x and y error boxes should be utilized. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value logical Returns true if the error boxes are to be plotted; else,\nfalse. Notice, the error boxes are only utilized if there is \nboth x and y error data defined, regardless of the value of this \nproperty. procedure, public :: get_use_range => pde_get_use_range private pure function pde_get_use_range(this) result(x) Gets a value determining if a defined range is being used\nto define the error bar extremes. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(in) :: this The plot_data_error_bars object. Return Value logical True if a defined range is being used; else, false. procedure, public, :: pde_define_x_err private subroutine pde_define_x_err(this, x, y, xerr, err) Defines the x error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xerr An N-element array containing the x errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_x_err_lim private subroutine pde_define_x_err_lim(this, x, y, xmin, xmax, err) Defines the x error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xmin An N-element array containing the minimum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: xmax An N-element array containing the maximum x values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_xy_err private subroutine pde_define_xy_err(this, x, y, xerr, yerr, err) Defines x and y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xerr An N-element array containing the x errors at each data point. real(kind=real64), intent(in), dimension(:) :: yerr An N-element array containing the y errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_xy_err_lim private subroutine pde_define_xy_err_lim(this, x, y, xmin, xmax, ymin, ymax, err) Defines the x and y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: xmin An N-element array containing the minimum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: xmax An N-element array containing the maximum x values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymin An N-element array containing the minimum y values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymax An N-element array containing the maximum x values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_y_err private subroutine pde_define_y_err(this, x, y, yerr, err) Defines the y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: yerr An N-element array containing the y errors at each data point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public, :: pde_define_y_err_lim private subroutine pde_define_y_err_lim(this, x, y, ymin, ymax, err) Defines the y error data. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x coordinates of the data. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y coordinates of the data. real(kind=real64), intent(in), dimension(:) :: ymin An N-element array containing the minimum y values at each data \npoint. real(kind=real64), intent(in), dimension(:) :: ymax An N-element array containing the maximum y values at each data \npoint. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_use_error_box => pde_set_box private subroutine pde_set_box(this, x) Deterimines if the x and y error boxes should be utilized. Arguments Type Intent Optional Attributes Name class( plot_data_error_bars ), intent(inout) :: this The plot_data_error_bars object. logical, intent(in) :: x Set to true if the error boxes are to be plotted; else,\nfalse. Notice, the error boxes are only utilized if there is \nboth x and y error data defined, regardless of the value of this \nproperty.","tags":"","loc":"type\\plot_data_error_bars.html"},{"title":"plot_data_histogram – FPLOT ","text":"type, public, extends( plot_data_colored ) :: plot_data_histogram A container for plotting data in the form of a histogram. Contents Type-Bound Procedures define_data get get_axes_string get_bin_count get_color_index get_command_string get_data_string get_draw_against_y2 get_is_filled get_line_color get_maximum_value get_minimum_value get_name set_bin_count set_color_index set_draw_against_y2 set_is_filled set_line_color set_name 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 Intent Optional 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 Intent Optional 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\nplotted against. Arguments Type Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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\nsecondary y axis. Arguments Type Intent Optional 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 \naxis; 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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\ncalling the define_data subroutine or bin_data subroutine. Arguments Type Intent Optional 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 Intent Optional 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\nsecondary y axis. Arguments Type Intent Optional 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 \naxis; 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 Intent Optional 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\nbox. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\plot_data_histogram.html"},{"title":"plot_data_tri_2d – FPLOT ","text":"type, public, extends( plot_data_colored ) :: plot_data_tri_2d Defines a 2D triangulated data set. Contents Type-Bound Procedures define_data get_color_index get_command_string get_data_string get_line_color get_line_style get_line_width get_name set_color_index set_line_color set_line_style set_line_width set_name Type-Bound Procedures procedure, public :: define_data => pdt2d_define_data private subroutine pdt2d_define_data(this, tri) Defines the data to plot. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(inout) :: this The plot_data_tri_2d object. class( delaunay_tri_2d ), intent(in) :: tri The triangulation data to plot. 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 Intent Optional 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 => pdt2d_get_cmd private function pdt2d_get_cmd(this) result(x) Gets the GNUPLOT command string for the object. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(in) :: this The plot_data_tri_2d object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => pdt2d_get_data_cmd private function pdt2d_get_data_cmd(this) result(x) Gets the GNUPLOT command string describing the data to plot. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(in) :: this The plot_data_tri_2d object. Return Value character(len=:), allocatable The command string. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. procedure, public :: get_line_style => pdt2d_get_line_style private pure function pdt2d_get_line_style(this) result(rst) Gets the line style. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(in) :: this The plot_data_tri_2d object. Return Value integer(kind=int32) The line style. The line style must be one of the following\nconstants. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: get_line_width => pdt2d_get_line_width private pure function pdt2d_get_line_width(this) result(rst) Gets the width of the lines used to draw the triangulation. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(in) :: this The plot_data_tri_2d object. Return Value real(kind=real32) The line width. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional Attributes Name class( plot_data_colored ), intent(inout) :: this The plot_data_colored object. type( color ), intent(in) :: x The color. procedure, public :: set_line_style => pdt2d_set_line_style private subroutine pdt2d_set_line_style(this, x) Sets the line style. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(inout) :: this The plot_data_tri_2d object. integer(kind=int32), intent(in) :: x The line style. The line style must be one of the following\nconstants. LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID procedure, public :: set_line_width => pdt2d_set_line_width private subroutine pdt2d_set_line_width(this, x) Sets the width of the lines used to draw the triangulation. Arguments Type Intent Optional Attributes Name class( plot_data_tri_2d ), intent(inout) :: this The plot_data_tri_2d object. real(kind=real32), intent(in) :: x The line width. 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\plot_data_tri_2d.html"},{"title":"plot_object – FPLOT ","text":"type, public, abstract :: plot_object The base type for all plot objects. Contents Type-Bound Procedures get_command_string Type-Bound Procedures procedure( get_string_result ), public, deferred :: get_command_string function get_string_result(this) result(x) Prototype Returns a string from a plot_object. Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:), allocatable The result string.","tags":"","loc":"type\\plot_object.html"},{"title":"plot_polar – FPLOT ","text":"type, public, extends( plot ) :: plot_polar Contents Finalization Procedures plr_clean_up Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_arrow get_arrow_count get_autoscale get_axis_equal get_bottom_margin get_colormap get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count get_left_margin get_legend get_radial_limits get_right_margin get_show_colorbar get_show_gridlines get_terminal get_theta_direction get_theta_start_position get_tics_inward get_title get_top_margin initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_arrow set_autoscale set_axis_equal set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label set_left_margin set_radial_limits set_right_margin set_show_colorbar set_show_gridlines set_theta_direction set_theta_start_position set_tics_inward set_title set_top_margin Finalization Procedures final :: plr_clean_up private subroutine plr_clean_up(this) Cleans up resources held by the plot_polar object. Arguments Type Intent Optional Attributes Name type( plot_polar ), intent(inout) :: this The plot_polar object. Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_autoscale => plr_get_autoscale private pure function plr_get_autoscale(this) result(rst) Gets a logical value determining if the axis should be \nautomatically scaled to fit the data. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value logical Returns true if the plot will autoscale; else, false. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_bottom_margin => plt_get_bottom_margin private pure function plt_get_bottom_margin(this) result(x) Gets the bottom margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => plr_get_cmd private function plr_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot_polar object. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value character(len=:), allocatable The command string. procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_left_margin => plt_get_left_margin private pure function plt_get_left_margin(this) result(x) Gets the left margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_radial_limits => plr_get_limits private pure function plr_get_limits(this) result(rst) Gets the radial axis limits if autoscaling is inactive. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value real(kind=real64), (2) A 2-element array containing the minimum and maximum limit\nvalues in that order. procedure, public :: get_right_margin => plt_get_right_margin private pure function plt_get_right_margin(this) result(x) Gets the right margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_theta_direction => plr_get_theta_direction private pure function plr_get_theta_direction(this) result(rst) Gets the direction. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value character(len=:), allocatable The direction. It is one of the following flags. POLAR_THETA_CCW POLAR_THETA_CW procedure, public :: get_theta_start_position => plr_get_theta_start private pure function plr_get_theta_start(this) result(rst) Gets the position for . Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(in) :: this The plot_polar object. Return Value character(len=:), allocatable The starting position. It is one of the following flags. POLAR_THETA_BOTTOM POLAR_THETA_TOP POLAR_THETA_RIGHT POLAR_THETA_LEFT procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_top_margin => plt_get_top_margin private pure function plt_get_top_margin(this) result(x) Gets the top margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: initialize => plr_init private subroutine plr_init(this, term, fname, err) Initializes the plot_polar object. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_autoscale => plr_set_autoscale private subroutine plr_set_autoscale(this, x) Sets a logical value determining if the axis should be \nautomatically scaled to fit the data. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. logical, intent(in) :: x Set to true if the plot will autoscale; else, false. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_bottom_margin => plt_set_bottom_margin private subroutine plt_set_bottom_margin(this, x) Sets the bottom margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_left_margin => plt_set_left_margin private subroutine plt_set_left_margin(this, x) Sets the left margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_radial_limits => plr_set_limits private subroutine plr_set_limits(this, x) Sets the radial axis limits if autoscaling is inactive. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. real(kind=real64), intent(in) :: x (2) A 2-element array containing the minimum and maximum limit\nvalues in that order. procedure, public :: set_right_margin => plt_set_right_margin private subroutine plt_set_right_margin(this, x) Sets the right margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_theta_direction => plr_set_theta_direction private subroutine plr_set_theta_direction(this, x) Sets the direction. Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. character(len=*), intent(in) :: x The direction. It is one of the following flags. POLAR_THETA_CCW POLAR_THETA_CW procedure, public :: set_theta_start_position => plr_set_theta_start private subroutine plr_set_theta_start(this, x) Sets the position for . Arguments Type Intent Optional Attributes Name class( plot_polar ), intent(inout) :: this The plot_polar object. character(len=*), intent(in) :: x The starting position. It is one of the following flags. POLAR_THETA_BOTTOM POLAR_THETA_TOP POLAR_THETA_RIGHT POLAR_THETA_LEFT procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_top_margin => plt_set_top_margin private subroutine plt_set_top_margin(this, x) Sets the top margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used.","tags":"","loc":"type\\plot_polar.html"},{"title":"png_terminal – FPLOT ","text":"type, public, extends( terminal ) :: png_terminal Defines a terminal used for producing PNG outputs. Contents Type-Bound Procedures get_command_string get_filename get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_filename set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => png_get_command_string private function png_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( png_terminal ), intent(in) :: this The png_terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_filename => png_get_filename private function png_get_filename(this) result(txt) Gets the filename for the output PNG file. Arguments Type Intent Optional Attributes Name class( png_terminal ), intent(in) :: this The png_terminal object. Return Value character(len=:), allocatable The filename, including the file extension (.png). procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => png_get_term_string private function png_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( png_terminal ), intent(in) :: this The png_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_filename => png_set_filename private subroutine png_set_filename(this, txt) Sets the filename for the output PNG file. Arguments Type Intent Optional Attributes Name class( png_terminal ), intent(inout) :: this The png_terminal object. character(len=*), intent(in) :: txt The filename, including the file extension (.png). procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\png_terminal.html"},{"title":"qt_terminal – FPLOT ","text":"type, public, extends( terminal ) :: qt_terminal Defines a terminal that utilizes QT. Contents Type-Bound Procedures get_command_string get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => term_get_command_string private function term_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => qt_get_term_string private function qt_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( qt_terminal ), intent(in) :: this The qt_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\qt_terminal.html"},{"title":"correlation_plot – FPLOT ","text":"type, public, extends( plot_object ) :: correlation_plot Defines a multiplot arrangement designed to illustrate correlation\nbetween data sets. Contents Type-Bound Procedures draw get get_column_count get_command_string get_font_name get_font_size get_plot_count get_row_count get_terminal initialize save_file set_font_name set_font_size 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 \nstate of the command list. Arguments Type Intent Optional 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\nto 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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 Intent Optional 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\ndata set in x. If supplied, this array must have the same length\nas x has columns. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal. The \ndefault 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 Intent Optional 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 Intent Optional 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 Intent Optional Attributes Name class( correlation_plot ), intent(inout) :: this The correlation_plot object. integer(kind=int32), intent(in) :: x The font size.","tags":"","loc":"type\\correlation_plot.html"},{"title":"surface_plot – FPLOT ","text":"type, public, extends( plot_3d ) :: surface_plot Contents Type-Bound Procedures clear_all clear_all_labels clear_arrows draw free_resources get get_allow_smoothing get_arrow get_arrow_count get_axis_equal get_azimuth get_bottom_margin get_colormap get_command_string get_coordinate_system get_count get_draw_border get_elevation get_font_name get_font_size get_label get_label_count get_left_margin get_legend get_light_intensity get_right_margin get_show_colorbar get_show_contours get_show_gridlines get_show_hidden get_specular_intensity get_terminal get_tics_inward get_title get_top_margin get_transparency get_use_lighting get_use_map_view get_x_axis get_y_axis get_z_axis get_z_intersect_xy initialize is_title_defined pop pop_arrow pop_label push push_arrow push_label save_file set set_allow_smoothing set_arrow set_axis_equal set_azimuth set_bottom_margin set_colormap set_coordinate_system set_draw_border set_elevation set_font_name set_font_size set_label set_left_margin set_light_intensity set_right_margin set_show_colorbar set_show_contours set_show_gridlines set_show_hidden set_specular_intensity set_tics_inward set_title set_top_margin set_transparency set_use_lighting set_use_map_view set_z_intersect_xy Type-Bound Procedures procedure, public :: clear_all => plt_clear_all private subroutine plt_clear_all(this) Removes all plot_data objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_all_labels => plt_clear_labels private subroutine plt_clear_labels(this) Clears all plot_label objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: clear_arrows => plt_clear_arrows private subroutine plt_clear_arrows(this) Clears all plot_arrow objects from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: draw => plt_draw private subroutine plt_draw(this, persist, err) Launches GNUPLOT and draws the plot per the current state of\nthe command list. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The 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 \nto allow GNUPLOT to close after drawing. The default is true. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: free_resources => plt_clean_up private subroutine plt_clean_up(this) Cleans up resources held by the plot object. Inheriting\nclasses are expected to call this routine to free internally held\nresources. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: get => plt_get private function plt_get(this, i) result(x) Gets a pointer to the requested plot_data object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. Return Value class( plot_data ), pointer A pointer to the requested plot_data object. procedure, public :: get_allow_smoothing => surf_get_smooth private pure function surf_get_smooth(this) result(x) Gets a value determining if the plotted surfaces should be\nsmoothed. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value logical Returns true if the surface should be smoothed; else, false. procedure, public :: get_arrow => plt_get_arrow private function plt_get_arrow(this, i) result(rst) Gets a pointer to the requested plot_arrow object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow to retrieve. Return Value class( plot_arrow ), pointer The plot_arrow object to retrieve. procedure, public :: get_arrow_count => plt_get_arrow_count private pure function plt_get_arrow_count(this) result(rst) Gets the number of plot_arrow objects held by the plot object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The plot_arrow objects count. procedure, public :: get_axis_equal => plt_get_axis_equal private pure function plt_get_axis_equal(this) result(rst) Gets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the axes should be scaled equally; else, false. procedure, public :: get_azimuth => p3d_get_azimuth private pure function p3d_get_azimuth(this) result(x) Gets the plot azimuth angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value real(kind=real64) The azimuth angle, in degrees. procedure, public :: get_bottom_margin => plt_get_bottom_margin private pure function plt_get_bottom_margin(this) result(x) Gets the bottom margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_colormap => plt_get_colormap private function plt_get_colormap(this) result(x) Gets a pointer to the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( colormap ), pointer A pointer to the colormap object. If no colormap is defined, a\nnull pointer is returned. procedure, public :: get_command_string => surf_get_cmd private function surf_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this plot_3d\nobject. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value character(len=:), allocatable The command string. procedure, public :: get_coordinate_system => p3d_get_csys private pure function p3d_get_csys(this) result(rst) Gets a value determining the coordinate system. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value integer(kind=int32) The coordinate system ID, which must be one of the following. COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL procedure, public :: get_count => plt_get_count private pure function plt_get_count(this) result(x) Gets the number of stored plot_data objects. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_data objects. procedure, public :: get_draw_border => plt_get_draw_border private pure function plt_get_draw_border(this) result(x) Gets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the border should be drawn; else, false. procedure, public :: get_elevation => p3d_get_elevation private pure function p3d_get_elevation(this) result(x) Gets the plot elevation angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value real(kind=real64) The elevation angle, in degrees. procedure, public :: get_font_name => plt_get_font private function plt_get_font(this) result(x) Gets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => plt_get_font_size private function plt_get_font_size(this) result(x) Gets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The size of the font, in points. procedure, public :: get_label => plt_get_label private function plt_get_label(this, i) result(x) Gets the requested plot_label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label object to retrieve. Return Value class( plot_label ), pointer A pointer to the requested plot_label object. procedure, public :: get_label_count => plt_get_label_count private pure function plt_get_label_count(this) result(x) Gets the number of plot_label objects belonging to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value integer(kind=int32) The number of plot_label objects. procedure, public :: get_left_margin => plt_get_left_margin private pure function plt_get_left_margin(this) result(x) Gets the left margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_legend => plt_get_legend private function plt_get_legend(this) result(x) Gets the plot's legend object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value type( legend ), pointer A pointer to the legend object. procedure, public :: get_light_intensity => surf_get_light_intensity private pure function surf_get_light_intensity(this) result(x) Gets the ratio of the strength of the light source relative\nto the ambient light. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value real(kind=real32) The light intensity ratio. procedure, public :: get_right_margin => plt_get_right_margin private pure function plt_get_right_margin(this) result(x) Gets the right margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_show_colorbar => plt_get_show_colorbar private pure function plt_get_show_colorbar(this) result(x) Gets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the colorbar should be drawn; else, false. procedure, public :: get_show_contours => surf_get_show_contours private pure function surf_get_show_contours(this) result(x) Gets a value determining if a contour plot should be drawn in\nconjunction with the surface plot. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value logical Returns true if the contour plot should be drawn; else, false to\nonly draw the surface. procedure, public :: get_show_gridlines => plt_get_show_grid private pure function plt_get_show_grid(this) result(x) Gets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the grid lines should be shown; else, false. procedure, public :: get_show_hidden => surf_get_show_hidden private pure function surf_get_show_hidden(this) result(x) Gets a value indicating if hidden lines should be shown. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value logical Returns true if hidden lines should be shown; else, false. procedure, public :: get_specular_intensity => surf_get_specular_intensity private pure function surf_get_specular_intensity(this) result(x) Gets the ratio of the strength of the specular light source\nrelative to the ambient light. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value real(kind=real32) The specular light intensity ratio. procedure, public :: get_terminal => plt_get_term private function plt_get_term(this) result(x) Gets the GNUPLOT terminal object. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value class( terminal ), pointer A pointer to the GNUPLOT terminal object. procedure, public :: get_tics_inward => plt_get_tics_in private pure function plt_get_tics_in(this) result(x) Gets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: get_title => plt_get_title private function plt_get_title(this) result(txt) Gets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value character(len=:), allocatable The title. procedure, public :: get_top_margin => plt_get_top_margin private pure function plt_get_top_margin(this) result(x) Gets the top margin of the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value real(kind=real32) The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: get_transparency => surf_get_transparency private pure function surf_get_transparency(this) result(x) Gets a factor defining the transparency of plotted surfaces. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value real(kind=real32) A value existing on the set (0 1] defining the level of\ntransparency. A value of 1 indicates a fully opaque surface. procedure, public :: get_use_lighting => surf_get_use_lighting private pure function surf_get_use_lighting(this) result(x) Gets a value indicating if lighting, beyond the ambient\nlight source, is to be used. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(in) :: this The surface_plot object. Return Value logical True if lighting should be used; else, false. procedure, public :: get_use_map_view => p3d_get_use_map_view private pure function p3d_get_use_map_view(this) result(rst) Gets a value determining if the view should be set to a 2D\nmap view. If true, the azimuth and elevation terms are ignored. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value logical Returns true if the map view will be used; else, false. procedure, public :: get_x_axis => p3d_get_x_axis private function p3d_get_x_axis(this) result(ptr) Gets the x-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the x-axis object. procedure, public :: get_y_axis => p3d_get_y_axis private function p3d_get_y_axis(this) result(ptr) Gets the y-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the y-axis object. procedure, public :: get_z_axis => p3d_get_z_axis private function p3d_get_z_axis(this) result(ptr) Gets the z-axis object. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value class( plot_axis ), pointer A pointer to the z-axis object. procedure, public :: get_z_intersect_xy => p3d_get_z_axis_intersect private pure function p3d_get_z_axis_intersect(this) result(x) Gets a value determining if the z-axis should intersect the\nx-y plane. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(in) :: this The plot_3d object. Return Value logical Returns true if the z-axis should intersect the x-y plane; else,\nfalse to allow the z-axis to float. procedure, public :: initialize => surf_init private subroutine surf_init(this, term, fname, err) Initializes the surface_plot object. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. integer(kind=int32), intent(in), optional :: term An optional input that is used to define the terminal.\n The default terminal is a WXT terminal. The acceptable inputs \nare: GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT GNUPLOT_TERMINAL_LATEX character(len=*), intent(in), optional :: fname A filename to pass to the terminal in the event the\nterminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: is_title_defined => plt_has_title private pure function plt_has_title(this) result(x) Gets a value determining if a title has been defined for the plot \nobject. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. Return Value logical Returns true if a title has been defined for this plot; else,\nreturns false. procedure, public :: pop => plt_pop_data private subroutine plt_pop_data(this) Pops the last plot_data object from the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_arrow => plt_pop_arrow private subroutine plt_pop_arrow(this) Pops the last plot_arrow object from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: pop_label => plt_pop_label private subroutine plt_pop_label(this) Removes the last label from the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. procedure, public :: push => plt_push_data private subroutine plt_push_data(this, x, err) Pushes a plot_data object onto the stack. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_data ), intent(inout) :: x The plot_data object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_arrow => plt_push_arrow private subroutine plt_push_arrow(this, x, err) Pushes a new @ref plot_arrow object onto the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_arrow ), intent(in) :: x The plot_arrow object. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: push_label => plt_push_label private subroutine plt_push_label(this, lbl, err) Adds a label to the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( plot_label ), intent(in) :: lbl The plot label. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: save_file => plt_save private subroutine plt_save(this, fname, err) Saves a GNUPLOT command file. Arguments Type Intent Optional Attributes Name class( plot ), intent(in) :: this The plot object. character(len=*), intent(in) :: fname The filename. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: set => plt_set private subroutine plt_set(this, i, x) Sets the requested plot_data object into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_data object. class( plot_data ), intent(in) :: x The plot_data object. procedure, public :: set_allow_smoothing => surf_set_smooth private subroutine surf_set_smooth(this, x) Sets a value determining if the plotted surfaces should be\nsmoothed. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. logical, intent(in) :: x Set to true if the surface should be smoothed; else, false. procedure, public :: set_arrow => plt_set_arrow private subroutine plt_set_arrow(this, i, x) Sets a plot_arrow into the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_arrow object to replace. class( plot_arrow ), intent(in) :: x The new plot_arrow object. procedure, public :: set_axis_equal => plt_set_axis_equal private subroutine plt_set_axis_equal(this, x) Sets a flag determining if the axes should be equally scaled. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the axes should be scaled equally; else, false. procedure, public :: set_azimuth => p3d_set_azimuth private subroutine p3d_set_azimuth(this, x) Sets the plot azimuth angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. real(kind=real64), intent(in) :: x The azimuth angle, in degrees. procedure, public :: set_bottom_margin => plt_set_bottom_margin private subroutine plt_set_bottom_margin(this, x) Sets the bottom margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_colormap => plt_set_colormap private subroutine plt_set_colormap(this, x, err) Sets the colormap object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. class( colormap ), intent(in) :: x The colormap object. Notice, a copy of this object is\nstored, and the plot object then manages the lifetime of the\ncopy. class(errors), intent(inout), optional, target :: err An error handler object. procedure, public :: set_coordinate_system => p3d_set_csys private subroutine p3d_set_csys(this, x) Sets a value determining the coordinate system. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. integer(kind=int32), intent(in) :: x The coordinate system ID, which must be one of the following. COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL procedure, public :: set_draw_border => plt_set_draw_border private subroutine plt_set_draw_border(this, x) Sets a value determining if the border should be drawn. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the border should be drawn; else, false. procedure, public :: set_elevation => p3d_set_elevation private subroutine p3d_set_elevation(this, x) Sets the plot elevation angle. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. real(kind=real64), intent(in) :: x The elevation angle, in degrees. procedure, public :: set_font_name => plt_set_font private subroutine plt_set_font(this, x) Sets the name of the font used for plot text. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: x The font name. procedure, public :: set_font_size => plt_set_font_size private subroutine plt_set_font_size(this, x) Sets the size of the font used by the plot. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: x The font size, in points. If a value of zero is provided,\nthe font size is reset to its default value; or, if a negative \nvalue is provided, the absolute value of the supplied value is\nutilized. procedure, public :: set_label => plt_set_label private subroutine plt_set_label(this, i, x) Sets the specified plot_label object. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. integer(kind=int32), intent(in) :: i The index of the plot_label to replace. class( plot_label ), intent(in) :: x The new plot_label object. procedure, public :: set_left_margin => plt_set_left_margin private subroutine plt_set_left_margin(this, x) Sets the left margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_light_intensity => surf_set_light_intensity private subroutine surf_set_light_intensity(this, x) Sets the ratio of the strength of the light source relative\nto the ambient light. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. real(kind=real32), intent(in) :: x The light intensity ratio. The value must exist in the\nset [0, 1]; else, it will be clipped to lie within the range. procedure, public :: set_right_margin => plt_set_right_margin private subroutine plt_set_right_margin(this, x) Sets the right margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_show_colorbar => plt_set_show_colorbar private subroutine plt_set_show_colorbar(this, x) Sets a value determining if the colorbar should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the colorbar should be drawn; else, false. procedure, public :: set_show_contours => surf_set_show_contours private subroutine surf_set_show_contours(this, x) Sets a value determining if a contour plot should be drawn in\nconjunction with the surface plot. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. logical, intent(in) :: x Set to true if the contour plot should be drawn; else, false to\nonly draw the surface. procedure, public :: set_show_gridlines => plt_set_show_grid private subroutine plt_set_show_grid(this, x) Sets a flag determining if the grid lines should be shown. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the grid lines should be shown; else, false. procedure, public :: set_show_hidden => surf_set_show_hidden private subroutine surf_set_show_hidden(this, x) Sets a value indicating if hidden lines should be shown. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. logical, intent(in) :: x Set to true if hidden lines should be shown; else, false. procedure, public :: set_specular_intensity => surf_set_specular_intensity private subroutine surf_set_specular_intensity(this, x) Sets the ratio of the strength of the specular light source\nrelative to the ambient light. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. real(kind=real32), intent(in) :: x The specular light intensity ratio. The value must exist in the \nset [0, 1]; else, it will be clipped to lie within the range. procedure, public :: set_tics_inward => plt_set_tics_in private subroutine plt_set_tics_in(this, x) Sets a value determining if the axis tic marks should point inwards. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. logical, intent(in) :: x Set to true if the tic marks should point inwards; else, false\nif the tic marks should point outwards. procedure, public :: set_title => plt_set_title private subroutine plt_set_title(this, txt) Sets the plot's title. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. character(len=*), intent(in) :: txt The title. procedure, public :: set_top_margin => plt_set_top_margin private subroutine plt_set_top_margin(this, x) Sets the top margin of the plot. If the value is negative, the\ndefault margin is used. Arguments Type Intent Optional Attributes Name class( plot ), intent(inout) :: this The plot object. real(kind=real32), intent(in) :: x The margin, in percent of screen. A negative value indicates the\ndefault margin is used. procedure, public :: set_transparency => surf_set_transparency private subroutine surf_set_transparency(this, x) Sets a factor defining the transparency of plotted surfaces. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. real(kind=real32), intent(in) :: x A value existing on the set (0 1] defining the level of\ntransparency. A value of 1 indicates a fully opaque surface. Any values supplied outside of the set are clipped to fit within\n(0 1]. procedure, public :: set_use_lighting => surf_set_use_lighting private subroutine surf_set_use_lighting(this, x) Sets a value indicating if lighting, beyond the ambient\nlight source, is to be used. Arguments Type Intent Optional Attributes Name class( surface_plot ), intent(inout) :: this The surface_plot object. logical, intent(in) :: x True if lighting should be used; else, false. procedure, public :: set_use_map_view => p3d_set_use_map_view private subroutine p3d_set_use_map_view(this, x) Sets a value determining if the view should be set to a 2D\nmap view. If true, the azimuth and elevation terms are ignored. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. logical, intent(in) :: x Seturns true if the map view will be used; else, false. procedure, public :: set_z_intersect_xy => p3d_set_z_axis_intersect private subroutine p3d_set_z_axis_intersect(this, x) Sets a value determining if the z-axis should intersect the\nx-y plane. Arguments Type Intent Optional Attributes Name class( plot_3d ), intent(inout) :: this The plot_3d object. logical, intent(in) :: x Set to true if the z-axis should intersect the x-y plane; else,\nfalse to allow the z-axis to float.","tags":"","loc":"type\\surface_plot.html"},{"title":"surface_plot_data – FPLOT ","text":"type, public, extends( plot_data ) :: surface_plot_data Provides a three-dimensional surface plot data set. Contents Type-Bound Procedures define_data get_command_string get_data_string get_name get_size get_use_wireframe get_x get_y get_z set_name set_use_wireframe set_x set_y set_z Type-Bound Procedures procedure, public :: define_data => surfd_set_data_1 private subroutine surfd_set_data_1(this, x, y, z, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. real(kind=real64), intent(in), dimension(:,:) :: x An M-by-N matrix containing the x-coordinate data. real(kind=real64), intent(in), dimension(:,:) :: y An M-by-N matrix containing the y-coordinate data. real(kind=real64), intent(in), dimension(:,:) :: z An M-by-N matrix containing the z-coordinate data. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get_command_string => surfd_get_cmd private function surfd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this surface_plot_data \nobject. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => surfd_get_data_cmd private function surfd_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data to plot. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. Return Value character(len=:), allocatable The GNUPLOT command string. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_size => surfd_get_size private pure function surfd_get_size(this, dim) result(x) Gets the size of the stored data set. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: dim The dimension of interest. Notice, data is stored as a\n2D matrix (i.e. only 1 and 2 are valid inputs). Return Value integer(kind=int32) The size of the requested dimension. procedure, public :: get_use_wireframe => surfd_get_wireframe private pure function surfd_get_wireframe(this) result(x) Gets a value determining if a wireframe mesh should be displayed. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. Return Value logical Returns true if a wireframe mesh should be displayed; else, \nfalse to display a solid surface. procedure, public :: get_x => surfd_get_x private pure function surfd_get_x(this, i, j) result(x) Gets the requested X data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. Return Value real(kind=real64) The value. procedure, public :: get_y => surfd_get_y private pure function surfd_get_y(this, i, j) result(x) Gets the requested Y data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. Return Value real(kind=real64) The value. procedure, public :: get_z => surfd_get_z private pure function surfd_get_z(this, i, j) result(x) Gets the requested Z data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(in) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. Return Value real(kind=real64) The value. 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_use_wireframe => surfd_set_wireframe private subroutine surfd_set_wireframe(this, x) Sets a value determining if a wireframe mesh should be displayed. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. logical, intent(in) :: x Set to true if a wireframe mesh should be displayed; else,\nfalse to display a solid surface. procedure, public :: set_x => surfd_set_x private subroutine surfd_set_x(this, i, j, x) Sets the requested X data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. real(kind=real64), intent(in) :: x The value. procedure, public :: set_y => surfd_set_y private subroutine surfd_set_y(this, i, j, x) Sets the requested Y data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. real(kind=real64), intent(in) :: x The value. procedure, public :: set_z => surfd_set_z private subroutine surfd_set_z(this, i, j, x) Sets the requested Z data point. Arguments Type Intent Optional Attributes Name class( surface_plot_data ), intent(inout) :: this The suface_plot_data object. integer(kind=int32), intent(in) :: i The row index. integer(kind=int32), intent(in) :: j The column index. real(kind=real64), intent(in) :: x The value.","tags":"","loc":"type\\surface_plot_data.html"},{"title":"terminal – FPLOT ","text":"type, public, abstract, extends( plot_object ) :: terminal A GNUPLOT terminal object. Contents Type-Bound Procedures get_command_string get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => term_get_command_string private function term_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure( term_get_string_result ), public, deferred :: get_id_string function term_get_string_result(this) result(x) Prototype Retrieves a string from a terminal. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\terminal.html"},{"title":"delaunay_tri_2d – FPLOT ","text":"type, public :: delaunay_tri_2d Provides a container for a 2D Delaunay triangulation. Contents Type-Bound Procedures create find_triangle get_indices get_point_count get_points_x get_points_y get_triangle_count Type-Bound Procedures procedure, public :: create => d2d_init private subroutine d2d_init(this, x, y, err) Creates an unconstrained 2D Delaunay triangulation given a \nset of x-y points. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(inout) :: this The delaunay_tri_2d object. real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of each\ndata point. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of each\ndata point. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: find_triangle => d2d_get_tri_with_pt private pure function d2d_get_tri_with_pt(this, x, y) result(rst) Finds the triangle that contains the specified point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. real(kind=real64), intent(in) :: x The x-coordinate of the point. real(kind=real64), intent(in) :: y The y-coordinate of the point. Return Value integer(kind=int32) Returns the index of the triangle containing the specified\npoint. If no triangle contains the specified point, a value of\n-1 is returned. procedure, public :: get_indices => d2d_get_tris private pure function d2d_get_tris(this) result(rst) Gets a list of the indices of each triangle vertex. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32), allocatable, dimension(:,:) An N-by-3 matrix with each column containing the index of the\nvertex of each triangle where N is the number of triangles. procedure, public :: get_point_count => d2d_get_pt_count private pure function d2d_get_pt_count(this) result(rst) Gets the number of points in the triangulation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32) The number of points in the triangulation. procedure, public :: get_points_x => d2d_get_x_pts private pure function d2d_get_x_pts(this) result(rst) Gets the x-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value real(kind=real64), allocatable, dimension(:) An array of the x-coordinates of each point. procedure, public :: get_points_y => d2d_get_y_pts private pure function d2d_get_y_pts(this) result(rst) Gets the y-coordinates of each point. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value real(kind=real64), allocatable, dimension(:) An array of the y-coordinates of each point. procedure, public :: get_triangle_count => d2d_get_tri_count private pure function d2d_get_tri_count(this) result(rst) Gets the number of triangles in the triangulation. Arguments Type Intent Optional Attributes Name class( delaunay_tri_2d ), intent(in) :: this The delaunay_tri_2d object. Return Value integer(kind=int32) The number of triangles in the triangulation.","tags":"","loc":"type\\delaunay_tri_2d.html"},{"title":"tri_surface_plot_data – FPLOT ","text":"type, public, extends( plot_data ) :: tri_surface_plot_data Provides a three-dimensional surface plot data set constructed of\ntriangulated points. Contents Type-Bound Procedures define_data get_command_string get_data_string get_name get_use_wireframe set_name set_use_wireframe Type-Bound Procedures procedure, public :: define_data => tspd_define_data private subroutine tspd_define_data(this, tri) Defines the data to plot. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(inout) :: this The tri_surface_plot_data object. class( delaunay_tri_surface ), intent(in) :: tri The triangulation to plot. procedure, public :: get_command_string => tspd_get_cmd private function tspd_get_cmd(this) result(x) Gets the GNUPLOT command string for the object. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(in) :: this The tri_surface_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => tspd_get_data_cmd private function tspd_get_data_cmd(this) result(x) Gets the GNUPLOT command string for representing the data. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(in) :: this The tri_surface_plot_data object. Return Value character(len=:), allocatable The command string. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_use_wireframe => tspd_get_wireframe private pure function tspd_get_wireframe(this) result(rst) Gets a value determining if a wireframe mesh should be displayed. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(in) :: this The tri_surface_plot_data object. Return Value logical Returns true if the plot is to be drawn as a wireframe; else,\nfalse to draw as a surface. 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name. procedure, public :: set_use_wireframe => tspd_set_wireframe private subroutine tspd_set_wireframe(this, x) Sets a value determining if a wireframe mesh should be displayed. Arguments Type Intent Optional Attributes Name class( tri_surface_plot_data ), intent(inout) :: this The tri_surface_plot_data object. logical, intent(in) :: x Set to true if the plot is to be drawn as a wireframe; else,\nfalse to draw as a surface.","tags":"","loc":"type\\tri_surface_plot_data.html"},{"title":"vector_field_plot_data – FPLOT ","text":"type, public, extends( plot_data_colored ) :: vector_field_plot_data Defines a two-dimensional vector-field plot data set. Contents Type-Bound Procedures define_data get_arrow_size get_color_index get_command_string get_data_string get_fill_arrow get_line_color get_name get_use_data_dependent_colors set_arrow_size set_color_index set_fill_arrow set_line_color set_name Type-Bound Procedures procedure, public :: define_data => vfpd_define_data private subroutine vfpd_define_data(this, x, y, dx, dy, c, err) Defines the data set. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(inout) :: this The vector_field_plot_data object. real(kind=real64), intent(in), dimension(:,:) :: x An M-by-N matrix containing the x-locations of each arrow's \norigin. real(kind=real64), intent(in), dimension(:,:) :: y An M-by-N matrix containing the y-locations of each arrow's \norigin. real(kind=real64), intent(in), dimension(:,:) :: dx An M-by-N matrix containing the x-direction of each arrow. real(kind=real64), intent(in), dimension(:,:) :: dy An M-by-N matrix containing the y-direction of each arrow. real(kind=real64), intent(in), optional, dimension(:,:) :: c An optional M-by-N matrix containing information on how to color \nthe arrows. The colors are determined by the active colormap. class(errors), intent(inout), optional, target :: err An error handling object. procedure, public :: get_arrow_size => vfpd_get_arrow_size private pure function vfpd_get_arrow_size(this) result(rst) Gets the scaling factor used to determine the arrow size. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value real(kind=real64) The scaling factor. 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 Intent Optional 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 => vfpd_get_cmd private function vfpd_get_cmd(this) result(x) Gets the GNUPLOT command string to represent this\nvector_field_plot_data object. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_data_string => vfpd_get_data_cmd private function vfpd_get_data_cmd(this) result(x) Gets the GNUPLOT command string containing the actual data to plot. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value character(len=:), allocatable The command string. procedure, public :: get_fill_arrow => vfpd_get_fill_arrow private pure function vfpd_get_fill_arrow(this) result(rst) Gets a value determining if the arrow heads should be filled. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value logical True if the arrow heads should be filled; else, false. 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 Intent Optional Attributes Name class( plot_data_colored ), intent(in) :: this The plot_data_colored object. Return Value type( color ) The color. 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 Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The name. procedure, public :: get_use_data_dependent_colors => vfpd_get_use_data_dependent_colors private pure function vfpd_get_use_data_dependent_colors(this) result(rst) Gets a value indicating if data-dependent coloring should be\nused. This is defined by supplying information on how to scale the\ncoloring when calling define_data. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(in) :: this The vector_field_plot_data object. Return Value logical Returns true if data-dependent coloring is being used; else,\nfalse. procedure, public :: set_arrow_size => vfpd_set_arrow_size private subroutine vfpd_set_arrow_size(this, x) Sets the scaling factor used to determine the arrow size. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(inout) :: this The vector_field_plot_data object. real(kind=real64), intent(in) :: x The scaling factor. procedure, public :: set_color_index => pdc_set_color_index private subroutine pdc_set_color_index(this, x) Sets the color index. Arguments Type Intent Optional 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_fill_arrow => vfpd_set_fill_arrow private subroutine vfpd_set_fill_arrow(this, x) Sets a value determining if the arrow heads should be filled. Arguments Type Intent Optional Attributes Name class( vector_field_plot_data ), intent(inout) :: this The vector_field_plot_data object. logical, intent(in) :: x True if the arrow heads should be filled; else, false. procedure, public :: set_line_color => pdc_set_line_color private subroutine pdc_set_line_color(this, x) Sets the object color. Arguments Type Intent Optional 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 Intent Optional Attributes Name class( plot_data ), intent(inout) :: this The plot_data object. character(len=*), intent(in) :: txt The name.","tags":"","loc":"type\\vector_field_plot_data.html"},{"title":"windows_terminal – FPLOT ","text":"type, public, extends( terminal ) :: windows_terminal A Windows-specific terminal. Contents Type-Bound Procedures get_command_string get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => term_get_command_string private function term_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => wt_get_term_string private function wt_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( windows_terminal ), intent(in) :: this The windows_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\windows_terminal.html"},{"title":"wxt_terminal – FPLOT ","text":"type, public, extends( terminal ) :: wxt_terminal A WXT terminal. Contents Type-Bound Procedures get_command_string get_font_name get_font_size get_id_string get_plot_window_number get_title get_window_height get_window_width set_font_name set_font_size set_plot_window_number set_title set_window_height set_window_width Type-Bound Procedures procedure, public :: get_command_string => term_get_command_string private function term_get_command_string(this) result(x) Returns the appropriate GNUPLOT command string to establish\nappropriate parameters. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The GNUPLOT command string. procedure, public :: get_font_name => term_get_font_name private function term_get_font_name(this) result(name) Gets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The font name. procedure, public :: get_font_size => term_get_font_size private pure function term_get_font_size(this) result(sz) Gets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The font size, in points. procedure, public :: get_id_string => wxt_get_term_string private function wxt_get_term_string(this) result(x) Retrieves a GNUPLOT terminal identifier string. Arguments Type Intent Optional Attributes Name class( wxt_terminal ), intent(in) :: this The wxt_terminal object. Return Value character(len=:), allocatable The string. procedure, public :: get_plot_window_number => term_get_plot_window_number private pure function term_get_plot_window_number(this) result(x) Gets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer(kind=int32) The plot window number. procedure, public :: get_title => term_get_title private function term_get_title(this) result(str) Gets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The title. procedure, public :: get_window_height => term_get_window_height private pure function term_get_window_height(this) result(x) Gets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The height of the plot window. procedure, public :: get_window_width => term_get_window_width private pure function term_get_window_width(this) result(x) Gets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value integer The width of the plot window. procedure, public :: set_font_name => term_set_font_name private subroutine term_set_font_name(this, name) Sets the name of the font used for text displayed by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: name The font name. procedure, public :: set_font_size => term_set_font_size private subroutine term_set_font_size(this, sz) Sets the size of the font used by the graph. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: sz The font size, in points. procedure, public :: set_plot_window_number => term_set_plot_window_number private subroutine term_set_plot_window_number(this, x) Sets the targeted plot window number. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer(kind=int32), intent(in) :: x The plot window number. procedure, public :: set_title => term_set_title private subroutine term_set_title(this, txt) Sets the plot window's title. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. character(len=*), intent(in) :: txt The title. procedure, public :: set_window_height => term_set_window_height private subroutine term_set_window_height(this, x) Sets the height of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The height of the plot window. procedure, public :: set_window_width => term_set_window_width private subroutine term_set_window_width(this, x) Sets the width of the plot window. Arguments Type Intent Optional Attributes Name class( terminal ), intent(inout) :: this The terminal object. integer, intent(in) :: x The width of the plot window.","tags":"","loc":"type\\wxt_terminal.html"},{"title":"cm_get_string_result – FPLOT","text":"interface public function cm_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:),allocatable The string. Description Retrieves a string result from a colormap object.","tags":"","loc":"interface\\cm_get_string_result.html"},{"title":"operator(/=) – FPLOT","text":"public interface operator(/=) Contents Module Procedures clr_not_equals Module Procedures private pure function clr_not_equals(x, y) result(rst) Arguments Type Intent Optional Attributes Name type( color ), intent(in) :: x type( color ), intent(in) :: y Return Value logical","tags":"","loc":"interface\\operator(SLASH=).html"},{"title":"operator(==) – FPLOT","text":"public interface operator(==) Contents Module Procedures clr_equals Module Procedures private pure function clr_equals(x, y) result(rst) Arguments Type Intent Optional Attributes Name type( color ), intent(in) :: x type( color ), intent(in) :: y Return Value logical","tags":"","loc":"interface\\operator(==).html"},{"title":"linspace – FPLOT","text":"public pure function linspace(start, finish, npts) result(x) Constructs a linearly spaced array. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in) :: start The first value in the array. real(kind=real64), intent(in) :: finish The last value in the array. integer(kind=int32), intent(in) :: npts The number of values in the array. Return Value real(kind=real64), allocatable, dimension(:) The resulting array. Contents","tags":"","loc":"proc\\linspace.html"},{"title":"logspace – FPLOT","text":"public pure function logspace(start, finish, npts) result(x) Construcst a logarithmically spaced array. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in) :: start The exponent of the first value in the array. real(kind=real64), intent(in) :: finish The exponent of the final value in the array. integer(kind=int32), intent(in) :: npts The number of values in the array. Return Value real(kind=real64), allocatable, dimension(:) The resulting array. Contents","tags":"","loc":"proc\\logspace.html"},{"title":"meshgrid – FPLOT","text":"public pure function meshgrid(x, y) result(xy) Constructs two matrices (X and Y) from x and y data arrays. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An M-element array of x data points. real(kind=real64), intent(in), dimension(:) :: y An N-element array of y data points. Return Value real(kind=real64), allocatable, dimension(:,:,:) An N-by-M-by-2 array containing the x data matrix on the first \npage of the array, and the y data matrix on the second page. Contents","tags":"","loc":"proc\\meshgrid.html"},{"title":"report_array_size_mismatch_error – FPLOT","text":"public subroutine report_array_size_mismatch_error(err, fcn, name, expected, actual) Reports an array size mismatch error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: name The variable name. integer(kind=int32), intent(in) :: expected The expected array size. integer(kind=int32), intent(in) :: actual The actual array size. Contents Variables msg Variables Type Visibility Attributes Name Initial character(len=256), public :: msg","tags":"","loc":"proc\\report_array_size_mismatch_error.html"},{"title":"report_file_create_error – FPLOT","text":"public subroutine report_file_create_error(err, fcn, fname, flag) Reports an I/O error related to file creating. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: fname The filename. integer(kind=int32), intent(in) :: flag The error flag returned by the system. Contents Variables msg Variables Type Visibility Attributes Name Initial character(len=2048), public :: msg","tags":"","loc":"proc\\report_file_create_error.html"},{"title":"report_matrix_size_mismatch_error – FPLOT","text":"public subroutine report_matrix_size_mismatch_error(err, fcn, name, mexp, nexp, mact, nact) Reports a matrix size mismatch error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: name The variable name. integer(kind=int32), intent(in) :: mexp The expected number of rows. integer(kind=int32), intent(in) :: nexp The expected number of columns. integer(kind=int32), intent(in) :: mact The actual number of rows. integer(kind=int32), intent(in) :: nact The actual number of columns. Contents Variables msg Variables Type Visibility Attributes Name Initial character(len=256), public :: msg","tags":"","loc":"proc\\report_matrix_size_mismatch_error.html"},{"title":"report_memory_error – FPLOT","text":"public subroutine report_memory_error(err, fcn, flag) Reports a memory allocation error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. integer(kind=int32), intent(in) :: flag The error flag returned by the system. Contents Variables msg Variables Type Visibility Attributes Name Initial character(len=256), public :: msg","tags":"","loc":"proc\\report_memory_error.html"},{"title":"pa_get_string_result – FPLOT","text":"interface public function pa_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:),allocatable The string. Description Retrieves a string from a plot_axis.","tags":"","loc":"interface\\pa_get_string_result.html"},{"title":"pd_get_string_result – FPLOT","text":"interface public function pd_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:),allocatable The string. Description Retrieves a string from a plot_data object.","tags":"","loc":"interface\\pd_get_string_result.html"},{"title":"spd_get_int_value – FPLOT","text":"interface public pure function spd_get_int_value(this) result(x) Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The value. Description Gets an integer value from the scatter_plot_data object.","tags":"","loc":"interface\\spd_get_int_value.html"},{"title":"spd_get_string_result – FPLOT","text":"interface public function spd_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:),allocatable The string. Description Gets a string value from the scatter_plot_data object.","tags":"","loc":"interface\\spd_get_string_result.html"},{"title":"spd_get_value – FPLOT","text":"interface public pure function spd_get_value(this, index) result(x) Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. Return Value real(kind=real64) The value. Description Gets an indexed value from the scatter_plot_data object.","tags":"","loc":"interface\\spd_get_value.html"},{"title":"spd_set_value – FPLOT","text":"interface public subroutine spd_set_value(this, index, x) Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. real(kind=real64), intent(in) :: x The value. Description Sets an indexed value from the scatter_plot_data object.","tags":"","loc":"interface\\spd_set_value.html"},{"title":"get_string_result – FPLOT","text":"interface public function get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:),allocatable The result string. Description Returns a string from a plot_object.","tags":"","loc":"interface\\get_string_result.html"},{"title":"simplify_polyline – FPLOT","text":"public interface simplify_polyline Contents Module Procedures simplify_polyline_2d1 simplify_polyline_3d1 simplify_polyline_mtx Module Procedures private function simplify_polyline_2d1(x, y, tol, err) result(ln) Simplifies a 2D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, and the second \ncolumn contains the y-coordinates. private function simplify_polyline_3d1(x, y, z, tol, err) result(ln) Simplifies a 3D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: z An N-element array containing the z-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, the second \ncolumn contains the y-coordinates, and the third column contains \nthe z-coordinates. private function simplify_polyline_mtx(xy, tol, err) result(ln) Simplifies a 2D or 3D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:,:) :: xy An N-by-2 or N-by-3 matrix containing the polyline vertex data. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, the second \ncolumn contains the y-coordinates, and if necessary, the third \ncolumn contains the z-coordinates.","tags":"","loc":"interface\\simplify_polyline.html"},{"title":"term_get_string_result – FPLOT","text":"interface public function term_get_string_result(this) result(x) Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:),allocatable The string. Description Retrieves a string from a terminal.","tags":"","loc":"interface\\term_get_string_result.html"},{"title":"fplot_arrow – FPLOT","text":"Uses iso_fortran_env fplot_plot_object fplot_colors fplot_constants strings Contents Derived Types plot_arrow Derived Types type, public, extends( plot_object ) :: plot_arrow Defines an arrow that can be drawn on a plot. Type-Bound Procedures procedure\n , public\n :: get_color =>\n par_get_color Function procedure\n , public\n :: get_command_string =>\n par_get_cmd Function procedure\n , public\n :: get_head_angle =>\n par_get_head_angle Function procedure\n , public\n :: get_head_back_angle =>\n par_get_head_back_angle Function procedure\n , public\n :: get_head_fill =>\n par_get_fill Function procedure\n , public\n :: get_head_location =>\n par_get_head Function procedure\n , public\n :: get_head_size =>\n par_get_head_size Function procedure\n , public\n :: get_head_type =>\n par_get_head_type Function procedure\n , public\n :: get_is_visible =>\n par_get_is_visible Function procedure\n , public\n :: get_line_style =>\n par_get_line_style Function procedure\n , public\n :: get_line_width =>\n par_get_line_width Function procedure\n , public\n :: get_move_to_front =>\n par_get_move_to_front Function procedure\n , public\n :: get_tail_location =>\n par_get_tail Function procedure\n , public\n :: get_use_default_size =>\n par_get_use_default_size Function procedure\n , public\n :: set_color =>\n par_set_color Subroutine procedure\n , public\n :: set_head_angle =>\n par_set_head_angle Subroutine procedure\n , public\n :: set_head_back_angle =>\n par_set_head_back_angle Subroutine procedure\n , public\n :: set_head_fill =>\n par_set_fill Subroutine generic,\n public\n :: set_head_location =>\n par_set_head_1, par_set_head_2, par_set_head_3 procedure\n , public\n :: set_head_size =>\n par_set_head_size Subroutine procedure\n , public\n :: set_head_type =>\n par_set_head_type Subroutine procedure\n , public\n :: set_is_visible =>\n par_set_is_visible Subroutine procedure\n , public\n :: set_line_style =>\n par_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n par_set_line_width Subroutine procedure\n , public\n :: set_move_to_front =>\n par_set_move_to_front Subroutine generic,\n public\n :: set_tail_location =>\n par_set_tail_1, par_set_tail_2, par_set_tail_3 procedure\n , public\n :: set_use_default_size =>\n par_set_use_default_size Subroutine","tags":"","loc":"module\\fplot_arrow.html"},{"title":"fplot_colormap – FPLOT","text":"Uses ferror iso_fortran_env fplot_plot_object fplot_colors fplot_errors strings forcolormap Contents Interfaces cm_get_string_result Derived Types colormap cool_colormap custom_colormap earth_colormap grey_colormap hot_colormap parula_colormap rainbow_colormap Interfaces interface public function cm_get_string_result(this) result(x) Retrieves a string result from a colormap object. Arguments Type Intent Optional Attributes Name class( colormap ), intent(in) :: this The colormap object. Return Value character(len=:), allocatable The string. Derived Types type, public, extends( plot_object ) :: colormap A colormap object for a surface plot. Type-Bound Procedures procedure\n(cm_get_string_result) , public\n :: get_color_string procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: cool_colormap Defines a colormap consisting of \"cool\" colors. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n ccm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: custom_colormap Defines a custom colormap that utilizes the FORCOLORMAP library\nto provide the map. Finalizations Procedures final :: custom_final Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n custom_get_clr Function procedure\n , public\n :: get_colormap =>\n custom_get Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_colormap =>\n custom_set Subroutine procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: earth_colormap Defines an earthy-colored colormap. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n ecm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: grey_colormap Defines a grey-scaled colormap. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n gcm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: hot_colormap Defines a colormap consisting of \"hot\" colors. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n hcm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: parula_colormap Defines a colormap equivalent to the MATLAB parula colormap. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n pcm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine type, public, extends( colormap ) :: rainbow_colormap Defines a rainbow colormap. Type-Bound Procedures procedure\n , public\n :: get_color_string =>\n rcm_get_clr Function procedure\n , public\n :: get_command_string =>\n cm_get_cmd Function procedure\n , public\n :: get_draw_border =>\n cm_get_draw_border Function procedure\n , public\n :: get_horizontal =>\n cm_get_horizontal Function procedure\n , public\n :: get_label =>\n cm_get_label Function procedure\n , public\n :: get_show_tics =>\n cm_get_show_tics Function procedure\n , public\n :: set_draw_border =>\n cm_set_draw_border Subroutine procedure\n , public\n :: set_horizontal =>\n cm_set_horizontal Subroutine procedure\n , public\n :: set_label =>\n cm_set_label Subroutine procedure\n , public\n :: set_show_tics =>\n cm_set_show_tics Subroutine","tags":"","loc":"module\\fplot_colormap.html"},{"title":"fplot_colors – FPLOT","text":"Uses iso_fortran_env Contents Variables CLR_BLACK CLR_BLUE CLR_CYAN CLR_GRAY CLR_GREEN CLR_LIME CLR_MAGENTA CLR_MAROON CLR_NAVY CLR_OLIVE CLR_ORANGE CLR_PURPLE CLR_RED CLR_SILVER CLR_TEAL CLR_WHITE CLR_YELLOW color_list Interfaces operator(/=) operator(==) Derived Types color Variables Type Visibility Attributes Name Initial type( color ), public, parameter :: CLR_BLACK = color(0, 0, 0, 0) Black. type( color ), public, parameter :: CLR_BLUE = color(0, 0, 255, 0) Blue. type( color ), public, parameter :: CLR_CYAN = color(0, 255, 255, 0) Cyan. type( color ), public, parameter :: CLR_GRAY = color(128, 128, 128, 0) Gray. type( color ), public, parameter :: CLR_GREEN = color(0, 128, 0, 0) Green. type( color ), public, parameter :: CLR_LIME = color(0, 255, 0, 0) Lime. type( color ), public, parameter :: CLR_MAGENTA = color(255, 0, 255, 0) Magenta. type( color ), public, parameter :: CLR_MAROON = color(128, 0, 0, 0) Maroon. type( color ), public, parameter :: CLR_NAVY = color(0, 0, 128, 0) Navy. type( color ), public, parameter :: CLR_OLIVE = color(128, 128, 0, 0) Olive. type( color ), public, parameter :: CLR_ORANGE = color(255, 165, 0, 0) Orange. type( color ), public, parameter :: CLR_PURPLE = color(128, 0, 128, 0) Purple. type( color ), public, parameter :: CLR_RED = color(255, 0, 0, 0) Red. type( color ), public, parameter :: CLR_SILVER = color(192, 192, 192, 0) Silver. type( color ), public, parameter :: CLR_TEAL = color(0, 128, 128, 0) Teal. type( color ), public, parameter :: CLR_WHITE = color(255, 255, 255, 0) White. type( color ), public, parameter :: CLR_YELLOW = color(255, 255, 0, 0) Yellow. type( color ), public, parameter, dimension(7) :: color_list = [color(0, int(0.447*255), int(0.741*255), 0), color(int(0.85*255), int(0.325*255), int(0.098*255), 0), color(int(0.929*255), int(0.694*255), int(0.125*255), 0), color(int(0.494*255), int(0.184*255), int(0.556*255), 0), color(int(0.466*255), int(0.674*255), int(0.188*255), 0), color(int(0.301*255), int(0.745*255), int(0.933*255), 0), color(int(0.635*255), int(0.078*255), int(0.184*255), 0)] Interfaces public interface operator(/=) private pure function clr_not_equals(x, y) result(rst) Arguments Type Intent Optional Attributes Name type( color ), intent(in) :: x type( color ), intent(in) :: y Return Value logical public interface operator(==) private pure function clr_equals(x, y) result(rst) Arguments Type Intent Optional Attributes Name type( color ), intent(in) :: x type( color ), intent(in) :: y Return Value logical Derived Types type, public :: color Describes an RGB color. Components Type Visibility Attributes Name Initial integer(kind=int32), public :: alpha = 0 The alpha component of the color (must be between 0 and 255).\nNotice, 0 is fully opaque and 255 is fully transparent. integer(kind=int32), public :: blue = 255 The blue component of the color (must be between 0 and 255). integer(kind=int32), public :: green = 0 The green component of the color (must be between 0 and 255). integer(kind=int32), public :: red = 0 The red component of the color (must be between 0 and 255). Type-Bound Procedures procedure\n , public\n, pass :: copy_from =>\n clr_copy_from Subroutine procedure\n , public\n, pass :: to_hex_string =>\n clr_to_hex_string Function","tags":"","loc":"module\\fplot_colors.html"},{"title":"fplot_constants – FPLOT","text":"Uses iso_fortran_env Contents Variables ARROW_BACKHEAD ARROW_EMPTY ARROW_FILLED ARROW_HEAD ARROW_HEADS ARROW_NO_BORDER ARROW_NO_FILL ARROW_NO_HEAD COORDINATES_CARTESIAN COORDINATES_CYLINDRICAL COORDINATES_SPHERICAL GNUPLOT_DEFAULT_FONTNAME GNUPLOT_DEFAULT_FONT_SIZE GNUPLOT_DEFAULT_WINDOW_HEIGHT GNUPLOT_DEFAULT_WINDOW_WIDTH GNUPLOT_HORIZONTAL_ALIGN_CENTER GNUPLOT_HORIZONTAL_ALIGN_LEFT GNUPLOT_HORIZONTAL_ALIGN_RIGHT GNUPLOT_MAX_LABEL_LENGTH GNUPLOT_MAX_PATH_LENGTH GNUPLOT_ROTATION_ORIGIN_CENTER GNUPLOT_ROTATION_ORIGIN_LEFT GNUPLOT_ROTATION_ORIGIN_RIGHT GNUPLOT_TERMINAL_LATEX GNUPLOT_TERMINAL_PNG GNUPLOT_TERMINAL_QT GNUPLOT_TERMINAL_WIN32 GNUPLOT_TERMINAL_WXT LEGEND_ARRANGE_HORIZONTALLY LEGEND_ARRANGE_VERTICALLY LEGEND_BOTTOM LEGEND_CENTER LEGEND_LEFT LEGEND_RIGHT LEGEND_TOP LINE_DASHED LINE_DASH_DOTTED LINE_DASH_DOT_DOT LINE_DOTTED LINE_SOLID MARKER_ASTERISK MARKER_EMPTY_CIRCLE MARKER_EMPTY_NABLA MARKER_EMPTY_RHOMBUS MARKER_EMPTY_SQUARE MARKER_EMPTY_TRIANGLE MARKER_FILLED_CIRCLE MARKER_FILLED_NABLA MARKER_FILLED_RHOMBUS MARKER_FILLED_SQUARE MARKER_FILLED_TRIANGLE MARKER_PLUS MARKER_X PLOTDATA_MAX_NAME_LENGTH POLAR_THETA_BOTTOM POLAR_THETA_CCW POLAR_THETA_CW POLAR_THETA_LEFT POLAR_THETA_RIGHT POLAR_THETA_TOP Variables Type Visibility Attributes Name Initial integer(kind=int32), public, parameter :: ARROW_BACKHEAD = 2 Defines an arrow with it's head at it's back end (tail). integer(kind=int32), public, parameter :: ARROW_EMPTY = 101 Defines an empty arrow head. integer(kind=int32), public, parameter :: ARROW_FILLED = 100 Defines a filled arrow head. integer(kind=int32), public, parameter :: ARROW_HEAD = 1 Defines an arrow with a traditional head. integer(kind=int32), public, parameter :: ARROW_HEADS = 3 Defines an arrow with a head on both ends. integer(kind=int32), public, parameter :: ARROW_NO_BORDER = 103 Defines an arrow head with no border. integer(kind=int32), public, parameter :: ARROW_NO_FILL = 102 Defines an arrow head without fill. integer(kind=int32), public, parameter :: ARROW_NO_HEAD = 0 Defines an arrow with no head. integer(kind=int32), public, parameter :: COORDINATES_CARTESIAN = 100 Defines a Cartesian coordinate system. integer(kind=int32), public, parameter :: COORDINATES_CYLINDRICAL = 102 Defines a cylindrical coordinate system. integer(kind=int32), public, parameter :: COORDINATES_SPHERICAL = 101 Defines a spherical coordinate system. character(len=*), public, parameter :: GNUPLOT_DEFAULT_FONTNAME = \"Calibri\" Defines the default font used by text on the graph. integer(kind=int32), public, parameter :: GNUPLOT_DEFAULT_FONT_SIZE = 14 Defines the default font size used by text on the graph. integer(kind=int32), public, parameter :: GNUPLOT_DEFAULT_WINDOW_HEIGHT = 420 The default GNUPLOT window height, in pixels. integer(kind=int32), public, parameter :: GNUPLOT_DEFAULT_WINDOW_WIDTH = 640 The default GNUPLOT window width, in pixels. character(len=*), public, parameter :: GNUPLOT_HORIZONTAL_ALIGN_CENTER = \"center\" Defines the text should be centered. character(len=*), public, parameter :: GNUPLOT_HORIZONTAL_ALIGN_LEFT = \"left\" Defines the text should be aligned to the left. character(len=*), public, parameter :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT = \"right\" Defines the text should be aligned to the right. integer(kind=int32), public, parameter :: GNUPLOT_MAX_LABEL_LENGTH = 128 Defines the maximum number of characters allowed in a graph label. integer(kind=int32), public, parameter :: GNUPLOT_MAX_PATH_LENGTH = 256 Defines the maximum number of characters allowed in a file path. character(len=*), public, parameter :: GNUPLOT_ROTATION_ORIGIN_CENTER = \"center\" Defines the text should be rotated around the center of the text. character(len=*), public, parameter :: GNUPLOT_ROTATION_ORIGIN_LEFT = \"left\" Defines the text should be rotated around the left side of the text. character(len=*), public, parameter :: GNUPLOT_ROTATION_ORIGIN_RIGHT = \"right\" Defines the text should be rotated around the right side of the text. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_LATEX = 5 Defines a LATEX terminal. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_PNG = 4 Defines a PNG terminal. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_QT = 3 Defines a QT terminal. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_WIN32 = 1 Defines a Win32 terminal. integer(kind=int32), public, parameter :: GNUPLOT_TERMINAL_WXT = 2 Defines a WXT terminal. character(len=*), public, parameter :: LEGEND_ARRANGE_HORIZONTALLY = \"horizontal\" Defines the legend should be arranged such that the row count\nis minimized. character(len=*), public, parameter :: LEGEND_ARRANGE_VERTICALLY = \"vertical\" Defines the legend should be arranged such that the column count\nis minimized. character(len=*), public, parameter :: LEGEND_BOTTOM = \"bottom\" Defines the legend should be placed at the bottom of the plot. character(len=*), public, parameter :: LEGEND_CENTER = \"center\" Defines the legend should be centered on the plot. character(len=*), public, parameter :: LEGEND_LEFT = \"left\" Defines the legend should be placed at the left of the plot. character(len=*), public, parameter :: LEGEND_RIGHT = \"right\" Defines the legend should be placed at the right of the plot. character(len=*), public, parameter :: LEGEND_TOP = \"top\" Defines the legend should be placed at the top of the plot. integer(kind=int32), public, parameter :: LINE_DASHED = 2 Defines a dashed line. integer(kind=int32), public, parameter :: LINE_DASH_DOTTED = 4 Defines a dash-dotted line. integer(kind=int32), public, parameter :: LINE_DASH_DOT_DOT = 5 Defines a dash-dot-dotted line. integer(kind=int32), public, parameter :: LINE_DOTTED = 3 Defines a dotted line. integer(kind=int32), public, parameter :: LINE_SOLID = 1 Defines a solid line. integer(kind=int32), public, parameter :: MARKER_ASTERISK = 3 Defines an * data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_CIRCLE = 6 Defines an empty circle-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_NABLA = 10 Defines an empty nabla-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_RHOMBUS = 12 Defines an empty rhombus-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_SQUARE = 4 Defines an empty square-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_EMPTY_TRIANGLE = 8 Defines an empty triangle-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_CIRCLE = 7 Defines an filled circle-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_NABLA = 11 Defines an filled nabla-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_RHOMBUS = 13 Defines an filled rhombus-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_SQUARE = 5 Defines an filled square-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_FILLED_TRIANGLE = 9 Defines an filled triangle-shaped data point marker. integer(kind=int32), public, parameter :: MARKER_PLUS = 1 Defines a + data point marker. integer(kind=int32), public, parameter :: MARKER_X = 2 Defines an x data point marker. integer(kind=int32), public, parameter :: PLOTDATA_MAX_NAME_LENGTH = 128 Defines the maximum number of characters allowed in a graph label. character(len=*), public, parameter :: POLAR_THETA_BOTTOM = \"bottom\" States that theta should start at the bottom of the plot. character(len=*), public, parameter :: POLAR_THETA_CCW = \"ccw\" States that theta should proceed in a counter-clockwise direction. character(len=*), public, parameter :: POLAR_THETA_CW = \"cw\" States that theta should proceed in a clockwise direction. character(len=*), public, parameter :: POLAR_THETA_LEFT = \"left\" States that theta should start at the left of the plot. character(len=*), public, parameter :: POLAR_THETA_RIGHT = \"right\" States that theta should start at the right of the plot. character(len=*), public, parameter :: POLAR_THETA_TOP = \"top\" States that theta should start at the top of the plot.","tags":"","loc":"module\\fplot_constants.html"},{"title":"fplot_core – FPLOT","text":"FPLOT is a Fortran library providing a means of interacting with GNUPLOT from a Fortran program. The library\nis designed in an object-oriented manner, and as such utilizes language \nfeatures that require a compiler that supports the 2003 standard. Additionally, it is expected that Gnuplot is installed on the system \npath. For full functionallity, a minimum of GNUPLOT v5.2 is expected. Uses fplot_plot_axis fplot_colors fplot_qt_terminal fplot_plot_2d fplot_triangulations_delaunay_2d fplot_colormap fplot_plot_data_bar fplot_stats_plots fplot_delaunay_tri_surface fplot_plot_object fplot_arrow fplot_surface_plot fplot_plot_data fplot_constants fplot_plot_data_histogram fplot_plot_data_tri_2d fplot_tri_surface_plot_data fplot_latex_terminal fplot_plot_3d fplot_surface_plot_data fplot_plot_data_2d fplot_terminal fplot_wxt_terminal fplot_windows_terminal fplot_png_terminal fplot_filled_plot_data fplot_plot_bar fplot_plot_data_3d fplot_vector_field_plot_data fplot_core_routines fplot_multiplot fplot_plot_polar fplot_label fplot_plot fplot_plot_data_error_bars fplot_legend Contents None","tags":"","loc":"module\\fplot_core.html"},{"title":"fplot_core_routines – FPLOT","text":"Uses iso_fortran_env Contents Functions linspace logspace meshgrid Functions public pure function linspace (start, finish, npts) result(x) Constructs a linearly spaced array. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in) :: start The first value in the array. real(kind=real64), intent(in) :: finish The last value in the array. integer(kind=int32), intent(in) :: npts The number of values in the array. Return Value real(kind=real64), allocatable, dimension(:) The resulting array. public pure function logspace (start, finish, npts) result(x) Construcst a logarithmically spaced array. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in) :: start The exponent of the first value in the array. real(kind=real64), intent(in) :: finish The exponent of the final value in the array. integer(kind=int32), intent(in) :: npts The number of values in the array. Return Value real(kind=real64), allocatable, dimension(:) The resulting array. public pure function meshgrid (x, y) result(xy) Constructs two matrices (X and Y) from x and y data arrays. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An M-element array of x data points. real(kind=real64), intent(in), dimension(:) :: y An N-element array of y data points. Return Value real(kind=real64), allocatable, dimension(:,:,:) An N-by-M-by-2 array containing the x data matrix on the first \npage of the array, and the y data matrix on the second page.","tags":"","loc":"module\\fplot_core_routines.html"},{"title":"fplot_delaunay_tri_surface – FPLOT","text":"Uses ferror iso_fortran_env fplot_triangulations_delaunay_2d fplot_errors ieee_arithmetic Contents Derived Types delaunay_tri_surface Derived Types type, public, extends( delaunay_tri_2d ) :: delaunay_tri_surface Provides a type describing a triangulated surface. Type-Bound Procedures procedure\n , public\n :: create =>\n d2d_init Subroutine procedure\n , public\n :: define_function_values =>\n dts_define_fcn Subroutine generic,\n public\n :: evaluate =>\n dts_interp_1, dts_interp_2 procedure\n , public\n :: find_triangle =>\n d2d_get_tri_with_pt Function procedure\n , public\n :: get_indices =>\n d2d_get_tris Function procedure\n , public\n :: get_point_count =>\n d2d_get_pt_count Function procedure\n , public\n :: get_points_x =>\n d2d_get_x_pts Function procedure\n , public\n :: get_points_y =>\n d2d_get_y_pts Function procedure\n , public\n :: get_points_z =>\n dts_get_z Function procedure\n , public\n :: get_triangle_count =>\n d2d_get_tri_count Function","tags":"","loc":"module\\fplot_delaunay_tri_surface.html"},{"title":"fplot_errors – FPLOT","text":"Uses ferror iso_fortran_env Contents Variables PLOT_ARRAY_SIZE_MISMATCH_ERROR PLOT_GNUPLOT_FILE_ERROR PLOT_INVALID_INPUT_ERROR PLOT_INVALID_OPERATION_ERROR PLOT_OUT_OF_MEMORY_ERROR Subroutines report_array_size_mismatch_error report_file_create_error report_matrix_size_mismatch_error report_memory_error Variables Type Visibility Attributes Name Initial integer(kind=int32), public, parameter :: PLOT_ARRAY_SIZE_MISMATCH_ERROR = 1003 Occurs if there is an array size mismatch error. integer(kind=int32), public, parameter :: PLOT_GNUPLOT_FILE_ERROR = 1004 Occurs if there is a GNUPLOT file error. integer(kind=int32), public, parameter :: PLOT_INVALID_INPUT_ERROR = 1001 Occurs if an invalid input is provided. integer(kind=int32), public, parameter :: PLOT_INVALID_OPERATION_ERROR = 1002 Occurs if an attempt is made to perform an invalid operation. integer(kind=int32), public, parameter :: PLOT_OUT_OF_MEMORY_ERROR = 1000 Occurs if there is insufficient memory available for the\nrequested operation. Subroutines public subroutine report_array_size_mismatch_error (err, fcn, name, expected, actual) Reports an array size mismatch error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: name The variable name. integer(kind=int32), intent(in) :: expected The expected array size. integer(kind=int32), intent(in) :: actual The actual array size. public subroutine report_file_create_error (err, fcn, fname, flag) Reports an I/O error related to file creating. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: fname The filename. integer(kind=int32), intent(in) :: flag The error flag returned by the system. public subroutine report_matrix_size_mismatch_error (err, fcn, name, mexp, nexp, mact, nact) Reports a matrix size mismatch error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. character(len=*), intent(in) :: name The variable name. integer(kind=int32), intent(in) :: mexp The expected number of rows. integer(kind=int32), intent(in) :: nexp The expected number of columns. integer(kind=int32), intent(in) :: mact The actual number of rows. integer(kind=int32), intent(in) :: nact The actual number of columns. public subroutine report_memory_error (err, fcn, flag) Reports a memory allocation error. Arguments Type Intent Optional Attributes Name class(errors), intent(inout) :: err The error handling object. character(len=*), intent(in) :: fcn The name of the function or subroutine in which the error occurred. integer(kind=int32), intent(in) :: flag The error flag returned by the system.","tags":"","loc":"module\\fplot_errors.html"},{"title":"fplot_filled_plot_data – FPLOT","text":"Uses ferror iso_fortran_env fplot_colors fplot_plot_data fplot_errors strings Contents Derived Types filled_plot_data Derived Types type, public, extends( plot_data_colored ) :: filled_plot_data Defines a two-dimensional filled plot data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n fpd_define_data Subroutine procedure\n , public\n :: get_axes_string =>\n fpd_get_axes_cmd Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n fpd_get_cmd Function procedure\n , public\n :: get_data_string =>\n fpd_get_data_cmd Function procedure\n , public\n :: get_draw_against_y2 =>\n fpd_get_draw_against_y2 Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_against_y2 =>\n fpd_set_draw_against_y2 Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine","tags":"","loc":"module\\fplot_filled_plot_data.html"},{"title":"fplot_label – FPLOT","text":"Uses strings iso_fortran_env fplot_plot_object fplot_constants Contents Derived Types plot_label Derived Types type, public, extends( plot_object ) :: plot_label Defines a plot label. Type-Bound Procedures procedure\n , public\n :: get_angle =>\n lbl_get_angle Function procedure\n , public\n :: get_command_string =>\n lbl_get_cmd Function procedure\n , public\n :: get_is_visible =>\n lbl_get_is_visible Function procedure\n , public\n :: get_position =>\n lbl_get_position Function procedure\n , public\n :: get_text =>\n lbl_get_txt Function procedure\n , public\n :: set_angle =>\n lbl_set_angle Subroutine procedure\n , public\n :: set_is_visible =>\n lbl_set_is_visible Subroutine procedure\n , public\n :: set_position =>\n lbl_set_position Subroutine procedure\n , public\n :: set_text =>\n lbl_set_txt Subroutine","tags":"","loc":"module\\fplot_label.html"},{"title":"fplot_latex_terminal – FPLOT","text":"Uses fplot_constants strings iso_fortran_env fplot_terminal Contents Derived Types latex_terminal Derived Types type, public, extends( terminal ) :: latex_terminal A LATEX terminal. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n tex_get_command_string Function procedure\n , public\n :: get_filename =>\n tex_get_filename Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n tex_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_filename =>\n tex_set_filename Subroutine procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_latex_terminal.html"},{"title":"fplot_legend – FPLOT","text":"Uses strings iso_fortran_env fplot_plot_object fplot_constants Contents Derived Types legend Derived Types type, public, extends( plot_object ) :: legend Defines a legend object. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n leg_get_command_txt Function procedure\n , public\n :: get_draw_border =>\n leg_get_box Function procedure\n , public\n :: get_draw_inside_axes =>\n leg_get_inside Function procedure\n , public\n :: get_horizontal_position =>\n leg_get_horz_pos Function procedure\n , public\n :: get_is_opaque =>\n leg_get_opaque Function procedure\n , public\n :: get_is_visible =>\n leg_get_visible Function procedure\n , public\n :: get_layout =>\n leg_get_layout Function procedure\n , public\n :: get_vertical_position =>\n leg_get_vert_pos Function procedure\n , public\n :: set_draw_border =>\n leg_set_box Subroutine procedure\n , public\n :: set_draw_inside_axes =>\n leg_set_inside Subroutine procedure\n , public\n :: set_horizontal_position =>\n leg_set_horz_pos Subroutine procedure\n , public\n :: set_is_opaque =>\n leg_set_opaque Subroutine procedure\n , public\n :: set_is_visible =>\n leg_set_visible Subroutine procedure\n , public\n :: set_layout =>\n leg_set_layout Subroutine procedure\n , public\n :: set_vertical_position =>\n leg_set_vert_pos Subroutine","tags":"","loc":"module\\fplot_legend.html"},{"title":"fplot_multiplot – FPLOT","text":"Uses iso_fortran_env ferror fplot_plot_object fplot_terminal fplot_qt_terminal fplot_wxt_terminal fplot_constants fplot_errors strings collections fplot_plot fplot_latex_terminal fplot_windows_terminal fplot_png_terminal Contents Derived Types multiplot Derived Types type, public, extends( plot_object ) :: multiplot Defines a multi-plot layout. Components Type Visibility Attributes Name Initial class( terminal ), public, pointer :: m_terminal => null() The GNUPLOT terminal object to target. Finalizations Procedures final :: mp_clean Type-Bound Procedures procedure\n , public\n :: draw =>\n mp_draw Subroutine procedure\n , public\n :: get =>\n mp_get Function procedure\n , public\n :: get_column_count =>\n mp_get_cols Function procedure\n , public\n :: get_command_string =>\n mp_get_command Function procedure\n , public\n :: get_font_name =>\n mp_get_font Function procedure\n , public\n :: get_font_size =>\n mp_get_font_size Function procedure\n , public\n :: get_plot_count =>\n mp_get_count Function procedure\n , public\n :: get_row_count =>\n mp_get_rows Function procedure\n , public\n :: get_terminal =>\n mp_get_term Function procedure\n , public\n :: get_title =>\n mp_get_title Function procedure\n , public\n :: initialize =>\n mp_init Subroutine procedure\n , public\n :: is_title_defined =>\n mp_has_title Function procedure\n , public\n :: save_file =>\n mp_save Subroutine procedure\n , public\n :: set =>\n mp_set Subroutine procedure\n , public\n :: set_font_name =>\n mp_set_font Subroutine procedure\n , public\n :: set_font_size =>\n mp_set_font_size Subroutine procedure\n , public\n :: set_title =>\n mp_set_title Subroutine","tags":"","loc":"module\\fplot_multiplot.html"},{"title":"fplot_plot – FPLOT","text":"Uses fplot_colors fplot_qt_terminal fplot_colormap fplot_errors collections fplot_plot_object fplot_arrow fplot_plot_data fplot_constants strings fplot_latex_terminal iso_fortran_env ferror fplot_terminal fplot_wxt_terminal fplot_windows_terminal fplot_png_terminal fplot_label fplot_legend Contents Derived Types plot Derived Types type, public, extends( plot_object ) :: plot Defines the basic GNUPLOT plot. Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_bottom_margin =>\n plt_get_bottom_margin Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n plt_get_cmd Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_left_margin =>\n plt_get_left_margin Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_right_margin =>\n plt_get_right_margin Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_top_margin =>\n plt_get_top_margin Function procedure\n , public\n :: initialize =>\n plt_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_bottom_margin =>\n plt_set_bottom_margin Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_left_margin =>\n plt_set_left_margin Subroutine procedure\n , public\n :: set_right_margin =>\n plt_set_right_margin Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_top_margin =>\n plt_set_top_margin Subroutine","tags":"","loc":"module\\fplot_plot.html"},{"title":"fplot_plot_2d – FPLOT","text":"Uses iso_fortran_env fplot_plot_axis ferror fplot_plot_data fplot_errors strings fplot_plot fplot_legend Contents Derived Types plot_2d Derived Types type, public, extends( plot ) :: plot_2d A plot object defining a 2D plot. Finalizations Procedures final :: p2d_clean_up Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_bottom_margin =>\n plt_get_bottom_margin Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n p2d_get_cmd Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_left_margin =>\n plt_get_left_margin Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_right_margin =>\n plt_get_right_margin Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_square_axes =>\n p2d_get_square_axes Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_top_margin =>\n plt_get_top_margin Function procedure\n , public\n :: get_use_y2_axis =>\n p2d_get_use_y2 Function procedure\n , public\n :: get_x_axis =>\n p2d_get_x_axis Function procedure\n , public\n :: get_y2_axis =>\n p2d_get_y2_axis Function procedure\n , public\n :: get_y_axis =>\n p2d_get_y_axis Function procedure\n , public\n :: initialize =>\n p2d_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_bottom_margin =>\n plt_set_bottom_margin Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_left_margin =>\n plt_set_left_margin Subroutine procedure\n , public\n :: set_right_margin =>\n plt_set_right_margin Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_square_axes =>\n p2d_set_square_axes Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_top_margin =>\n plt_set_top_margin Subroutine procedure\n , public\n :: set_use_y2_axis =>\n p2d_set_use_y2 Subroutine","tags":"","loc":"module\\fplot_plot_2d.html"},{"title":"fplot_plot_3d – FPLOT","text":"Uses iso_fortran_env fplot_plot_axis ferror fplot_plot_data fplot_constants fplot_errors strings fplot_plot fplot_legend Contents Derived Types plot_3d Derived Types type, public, extends( plot ) :: plot_3d A plot object defining a 3D plot. Finalizations Procedures final :: p3d_clean_up Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_azimuth =>\n p3d_get_azimuth Function procedure\n , public\n :: get_bottom_margin =>\n plt_get_bottom_margin Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n p3d_get_cmd Function procedure\n , public\n :: get_coordinate_system =>\n p3d_get_csys Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_elevation =>\n p3d_get_elevation Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_left_margin =>\n plt_get_left_margin Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_right_margin =>\n plt_get_right_margin Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_top_margin =>\n plt_get_top_margin Function procedure\n , public\n :: get_use_map_view =>\n p3d_get_use_map_view Function procedure\n , public\n :: get_x_axis =>\n p3d_get_x_axis Function procedure\n , public\n :: get_y_axis =>\n p3d_get_y_axis Function procedure\n , public\n :: get_z_axis =>\n p3d_get_z_axis Function procedure\n , public\n :: get_z_intersect_xy =>\n p3d_get_z_axis_intersect Function procedure\n , public\n :: initialize =>\n p3d_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_azimuth =>\n p3d_set_azimuth Subroutine procedure\n , public\n :: set_bottom_margin =>\n plt_set_bottom_margin Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_coordinate_system =>\n p3d_set_csys Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_elevation =>\n p3d_set_elevation Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_left_margin =>\n plt_set_left_margin Subroutine procedure\n , public\n :: set_right_margin =>\n plt_set_right_margin Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_top_margin =>\n plt_set_top_margin Subroutine procedure\n , public\n :: set_use_map_view =>\n p3d_set_use_map_view Subroutine procedure\n , public\n :: set_z_intersect_xy =>\n p3d_set_z_axis_intersect Subroutine","tags":"","loc":"module\\fplot_plot_3d.html"},{"title":"fplot_plot_axis – FPLOT","text":"Uses strings iso_fortran_env fplot_plot_object fplot_constants Contents Interfaces pa_get_string_result Derived Types plot_axis x_axis y2_axis y_axis z_axis Interfaces interface public function pa_get_string_result(this) result(x) Retrieves a string from a plot_axis. Arguments Type Intent Optional Attributes Name class( plot_axis ), intent(in) :: this The plot_axis object. Return Value character(len=:), allocatable The string. Derived Types type, public, extends( plot_object ) :: plot_axis Defines a plot axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n(pa_get_string_result) , public\n :: get_id_string procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_offset_tics =>\n pa_get_offset_tics Function procedure\n , public\n :: get_show_tic_labels =>\n pa_get_show_tic_labels Function procedure\n , public\n :: get_tic_label_alignment =>\n pa_get_tic_label_alignment Function procedure\n , public\n :: get_tic_label_angle =>\n pa_get_tic_label_angle Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_tic_label_rotation_origin =>\n pa_get_tic_rotation_origin Function procedure\n , public\n :: get_tic_label_x_offset =>\n pa_get_tic_x_offset Function procedure\n , public\n :: get_tic_label_y_offset =>\n pa_get_tic_y_offset Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_title_x_offset =>\n pa_get_title_x_offset Function procedure\n , public\n :: get_title_y_offset =>\n pa_get_title_y_offset Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_offset_tics =>\n pa_set_offset_tics Subroutine procedure\n , public\n :: set_show_tic_labels =>\n pa_set_show_tic_labels Subroutine procedure\n , public\n :: set_tic_label_alignment =>\n pa_set_tic_label_alignment Subroutine procedure\n , public\n :: set_tic_label_angle =>\n pa_set_tic_label_angle Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_tic_label_rotation_origin =>\n pa_set_tic_rotation_origin Subroutine procedure\n , public\n :: set_tic_label_x_offset =>\n pa_set_tic_x_offset Subroutine procedure\n , public\n :: set_tic_label_y_offset =>\n pa_set_tic_y_offset Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_title_x_offset =>\n pa_set_title_x_offset Subroutine procedure\n , public\n :: set_title_y_offset =>\n pa_set_title_y_offset Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine type, public, extends( plot_axis ) :: x_axis Defines an x-axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n , public\n :: get_id_string =>\n xa_get_id Function procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_offset_tics =>\n pa_get_offset_tics Function procedure\n , public\n :: get_show_tic_labels =>\n pa_get_show_tic_labels Function procedure\n , public\n :: get_tic_label_alignment =>\n pa_get_tic_label_alignment Function procedure\n , public\n :: get_tic_label_angle =>\n pa_get_tic_label_angle Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_tic_label_rotation_origin =>\n pa_get_tic_rotation_origin Function procedure\n , public\n :: get_tic_label_x_offset =>\n pa_get_tic_x_offset Function procedure\n , public\n :: get_tic_label_y_offset =>\n pa_get_tic_y_offset Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_title_x_offset =>\n pa_get_title_x_offset Function procedure\n , public\n :: get_title_y_offset =>\n pa_get_title_y_offset Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_offset_tics =>\n pa_set_offset_tics Subroutine procedure\n , public\n :: set_show_tic_labels =>\n pa_set_show_tic_labels Subroutine procedure\n , public\n :: set_tic_label_alignment =>\n pa_set_tic_label_alignment Subroutine procedure\n , public\n :: set_tic_label_angle =>\n pa_set_tic_label_angle Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_tic_label_rotation_origin =>\n pa_set_tic_rotation_origin Subroutine procedure\n , public\n :: set_tic_label_x_offset =>\n pa_set_tic_x_offset Subroutine procedure\n , public\n :: set_tic_label_y_offset =>\n pa_set_tic_y_offset Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_title_x_offset =>\n pa_set_title_x_offset Subroutine procedure\n , public\n :: set_title_y_offset =>\n pa_set_title_y_offset Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine type, public, extends( plot_axis ) :: y2_axis Defines a secondary y-axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n , public\n :: get_id_string =>\n y2a_get_id Function procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_offset_tics =>\n pa_get_offset_tics Function procedure\n , public\n :: get_show_tic_labels =>\n pa_get_show_tic_labels Function procedure\n , public\n :: get_tic_label_alignment =>\n pa_get_tic_label_alignment Function procedure\n , public\n :: get_tic_label_angle =>\n pa_get_tic_label_angle Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_tic_label_rotation_origin =>\n pa_get_tic_rotation_origin Function procedure\n , public\n :: get_tic_label_x_offset =>\n pa_get_tic_x_offset Function procedure\n , public\n :: get_tic_label_y_offset =>\n pa_get_tic_y_offset Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_title_x_offset =>\n pa_get_title_x_offset Function procedure\n , public\n :: get_title_y_offset =>\n pa_get_title_y_offset Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_offset_tics =>\n pa_set_offset_tics Subroutine procedure\n , public\n :: set_show_tic_labels =>\n pa_set_show_tic_labels Subroutine procedure\n , public\n :: set_tic_label_alignment =>\n pa_set_tic_label_alignment Subroutine procedure\n , public\n :: set_tic_label_angle =>\n pa_set_tic_label_angle Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_tic_label_rotation_origin =>\n pa_set_tic_rotation_origin Subroutine procedure\n , public\n :: set_tic_label_x_offset =>\n pa_set_tic_x_offset Subroutine procedure\n , public\n :: set_tic_label_y_offset =>\n pa_set_tic_y_offset Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_title_x_offset =>\n pa_set_title_x_offset Subroutine procedure\n , public\n :: set_title_y_offset =>\n pa_set_title_y_offset Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine type, public, extends( plot_axis ) :: y_axis Defines a y-axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n , public\n :: get_id_string =>\n ya_get_id Function procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_offset_tics =>\n pa_get_offset_tics Function procedure\n , public\n :: get_show_tic_labels =>\n pa_get_show_tic_labels Function procedure\n , public\n :: get_tic_label_alignment =>\n pa_get_tic_label_alignment Function procedure\n , public\n :: get_tic_label_angle =>\n pa_get_tic_label_angle Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_tic_label_rotation_origin =>\n pa_get_tic_rotation_origin Function procedure\n , public\n :: get_tic_label_x_offset =>\n pa_get_tic_x_offset Function procedure\n , public\n :: get_tic_label_y_offset =>\n pa_get_tic_y_offset Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_title_x_offset =>\n pa_get_title_x_offset Function procedure\n , public\n :: get_title_y_offset =>\n pa_get_title_y_offset Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_offset_tics =>\n pa_set_offset_tics Subroutine procedure\n , public\n :: set_show_tic_labels =>\n pa_set_show_tic_labels Subroutine procedure\n , public\n :: set_tic_label_alignment =>\n pa_set_tic_label_alignment Subroutine procedure\n , public\n :: set_tic_label_angle =>\n pa_set_tic_label_angle Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_tic_label_rotation_origin =>\n pa_set_tic_rotation_origin Subroutine procedure\n , public\n :: set_tic_label_x_offset =>\n pa_set_tic_x_offset Subroutine procedure\n , public\n :: set_tic_label_y_offset =>\n pa_set_tic_y_offset Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_title_x_offset =>\n pa_set_title_x_offset Subroutine procedure\n , public\n :: set_title_y_offset =>\n pa_set_title_y_offset Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine type, public, extends( plot_axis ) :: z_axis Defines a z-axis object. Type-Bound Procedures procedure\n , public\n :: get_autoscale =>\n pa_get_autoscale Function procedure\n , public\n :: get_command_string =>\n pa_get_cmd_string Function procedure\n , public\n :: get_id_string =>\n za_get_id Function procedure\n , public\n :: get_is_log_scaled =>\n pa_get_log_scale Function procedure\n , public\n :: get_limits =>\n pa_get_axis_limits Function procedure\n , public\n :: get_offset_tics =>\n pa_get_offset_tics Function procedure\n , public\n :: get_show_tic_labels =>\n pa_get_show_tic_labels Function procedure\n , public\n :: get_tic_label_alignment =>\n pa_get_tic_label_alignment Function procedure\n , public\n :: get_tic_label_angle =>\n pa_get_tic_label_angle Function procedure\n , public\n :: get_tic_label_format =>\n pa_get_tic_label_fmt Function procedure\n , public\n :: get_tic_label_rotation_origin =>\n pa_get_tic_rotation_origin Function procedure\n , public\n :: get_tic_label_x_offset =>\n pa_get_tic_x_offset Function procedure\n , public\n :: get_tic_label_y_offset =>\n pa_get_tic_y_offset Function procedure\n , public\n :: get_title =>\n pa_get_title Function procedure\n , public\n :: get_title_x_offset =>\n pa_get_title_x_offset Function procedure\n , public\n :: get_title_y_offset =>\n pa_get_title_y_offset Function procedure\n , public\n :: get_use_default_tic_label_format =>\n pa_get_use_dft_tic_lbl_fmt Function procedure\n , public\n :: get_zero_axis =>\n pa_get_zero_axis Function procedure\n , public\n :: get_zero_axis_line_width =>\n pa_get_zero_axis_width Function procedure\n , public\n :: is_title_defined =>\n pa_has_title Function procedure\n , public\n :: set_autoscale =>\n pa_set_autoscale Subroutine procedure\n , public\n :: set_is_log_scaled =>\n pa_set_log_scale Subroutine procedure\n , public\n :: set_limits =>\n pa_set_axis_limits Subroutine procedure\n , public\n :: set_offset_tics =>\n pa_set_offset_tics Subroutine procedure\n , public\n :: set_show_tic_labels =>\n pa_set_show_tic_labels Subroutine procedure\n , public\n :: set_tic_label_alignment =>\n pa_set_tic_label_alignment Subroutine procedure\n , public\n :: set_tic_label_angle =>\n pa_set_tic_label_angle Subroutine procedure\n , public\n :: set_tic_label_format =>\n pa_set_tic_label_fmt Subroutine procedure\n , public\n :: set_tic_label_rotation_origin =>\n pa_set_tic_rotation_origin Subroutine procedure\n , public\n :: set_tic_label_x_offset =>\n pa_set_tic_x_offset Subroutine procedure\n , public\n :: set_tic_label_y_offset =>\n pa_set_tic_y_offset Subroutine procedure\n , public\n :: set_title =>\n pa_set_title Subroutine procedure\n , public\n :: set_title_x_offset =>\n pa_set_title_x_offset Subroutine procedure\n , public\n :: set_title_y_offset =>\n pa_set_title_y_offset Subroutine procedure\n , public\n :: set_use_default_tic_label_format =>\n pa_set_use_dft_tic_lbl_fmt Subroutine procedure\n , public\n :: set_zero_axis =>\n pa_set_zero_axis Subroutine procedure\n , public\n :: set_zero_axis_line_width =>\n pa_set_zero_axis_width Subroutine","tags":"","loc":"module\\fplot_plot_axis.html"},{"title":"fplot_plot_bar – FPLOT","text":"Uses fplot_plot_2d iso_fortran_env strings Contents Derived Types plot_bar Derived Types type, public, extends( plot_2d ) :: plot_bar Defines a 2D plot tailored towards bar plotting. Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_bar_width =>\n pb_get_bar_width Function procedure\n , public\n :: get_bottom_margin =>\n plt_get_bottom_margin Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n pb_get_cmd Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_left_margin =>\n plt_get_left_margin Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_right_margin =>\n plt_get_right_margin Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_square_axes =>\n p2d_get_square_axes Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_top_margin =>\n plt_get_top_margin Function procedure\n , public\n :: get_use_y2_axis =>\n p2d_get_use_y2 Function procedure\n , public\n :: get_x_axis =>\n p2d_get_x_axis Function procedure\n , public\n :: get_y2_axis =>\n p2d_get_y2_axis Function procedure\n , public\n :: get_y_axis =>\n p2d_get_y_axis Function procedure\n , public\n :: initialize =>\n p2d_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_bar_width =>\n pb_set_bar_width Subroutine procedure\n , public\n :: set_bottom_margin =>\n plt_set_bottom_margin Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_left_margin =>\n plt_set_left_margin Subroutine procedure\n , public\n :: set_right_margin =>\n plt_set_right_margin Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_square_axes =>\n p2d_set_square_axes Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_top_margin =>\n plt_set_top_margin Subroutine procedure\n , public\n :: set_use_y2_axis =>\n p2d_set_use_y2 Subroutine","tags":"","loc":"module\\fplot_plot_bar.html"},{"title":"fplot_plot_data – FPLOT","text":"Uses iso_fortran_env ferror fplot_plot_object fplot_colors fplot_constants fplot_errors strings Contents Interfaces pd_get_string_result spd_get_int_value spd_get_string_result spd_get_value spd_set_value Derived Types plot_data plot_data_colored scatter_plot_data Interfaces interface public function pd_get_string_result(this) result(x) Retrieves a string from a plot_data object. Arguments Type Intent Optional Attributes Name class( plot_data ), intent(in) :: this The plot_data object. Return Value character(len=:), allocatable The string. interface public pure function spd_get_int_value(this) result(x) Gets an integer value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value integer(kind=int32) The value. interface public function spd_get_string_result(this) result(x) Gets a string value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. Return Value character(len=:), allocatable The string. interface public pure function spd_get_value(this, index) result(x) Gets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(in) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. Return Value real(kind=real64) The value. interface public subroutine spd_set_value(this, index, x) Sets an indexed value from the scatter_plot_data object. Arguments Type Intent Optional Attributes Name class( scatter_plot_data ), intent(inout) :: this The scatter_plot_data object. integer(kind=int32), intent(in) :: index The index. real(kind=real64), intent(in) :: x The value. Derived Types type, public, extends( plot_object ) :: plot_data A container for plot data. Type-Bound Procedures procedure\n(get_string_result) , public\n :: get_command_string procedure\n(pd_get_string_result) , public\n :: get_data_string procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_name =>\n pd_set_name Subroutine type, public, extends( plot_data ) :: plot_data_colored Defines a colored plot data set. Type-Bound Procedures procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n(get_string_result) , public\n :: get_command_string procedure\n(pd_get_string_result) , public\n :: get_data_string procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine type, public, extends( plot_data_colored ) :: scatter_plot_data A plot_data object for describing scatter plot data sets. Type-Bound Procedures procedure\n(spd_get_string_result) , public\n :: get_axes_string procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n spd_get_cmd Function procedure\n(spd_get_int_value) , public\n :: get_count procedure\n(pd_get_string_result) , public\n :: get_data_string procedure\n , public\n :: get_draw_line =>\n spd_get_draw_line Function procedure\n , public\n :: get_draw_markers =>\n spd_get_draw_markers Function procedure\n , public\n :: get_fill_curve =>\n spd_get_filled Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_line_style =>\n spd_get_line_style Function procedure\n , public\n :: get_line_width =>\n spd_get_line_width Function procedure\n , public\n :: get_marker_frequency =>\n spd_get_marker_frequency Function procedure\n , public\n :: get_marker_scaling =>\n spd_get_marker_scaling Function procedure\n , public\n :: get_marker_style =>\n spd_get_marker_style Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_simplification_factor =>\n spd_get_simplify_factor Function procedure\n , public\n :: get_simplify_data =>\n spd_get_simplify_data Function procedure\n , public\n :: get_use_data_dependent_colors =>\n spd_get_data_dependent_colors Function procedure\n , public\n :: get_use_variable_size_points =>\n spd_get_use_var_point_size Function procedure\n(spd_get_value) , public\n :: get_x procedure\n(spd_get_value) , public\n :: get_y procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_line =>\n spd_set_draw_line Subroutine procedure\n , public\n :: set_draw_markers =>\n spd_set_draw_markers Subroutine procedure\n , public\n :: set_fill_curve =>\n spd_set_filled Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_line_style =>\n spd_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n spd_set_line_width Subroutine procedure\n , public\n :: set_marker_frequency =>\n spd_set_marker_frequency Subroutine procedure\n , public\n :: set_marker_scaling =>\n spd_set_marker_scaling Subroutine procedure\n , public\n :: set_marker_style =>\n spd_set_marker_style Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_simplification_factor =>\n spd_set_simplify_factor Subroutine procedure\n , public\n :: set_simplify_data =>\n spd_set_simplify_data Subroutine procedure\n , public\n :: set_use_data_dependent_colors =>\n spd_set_data_dependent_colors Subroutine procedure\n , public\n :: set_use_variable_size_points =>\n spd_set_use_var_point_size Subroutine procedure\n(spd_set_value) , public\n :: set_x procedure\n(spd_set_value) , public\n :: set_y","tags":"","loc":"module\\fplot_plot_data.html"},{"title":"fplot_plot_data_2d – FPLOT","text":"Uses ferror iso_fortran_env fplot_simplify fplot_plot_data fplot_errors strings Contents Derived Types plot_data_2d Derived Types type, public, extends( scatter_plot_data ) :: plot_data_2d Defines a two-dimensional plot data set. Type-Bound Procedures generic,\n public\n :: define_data => pd2d_set_data_1 , pd2d_set_data_2 procedure\n , public\n :: get_axes_string =>\n pd2d_get_axes_cmd Function procedure\n , public\n :: get_color_data =>\n pd2d_get_c_array Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n spd_get_cmd Function procedure\n , public\n :: get_count =>\n pd2d_get_data_count Function procedure\n , public\n :: get_data_string =>\n pd2d_get_data_cmd Function procedure\n , public\n :: get_draw_against_y2 =>\n pd2d_get_draw_against_y2 Function procedure\n , public\n :: get_draw_line =>\n spd_get_draw_line Function procedure\n , public\n :: get_draw_markers =>\n spd_get_draw_markers Function procedure\n , public\n :: get_fill_curve =>\n spd_get_filled Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_line_style =>\n spd_get_line_style Function procedure\n , public\n :: get_line_width =>\n spd_get_line_width Function procedure\n , public\n :: get_marker_frequency =>\n spd_get_marker_frequency Function procedure\n , public\n :: get_marker_scaling =>\n spd_get_marker_scaling Function procedure\n , public\n :: get_marker_style =>\n spd_get_marker_style Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_point_size_data =>\n pd2d_get_ps_array Function procedure\n , public\n :: get_simplification_factor =>\n spd_get_simplify_factor Function procedure\n , public\n :: get_simplify_data =>\n spd_get_simplify_data Function procedure\n , public\n :: get_use_data_dependent_colors =>\n spd_get_data_dependent_colors Function procedure\n , public\n :: get_use_variable_size_points =>\n spd_get_use_var_point_size Function procedure\n , public\n :: get_x =>\n pd2d_get_x_data Function procedure\n , public\n :: get_x_data =>\n pd2d_get_x_array Function procedure\n , public\n :: get_y =>\n pd2d_get_y_data Function procedure\n , public\n :: get_y_data =>\n pd2d_get_y_array Function procedure\n , public\n, :: pd2d_set_data_1 Subroutine procedure\n , public\n, :: pd2d_set_data_2 Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_against_y2 =>\n pd2d_set_draw_against_y2 Subroutine procedure\n , public\n :: set_draw_line =>\n spd_set_draw_line Subroutine procedure\n , public\n :: set_draw_markers =>\n spd_set_draw_markers Subroutine procedure\n , public\n :: set_fill_curve =>\n spd_set_filled Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_line_style =>\n spd_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n spd_set_line_width Subroutine procedure\n , public\n :: set_marker_frequency =>\n spd_set_marker_frequency Subroutine procedure\n , public\n :: set_marker_scaling =>\n spd_set_marker_scaling Subroutine procedure\n , public\n :: set_marker_style =>\n spd_set_marker_style Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_simplification_factor =>\n spd_set_simplify_factor Subroutine procedure\n , public\n :: set_simplify_data =>\n spd_set_simplify_data Subroutine procedure\n , public\n :: set_use_data_dependent_colors =>\n spd_set_data_dependent_colors Subroutine procedure\n , public\n :: set_use_variable_size_points =>\n spd_set_use_var_point_size Subroutine procedure\n , public\n :: set_x =>\n pd2d_set_x_data Subroutine procedure\n , public\n :: set_y =>\n pd2d_set_y_data Subroutine","tags":"","loc":"module\\fplot_plot_data_2d.html"},{"title":"fplot_plot_data_3d – FPLOT","text":"Uses ferror iso_fortran_env fplot_simplify fplot_plot_data fplot_errors strings Contents Derived Types plot_data_3d Derived Types type, public, extends( scatter_plot_data ) :: plot_data_3d Defines a three-dimensional plot data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n pd3d_set_data_1 Subroutine procedure\n , public\n :: get_axes_string =>\n pd3d_get_axes_cmd Function procedure\n , public\n :: get_color_data =>\n pd3d_get_c_array Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n spd_get_cmd Function procedure\n , public\n :: get_count =>\n pd3d_get_data_count Function procedure\n , public\n :: get_data_string =>\n pd3d_get_data_cmd Function procedure\n , public\n :: get_draw_line =>\n spd_get_draw_line Function procedure\n , public\n :: get_draw_markers =>\n spd_get_draw_markers Function procedure\n , public\n :: get_fill_curve =>\n spd_get_filled Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_line_style =>\n spd_get_line_style Function procedure\n , public\n :: get_line_width =>\n spd_get_line_width Function procedure\n , public\n :: get_marker_frequency =>\n spd_get_marker_frequency Function procedure\n , public\n :: get_marker_scaling =>\n spd_get_marker_scaling Function procedure\n , public\n :: get_marker_style =>\n spd_get_marker_style Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_point_size_data =>\n pd3d_get_c_array Function procedure\n , public\n :: get_simplification_factor =>\n spd_get_simplify_factor Function procedure\n , public\n :: get_simplify_data =>\n spd_get_simplify_data Function procedure\n , public\n :: get_use_data_dependent_colors =>\n spd_get_data_dependent_colors Function procedure\n , public\n :: get_use_variable_size_points =>\n spd_get_use_var_point_size Function procedure\n , public\n :: get_x =>\n pd3d_get_x_data Function procedure\n , public\n :: get_x_data =>\n pd3d_get_x_array Function procedure\n , public\n :: get_y =>\n pd3d_get_y_data Function procedure\n , public\n :: get_y_data =>\n pd3d_get_y_array Function procedure\n , public\n :: get_z =>\n pd3d_get_z_data Function procedure\n , public\n :: get_z_data =>\n pd3d_get_z_array Function procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_line =>\n spd_set_draw_line Subroutine procedure\n , public\n :: set_draw_markers =>\n spd_set_draw_markers Subroutine procedure\n , public\n :: set_fill_curve =>\n spd_set_filled Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_line_style =>\n spd_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n spd_set_line_width Subroutine procedure\n , public\n :: set_marker_frequency =>\n spd_set_marker_frequency Subroutine procedure\n , public\n :: set_marker_scaling =>\n spd_set_marker_scaling Subroutine procedure\n , public\n :: set_marker_style =>\n spd_set_marker_style Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_simplification_factor =>\n spd_set_simplify_factor Subroutine procedure\n , public\n :: set_simplify_data =>\n spd_set_simplify_data Subroutine procedure\n , public\n :: set_use_data_dependent_colors =>\n spd_set_data_dependent_colors Subroutine procedure\n , public\n :: set_use_variable_size_points =>\n spd_set_use_var_point_size Subroutine procedure\n , public\n :: set_x =>\n pd3d_set_x_data Subroutine procedure\n , public\n :: set_y =>\n pd3d_set_y_data Subroutine procedure\n , public\n :: set_z =>\n pd3d_set_z_data Subroutine","tags":"","loc":"module\\fplot_plot_data_3d.html"},{"title":"fplot_plot_data_bar – FPLOT","text":"Uses iso_fortran_env ferror fplot_colors fplot_plot_data fplot_errors strings Contents Derived Types plot_data_bar Derived Types type, public, extends( plot_data_colored ) :: plot_data_bar Defines a data set tailored to bar charts. Type-Bound Procedures generic,\n public\n :: define_data =>\n pdb_set_data_1, pdb_set_data_2, pdb_set_data_3 procedure\n , public\n :: get =>\n pdb_get_data Function procedure\n , public\n :: get_axes_string =>\n pdb_get_axes_cmd Function procedure\n , public\n :: get_bar_per_label_count =>\n pdb_get_col_count Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n pdb_get_cmd Function procedure\n , public\n :: get_count =>\n pdb_get_count Function procedure\n , public\n :: get_data =>\n pdb_get_data_set Function procedure\n , public\n :: get_data_string =>\n pdb_get_data_cmd Function procedure\n , public\n :: get_draw_against_y2 =>\n pdb_get_use_y2 Function procedure\n , public\n :: get_is_filled =>\n pdb_get_is_filled Function procedure\n , public\n :: get_label =>\n pdb_get_label Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_transparency =>\n pdb_get_alpha Function procedure\n , public\n :: get_use_labels =>\n pdb_get_use_labels Function procedure\n , public\n :: set =>\n pdb_set_data Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_data_1 =>\n pdb_set_data_1_core Subroutine procedure\n , public\n :: set_data_2 =>\n pdb_set_data_2_core Subroutine procedure\n , public\n :: set_data_3 =>\n pdb_set_data_3_core Subroutine procedure\n , public\n :: set_draw_against_y2 =>\n pdb_set_use_y2 Subroutine procedure\n , public\n :: set_is_filled =>\n pdb_set_is_filled Subroutine procedure\n , public\n :: set_label =>\n pdb_set_label Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_transparency =>\n pdb_set_alpha Subroutine procedure\n , public\n :: set_use_labels =>\n pdb_set_use_labels Subroutine","tags":"","loc":"module\\fplot_plot_data_bar.html"},{"title":"fplot_plot_data_error_bars – FPLOT","text":"Uses ferror iso_fortran_env fplot_colors fplot_plot_data fplot_errors strings Contents Derived Types plot_data_error_bars Derived Types type, public, extends( plot_data_colored ) :: plot_data_error_bars Defines a 2D error-bar based data set. Type-Bound Procedures generic,\n public\n :: define_x_error_data => pde_define_x_err , pde_define_x_err_lim generic,\n public\n :: define_xy_error_data => pde_define_xy_err , pde_define_xy_err_lim generic,\n public\n :: define_y_error_data => pde_define_y_err , pde_define_y_err_lim procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n pde_get_cmd Function procedure\n , public\n :: get_count =>\n pde_get_count Function procedure\n , public\n :: get_data_string =>\n pde_get_data_cmd Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_plot_x_error_bars =>\n pde_get_plot_x_err Function procedure\n , public\n :: get_plot_y_error_bars =>\n pde_get_plot_y_err Function procedure\n , public\n :: get_use_error_box =>\n pde_get_box Function procedure\n , public\n :: get_use_range =>\n pde_get_use_range Function procedure\n , public\n, :: pde_define_x_err Subroutine procedure\n , public\n, :: pde_define_x_err_lim Subroutine procedure\n , public\n, :: pde_define_xy_err Subroutine procedure\n , public\n, :: pde_define_xy_err_lim Subroutine procedure\n , public\n, :: pde_define_y_err Subroutine procedure\n , public\n, :: pde_define_y_err_lim Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_use_error_box =>\n pde_set_box Subroutine","tags":"","loc":"module\\fplot_plot_data_error_bars.html"},{"title":"fplot_plot_data_histogram – FPLOT","text":"Uses ferror iso_fortran_env fplot_colors fplot_plot_data fplot_errors strings Contents Derived Types plot_data_histogram Derived Types type, public, extends( plot_data_colored ) :: plot_data_histogram A container for plotting data in the form of a histogram. Type-Bound Procedures procedure\n , public\n :: define_data =>\n pdh_define_data Subroutine procedure\n , public\n :: get =>\n pdh_get_bin_data Subroutine procedure\n , public\n :: get_axes_string =>\n pdh_get_axes_cmd Function procedure\n , public\n :: get_bin_count =>\n pdh_get_bin_count Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n pdh_get_cmd Function procedure\n , public\n :: get_data_string =>\n pdh_get_data_cmd Function procedure\n , public\n :: get_draw_against_y2 =>\n pdh_get_use_y2 Function procedure\n , public\n :: get_is_filled =>\n pdh_get_is_filled Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_maximum_value =>\n pdh_get_max_x Function procedure\n , public\n :: get_minimum_value =>\n pdh_get_min_x Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_bin_count =>\n pdh_set_bin_count Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_draw_against_y2 =>\n pdh_set_use_y2 Subroutine procedure\n , public\n :: set_is_filled =>\n pdh_set_is_filled Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine","tags":"","loc":"module\\fplot_plot_data_histogram.html"},{"title":"fplot_plot_data_tri_2d – FPLOT","text":"Uses iso_fortran_env fplot_colors fplot_triangulations_delaunay_2d fplot_plot_data fplot_constants strings Contents Derived Types plot_data_tri_2d Derived Types type, public, extends( plot_data_colored ) :: plot_data_tri_2d Defines a 2D triangulated data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n pdt2d_define_data Subroutine procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n pdt2d_get_cmd Function procedure\n , public\n :: get_data_string =>\n pdt2d_get_data_cmd Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_line_style =>\n pdt2d_get_line_style Function procedure\n , public\n :: get_line_width =>\n pdt2d_get_line_width Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_line_style =>\n pdt2d_set_line_style Subroutine procedure\n , public\n :: set_line_width =>\n pdt2d_set_line_width Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine","tags":"","loc":"module\\fplot_plot_data_tri_2d.html"},{"title":"fplot_plot_object – FPLOT","text":"Uses iso_fortran_env Contents Interfaces get_string_result Derived Types plot_object Interfaces interface public function get_string_result(this) result(x) Returns a string from a plot_object. Arguments Type Intent Optional Attributes Name class( plot_object ), intent(in) :: this The plot_object object. Return Value character(len=:), allocatable The result string. Derived Types type, public :: plot_object The base type for all plot objects. Type-Bound Procedures procedure\n(get_string_result) , public\n :: get_command_string","tags":"","loc":"module\\fplot_plot_object.html"},{"title":"fplot_plot_polar – FPLOT","text":"Uses iso_fortran_env ferror fplot_terminal fplot_plot_data fplot_constants fplot_errors strings fplot_plot fplot_legend Contents Derived Types plot_polar Derived Types type, public, extends( plot ) :: plot_polar Finalizations Procedures final :: plr_clean_up Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_autoscale =>\n plr_get_autoscale Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_bottom_margin =>\n plt_get_bottom_margin Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n plr_get_cmd Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_left_margin =>\n plt_get_left_margin Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_radial_limits =>\n plr_get_limits Function procedure\n , public\n :: get_right_margin =>\n plt_get_right_margin Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_theta_direction =>\n plr_get_theta_direction Function procedure\n , public\n :: get_theta_start_position =>\n plr_get_theta_start Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_top_margin =>\n plt_get_top_margin Function procedure\n , public\n :: initialize =>\n plr_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_autoscale =>\n plr_set_autoscale Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_bottom_margin =>\n plt_set_bottom_margin Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_left_margin =>\n plt_set_left_margin Subroutine procedure\n , public\n :: set_radial_limits =>\n plr_set_limits Subroutine procedure\n , public\n :: set_right_margin =>\n plt_set_right_margin Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_theta_direction =>\n plr_set_theta_direction Subroutine procedure\n , public\n :: set_theta_start_position =>\n plr_set_theta_start Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_top_margin =>\n plt_set_top_margin Subroutine","tags":"","loc":"module\\fplot_plot_polar.html"},{"title":"fplot_png_terminal – FPLOT","text":"Uses fplot_constants fplot_terminal iso_fortran_env strings Contents Derived Types png_terminal Derived Types type, public, extends( terminal ) :: png_terminal Defines a terminal used for producing PNG outputs. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n png_get_command_string Function procedure\n , public\n :: get_filename =>\n png_get_filename Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n png_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_filename =>\n png_set_filename Subroutine procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_png_terminal.html"},{"title":"fplot_qt_terminal – FPLOT","text":"Uses iso_fortran_env fplot_terminal Contents Derived Types qt_terminal Derived Types type, public, extends( terminal ) :: qt_terminal Defines a terminal that utilizes QT. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n term_get_command_string Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n qt_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_qt_terminal.html"},{"title":"fplot_simplify – FPLOT","text":"Uses fplot_errors ferror iso_fortran_env Contents Interfaces simplify_polyline Interfaces public interface simplify_polyline private function simplify_polyline_2d1(x, y, tol, err) result(ln) Simplifies a 2D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, and the second \ncolumn contains the y-coordinates. private function simplify_polyline_3d1(x, y, z, tol, err) result(ln) Simplifies a 3D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:) :: x An N-element array containing the x-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: y An N-element array containing the y-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in), dimension(:) :: z An N-element array containing the z-coordinates of the vertices\nmaking up the polyline. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, the second \ncolumn contains the y-coordinates, and the third column contains \nthe z-coordinates. private function simplify_polyline_mtx(xy, tol, err) result(ln) Simplifies a 2D or 3D polyline by removing points too close to \ndiscern given a specified tolerance. Arguments Type Intent Optional Attributes Name real(kind=real64), intent(in), dimension(:,:) :: xy An N-by-2 or N-by-3 matrix containing the polyline vertex data. real(kind=real64), intent(in) :: tol The distance tolerance to use when simplifying the polyline.\nThis value must be positive, and larger than machine epsilon. class(errors), intent(inout), optional, target :: err An error handling object. Return Value real(kind=real64), allocatable, dimension(:,:) A matrix containing the simplified polyline vertices. The first\ncolumn of the matrix contains the x-coordinates, the second \ncolumn contains the y-coordinates, and if necessary, the third \ncolumn contains the z-coordinates.","tags":"","loc":"module\\fplot_simplify.html"},{"title":"fplot_stats_plots – FPLOT","text":"Uses fplot_plot_data_2d iso_fortran_env fplot_plot_axis fplot_plot_object fplot_terminal fplot_colors ferror fplot_plot_data_histogram fplot_multiplot fplot_constants fplot_errors strings collections fplot_plot fplot_plot_2d Contents Derived Types correlation_plot Derived Types type, public, extends( plot_object ) :: correlation_plot Defines a multiplot arrangement designed to illustrate correlation\nbetween data sets. Type-Bound Procedures procedure\n , public\n :: draw =>\n cp_draw Subroutine procedure\n , public\n :: get =>\n cp_get Function procedure\n , public\n :: get_column_count =>\n cp_get_cols Function procedure\n , public\n :: get_command_string =>\n cp_get_command Function procedure\n , public\n :: get_font_name =>\n cp_get_font Function procedure\n , public\n :: get_font_size =>\n cp_get_font_size Function procedure\n , public\n :: get_plot_count =>\n cp_get_count Function procedure\n , public\n :: get_row_count =>\n cp_get_rows Function procedure\n , public\n :: get_terminal =>\n cp_get_term Function procedure\n , public\n :: initialize =>\n cp_init Subroutine procedure\n , public\n :: save_file =>\n cp_save Subroutine procedure\n , public\n :: set_font_name =>\n cp_set_font Subroutine procedure\n , public\n :: set_font_size =>\n cp_set_font_size Subroutine","tags":"","loc":"module\\fplot_stats_plots.html"},{"title":"fplot_surface_plot – FPLOT","text":"Uses ferror iso_fortran_env fplot_errors strings fplot_plot_3d fplot_legend Contents Derived Types surface_plot Derived Types type, public, extends( plot_3d ) :: surface_plot Type-Bound Procedures procedure\n , public\n :: clear_all =>\n plt_clear_all Subroutine procedure\n , public\n :: clear_all_labels =>\n plt_clear_labels Subroutine procedure\n , public\n :: clear_arrows =>\n plt_clear_arrows Subroutine procedure\n , public\n :: draw =>\n plt_draw Subroutine procedure\n , public\n :: free_resources =>\n plt_clean_up Subroutine procedure\n , public\n :: get =>\n plt_get Function procedure\n , public\n :: get_allow_smoothing =>\n surf_get_smooth Function procedure\n , public\n :: get_arrow =>\n plt_get_arrow Function procedure\n , public\n :: get_arrow_count =>\n plt_get_arrow_count Function procedure\n , public\n :: get_axis_equal =>\n plt_get_axis_equal Function procedure\n , public\n :: get_azimuth =>\n p3d_get_azimuth Function procedure\n , public\n :: get_bottom_margin =>\n plt_get_bottom_margin Function procedure\n , public\n :: get_colormap =>\n plt_get_colormap Function procedure\n , public\n :: get_command_string =>\n surf_get_cmd Function procedure\n , public\n :: get_coordinate_system =>\n p3d_get_csys Function procedure\n , public\n :: get_count =>\n plt_get_count Function procedure\n , public\n :: get_draw_border =>\n plt_get_draw_border Function procedure\n , public\n :: get_elevation =>\n p3d_get_elevation Function procedure\n , public\n :: get_font_name =>\n plt_get_font Function procedure\n , public\n :: get_font_size =>\n plt_get_font_size Function procedure\n , public\n :: get_label =>\n plt_get_label Function procedure\n , public\n :: get_label_count =>\n plt_get_label_count Function procedure\n , public\n :: get_left_margin =>\n plt_get_left_margin Function procedure\n , public\n :: get_legend =>\n plt_get_legend Function procedure\n , public\n :: get_light_intensity =>\n surf_get_light_intensity Function procedure\n , public\n :: get_right_margin =>\n plt_get_right_margin Function procedure\n , public\n :: get_show_colorbar =>\n plt_get_show_colorbar Function procedure\n , public\n :: get_show_contours =>\n surf_get_show_contours Function procedure\n , public\n :: get_show_gridlines =>\n plt_get_show_grid Function procedure\n , public\n :: get_show_hidden =>\n surf_get_show_hidden Function procedure\n , public\n :: get_specular_intensity =>\n surf_get_specular_intensity Function procedure\n , public\n :: get_terminal =>\n plt_get_term Function procedure\n , public\n :: get_tics_inward =>\n plt_get_tics_in Function procedure\n , public\n :: get_title =>\n plt_get_title Function procedure\n , public\n :: get_top_margin =>\n plt_get_top_margin Function procedure\n , public\n :: get_transparency =>\n surf_get_transparency Function procedure\n , public\n :: get_use_lighting =>\n surf_get_use_lighting Function procedure\n , public\n :: get_use_map_view =>\n p3d_get_use_map_view Function procedure\n , public\n :: get_x_axis =>\n p3d_get_x_axis Function procedure\n , public\n :: get_y_axis =>\n p3d_get_y_axis Function procedure\n , public\n :: get_z_axis =>\n p3d_get_z_axis Function procedure\n , public\n :: get_z_intersect_xy =>\n p3d_get_z_axis_intersect Function procedure\n , public\n :: initialize =>\n surf_init Subroutine procedure\n , public\n :: is_title_defined =>\n plt_has_title Function procedure\n , public\n :: pop =>\n plt_pop_data Subroutine procedure\n , public\n :: pop_arrow =>\n plt_pop_arrow Subroutine procedure\n , public\n :: pop_label =>\n plt_pop_label Subroutine procedure\n , public\n :: push =>\n plt_push_data Subroutine procedure\n , public\n :: push_arrow =>\n plt_push_arrow Subroutine procedure\n , public\n :: push_label =>\n plt_push_label Subroutine procedure\n , public\n :: save_file =>\n plt_save Subroutine procedure\n , public\n :: set =>\n plt_set Subroutine procedure\n , public\n :: set_allow_smoothing =>\n surf_set_smooth Subroutine procedure\n , public\n :: set_arrow =>\n plt_set_arrow Subroutine procedure\n , public\n :: set_axis_equal =>\n plt_set_axis_equal Subroutine procedure\n , public\n :: set_azimuth =>\n p3d_set_azimuth Subroutine procedure\n , public\n :: set_bottom_margin =>\n plt_set_bottom_margin Subroutine procedure\n , public\n :: set_colormap =>\n plt_set_colormap Subroutine procedure\n , public\n :: set_coordinate_system =>\n p3d_set_csys Subroutine procedure\n , public\n :: set_draw_border =>\n plt_set_draw_border Subroutine procedure\n , public\n :: set_elevation =>\n p3d_set_elevation Subroutine procedure\n , public\n :: set_font_name =>\n plt_set_font Subroutine procedure\n , public\n :: set_font_size =>\n plt_set_font_size Subroutine procedure\n , public\n :: set_label =>\n plt_set_label Subroutine procedure\n , public\n :: set_left_margin =>\n plt_set_left_margin Subroutine procedure\n , public\n :: set_light_intensity =>\n surf_set_light_intensity Subroutine procedure\n , public\n :: set_right_margin =>\n plt_set_right_margin Subroutine procedure\n , public\n :: set_show_colorbar =>\n plt_set_show_colorbar Subroutine procedure\n , public\n :: set_show_contours =>\n surf_set_show_contours Subroutine procedure\n , public\n :: set_show_gridlines =>\n plt_set_show_grid Subroutine procedure\n , public\n :: set_show_hidden =>\n surf_set_show_hidden Subroutine procedure\n , public\n :: set_specular_intensity =>\n surf_set_specular_intensity Subroutine procedure\n , public\n :: set_tics_inward =>\n plt_set_tics_in Subroutine procedure\n , public\n :: set_title =>\n plt_set_title Subroutine procedure\n , public\n :: set_top_margin =>\n plt_set_top_margin Subroutine procedure\n , public\n :: set_transparency =>\n surf_set_transparency Subroutine procedure\n , public\n :: set_use_lighting =>\n surf_set_use_lighting Subroutine procedure\n , public\n :: set_use_map_view =>\n p3d_set_use_map_view Subroutine procedure\n , public\n :: set_z_intersect_xy =>\n p3d_set_z_axis_intersect Subroutine","tags":"","loc":"module\\fplot_surface_plot.html"},{"title":"fplot_surface_plot_data – FPLOT","text":"Uses ferror iso_fortran_env fplot_plot_data fplot_errors strings Contents Derived Types surface_plot_data Derived Types type, public, extends( plot_data ) :: surface_plot_data Provides a three-dimensional surface plot data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n surfd_set_data_1 Subroutine procedure\n , public\n :: get_command_string =>\n surfd_get_cmd Function procedure\n , public\n :: get_data_string =>\n surfd_get_data_cmd Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_size =>\n surfd_get_size Function procedure\n , public\n :: get_use_wireframe =>\n surfd_get_wireframe Function procedure\n , public\n :: get_x =>\n surfd_get_x Function procedure\n , public\n :: get_y =>\n surfd_get_y Function procedure\n , public\n :: get_z =>\n surfd_get_z Function procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_use_wireframe =>\n surfd_set_wireframe Subroutine procedure\n , public\n :: set_x =>\n surfd_set_x Subroutine procedure\n , public\n :: set_y =>\n surfd_set_y Subroutine procedure\n , public\n :: set_z =>\n surfd_set_z Subroutine","tags":"","loc":"module\\fplot_surface_plot_data.html"},{"title":"fplot_terminal – FPLOT","text":"Uses strings iso_fortran_env fplot_plot_object fplot_constants Contents Interfaces term_get_string_result Derived Types terminal Interfaces interface public function term_get_string_result(this) result(x) Retrieves a string from a terminal. Arguments Type Intent Optional Attributes Name class( terminal ), intent(in) :: this The terminal object. Return Value character(len=:), allocatable The string. Derived Types type, public, extends( plot_object ) :: terminal A GNUPLOT terminal object. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n term_get_command_string Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n(term_get_string_result) , public\n :: get_id_string procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_terminal.html"},{"title":"fplot_triangulations_delaunay_2d – FPLOT","text":"Uses fplot_errors ferror iso_fortran_env geompack Contents Derived Types delaunay_tri_2d Derived Types type, public :: delaunay_tri_2d Provides a container for a 2D Delaunay triangulation. Type-Bound Procedures procedure\n , public\n :: create =>\n d2d_init Subroutine procedure\n , public\n :: find_triangle =>\n d2d_get_tri_with_pt Function procedure\n , public\n :: get_indices =>\n d2d_get_tris Function procedure\n , public\n :: get_point_count =>\n d2d_get_pt_count Function procedure\n , public\n :: get_points_x =>\n d2d_get_x_pts Function procedure\n , public\n :: get_points_y =>\n d2d_get_y_pts Function procedure\n , public\n :: get_triangle_count =>\n d2d_get_tri_count Function","tags":"","loc":"module\\fplot_triangulations_delaunay_2d.html"},{"title":"fplot_tri_surface_plot_data – FPLOT","text":"Uses fplot_delaunay_tri_surface iso_fortran_env fplot_plot_data strings Contents Derived Types tri_surface_plot_data Derived Types type, public, extends( plot_data ) :: tri_surface_plot_data Provides a three-dimensional surface plot data set constructed of\ntriangulated points. Type-Bound Procedures procedure\n , public\n :: define_data =>\n tspd_define_data Subroutine procedure\n , public\n :: get_command_string =>\n tspd_get_cmd Function procedure\n , public\n :: get_data_string =>\n tspd_get_data_cmd Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_use_wireframe =>\n tspd_get_wireframe Function procedure\n , public\n :: set_name =>\n pd_set_name Subroutine procedure\n , public\n :: set_use_wireframe =>\n tspd_set_wireframe Subroutine","tags":"","loc":"module\\fplot_tri_surface_plot_data.html"},{"title":"fplot_vector_field_plot_data – FPLOT","text":"Uses ferror iso_fortran_env fplot_colors fplot_plot_data fplot_errors strings Contents Derived Types vector_field_plot_data Derived Types type, public, extends( plot_data_colored ) :: vector_field_plot_data Defines a two-dimensional vector-field plot data set. Type-Bound Procedures procedure\n , public\n :: define_data =>\n vfpd_define_data Subroutine procedure\n , public\n :: get_arrow_size =>\n vfpd_get_arrow_size Function procedure\n , public\n :: get_color_index =>\n pdc_get_color_index Function procedure\n , public\n :: get_command_string =>\n vfpd_get_cmd Function procedure\n , public\n :: get_data_string =>\n vfpd_get_data_cmd Function procedure\n , public\n :: get_fill_arrow =>\n vfpd_get_fill_arrow Function procedure\n , public\n :: get_line_color =>\n pdc_get_line_color Function procedure\n , public\n :: get_name =>\n pd_get_name Function procedure\n , public\n :: get_use_data_dependent_colors =>\n vfpd_get_use_data_dependent_colors Function procedure\n , public\n :: set_arrow_size =>\n vfpd_set_arrow_size Subroutine procedure\n , public\n :: set_color_index =>\n pdc_set_color_index Subroutine procedure\n , public\n :: set_fill_arrow =>\n vfpd_set_fill_arrow Subroutine procedure\n , public\n :: set_line_color =>\n pdc_set_line_color Subroutine procedure\n , public\n :: set_name =>\n pd_set_name Subroutine","tags":"","loc":"module\\fplot_vector_field_plot_data.html"},{"title":"fplot_windows_terminal – FPLOT","text":"Uses iso_fortran_env fplot_terminal Contents Derived Types windows_terminal Derived Types type, public, extends( terminal ) :: windows_terminal A Windows-specific terminal. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n term_get_command_string Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n wt_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_windows_terminal.html"},{"title":"fplot_wxt_terminal – FPLOT","text":"Uses iso_fortran_env fplot_terminal Contents Derived Types wxt_terminal Derived Types type, public, extends( terminal ) :: wxt_terminal A WXT terminal. Type-Bound Procedures procedure\n , public\n :: get_command_string =>\n term_get_command_string Function procedure\n , public\n :: get_font_name =>\n term_get_font_name Function procedure\n , public\n :: get_font_size =>\n term_get_font_size Function procedure\n , public\n :: get_id_string =>\n wxt_get_term_string Function procedure\n , public\n :: get_plot_window_number =>\n term_get_plot_window_number Function procedure\n , public\n :: get_title =>\n term_get_title Function procedure\n , public\n :: get_window_height =>\n term_get_window_height Function procedure\n , public\n :: get_window_width =>\n term_get_window_width Function procedure\n , public\n :: set_font_name =>\n term_set_font_name Subroutine procedure\n , public\n :: set_font_size =>\n term_set_font_size Subroutine procedure\n , public\n :: set_plot_window_number =>\n term_set_plot_window_number Subroutine procedure\n , public\n :: set_title =>\n term_set_title Subroutine procedure\n , public\n :: set_window_height =>\n term_set_window_height Subroutine procedure\n , public\n :: set_window_width =>\n term_set_window_width Subroutine","tags":"","loc":"module\\fplot_wxt_terminal.html"},{"title":"fplot_arrow.f90 – FPLOT","text":"Contents Modules fplot_arrow Source Code fplot_arrow.f90 Source Code module fplot_arrow use iso_fortran_env use fplot_plot_object use fplot_colors use fplot_constants use strings implicit none private public :: plot_arrow type , extends ( plot_object ) :: plot_arrow !! Defines an arrow that can be drawn on a plot. logical , private :: m_visible = . true . !! Visible? real ( real32 ), private , dimension ( 3 ) :: m_tail = [ 0.0 , 0.0 , 0.0 ] !! The x, y, z coordinates of the tail. real ( real32 ), private , dimension ( 3 ) :: m_head = [ 0.0 , 0.0 , 0.0 ] !! The x, y, z coordinates of the head. type ( color ), private :: m_color = CLR_BLACK !! The arrow color. integer ( int32 ), private :: m_linestyle = LINE_SOLID !! The line style. real ( real32 ), private :: m_linewidth = 1.0 !! The line width. integer ( int32 ), private :: m_head_type = ARROW_HEAD !! The head configuration. integer ( int32 ), private :: m_filling = ARROW_FILLED !! Arrow filling. logical , private :: m_front = . true . !! Move to front? real ( real32 ), private :: m_size = 0.375 !! Arrow head size. real ( real32 ), private :: m_angle = 1 0.0 !! Arrow head angle. real ( real32 ), private :: m_backangle = 9 0.0 !! Arrow head back angle. logical , private :: m_use_default_size = . true . !! Use default head size. contains procedure , public :: get_is_visible => par_get_is_visible procedure , public :: set_is_visible => par_set_is_visible procedure , public :: get_tail_location => par_get_tail generic , public :: set_tail_location => par_set_tail_1 , & par_set_tail_2 , par_set_tail_3 procedure , private :: par_set_tail_1 procedure , private :: par_set_tail_2 procedure , private :: par_set_tail_3 procedure , public :: get_head_location => par_get_head generic , public :: set_head_location => par_set_head_1 , & par_set_head_2 , par_set_head_3 procedure , private :: par_set_head_1 procedure , private :: par_set_head_2 procedure , private :: par_set_head_3 procedure , public :: get_color => par_get_color procedure , public :: set_color => par_set_color procedure , public :: get_line_style => par_get_line_style procedure , public :: set_line_style => par_set_line_style procedure , public :: get_line_width => par_get_line_width procedure , public :: set_line_width => par_set_line_width procedure , public :: get_head_type => par_get_head_type procedure , public :: set_head_type => par_set_head_type procedure , public :: get_head_fill => par_get_fill procedure , public :: set_head_fill => par_set_fill procedure , public :: get_move_to_front => par_get_move_to_front procedure , public :: set_move_to_front => par_set_move_to_front procedure , public :: get_head_size => par_get_head_size procedure , public :: set_head_size => par_set_head_size procedure , public :: get_head_angle => par_get_head_angle procedure , public :: set_head_angle => par_set_head_angle procedure , public :: get_head_back_angle => par_get_head_back_angle procedure , public :: set_head_back_angle => par_set_head_back_angle procedure , public :: get_use_default_size => par_get_use_default_size procedure , public :: set_use_default_size => par_set_use_default_size procedure , public :: get_command_string => par_get_cmd end type contains ! ------------------------------------------------------------------------------ pure function par_get_is_visible ( this ) result ( rst ) !! Gets a value determining if the arrow is visible. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. logical :: rst !! True if the arrow is visible; else, false. rst = this % m_visible end function ! -------------------- subroutine par_set_is_visible ( this , x ) !! Sets a value determining if the arrow is visible. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. logical , intent ( in ) :: x !! True if the arrow is visible; else, false. this % m_visible = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_tail ( this ) result ( rst ) !! Gets the coordinates of the arrow's tail. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ), dimension ( 3 ) :: rst !! A 3-element array containing the x, y, and z coordinates of the !! arrow's tail. rst = this % m_tail end function ! -------------------- subroutine par_set_tail_1 ( this , x ) !! Sets the coordinates of the arrow's tail. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x ( 3 ) !! A 3-element array containing the x, y, and z coordinates of the !! arrow's tail. this % m_tail = x end subroutine ! -------------------- subroutine par_set_tail_2 ( this , x , y ) !! Sets the coordinates of the arrow's tail. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The x-coordinate of the arrow's tail. real ( real32 ), intent ( in ) :: y !! !! The y-coordinate of the arrow's tail. this % m_tail = [ x , y , 0.0 ] end subroutine ! -------------------- subroutine par_set_tail_3 ( this , x , y , z ) !! Sets the coordinates of the arrow's tail. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The x-coordinate of the arrow's tail. real ( real32 ), intent ( in ) :: y !! The y-coordinate of the arrow's tail. real ( real32 ), intent ( in ) :: z !! The z-coordinate of the arrow's tail. this % m_tail = [ x , y , z ] end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head ( this ) result ( rst ) !! Gets the coordinates of the arrow's head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ), dimension ( 3 ) :: rst !! A 3-element array containing the x, y, and z coordinates of the !! arrow's head. rst = this % m_head end function ! -------------------- subroutine par_set_head_1 ( this , x ) !! Sets the location of the arrow's head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x ( 3 ) !! A 3-element array containing the x, y, and z coordinates of the !! arrow's head. this % m_head = x end subroutine ! -------------------- subroutine par_set_head_2 ( this , x , y ) !! Sets the location of the arrow's head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The x-coordinate of the arrow's head. real ( real32 ), intent ( in ) :: y !! The y-coordinate of the arrow's head. this % m_head = [ x , y , 0.0 ] end subroutine ! -------------------- subroutine par_set_head_3 ( this , x , y , z ) !! Sets the location of the arrow's head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The x-coordinate of the arrow's head. real ( real32 ), intent ( in ) :: y !! The y-coordinate of the arrow's head. real ( real32 ), intent ( in ) :: z !! The z-coordinate of the arrow's head. this % m_head = [ x , y , z ] end subroutine ! ------------------------------------------------------------------------------ pure function par_get_color ( this ) result ( rst ) !! Gets the color of the arrow. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. type ( color ) :: rst !! The color. rst = this % m_color end function ! -------------------- subroutine par_set_color ( this , x ) !! Sets the color of the arrow. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. type ( color ), intent ( in ) :: x !! The color. this % m_color = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_line_style ( this ) result ( rst ) !! Gets the line style used to draw the arrow. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. integer ( int32 ) :: rst !! The line style. rst = this % m_linestyle end function ! -------------------- subroutine par_set_line_style ( this , x ) !! Sets the line style used to draw the arrow. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. integer ( int32 ), intent ( in ) :: x !! The line style. The value must be one of the following. !! !! - LINE_SOLID !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! If the value is not one of the above, the command is ignored. if ( x == LINE_DASHED . or . & x == LINE_DASH_DOTTED . or . & x == LINE_DASH_DOT_DOT . or . & x == LINE_DOTTED . or . & x == LINE_SOLID ) then ! Only reset the line style if it is a valid type. this % m_linestyle = x end if end subroutine ! ------------------------------------------------------------------------------ pure function par_get_line_width ( this ) result ( rst ) !! Gets the width of the lines used to draw the arrow. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ) :: rst !! The width of the line. rst = this % m_linewidth end function ! -------------------- subroutine par_set_line_width ( this , x ) !! Sets the width of the lines used to draw the arrow. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The width of the line. this % m_linewidth = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head_type ( this ) result ( rst ) !! Gets the type of arrow head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. integer ( int32 ) :: rst !! The arrow head type. rst = this % m_head_type end function ! -------------------- subroutine par_set_head_type ( this , x ) !! Sets the type of arrow head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. integer ( int32 ), intent ( in ) :: x !! The arrow head type. It must be one of the following constants. !! !! - ARROW_HEAD !! !! - ARROW_BACKHEAD !! !! - ARROW_HEADS !! !! - ARROW_NO_HEAD !! !! If the value is not one of the above, the command is ignored. if ( x == ARROW_BACKHEAD . or . & x == ARROW_HEAD . or . & x == ARROW_HEADS . or . & x == ARROW_NO_HEAD & ) then this % m_head_type = x end if end subroutine ! ------------------------------------------------------------------------------ pure function par_get_fill ( this ) result ( rst ) !! Gets a flag denoting the head fill type. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. integer ( int32 ) :: rst !! The flag denoting head fill. rst = this % m_filling end function ! -------------------- subroutine par_set_fill ( this , x ) !! Sets a flag denoting the head fill type. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. integer ( int32 ), intent ( in ) :: x !! The flag denoting head fill. It must be one of the following !! constants. !! !! - ARROW_FILLED !! !! - ARROW_EMPTY !! !! - ARROW_NO_BORDER !! !! - ARROW_NO_FILL !! !! If the value is not one of the above, the command is ignored. if ( x == ARROW_FILLED . or . & x == ARROW_EMPTY . or . & x == ARROW_NO_BORDER . or . & x == ARROW_NO_FILL & ) then this % m_filling = x end if end subroutine ! ------------------------------------------------------------------------------ pure function par_get_move_to_front ( this ) result ( rst ) !! Gets a value determining if the arrow should be moved to the front. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. logical :: rst !! True if the arrow should be moved to the front; else, false. rst = this % m_front end function ! -------------------- subroutine par_set_move_to_front ( this , x ) !! Sets a value determining if the arrow should be moved to the front. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. logical , intent ( in ) :: x !! True if the arrow should be moved to the front; else, false. this % m_front = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head_size ( this ) result ( rst ) !! Gets the size of the arrow head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ) :: rst !! The head size. rst = this % m_size end function ! -------------------- subroutine par_set_head_size ( this , x ) !! Sets the size of the arrow head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The head size. this % m_size = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head_angle ( this ) result ( rst ) !! Gets the angle of the arrow head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ) :: rst !! The angle, in degrees. rst = this % m_angle end function ! -------------------- subroutine par_set_head_angle ( this , x ) !! Sets the angle of the arrow head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The angle, in degrees. this % m_angle = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_head_back_angle ( this ) result ( rst ) !! Gets the angle of the back of the arrow head. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. real ( real32 ) :: rst !! The angle, in degrees. rst = this % m_backangle end function ! -------------------- subroutine par_set_head_back_angle ( this , x ) !! Sets the angle of the back of the arrow head. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. real ( real32 ), intent ( in ) :: x !! The angle, in degrees. this % m_backangle = x end subroutine ! ------------------------------------------------------------------------------ pure function par_get_use_default_size ( this ) result ( rst ) !! Gets a value determining if arrow head sizing defaults should be used. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. logical :: rst !! True if the defaults should be used; else, false. rst = this % m_use_default_size end function ! -------------------- subroutine par_set_use_default_size ( this , x ) !! Sets a value determining if arrow head sizing defaults should be used. class ( plot_arrow ), intent ( inout ) :: this !! The plot_arrow object. logical , intent ( in ) :: x !! True if the defaults should be used; else, false. this % m_use_default_size = x end subroutine ! ------------------------------------------------------------------------------ function par_get_cmd ( this ) result ( rst ) !! Returns the appropriate GNUPLOT command string to establish appropriate !! parameters. class ( plot_arrow ), intent ( in ) :: this !! The plot_arrow object. character ( len = :), allocatable :: rst !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str type ( color ) :: clr real ( real32 ) :: tail ( 3 ), head ( 3 ) ! Quick Return if (. not . this % get_is_visible ()) then rst = \"\" return end if ! Command call str % append ( \"set arrow\" ) ! Position Info tail = this % get_tail_location () head = this % get_head_location () call str % append ( \" from \" ) call str % append ( to_string ( tail ( 1 ))) call str % append ( \",\" ) call str % append ( to_string ( tail ( 2 ))) call str % append ( \",\" ) call str % append ( to_string ( tail ( 3 ))) call str % append ( \" to \" ) call str % append ( to_string ( head ( 1 ))) call str % append ( \",\" ) call str % append ( to_string ( head ( 2 ))) call str % append ( \",\" ) call str % append ( to_string ( head ( 3 ))) ! Head Type select case ( this % get_head_type ()) case ( ARROW_BACKHEAD ) call str % append ( \" backhead\" ) case ( ARROW_HEAD ) call str % append ( \" head\" ) case ( ARROW_HEADS ) call str % append ( \" heads\" ) case ( ARROW_NO_HEAD ) call str % append ( \" nohead\" ) end select if ( this % get_head_type () /= ARROW_NO_HEAD ) then ! Fill Info select case ( this % get_head_fill ()) case ( ARROW_FILLED ) call str % append ( \" filled\" ) case ( ARROW_EMPTY ) call str % append ( \" empty\" ) case ( ARROW_NO_BORDER ) call str % append ( \" noborder\" ) case ( ARROW_NO_FILL ) call str % append ( \" nofilled\" ) end select ! Size if (. not . this % get_use_default_size ()) then call str % append ( \" size \" ) call str % append ( to_string ( this % get_head_size ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_head_angle ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_head_back_angle ())) end if end if ! Front/Back if ( this % get_move_to_front ()) then call str % append ( \" front\" ) else call str % append ( \" back\" ) end if ! Line Color clr = this % get_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Line Width call str % append ( \" lw \" ) call str % append ( to_string ( this % get_line_width ())) ! Line Style call str % append ( \" lt \" ) call str % append ( to_string ( this % get_line_style ())) if ( this % get_line_style () /= LINE_SOLID ) then call str % append ( \" dashtype \" ) call str % append ( to_string ( this % get_line_style ())) end if ! End rst = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ ! pure subroutine par_assign(x, y) ! type(plot_arrow), intent(out) :: x ! class(plot_arrow), intent(in) :: y ! x%m_visible = y%m_visible ! x%m_tail = y%m_tail ! x%m_head = y%m_head ! x%m_color = y%m_color ! x%m_linestyle = y%m_linestyle ! x%m_linewidth = y%m_linewidth ! x%m_head_type = y%m_head_type ! x%m_filling = y%m_filling ! x%m_front = y%m_front ! x%m_size = y%m_size ! x%m_angle = y%m_angle ! x%m_backangle = y%m_backangle ! x%m_use_default_size = y%m_use_default_size ! end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_arrow.f90.html"},{"title":"fplot_colormap.f90 – FPLOT","text":"Contents Modules fplot_colormap Source Code fplot_colormap.f90 Source Code ! fplot_colormap.f90 module fplot_colormap use iso_fortran_env use fplot_plot_object use strings use ferror use fplot_errors use fplot_colors use forcolormap , cmap => Colormap ! avoid conflict with the internally defined colormap type implicit none private public :: cmap public :: colormap public :: cm_get_string_result public :: rainbow_colormap public :: hot_colormap public :: cool_colormap public :: parula_colormap public :: grey_colormap public :: earth_colormap public :: custom_colormap type , abstract , extends ( plot_object ) :: colormap !! A colormap object for a surface plot. character ( len = :), private , allocatable :: m_label !! The label to associate with the colormap. logical , private :: m_horizontal = . false . !! The colormap should be drawn horizontally. logical , private :: m_drawBorder = . true . !! Draw the colormap border. logical , private :: m_showTics = . true . !! Show the tic marks. contains procedure , public :: get_command_string => cm_get_cmd procedure ( cm_get_string_result ), deferred , public :: get_color_string procedure , public :: get_label => cm_get_label procedure , public :: set_label => cm_set_label procedure , public :: get_horizontal => cm_get_horizontal procedure , public :: set_horizontal => cm_set_horizontal procedure , public :: get_draw_border => cm_get_draw_border procedure , public :: set_draw_border => cm_set_draw_border procedure , public :: get_show_tics => cm_get_show_tics procedure , public :: set_show_tics => cm_set_show_tics end type interface function cm_get_string_result ( this ) result ( x ) !! Retrieves a string result from a colormap object. import colormap class ( colormap ), intent ( in ) :: this !! The colormap object. character ( len = :), allocatable :: x !! The string. end function end interface ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: rainbow_colormap !! Defines a rainbow colormap. contains procedure , public :: get_color_string => rcm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: hot_colormap !! Defines a colormap consisting of \"hot\" colors. contains procedure , public :: get_color_string => hcm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: cool_colormap !! Defines a colormap consisting of \"cool\" colors. contains procedure , public :: get_color_string => ccm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: parula_colormap !! Defines a colormap equivalent to the MATLAB parula colormap. contains procedure , public :: get_color_string => pcm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: grey_colormap !! Defines a grey-scaled colormap. contains procedure , public :: get_color_string => gcm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: earth_colormap !! Defines an earthy-colored colormap. contains procedure , public :: get_color_string => ecm_get_clr end type ! ------------------------------------------------------------------------------ type , extends ( colormap ) :: custom_colormap !! Defines a custom colormap that utilizes the FORCOLORMAP library !! to provide the map. class ( cmap ), private , pointer :: m_map => null () !! The FORCOLORMAP object. contains final :: custom_final procedure , public :: get_color_string => custom_get_clr procedure , public :: set_colormap => custom_set procedure , public :: get_colormap => custom_get end type ! ------------------------------------------------------------------------------ contains ! ****************************************************************************** ! COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function cm_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this colormap object. class ( colormap ), intent ( in ) :: this !! The colormap object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str ! Initialization call str % initialize () ! Palette Definition call str % append ( \"set palette defined (\" ) call str % append ( this % get_color_string ()) call str % append ( \")\" ) if ( len ( this % get_label ()) > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( 'set cblabel \"' ) call str % append ( this % get_label ()) call str % append ( '\"' ) end if ! Orientation if ( this % get_horizontal ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set colorbox horizontal\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set size 0.8,0.8; set origin 0.1,0.2\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set colorbox user origin 0.1,0.175 size 0.8,0.055\" ) if ( len ( this % get_label ()) > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set cblabel offset 0,0.8\" ) end if end if ! Border & Tic Marks if (. not . this % get_draw_border ()) then ! Eliminate the border call str % append ( new_line ( 'a' )) call str % append ( \"set colorbox noborder\" ) ! Hide the tic marks call str % append ( new_line ( 'a' )) call str % append ( \"set cbtic scale 0\" ) else ! Respect the tic mark visibility setting if the border is shown if (. not . this % get_show_tics ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set cbtic scale 0\" ) end if end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function cm_get_label ( this ) result ( rst ) !! Gets the label to associate with the colorbar. class ( colormap ), intent ( in ) :: this !! The colormap object. character ( len = :), allocatable :: rst !! The label. if ( allocated ( this % m_label )) then rst = this % m_label else rst = \"\" end if end function ! -------------------- subroutine cm_set_label ( this , x ) !! Sets the label to associate with the colorbar. class ( colormap ), intent ( inout ) :: this !! The colormap object. character ( len = * ), intent ( in ) :: x !! The label. this % m_label = x end subroutine ! ------------------------------------------------------------------------------ pure function cm_get_horizontal ( this ) result ( rst ) !! Gets a logical value determining if the colormap should be !! drawn horizontally and below the plot. class ( colormap ), intent ( in ) :: this !! The colormap object. logical :: rst !! Returns true if the colormap should be drawn horizontally; !! else, false. rst = this % m_horizontal end function ! -------------------- subroutine cm_set_horizontal ( this , x ) !! Sets a logical value determining if the colormap should be !! drawn horizontally and below the plot. class ( colormap ), intent ( inout ) :: this !! The colormap object. logical , intent ( in ) :: x !! Set to true if the colormap should be drawn horizontally; !! else, false. this % m_horizontal = x end subroutine ! ------------------------------------------------------------------------------ pure function cm_get_draw_border ( this ) result ( rst ) !! Gets a logical value determining if the border should be drawn. class ( colormap ), intent ( in ) :: this !! The colormap object. logical :: rst !! Returns true if the border should be drawn; else, false. rst = this % m_drawBorder end function ! -------------------- subroutine cm_set_draw_border ( this , x ) !! Sets a logical value determining if the border should be drawn. class ( colormap ), intent ( inout ) :: this !! The colormap object. logical , intent ( in ) :: x !! Set to true if the border should be drawn; else, false. this % m_drawBorder = x end subroutine ! ------------------------------------------------------------------------------ pure function cm_get_show_tics ( this ) result ( rst ) !! Gets a logical value determining if the tic marks should be drawn. class ( colormap ), intent ( in ) :: this !! The colormap object. logical :: rst !! Returns true if the tic marks should be drawn; else, false. rst = this % m_showTics end function ! -------------------- subroutine cm_set_show_tics ( this , x ) !! Sets a logical value determining if the tic marks should be drawn. class ( colormap ), intent ( inout ) :: this !! The colormap object. logical , intent ( in ) :: x !! Set to true if the tic marks should be drawn; else, false. this % m_showTics = x end subroutine ! ------------------------------------------------------------------------------ ! TO DO: ! - Set user-defined tic labels & limits (ref: http://gnuplot.sourceforge.net/demo_5.4/cerf.html) ! ****************************************************************************** ! RAINBOW_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function rcm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( rainbow_colormap ), intent ( in ) :: this !! The rainbow_colormap object. character ( len = :), allocatable :: x !! The command string. x = '0 \"dark-blue\", 1 \"blue\", 2 \"cyan\", 3 \"green\", 4 \"yellow\", ' // & '5 \"orange\", 6 \"red\", 7 \"dark-red\"' end function ! ****************************************************************************** ! HOT_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function hcm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( hot_colormap ), intent ( in ) :: this !! The hot_colormap object. character ( len = :), allocatable :: x !! The command string. x = '0 \"black\", 1 \"red\", 2 \"orange\", 3 \"yellow\", 4 \"white\"' end function ! ****************************************************************************** ! COOL_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function ccm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( cool_colormap ), intent ( in ) :: this !! The cool_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str call str % append ( \"0 '#08589E',\" ) call str % append ( \"1 '#2B8CBE',\" ) call str % append ( \"2 '#4EB3D3',\" ) call str % append ( \"3 '#7BCCC4',\" ) call str % append ( \"4 '#A8DDB5',\" ) call str % append ( \"5 '#CCEBC5',\" ) call str % append ( \"6 '#E0F3DB',\" ) call str % append ( \"7 '#F7FCF0'\" ) x = char ( str % to_string ()) ! x = '0 \"blue\", 1 \"turquoise\", 2 \"light-green\"' end function ! ****************************************************************************** ! PARULA_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function pcm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( parula_colormap ), intent ( in ) :: this !! The parula_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str call str % append ( \"0 '#352a87',\" ) call str % append ( \"1 '#0363e1',\" ) call str % append ( \"2 '#1485d4',\" ) call str % append ( \"3 '#06a7c6',\" ) call str % append ( \"4 '#38b99e',\" ) call str % append ( \"5 '#92bf73',\" ) call str % append ( \"6 '#d9ba56',\" ) call str % append ( \"7 '#fcce2e',\" ) call str % append ( \"8 '#f9fb0e'\" ) x = char ( str % to_string ()) end function ! ****************************************************************************** ! GREY_COLORMAP MEMBERS ! ------------------------------------------------------------------------------ function gcm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( grey_colormap ), intent ( in ) :: this !! The grey_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str call str % append ( \"0 '#FFFFFF',\" ) call str % append ( \"1 '#F0F0F0',\" ) call str % append ( \"2 '#D9D9D9',\" ) call str % append ( \"3 '#BDBDBD',\" ) call str % append ( \"4 '#969696',\" ) call str % append ( \"5 '#737373',\" ) call str % append ( \"6 '#525252',\" ) call str % append ( \"7 '#252525'\" ) x = char ( str % to_string ()) end function ! ****************************************************************************** ! EARTH_COLORMAP ! ------------------------------------------------------------------------------ function ecm_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( earth_colormap ), intent ( in ) :: this !! The earth_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str call str % append ( \"0 '#8C510A',\" ) call str % append ( \"1 '#BF812D',\" ) call str % append ( \"2 '#DFC27D',\" ) call str % append ( \"3 '#F6E8C3',\" ) call str % append ( \"4 '#D9F0D3',\" ) call str % append ( \"5 '#A6DBA0',\" ) call str % append ( \"6 '#5AAE61',\" ) call str % append ( \"7 '#1B7837'\" ) x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ ! Additional Color Maps: ! https://github.com/Gnuplotting/gnuplot-palettes ! ****************************************************************************** ! ADDED: Jan. 08, 2024 - JAC ! CUSTOM_COLORMAP ! ------------------------------------------------------------------------------ function custom_get_clr ( this ) result ( x ) !! Gets the GNUPLOT string defining the color distribution. class ( custom_colormap ), intent ( in ) :: this !! The custom_colormap object. character ( len = :), allocatable :: x !! The command string. type ( string_builder ) :: str integer ( int32 ) :: i , n , r , g , b , c character ( len = 6 ) :: ctxt if (. not . associated ( this % m_map )) then allocate ( character ( len = 0 ) :: x ) return end if n = this % m_map % get_levels () do i = 0 , n - 1 ! Get the RGB triple call this % m_map % get_RGB ( i , r , g , b ) c = ishft ( r , 16 ) + ishft ( g , 8 ) + b write ( ctxt , '(Z6.6)' ) c ! Append the color information call str % append ( to_string ( i )) call str % append ( \" '#\" ) call str % append ( ctxt ) call str % append ( \"'\" ) if ( i /= n - 1 ) then call str % append ( \",\" ) end if end do x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine custom_set ( this , map , err ) !! Sets the FORCOLORMAP colormap object. class ( custom_colormap ), intent ( inout ) :: this !! The custom_colormap object. class ( cmap ), intent ( in ) :: map !! The FORCOLORMAP colormap object. The custom_colormap object !! stores a copy of this object; therefore, any changes made to !! x after calls to this routine will not impact the behavior of !! the custom_colormap object. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Process if ( associated ( this % m_map )) deallocate ( this % m_map ) allocate ( this % m_map , source = map , stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"custom_set\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ function custom_get ( this ) result ( rst ) !! Gets a pointer to the FORCOLORMAP colormap object. class ( custom_colormap ), intent ( in ) :: this !! The custom_colormap object. class ( cmap ), pointer :: rst !! A pointer to the FORCOLORMAP colormap object. rst => this % m_map end function ! ------------------------------------------------------------------------------ subroutine custom_final ( this ) type ( custom_colormap ), intent ( inout ) :: this !! The custom_colormap object. if ( associated ( this % m_map )) then deallocate ( this % m_map ) nullify ( this % m_map ) end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_colormap.f90.html"},{"title":"fplot_colors.f90 – FPLOT","text":"Contents Modules fplot_colors Source Code fplot_colors.f90 Source Code ! fplot_colors.f90 module fplot_colors use iso_fortran_env implicit none private public :: color public :: operator ( == ) public :: operator ( /= ) public :: CLR_BLACK public :: CLR_WHITE public :: CLR_RED public :: CLR_LIME public :: CLR_BLUE public :: CLR_YELLOW public :: CLR_CYAN public :: CLR_MAGENTA public :: CLR_SILVER public :: CLR_GRAY public :: CLR_MAROON public :: CLR_OLIVE public :: CLR_GREEN public :: CLR_PURPLE public :: CLR_TEAL public :: CLR_NAVY public :: CLR_ORANGE public :: color_list type color !! Describes an RGB color. integer ( int32 ), public :: red = 0 !! The red component of the color (must be between 0 and 255). integer ( int32 ), public :: green = 0 !! The green component of the color (must be between 0 and 255). integer ( int32 ), public :: blue = 255 !! The blue component of the color (must be between 0 and 255). integer ( int32 ), public :: alpha = 0 !! The alpha component of the color (must be between 0 and 255). !! Notice, 0 is fully opaque and 255 is fully transparent. contains procedure , public , pass :: to_hex_string => clr_to_hex_string procedure , public , pass :: copy_from => clr_copy_from end type interface operator ( == ) module procedure :: clr_equals end interface interface operator ( /= ) module procedure :: clr_not_equals end interface type ( color ), parameter :: CLR_BLACK = color ( 0 , 0 , 0 , 0 ) !! Black. type ( color ), parameter :: CLR_WHITE = color ( 255 , 255 , 255 , 0 ) !! White. type ( color ), parameter :: CLR_RED = color ( 255 , 0 , 0 , 0 ) !! Red. type ( color ), parameter :: CLR_LIME = color ( 0 , 255 , 0 , 0 ) !! Lime. type ( color ), parameter :: CLR_BLUE = color ( 0 , 0 , 255 , 0 ) !! Blue. type ( color ), parameter :: CLR_YELLOW = color ( 255 , 255 , 0 , 0 ) !! Yellow. type ( color ), parameter :: CLR_CYAN = color ( 0 , 255 , 255 , 0 ) !! Cyan. type ( color ), parameter :: CLR_MAGENTA = color ( 255 , 0 , 255 , 0 ) !! Magenta. type ( color ), parameter :: CLR_SILVER = color ( 192 , 192 , 192 , 0 ) !! Silver. type ( color ), parameter :: CLR_GRAY = color ( 128 , 128 , 128 , 0 ) !! Gray. type ( color ), parameter :: CLR_MAROON = color ( 128 , 0 , 0 , 0 ) !! Maroon. type ( color ), parameter :: CLR_OLIVE = color ( 128 , 128 , 0 , 0 ) !! Olive. type ( color ), parameter :: CLR_GREEN = color ( 0 , 128 , 0 , 0 ) !! Green. type ( color ), parameter :: CLR_PURPLE = color ( 128 , 0 , 128 , 0 ) !! Purple. type ( color ), parameter :: CLR_TEAL = color ( 0 , 128 , 128 , 0 ) !! Teal. type ( color ), parameter :: CLR_NAVY = color ( 0 , 0 , 128 , 0 ) !! Navy. type ( color ), parameter :: CLR_ORANGE = color ( 255 , 165 , 0 , 0 ) !! Orange. ! A list of colors that can be cycled through by plotting code type ( color ), parameter , dimension ( 7 ) :: color_list = [ & color ( 0 , int ( 0.447 * 255 ), int ( 0.741 * 255 ), 0 ), & color ( int ( 0.85 * 255 ), int ( 0.325 * 255 ), int ( 0.098 * 255 ), 0 ), & color ( int ( 0.929 * 255 ), int ( 0.694 * 255 ), int ( 0.125 * 255 ), 0 ), & color ( int ( 0.494 * 255 ), int ( 0.184 * 255 ), int ( 0.556 * 255 ), 0 ), & color ( int ( 0.466 * 255 ), int ( 0.674 * 255 ), int ( 0.188 * 255 ), 0 ), & color ( int ( 0.301 * 255 ), int ( 0.745 * 255 ), int ( 0.933 * 255 ), 0 ), & color ( int ( 0.635 * 255 ), int ( 0.078 * 255 ), int ( 0.184 * 255 ), 0 )] contains ! ------------------------------------------------------------------------------ pure function clr_to_hex_string ( this ) result ( txt ) !! Returns the color in hexadecimal format. class ( color ), intent ( in ) :: this !! The color object. character ( 8 ) :: txt !! A string containing the hexadecimal equivalent. ! Local Variables integer ( int32 ) :: r , g , b , a , clr ! Clip each color if necessary if ( this % red < 0 ) then r = 0 else if ( this % red > 255 ) then r = 255 else r = this % red end if if ( this % green < 0 ) then g = 0 else if ( this % green > 255 ) then g = 255 else g = this % green end if if ( this % blue < 0 ) then b = 0 else if ( this % blue > 255 ) then b = 255 else b = this % blue end if if ( this % alpha < 0 ) then a = 0 else if ( this % alpha > 255 ) then a = 255 else a = this % alpha end if ! Build the color information clr = ishft ( a , 24 ) + ishft ( r , 16 ) + ishft ( g , 8 ) + b ! Convert the integer to a hexadecimal string write ( txt , '(Z8.8)' ) clr end function ! ------------------------------------------------------------------------------ subroutine clr_copy_from ( this , clr ) !! Copies another color to this color. class ( color ), intent ( inout ) :: this !! The color object. class ( color ), intent ( in ) :: clr !! The color to copy. this % red = clr % red this % green = clr % green this % blue = clr % blue end subroutine ! ****************************************************************************** ! ADDED: JAN. 09, 2024 - JAC ! ------------------------------------------------------------------------------ ! pure subroutine clr_assign(x, y) ! type(color), intent(out) :: x ! class(color), intent(in) :: y ! call x%copy_from(y) ! end subroutine ! ------------------------------------------------------------------------------ pure function clr_equals ( x , y ) result ( rst ) type ( color ), intent ( in ) :: x , y logical :: rst rst = . true . if ( x % red /= y % red . or . & x % green /= y % green . or . & x % blue /= y % blue & ) then rst = . false . end if end function ! ------------------------------------------------------------------------------ pure function clr_not_equals ( x , y ) result ( rst ) type ( color ), intent ( in ) :: x , y logical :: rst rst = . not . clr_equals ( x , y ) end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_colors.f90.html"},{"title":"fplot_constants.f90 – FPLOT","text":"Contents Modules fplot_constants Source Code fplot_constants.f90 Source Code module fplot_constants use iso_fortran_env implicit none ! ****************************************************************************** ! GNUPLOT TERMINAL CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: GNUPLOT_TERMINAL_WIN32 = 1 !! Defines a Win32 terminal. integer ( int32 ), parameter :: GNUPLOT_TERMINAL_WXT = 2 !! Defines a WXT terminal. integer ( int32 ), parameter :: GNUPLOT_TERMINAL_QT = 3 !! Defines a QT terminal. integer ( int32 ), parameter :: GNUPLOT_TERMINAL_PNG = 4 !! Defines a PNG terminal. integer ( int32 ), parameter :: GNUPLOT_TERMINAL_LATEX = 5 !! Defines a LATEX terminal. ! ****************************************************************************** ! MARKER CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: MARKER_PLUS = 1 !! Defines a + data point marker. integer ( int32 ), parameter :: MARKER_X = 2 !! Defines an x data point marker. integer ( int32 ), parameter :: MARKER_ASTERISK = 3 !! Defines an * data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_SQUARE = 4 !! Defines an empty square-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_SQUARE = 5 !! Defines an filled square-shaped data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_CIRCLE = 6 !! Defines an empty circle-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_CIRCLE = 7 !! Defines an filled circle-shaped data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_TRIANGLE = 8 !! Defines an empty triangle-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_TRIANGLE = 9 !! Defines an filled triangle-shaped data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_NABLA = 10 !! Defines an empty nabla-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_NABLA = 11 !! Defines an filled nabla-shaped data point marker. integer ( int32 ), parameter :: MARKER_EMPTY_RHOMBUS = 12 !! Defines an empty rhombus-shaped data point marker. integer ( int32 ), parameter :: MARKER_FILLED_RHOMBUS = 13 !! Defines an filled rhombus-shaped data point marker. ! ****************************************************************************** ! LINE CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: LINE_SOLID = 1 !! Defines a solid line. integer ( int32 ), parameter :: LINE_DASHED = 2 !! Defines a dashed line. integer ( int32 ), parameter :: LINE_DOTTED = 3 !! Defines a dotted line. integer ( int32 ), parameter :: LINE_DASH_DOTTED = 4 !! Defines a dash-dotted line. integer ( int32 ), parameter :: LINE_DASH_DOT_DOT = 5 !! Defines a dash-dot-dotted line. ! ****************************************************************************** ! LEGEND CONSTANTS ! ------------------------------------------------------------------------------ character ( len = * ), parameter :: LEGEND_TOP = \"top\" !! Defines the legend should be placed at the top of the plot. character ( len = * ), parameter :: LEGEND_CENTER = \"center\" !! Defines the legend should be centered on the plot. character ( len = * ), parameter :: LEGEND_LEFT = \"left\" !! Defines the legend should be placed at the left of the plot. character ( len = * ), parameter :: LEGEND_RIGHT = \"right\" !! Defines the legend should be placed at the right of the plot. character ( len = * ), parameter :: LEGEND_BOTTOM = \"bottom\" !! Defines the legend should be placed at the bottom of the plot. character ( len = * ), parameter :: LEGEND_ARRANGE_VERTICALLY = \"vertical\" !! Defines the legend should be arranged such that the column count !! is minimized. character ( len = * ), parameter :: LEGEND_ARRANGE_HORIZONTALLY = \"horizontal\" !! Defines the legend should be arranged such that the row count !! is minimized. ! ****************************************************************************** ! POLAR PLOT CONSTANTS ! ------------------------------------------------------------------------------ character ( len = * ), parameter :: POLAR_THETA_TOP = \"top\" !! States that theta should start at the top of the plot. character ( len = * ), parameter :: POLAR_THETA_RIGHT = \"right\" !! States that theta should start at the right of the plot. character ( len = * ), parameter :: POLAR_THETA_BOTTOM = \"bottom\" !! States that theta should start at the bottom of the plot. character ( len = * ), parameter :: POLAR_THETA_LEFT = \"left\" !! States that theta should start at the left of the plot. character ( len = * ), parameter :: POLAR_THETA_CCW = \"ccw\" !! States that theta should proceed in a counter-clockwise direction. character ( len = * ), parameter :: POLAR_THETA_CW = \"cw\" !! States that theta should proceed in a clockwise direction. ! ****************************************************************************** ! COORDINATE SYSTEM CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: COORDINATES_CARTESIAN = 100 !! Defines a Cartesian coordinate system. integer ( int32 ), parameter :: COORDINATES_SPHERICAL = 101 !! Defines a spherical coordinate system. integer ( int32 ), parameter :: COORDINATES_CYLINDRICAL = 102 !! Defines a cylindrical coordinate system. ! ****************************************************************************** ! ARROW CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: ARROW_NO_HEAD = 0 !! Defines an arrow with no head. integer ( int32 ), parameter :: ARROW_HEAD = 1 !! Defines an arrow with a traditional head. integer ( int32 ), parameter :: ARROW_BACKHEAD = 2 !! Defines an arrow with it's head at it's back end (tail). integer ( int32 ), parameter :: ARROW_HEADS = 3 !! Defines an arrow with a head on both ends. integer ( int32 ), parameter :: ARROW_FILLED = 100 !! Defines a filled arrow head. integer ( int32 ), parameter :: ARROW_EMPTY = 101 !! Defines an empty arrow head. integer ( int32 ), parameter :: ARROW_NO_FILL = 102 !! Defines an arrow head without fill. integer ( int32 ), parameter :: ARROW_NO_BORDER = 103 !! Defines an arrow head with no border. ! ****************************************************************************** ! PLOT DATA CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: PLOTDATA_MAX_NAME_LENGTH = 128 !! Defines the maximum number of characters allowed in a graph label. ! ****************************************************************************** ! PRIVATE/DEFAULT CONSTANTS ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: GNUPLOT_DEFAULT_WINDOW_WIDTH = 640 !! The default GNUPLOT window width, in pixels. integer ( int32 ), parameter :: GNUPLOT_DEFAULT_WINDOW_HEIGHT = 420 !! The default GNUPLOT window height, in pixels. integer ( int32 ), parameter :: GNUPLOT_MAX_LABEL_LENGTH = 128 !! Defines the maximum number of characters allowed in a graph label. character ( len = * ), parameter :: GNUPLOT_DEFAULT_FONTNAME = \"Calibri\" !! Defines the default font used by text on the graph. integer ( int32 ), parameter :: GNUPLOT_DEFAULT_FONT_SIZE = 14 !! Defines the default font size used by text on the graph. integer ( int32 ), parameter :: GNUPLOT_MAX_PATH_LENGTH = 256 !! Defines the maximum number of characters allowed in a file path. ! ****************************************************************************** ! HORIZONTAL ALIGNMENT CONSTANTS ! ------------------------------------------------------------------------------ character ( len = * ), parameter :: GNUPLOT_HORIZONTAL_ALIGN_LEFT = \"left\" !! Defines the text should be aligned to the left. character ( len = * ), parameter :: GNUPLOT_HORIZONTAL_ALIGN_CENTER = \"center\" !! Defines the text should be centered. character ( len = * ), parameter :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT = \"right\" !! Defines the text should be aligned to the right. ! ****************************************************************************** ! ROTATION ORIGIN CONSTANTS ! ------------------------------------------------------------------------------ character ( len = * ), parameter :: GNUPLOT_ROTATION_ORIGIN_RIGHT = \"right\" !! Defines the text should be rotated around the right side of the text. character ( len = * ), parameter :: GNUPLOT_ROTATION_ORIGIN_CENTER = \"center\" !! Defines the text should be rotated around the center of the text. character ( len = * ), parameter :: GNUPLOT_ROTATION_ORIGIN_LEFT = \"left\" !! Defines the text should be rotated around the left side of the text. end module","tags":"","loc":"sourcefile\\fplot_constants.f90.html"},{"title":"fplot_core.f90 – FPLOT","text":"Contents Modules fplot_core Source Code fplot_core.f90 Source Code module fplot_core !! FPLOT is a Fortran library providing a means of interacting with !! [GNUPLOT](http://www.gnuplot.info/) from a Fortran program. The library !! is designed in an object-oriented manner, and as such utilizes language !! features that require a compiler that supports the 2003 standard. !! Additionally, it is expected that Gnuplot is installed on the system !! path. For full functionallity, a minimum of GNUPLOT v5.2 is expected. use fplot_constants use fplot_core_routines use fplot_colors use fplot_plot_object use fplot_plot_data use fplot_plot_axis use fplot_terminal use fplot_windows_terminal use fplot_qt_terminal use fplot_wxt_terminal use fplot_png_terminal use fplot_latex_terminal use fplot_label use fplot_arrow use fplot_legend use fplot_plot_data_2d use fplot_plot_data_3d use fplot_surface_plot_data use fplot_plot_data_error_bars use fplot_plot_data_bar use fplot_plot_data_histogram use fplot_colormap use fplot_filled_plot_data use fplot_triangulations_delaunay_2d use fplot_plot_data_tri_2d use fplot_delaunay_tri_surface use fplot_tri_surface_plot_data use fplot_vector_field_plot_data use fplot_plot use fplot_plot_2d use fplot_plot_3d use fplot_surface_plot use fplot_multiplot use fplot_plot_bar use fplot_plot_polar use fplot_stats_plots implicit none private ! FPLOT_CONSTANTS.F90 public :: GNUPLOT_TERMINAL_WIN32 public :: GNUPLOT_TERMINAL_WXT public :: GNUPLOT_TERMINAL_QT public :: GNUPLOT_TERMINAL_PNG public :: GNUPLOT_TERMINAL_LATEX public :: MARKER_PLUS public :: MARKER_X public :: MARKER_ASTERISK public :: MARKER_EMPTY_SQUARE public :: MARKER_FILLED_SQUARE public :: MARKER_EMPTY_CIRCLE public :: MARKER_FILLED_CIRCLE public :: MARKER_EMPTY_TRIANGLE public :: MARKER_FILLED_TRIANGLE public :: MARKER_EMPTY_NABLA public :: MARKER_FILLED_NABLA public :: MARKER_EMPTY_RHOMBUS public :: MARKER_FILLED_RHOMBUS public :: LINE_SOLID public :: LINE_DASHED public :: LINE_DOTTED public :: LINE_DASH_DOTTED public :: LINE_DASH_DOT_DOT public :: LEGEND_CENTER public :: LEGEND_LEFT public :: LEGEND_RIGHT public :: LEGEND_TOP public :: LEGEND_BOTTOM public :: LEGEND_ARRANGE_VERTICALLY public :: LEGEND_ARRANGE_HORIZONTALLY public :: POLAR_THETA_BOTTOM public :: POLAR_THETA_LEFT public :: POLAR_THETA_RIGHT public :: POLAR_THETA_TOP public :: POLAR_THETA_CCW public :: POLAR_THETA_CW public :: PLOTDATA_MAX_NAME_LENGTH public :: COORDINATES_CARTESIAN public :: COORDINATES_SPHERICAL public :: COORDINATES_CYLINDRICAL public :: ARROW_NO_HEAD public :: ARROW_HEAD public :: ARROW_BACKHEAD public :: ARROW_HEADS public :: ARROW_FILLED public :: ARROW_EMPTY public :: ARROW_NO_FILL public :: ARROW_NO_BORDER public :: GNUPLOT_HORIZONTAL_ALIGN_LEFT public :: GNUPLOT_HORIZONTAL_ALIGN_CENTER public :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT public :: GNUPLOT_ROTATION_ORIGIN_RIGHT public :: GNUPLOT_ROTATION_ORIGIN_CENTER public :: GNUPLOT_ROTATION_ORIGIN_LEFT ! FPLOT_CORE_ROUTINES.F90 public :: linspace public :: logspace public :: meshgrid ! FPLOT_COLORS.F90 public :: color public :: operator ( == ) public :: operator ( /= ) public :: CLR_BLACK public :: CLR_WHITE public :: CLR_RED public :: CLR_LIME public :: CLR_BLUE public :: CLR_YELLOW public :: CLR_CYAN public :: CLR_MAGENTA public :: CLR_SILVER public :: CLR_GRAY public :: CLR_MAROON public :: CLR_OLIVE public :: CLR_GREEN public :: CLR_PURPLE public :: CLR_TEAL public :: CLR_NAVY public :: CLR_ORANGE public :: color_list ! FPLOT_PLOT_OBJECT.F90 public :: plot_object public :: get_string_result ! FPLOT_PLOT_DATA.F90 public :: plot_data public :: pd_get_string_result public :: plot_data_colored public :: scatter_plot_data public :: spd_get_int_value public :: spd_get_string_result public :: spd_get_value public :: spd_set_value ! FPLOT_PLOT_AXIS.F90 public :: plot_axis public :: pa_get_string_result public :: x_axis public :: y_axis public :: y2_axis public :: z_axis ! FPLOT_TERMINAL.F90 public :: terminal public :: term_get_string_result ! FPLOT_WINDOWS_TERMINAL.F90 public :: windows_terminal ! FPLOT_QT_TERMINAL.F90 public :: qt_terminal ! FPLOT_WXT_TERMINAL.F90 public :: wxt_terminal ! FPLOT_PNG_TERMINAL.F90 public :: png_terminal ! FPLOT_LATEX_TERMINAL.F90 public :: latex_terminal ! FPLOT_LABEL.F90 public :: plot_label ! FPLOT_ARROW.F90 public :: plot_arrow ! FPLOT_LEGEND.F90 public :: legend ! FPLOT_PLOT_DATA_2D.F90 public :: plot_data_2d ! FPLOT_PLOT_DATA_3D.F90 public :: plot_data_3d ! FPLOT_SURFACE_PLOT_DATA.F90 public :: surface_plot_data ! FPLOT_PLOT_DATA_ERROR_BARS.F90 public :: plot_data_error_bars ! FPLOT_PLOT_DATA_BAR.F90 public :: plot_data_bar ! FPLOT_PLOT_DATA_HISTOGRAM.F90 public :: plot_data_histogram ! FPLOT_COLORMAP.F90 public :: cmap public :: colormap public :: cm_get_string_result public :: rainbow_colormap public :: hot_colormap public :: cool_colormap public :: parula_colormap public :: grey_colormap public :: earth_colormap public :: custom_colormap ! FPLOT_FILLED_PLOT_DATA.F90 public :: filled_plot_data ! FPLOT_TRIANGULATIONS_DELAUNAY_2D.F90 public :: delaunay_tri_2d ! FPLOT_PLOT_DATA_TRI_2D.F90 public :: plot_data_tri_2d ! FPLOT_DELAUNAY_TRI_SURFACE.F90 public :: delaunay_tri_surface ! FPLOT_TRI_SURFACE_PLOT_DATA.F90 public :: tri_surface_plot_data ! FPLOT_VECTOR_FIELD_PLOT_DATA.F90 public :: vector_field_plot_data ! FPLOT_PLOT.F90 public :: plot ! FPLOT_PLOT_2D.F90 public :: plot_2d ! FPLOT_PLOT_3D.F90 public :: plot_3d ! FPLOT_SURFACE_PLOT.F90 public :: surface_plot ! FPLOT_MULTIPLOT.F90 public :: multiplot ! FPLOT_PLOT_BAR.F90 public :: plot_bar ! FPLOT_PLOT_POLAR.F90 public :: plot_polar ! FPLOT_STATS_PLOTS.F90 public :: correlation_plot end module","tags":"","loc":"sourcefile\\fplot_core.f90.html"},{"title":"fplot_core_routines.f90 – FPLOT","text":"Contents Modules fplot_core_routines Source Code fplot_core_routines.f90 Source Code ! fplot_core_routines.f90 module fplot_core_routines use iso_fortran_env implicit none private public :: linspace public :: logspace public :: meshgrid contains ! ------------------------------------------------------------------------------ pure function linspace ( start , finish , npts ) result ( x ) !! Constructs a linearly spaced array. real ( real64 ), intent ( in ) :: start !! The first value in the array. real ( real64 ), intent ( in ) :: finish !! The last value in the array. integer ( int32 ), intent ( in ) :: npts !! The number of values in the array. real ( real64 ), allocatable , dimension (:) :: x !! The resulting array. ! Local Variables integer ( int32 ) :: i real ( real64 ) :: dx ! Process allocate ( x ( npts )) dx = ( finish - start ) / ( npts - 1.0d0 ) x ( 1 ) = start do i = 2 , npts x ( i ) = x ( i - 1 ) + dx end do end function ! ------------------------------------------------------------------------------ pure function logspace ( start , finish , npts ) result ( x ) !! Construcst a logarithmically spaced array. real ( real64 ), intent ( in ) :: start !! The exponent of the first value in the array. real ( real64 ), intent ( in ) :: finish !! The exponent of the final value in the array. integer ( int32 ), intent ( in ) :: npts !! The number of values in the array. real ( real64 ), allocatable , dimension (:) :: x !! The resulting array. ! Local Variables integer ( int32 ) :: i real ( real64 ) :: dx , exponent ! Process allocate ( x ( npts )) dx = ( finish - start ) / ( npts - 1.0d0 ) exponent = start do i = 1 , npts x ( i ) = 1.0d1 ** exponent exponent = exponent + dx end do end function ! ------------------------------------------------------------------------------ pure function meshgrid ( x , y ) result ( xy ) !! Constructs two matrices (X and Y) from x and y data arrays. real ( real64 ), intent ( in ), dimension (:) :: x !! An M-element array of x data points. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array of y data points. real ( real64 ), allocatable , dimension (:,:,:) :: xy !! An N-by-M-by-2 array containing the x data matrix on the first !! page of the array, and the y data matrix on the second page. ! Local Variables integer ( int32 ) :: i , nx , ny ! Process nx = size ( x ) ny = size ( y ) allocate ( xy ( ny , nx , 2 )) do i = 1 , ny xy ( i ,:, 1 ) = x end do do i = 1 , nx xy (:, i , 2 ) = y end do end function end module","tags":"","loc":"sourcefile\\fplot_core_routines.f90.html"},{"title":"fplot_delaunay_tri_surface.f90 – FPLOT","text":"Contents Modules fplot_delaunay_tri_surface Source Code fplot_delaunay_tri_surface.f90 Source Code ! fplot_delaunay_tri_surface.f90 module fplot_delaunay_tri_surface use iso_fortran_env use ieee_arithmetic use fplot_triangulations_delaunay_2d use fplot_errors use ferror implicit none private public :: delaunay_tri_surface type , extends ( delaunay_tri_2d ) :: delaunay_tri_surface !! Provides a type describing a triangulated surface. real ( real64 ), private , allocatable , dimension (:) :: m_z !! An array of the z-coordinates of each point. contains procedure , public :: define_function_values => dts_define_fcn procedure , public :: get_points_z => dts_get_z generic , public :: evaluate => dts_interp_1 , dts_interp_2 procedure , private :: dts_interp_1 procedure , private :: dts_interp_2 end type contains ! ------------------------------------------------------------------------------ subroutine dts_define_fcn ( this , z , err ) !! Defines the function values that correspond to the x and y !! data points. class ( delaunay_tri_surface ), intent ( inout ) :: this !! The delaunay_tri_surface object. real ( real64 ), intent ( in ), dimension (:) :: z !! An N-element array containing the function values for !! each x and y coordinate. Notice, the x and y coordinates must !! already be defined prior to calling this routine. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = this % get_point_count () ! Input Check if ( n == 0 ) then call errmgr % report_error ( \"dts_define_fcn\" , & \"No x-y coordinates have been defined.\" , & PLOT_INVALID_OPERATION_ERROR ) return end if if ( size ( z ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"dts_define_fcn\" , & \"z\" , n , size ( z )) return end if ! Store the data if ( allocated ( this % m_z )) deallocate ( this % m_z ) allocate ( this % m_z ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"dts_define_fcn\" , flag ) return end if this % m_z = z end subroutine ! ------------------------------------------------------------------------------ pure function dts_get_z ( this ) result ( rst ) !! Gets the z-coordinates of each point. class ( delaunay_tri_surface ), intent ( in ) :: this !! The delaunay_tri_surface object. real ( real64 ), allocatable , dimension (:) :: rst !! An array of the z-coordinates of each point. if ( allocated ( this % m_z )) then rst = this % m_z else allocate ( rst ( 0 )) end if end function ! ------------------------------------------------------------------------------ ! Interpolation Routine - Barycentric Coordinate Approach ! https://www.iue.tuwien.ac.at/phd/nentchev/node25.html ! https://academic.csuohio.edu/duffy_s/CVE_512_11.pdf pure function dts_interp_1 ( this , x , y ) result ( z ) !! Evaluates the function at the requested point by means of !! linear interpolation. class ( delaunay_tri_surface ), intent ( in ) :: this !! The delaunay_tri_surface object. real ( real64 ), intent ( in ) :: x !! The x-coordinate at which to evaluate the function. real ( real64 ), intent ( in ) :: y !! The y-coordinate at which to evaluate the function. real ( real64 ) :: z !! The function value. If the point (x, y) does not lie within the !! range of defined values, then a value of NaN is returned. ! Local Variables integer ( int32 ) :: i , n1 , n2 , n3 real ( real64 ) :: x1 , x2 , x3 , y1 , y2 , y3 , z1 , z2 , z3 integer ( int32 ), allocatable , dimension (:,:) :: indices real ( real64 ), allocatable , dimension (:) :: xc , yc , zc ! Initialization z = ieee_value ( z , ieee_quiet_nan ) indices = this % get_indices () xc = this % get_points_x () yc = this % get_points_y () zc = this % get_points_z () ! Quick Return if ( this % get_triangle_count () == 0 . or . & this % get_point_count () == 0 . or . & size ( zc ) == 0 ) return ! Locate the triangle to which the point (x, y) belongs. If no triangle ! is found, simply return NaN i = this % find_triangle ( x , y ) if ( i == - 1 ) return ! Get the triangle vertices n1 = indices ( i , 1 ) n2 = indices ( i , 2 ) n3 = indices ( i , 3 ) x1 = xc ( n1 ) y1 = yc ( n1 ) z1 = zc ( n1 ) x2 = xc ( n2 ) y2 = yc ( n2 ) z2 = zc ( n2 ) x3 = xc ( n3 ) y3 = yc ( n3 ) z3 = zc ( n3 ) ! Perform the interpolation z = linear_interp ( x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 , x , y ) end function ! -------------------- pure function dts_interp_2 ( this , x , y ) result ( z ) !! Evaluates the function at the requested point by means of !! linear interpolation. class ( delaunay_tri_surface ), intent ( in ) :: this !! The delaunay_tri_surface object. real ( real64 ), intent ( in ), dimension (:) :: x !! The x data coordinates. real ( real64 ), intent ( in ), dimension (:) :: y !! The x data coordinates. real ( real64 ), allocatable , dimension (:) :: z !! The interpolated z coordinate points. If the point (x, y) does !! not lie within the range of defined values, then a value of NaN !! is returned. ! Local Variables integer ( int32 ) :: i , j , n1 , n2 , n3 , nxy real ( real64 ) :: x1 , x2 , x3 , y1 , y2 , y3 , z1 , z2 , z3 , nan integer ( int32 ), allocatable , dimension (:,:) :: indices real ( real64 ), allocatable , dimension (:) :: xc , yc , zc ! Initialization nxy = min ( size ( x ), size ( y )) nan = ieee_value ( nan , ieee_quiet_nan ) allocate ( z ( nxy )) z = nan indices = this % get_indices () xc = this % get_points_x () yc = this % get_points_y () zc = this % get_points_z () ! Quick Return if ( this % get_triangle_count () == 0 . or . & this % get_point_count () == 0 . or . & size ( zc ) == 0 ) return ! Locate the triangle to which the point (x, y) belongs. If no triangle ! is found, simply return NaN do i = 1 , nxy ! Find the index of the triangle j = this % find_triangle ( x ( i ), y ( i )) if ( j == - 1 ) cycle ! Skip if we couldn't find a triangle ! Get the vertices n1 = indices ( j , 1 ) n2 = indices ( j , 2 ) n3 = indices ( j , 3 ) x1 = xc ( n1 ) y1 = yc ( n1 ) z1 = zc ( n1 ) x2 = xc ( n2 ) y2 = yc ( n2 ) z2 = zc ( n2 ) x3 = xc ( n3 ) y3 = yc ( n3 ) z3 = zc ( n3 ) ! Perform the interpolation z ( i ) = linear_interp ( x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 , x ( i ), y ( i )) end do end function ! ------------------------------------------------------------------------------ ! Utilizes linear shape functions to interpolate on a triangle given its ! vertex locations, and the desired interpolation location. Notice, the ! interpolation location is expected to lie within the triangle. This is ! not checked. pure elemental function linear_interp ( x1 , y1 , z1 , x2 , y2 , z2 , x3 , & y3 , z3 , x , y ) result ( z ) real ( real64 ), intent ( in ) :: x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 , x , y real ( real64 ) :: a1 , a2 , a3 , j , z j = ( x2 - x1 ) * y3 + ( x1 - x3 ) * y2 + ( x3 - x2 ) * y1 a1 = ( x2 * y3 - x3 * y2 + ( y2 - y3 ) * x + ( x3 - x2 ) * y ) a2 = ( x3 * y1 - x1 * y3 + ( y3 - y1 ) * x + ( x1 - x3 ) * y ) a3 = ( x1 * y2 - x2 * y1 + ( y1 - y2 ) * x + ( x2 - x1 ) * y ) z = ( a1 * z1 + a2 * z2 + a3 * z3 ) / j end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_delaunay_tri_surface.f90.html"},{"title":"fplot_errors.f90 – FPLOT","text":"Contents Modules fplot_errors Source Code fplot_errors.f90 Source Code module fplot_errors use iso_fortran_env use ferror implicit none ! ****************************************************************************** ! ERROR CODES ! ------------------------------------------------------------------------------ integer ( int32 ), parameter :: PLOT_OUT_OF_MEMORY_ERROR = 1000 !! Occurs if there is insufficient memory available for the !! requested operation. integer ( int32 ), parameter :: PLOT_INVALID_INPUT_ERROR = 1001 !! Occurs if an invalid input is provided. integer ( int32 ), parameter :: PLOT_INVALID_OPERATION_ERROR = 1002 !! Occurs if an attempt is made to perform an invalid operation. integer ( int32 ), parameter :: PLOT_ARRAY_SIZE_MISMATCH_ERROR = 1003 !! Occurs if there is an array size mismatch error. integer ( int32 ), parameter :: PLOT_GNUPLOT_FILE_ERROR = 1004 !! Occurs if there is a GNUPLOT file error. contains ! ------------------------------------------------------------------------------ subroutine report_memory_error ( err , fcn , flag ) !! Reports a memory allocation error. class ( errors ), intent ( inout ) :: err !! The error handling object. character ( len = * ), intent ( in ) :: fcn !! The name of the function or subroutine in which the error occurred. integer ( int32 ), intent ( in ) :: flag !! The error flag returned by the system. ! Local Variables character ( len = 256 ) :: msg ! Define the error message write ( 100 , msg ) \"Memory allocation error returning flag \" , flag , \".\" call err % report_error ( fcn , trim ( msg ), PLOT_OUT_OF_MEMORY_ERROR ) ! Formatting 100 format ( A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ subroutine report_file_create_error ( err , fcn , fname , flag ) !! Reports an I/O error related to file creating. class ( errors ), intent ( inout ) :: err !! The error handling object. character ( len = * ), intent ( in ) :: fcn !! The name of the function or subroutine in which the error occurred. character ( len = * ), intent ( in ) :: fname !! The filename. integer ( int32 ), intent ( in ) :: flag !! The error flag returned by the system. ! Local Variables character ( len = 2048 ) :: msg ! Define the error message write ( 100 , msg ) \"File \" , fname , \" could not be created. The error flag \" , & flag , \" was returned.\" call err % report_error ( fcn , trim ( msg ), PLOT_GNUPLOT_FILE_ERROR ) ! Formatting 100 format ( A , A , A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ subroutine report_array_size_mismatch_error ( err , fcn , name , expected , actual ) !! Reports an array size mismatch error. class ( errors ), intent ( inout ) :: err !! The error handling object. character ( len = * ), intent ( in ) :: fcn !! The name of the function or subroutine in which the error occurred. character ( len = * ), intent ( in ) :: name !! The variable name. integer ( int32 ), intent ( in ) :: expected !! The expected array size. integer ( int32 ), intent ( in ) :: actual !! The actual array size. ! Local Variables character ( len = 256 ) :: msg ! Define the message write ( 100 , msg ) \"Array \" , name , \" was found to be of length \" , actual , & \", but was expected to be of length \" , expected , \".\" call err % report_error ( fcn , trim ( msg ), PLOT_ARRAY_SIZE_MISMATCH_ERROR ) ! Formatting 100 format ( A , A , A , I0 , A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ subroutine report_matrix_size_mismatch_error ( err , fcn , name , mexp , nexp , & mact , nact ) !! Reports a matrix size mismatch error. class ( errors ), intent ( inout ) :: err !! The error handling object. character ( len = * ), intent ( in ) :: fcn !! The name of the function or subroutine in which the error occurred. character ( len = * ), intent ( in ) :: name !! The variable name. integer ( int32 ), intent ( in ) :: mexp !! The expected number of rows. integer ( int32 ), intent ( in ) :: nexp !! The expected number of columns. integer ( int32 ), intent ( in ) :: mact !! The actual number of rows. integer ( int32 ), intent ( in ) :: nact !! The actual number of columns. ! Local Variables character ( len = 256 ) :: msg ! Define the error write ( 100 , msg ) \"Matrix \" , name , \" was expected to be of size \" , mexp , & \"-by-\" , nexp , \", but was found to be of size \" , mact , \"-by-\" , nact , \".\" call err % report_error ( fcn , trim ( msg ), PLOT_ARRAY_SIZE_MISMATCH_ERROR ) ! Formatting 100 format ( A , A , A , I0 , A , I0 , A , I0 , A , I0 , A ) end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_errors.f90.html"},{"title":"fplot_filled_plot_data.f90 – FPLOT","text":"Contents Modules fplot_filled_plot_data Source Code fplot_filled_plot_data.f90 Source Code ! fplot_filled_plot_data.f90 module fplot_filled_plot_data use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_colors use ferror use strings implicit none private public :: filled_plot_data type , extends ( plot_data_colored ) :: filled_plot_data !! Defines a two-dimensional filled plot data set. logical , private :: m_useY2 = . false . !! Plot against the secondary y-axis. real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! The data set (column 1 = x, column 2 = y, column 3 = constraint y) contains procedure , public :: get_axes_string => fpd_get_axes_cmd procedure , public :: get_draw_against_y2 => fpd_get_draw_against_y2 procedure , public :: set_draw_against_y2 => fpd_set_draw_against_y2 procedure , public :: get_command_string => fpd_get_cmd procedure , public :: get_data_string => fpd_get_data_cmd procedure , public :: define_data => fpd_define_data end type contains ! ------------------------------------------------------------------------------ function fpd_get_axes_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string defining which axes the data !! is to be plotted against. class ( filled_plot_data ), intent ( in ) :: this !! The filled_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Define which axes the data is to be plotted against if ( this % get_draw_against_y2 ()) then x = \"axes x1y2\" else x = \"axes x1y1\" end if end function ! ------------------------------------------------------------------------------ pure function fpd_get_draw_against_y2 ( this ) result ( x ) !! Gets a value determining if the data should be plotted against !! the secondary y-axis. class ( filled_plot_data ), intent ( in ) :: this !! The filled_plot_data object. logical :: x !! Returns true if the data should be plotted against the secondary !! y-axis; else, false to plot against the primary y-axis. x = this % m_useY2 end function ! -------------------- subroutine fpd_set_draw_against_y2 ( this , x ) !! Sets a value determining if the data should be plotted against !! the secondary y-axis. class ( filled_plot_data ), intent ( inout ) :: this !! The filled_plot_data object. logical , intent ( in ) :: x !! Set to true if the data should be plotted against the secondary !! y-axis; else, false to plot against the primary y-axis. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ function fpd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this !! filled_plot_data object. class ( filled_plot_data ), intent ( in ) :: this !! The filled_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Establish filled data call str % append ( \" with filledcurves\" ) ! Line Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Define the axes structure call str % append ( \" \" ) call str % append ( this % get_axes_string ()) ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function fpd_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data to plot. class ( filled_plot_data ), intent ( in ) :: this !! The filled_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i character ( len = :), allocatable :: nl , delimiter ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) ! Process do i = 1 , size ( this % m_data , 1 ) call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( nl ) end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine fpd_define_data ( this , x , y , yc , err ) !! Defines the data set. class ( filled_plot_data ), intent ( inout ) :: this !! The filled_plot_data object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinate data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinate data. real ( real64 ), intent ( in ), dimension (:) :: yc !! An N-element array containing the constraining curve y !! coordinate data. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables type ( errors ), target :: deferr class ( errors ), pointer :: errmgr integer ( int32 ) :: i , n , flag ! Set up error handling if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking n = size ( x ) if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"fpd_define_data\" , & \"y\" , n , size ( y )) return end if if ( size ( yc ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"fpd_define_data\" , & \"yc\" , n , size ( yc )) return end if ! Allocate space for the data if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 3 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"fpd_define_data\" , flag ) return end if ! Store the data do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = yc ( i ) end do end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_filled_plot_data.f90.html"},{"title":"fplot_label.f90 – FPLOT","text":"Contents Modules fplot_label Source Code fplot_label.f90 Source Code ! fplot_label.f90 module fplot_label use iso_fortran_env use fplot_plot_object use fplot_constants use strings implicit none private public :: plot_label type , extends ( plot_object ) :: plot_label !! Defines a plot label. logical , private :: m_visible = . true . !! Is the label visible? real ( real32 ), private , dimension ( 3 ) :: m_position !! The x, y, and z coordinates of the label. real ( real32 ), private :: m_angle = 0.0 !! The rotation angle of the label. character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_text !! The label text. contains procedure , public :: get_command_string => lbl_get_cmd procedure , public :: get_is_visible => lbl_get_is_visible procedure , public :: set_is_visible => lbl_set_is_visible procedure , public :: get_position => lbl_get_position procedure , public :: set_position => lbl_set_position procedure , public :: get_angle => lbl_get_angle procedure , public :: set_angle => lbl_set_angle procedure , public :: get_text => lbl_get_txt procedure , public :: set_text => lbl_set_txt end type contains ! ------------------------------------------------------------------------------ function lbl_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for the label. class ( plot_label ), intent ( in ) :: this !! The plot_label object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str real ( real32 ) :: pt ( 3 ) ! Initialization call str % initialize () pt = this % get_position () ! If visible, draw the label if ( this % get_is_visible ()) then call str % append ( 'set label \"' ) call str % append ( this % get_text ()) call str % append ( '\"' ) call str % append ( \" at \" ) call str % append ( to_string ( pt ( 1 ))) call str % append ( \",\" ) call str % append ( to_string ( pt ( 2 ))) call str % append ( \",\" ) call str % append ( to_string ( pt ( 3 ))) call str % append ( \" rotate by \" ) call str % append ( to_string ( this % get_angle ())) x = char ( str % to_string ()) end if end function ! ------------------------------------------------------------------------------ pure function lbl_get_is_visible ( this ) result ( x ) !! Gets a value determining if the label is to be drawn. class ( plot_label ), intent ( in ) :: this !! The plot_label object. logical :: x !! Returns true if the label is to be drawn; else, false. x = this % m_visible end function ! -------------------- subroutine lbl_set_is_visible ( this , x ) !! Sets a value determining if the label is to be drawn. class ( plot_label ), intent ( inout ) :: this !! The plot_label object. logical , intent ( in ) :: x !! Set to true if the label is to be drawn; else, false. this % m_visible = x end subroutine ! ------------------------------------------------------------------------------ pure function lbl_get_position ( this ) result ( x ) !! Gets the position of the label in terms of plot coordinates. class ( plot_label ), intent ( in ) :: this !! The plot_label object. real ( real32 ), dimension ( 3 ) :: x !! A 3-element array containing the X, Y, and Z position of the !! label. x = this % m_position end function ! -------------------- subroutine lbl_set_position ( this , x ) !! Sets the position of the label in terms of plot coordinates. class ( plot_label ), intent ( inout ) :: this !! The plot_label object. real ( real32 ), intent ( in ), dimension ( 3 ) :: x !! A 3-element array containing the X, Y, and Z position of the !! label. this % m_position = x end subroutine ! ------------------------------------------------------------------------------ pure function lbl_get_angle ( this ) result ( x ) !! Gets the angle of the label text, in degrees. class ( plot_label ), intent ( in ) :: this !! The plot_label object. real ( real32 ) :: x !! The angle, in degrees. x = this % m_angle end function ! -------------------- subroutine lbl_set_angle ( this , x ) !! Sets the angle of the label text, in degrees. class ( plot_label ), intent ( inout ) :: this !! The plot_label object. real ( real32 ), intent ( in ) :: x !! The angle, in degrees. this % m_angle = x end subroutine ! ------------------------------------------------------------------------------ function lbl_get_txt ( this ) result ( x ) !! Gets the text displayed by the label. class ( plot_label ), intent ( in ) :: this !! The plot_label object. character ( len = :), allocatable :: x !! The text string to display. x = trim ( this % m_text ) end function ! -------------------- subroutine lbl_set_txt ( this , x ) !! Sets the text displayed by the label. class ( plot_label ), intent ( inout ) :: this !! The plot_label object. character ( len = * ), intent ( in ) :: x !! The text string to display. integer ( int32 ) :: n n = min ( len ( x ), PLOTDATA_MAX_NAME_LENGTH ) this % m_text = \"\" this % m_text ( 1 : n ) = x ( 1 : n ) end subroutine ! ****************************************************************************** ! ADDED: JAN. 09, 2024 - JAC ! ------------------------------------------------------------------------------ ! pure subroutine lbl_assign(x, y) ! type(plot_label), intent(out) :: x ! class(plot_label), intent(in) :: y ! x%m_visible = y%m_visible ! x%m_position = y%m_position ! x%m_angle = y%m_angle ! x%m_text = y%m_text ! end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_label.f90.html"},{"title":"fplot_latex_terminal.f90 – FPLOT","text":"Contents Modules fplot_latex_terminal Source Code fplot_latex_terminal.f90 Source Code ! fplot_latex_terminal.f90 module fplot_latex_terminal use iso_fortran_env use fplot_terminal use fplot_constants use strings implicit none private public :: latex_terminal type , extends ( terminal ) :: latex_terminal !! A LATEX terminal. character ( len = 14 ), private :: m_id = \"epslatex color\" !! The terminal ID string character ( len = GNUPLOT_MAX_PATH_LENGTH ), private :: m_fname = \"default.tex\" !! The filename of the file to write. contains procedure , public :: get_filename => tex_get_filename procedure , public :: set_filename => tex_set_filename procedure , public :: get_id_string => tex_get_term_string procedure , public :: get_command_string => tex_get_command_string end type contains ! ------------------------------------------------------------------------------ function tex_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( latex_terminal ), intent ( in ) :: this !! The latex_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function ! ------------------------------------------------------------------------------ function tex_get_filename ( this ) result ( txt ) !! Gets the filename for the output LATEX file. class ( latex_terminal ), intent ( in ) :: this !! The latex_terminal object. character ( len = :), allocatable :: txt !! The filename, including the file extension (.tex). integer ( int32 ) :: n n = len_trim ( this % m_fname ) allocate ( character ( len = n ) :: txt ) txt = trim ( this % m_fname ) end function ! -------------------- subroutine tex_set_filename ( this , txt ) !! Sets the filename for the output LATEX file. class ( latex_terminal ), intent ( inout ) :: this !! The latex_terminal object. character ( len = * ), intent ( in ) :: txt !! The filename, including the file extension (.tex). integer ( int32 ) :: n n = min ( len_trim ( txt ), GNUPLOT_MAX_PATH_LENGTH ) this % m_fname = \"\" if ( n /= 0 ) then this % m_fname ( 1 : n ) = txt ( 1 : n ) else this % m_fname = \"default.tex\" end if end subroutine ! ------------------------------------------------------------------------------ function tex_get_command_string ( this ) result ( x ) !! Returns the appropriate GNUPLOT command string to establish !! appropriate parameters. class ( latex_terminal ), intent ( in ) :: this !! The latex_terminal object. character ( len = :), allocatable :: x !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str ! Process call str % initialize () call str % append ( \"set term epslatex color \" ) call str % append ( \" font \" ) call str % append ( '\"' ) call str % append ( this % get_font_name ()) call str % append ( ',' ) call str % append ( to_string ( this % get_font_size ())) call str % append ( '\"' ) call str % append ( \" size \" ) call str % append ( to_string ( this % get_window_width ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_window_height ())) call str % append ( new_line ( 'a' )) call str % append ( \"set output \" ) call str % append ( '\"' ) call str % append ( this % get_filename ()) call str % append ( '\"' ) x = char ( str % to_string ()) end function end module","tags":"","loc":"sourcefile\\fplot_latex_terminal.f90.html"},{"title":"fplot_legend.f90 – FPLOT","text":"Contents Modules fplot_legend Source Code fplot_legend.f90 Source Code ! fplot_legend.f90 module fplot_legend use iso_fortran_env use fplot_plot_object use fplot_constants use strings implicit none private public :: legend type , extends ( plot_object ) :: legend !! Defines a legend object. logical , private :: m_inside = . true . !! Inside or outside the axes? logical , private :: m_box = . true . !! Box around? character ( len = 20 ), private :: m_horzPosition = LEGEND_RIGHT !! Horizontal position. character ( len = 20 ), private :: m_vertPosition = LEGEND_TOP !! Verical position. logical , private :: m_show = . false . !! Is visible? character ( len = 20 ), private :: m_layout = LEGEND_ARRANGE_VERTICALLY !! Determines the legend layout. logical , private :: m_opaque = . true . !! Opaque background? contains procedure , public :: get_draw_inside_axes => leg_get_inside procedure , public :: set_draw_inside_axes => leg_set_inside procedure , public :: get_draw_border => leg_get_box procedure , public :: set_draw_border => leg_set_box procedure , public :: get_horizontal_position => leg_get_horz_pos procedure , public :: set_horizontal_position => leg_set_horz_pos procedure , public :: get_vertical_position => leg_get_vert_pos procedure , public :: set_vertical_position => leg_set_vert_pos procedure , public :: get_is_visible => leg_get_visible procedure , public :: set_is_visible => leg_set_visible procedure , public :: get_command_string => leg_get_command_txt procedure , public :: get_layout => leg_get_layout procedure , public :: set_layout => leg_set_layout procedure , public :: get_is_opaque => leg_get_opaque procedure , public :: set_is_opaque => leg_set_opaque end type contains ! ------------------------------------------------------------------------------ pure function leg_get_inside ( this ) result ( x ) !! Gets a value determining if the legend should be drawn inside !! or outside the axes border. class ( legend ), intent ( in ) :: this !! The legend object. logical :: x !! True to draw inside the axes border; else, false for outside. x = this % m_inside end function ! --------------------- subroutine leg_set_inside ( this , x ) !! Sets a value determining if the legend should be drawn inside !! or outside the axes border. class ( legend ), intent ( inout ) :: this !! The legend object. logical , intent ( in ) :: x !! True to draw inside the axes border; else, false for outside. this % m_inside = x end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_box ( this ) result ( x ) !! Gets a value determining if the legend should have a border. class ( legend ), intent ( in ) :: this !! The legend object. logical :: x !! True if the legend should have a border; else, false. x = this % m_box end function ! --------------------- subroutine leg_set_box ( this , x ) !! Sets a value determining if the legend should have a border. class ( legend ), intent ( inout ) :: this !! The legend object. logical , intent ( in ) :: x !! True if the legend should have a border; else, false. this % m_box = x end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_horz_pos ( this ) result ( x ) !! Gets the horizontal position of the legend. class ( legend ), intent ( in ) :: this !! The legend object. character ( len = :), allocatable :: x !! The horizontal position of the legend (LEGEND_LEFT, !! LEGEND_CENTER, or LEGEND_RIGHT). integer ( int32 ) :: n n = len_trim ( this % m_horzPosition ) allocate ( character ( len = n ) :: x ) x = trim ( this % m_horzPosition ) end function ! --------------------- subroutine leg_set_horz_pos ( this , x ) !! Sets the horizontal position of the legend. class ( legend ), intent ( inout ) :: this !! The legend object. character ( len = * ), intent ( in ) :: x !! The horizontal position of the legend. The parameter must be !! set to one of the following: LEGEND_LEFT, LEGEND_CENTER, or !! LEGEND_RIGHT. If not, the default LEGEND_RIGHT will be used. this % m_horzPosition = x if ( x /= LEGEND_LEFT . and . x /= LEGEND_RIGHT . and . x /= LEGEND_CENTER ) & this % m_horzPosition = LEGEND_RIGHT end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_vert_pos ( this ) result ( x ) !! Gets the vertical position of the legend. class ( legend ), intent ( in ) :: this !! The legend object. character ( len = :), allocatable :: x !! The vertical position of the legend (LEGEND_TOP, !! LEGEND_CENTER, or LEGEND_BOTTOM). integer ( int32 ) :: n n = len_trim ( this % m_vertPosition ) allocate ( character ( len = n ) :: x ) x = trim ( this % m_vertPosition ) end function ! --------------------- subroutine leg_set_vert_pos ( this , x ) !! Sets the vertical position of the legend. class ( legend ), intent ( inout ) :: this !! The legend object. character ( len = * ), intent ( in ) :: x !! The vertical position of the legend. The parameter must be !! set to one of the following: LEGEND_TOP, LEGEND_CENTER, or !! LEGEND_BOTTOM. If not, the default LEGEND_TOP will be used. this % m_vertPosition = x if ( x /= LEGEND_TOP . and . x /= LEGEND_CENTER . and . x /= LEGEND_BOTTOM ) & this % m_vertPosition = LEGEND_TOP end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_visible ( this ) result ( x ) !! Gets a value determining if the legend is visible. class ( legend ), intent ( in ) :: this !! The legend object. logical :: x !! True if the legend is visible; else, false. x = this % m_show end function ! --------------------- subroutine leg_set_visible ( this , x ) !! Sets a value determining if the legend is visible. class ( legend ), intent ( inout ) :: this !! The legend object. logical , intent ( in ) :: x !! True if the legend is visible; else, false. this % m_show = x end subroutine ! ------------------------------------------------------------------------------ function leg_get_command_txt ( this ) result ( txt ) !! Gets the command string defining the legend properties. class ( legend ), intent ( in ) :: this !! The legend object. character ( len = :), allocatable :: txt !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str ! Process call str % initialize () ! Visible? if (. not . this % get_is_visible ()) then txt = \"set key off\" return end if ! Inside vs Outside & Position if ( this % get_draw_inside_axes ()) then call str % append ( \"set key inside\" ) else call str % append ( \"set key outside\" ) end if call str % append ( \" \" ) call str % append ( this % get_vertical_position ()) call str % append ( \" \" ) call str % append ( this % get_horizontal_position ()) ! Border call str % append ( new_line ( 'a' )) if ( this % get_draw_border ()) then ! call str%append(\"set key box opaque\") call str % append ( \"set key box\" ) else call str % append ( \"set key nobox\" ) end if ! Layout call str % append ( new_line ( 'a' )) call str % append ( \"set key \" ) call str % append ( this % get_layout ()) ! Opaque call str % append ( new_line ( 'a' )) call str % append ( \"set key \" ) if ( this % get_is_opaque ()) then call str % append ( \"opaque\" ) else call str % append ( \"noopaque\" ) end if ! End txt = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function leg_get_layout ( this ) result ( rst ) !! Gets the layout of the legend. class ( legend ), intent ( in ) :: this !! The legend object. character ( len = :), allocatable :: rst !! The layout type, either LEGEND_ARRANGE_VERTICALLY or !! LEGEND_ARRANGE_HORIZONTALLY. rst = trim ( this % m_layout ) end function ! --------------------- subroutine leg_set_layout ( this , x ) !! Sets the layout of the legend. class ( legend ), intent ( inout ) :: this !! The legend object. character ( len = * ), intent ( in ) :: x !! The layout type, either LEGEND_ARRANGE_VERTICALLY or !! LEGEND_ARRANGE_HORIZONTALLY. if ( x == LEGEND_ARRANGE_HORIZONTALLY . or . & x == LEGEND_ARRANGE_VERTICALLY ) & then this % m_layout = x end if end subroutine ! ------------------------------------------------------------------------------ pure function leg_get_opaque ( this ) result ( rst ) !! Gets a value determining if the legend is to be opaque. class ( legend ), intent ( in ) :: this !! The legend object. logical :: rst !! True if the legend is to be opaque; else, false. rst = this % m_opaque end function ! --------------------- subroutine leg_set_opaque ( this , x ) !! Sets a value determining if the legend is to be opaque. class ( legend ), intent ( inout ) :: this !! The legend object. logical :: x !! True if the legend is to be opaque; else, false. this % m_opaque = x end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_legend.f90.html"},{"title":"fplot_multiplot.f90 – FPLOT","text":"Contents Modules fplot_multiplot Source Code fplot_multiplot.f90 Source Code ! fplot_multiplot.f90 module fplot_multiplot use iso_fortran_env use fplot_plot_object use fplot_plot use fplot_terminal use fplot_windows_terminal use fplot_qt_terminal use fplot_wxt_terminal use fplot_png_terminal use fplot_latex_terminal use fplot_constants use fplot_errors use collections use ferror use strings implicit none private public :: multiplot type , extends ( plot_object ) :: multiplot !! Defines a multi-plot layout. type ( list ), private :: m_plots !! The collection of plot objects. integer ( int32 ), private :: m_rows = 0 !! The number of rows of plots. integer ( int32 ), private :: m_cols = 0 !! The number of columns of plots. character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_title !! The page title. logical , private :: m_hasTitle = . false . !! Has a title? class ( terminal ), pointer :: m_terminal => null () !! The GNUPLOT terminal object to target. contains final :: mp_clean procedure , public :: get_command_string => mp_get_command procedure , public :: initialize => mp_init procedure , public :: get_row_count => mp_get_rows procedure , public :: get_column_count => mp_get_cols procedure , public :: get_plot_count => mp_get_count procedure , public :: get_title => mp_get_title procedure , public :: set_title => mp_set_title procedure , public :: draw => mp_draw procedure , public :: get => mp_get procedure , public :: set => mp_set procedure , public :: is_title_defined => mp_has_title procedure , public :: get_terminal => mp_get_term procedure , public :: save_file => mp_save procedure , public :: get_font_name => mp_get_font procedure , public :: set_font_name => mp_set_font procedure , public :: get_font_size => mp_get_font_size procedure , public :: set_font_size => mp_set_font_size end type contains ! ------------------------------------------------------------------------------ function mp_get_command ( this ) result ( x ) !! Gets the GNUPLOT commands for this object. class ( multiplot ), intent ( in ) :: this !! The multiplot object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , m , n class ( plot ), pointer :: ptr ! Initialization call str % initialize () m = this % get_row_count () n = this % get_column_count () ! Set up the multiplot call str % append ( \"set multiplot layout \" ) call str % append ( to_string ( m )) call str % append ( \",\" ) call str % append ( to_string ( n )) call str % append ( \" columnsfirst\" ) if ( this % is_title_defined ()) then call str % append ( \" title \" ) call str % append ( '\"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if call str % append ( new_line ( 'a' )) ! Write commands for each plot object do j = 1 , n do i = 1 , m ptr => this % get ( i , j ) call str % append ( new_line ( 'a' )) call str % append ( ptr % get_command_string ()) end do end do ! Close out the multiplot call str % append ( new_line ( 'a' )) call str % append ( \"unset multiplot\" ) ! Get the string x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine mp_init ( this , m , n , term , width , height , err ) !! Initializes the multiplot object. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. integer ( int32 ), intent ( in ) :: m !! The number of rows of plots. integer ( int32 ), intent ( in ) :: n !! The number of columns of plots. integer ( 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 ( int32 ), intent ( in ), optional :: width !! Optionally, the width of the plot window. integer ( int32 ), intent ( in ), optional :: height !! Optionally, the height of the plot window. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag , t , i class ( errors ), pointer :: errmgr type ( errors ), target :: deferr type ( wxt_terminal ), pointer :: wxt type ( windows_terminal ), pointer :: win type ( qt_terminal ), pointer :: qt type ( png_terminal ), pointer :: png type ( latex_terminal ), pointer :: latex ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if if ( present ( term )) then t = term else t = GNUPLOT_TERMINAL_WXT end if ! Process call this % m_plots % clear () this % m_rows = m this % m_cols = n flag = 0 ! Populate the list with a dummy variable at the outset. This allows ! the list to be appropriately sized so the user may use the \"set\" ! subroutine appropriately do i = 1 , m * n call this % m_plots % push ( i ) end do ! Define the terminal if ( associated ( this % m_terminal )) deallocate ( this % m_terminal ) select case ( t ) case ( GNUPLOT_TERMINAL_PNG ) allocate ( png , stat = flag ) this % m_terminal => png case ( GNUPLOT_TERMINAL_QT ) allocate ( qt , stat = flag ) this % m_terminal => qt case ( GNUPLOT_TERMINAL_WIN32 ) allocate ( win , stat = flag ) this % m_terminal => win case ( GNUPLOT_TERMINAL_LATEX ) allocate ( latex , stat = flag ) this % m_terminal => latex case default ! WXT is the default allocate ( wxt , stat = flag ) this % m_terminal => wxt end select ! Error Checking if ( flag /= 0 ) then call report_memory_error ( errmgr , \"mp_init\" , flag ) return end if ! Size the window? if ( present ( width )) then call this % m_terminal % set_window_width ( width ) end if if ( present ( height )) then call this % m_terminal % set_window_height ( height ) end if end subroutine ! ------------------------------------------------------------------------------ subroutine mp_clean ( this ) !! Cleans up resources held by the multiplot object. type ( multiplot ), intent ( inout ) :: this !! The multiplot object. if ( associated ( this % m_terminal )) deallocate ( this % m_terminal ) nullify ( this % m_terminal ) end subroutine ! ------------------------------------------------------------------------------ pure function mp_get_rows ( this ) result ( x ) !! Gets the number of rows of plots. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ) :: x !! The row count. x = this % m_rows end function ! -------------------- pure function mp_get_cols ( this ) result ( x ) !! Gets the number of columns of plots. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ) :: x !! The column count. x = this % m_cols end function ! -------------------- pure function mp_get_count ( this ) result ( x ) !! Gets the total number of plots. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ) :: x !! The plot count. x = this % m_plots % count () end function ! ------------------------------------------------------------------------------ function mp_get_title ( this ) result ( x ) !! Gets the multiplot's title. class ( multiplot ), intent ( in ) :: this !! The multiplot object. character ( len = :), allocatable :: x !! The title. x = this % m_title end function ! -------------------- subroutine mp_set_title ( this , x ) !! Sets the multiplot's title. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. character ( len = * ), intent ( in ) :: x !! The title. ! Local Variables integer ( int32 ) :: n ! Process n = min ( len ( x ), PLOTDATA_MAX_NAME_LENGTH ) this % m_title = \"\" if ( n /= 0 ) then this % m_title ( 1 : n ) = x ( 1 : n ) this % m_hasTitle = . true . else this % m_hasTitle = . false . end if end subroutine ! ------------------------------------------------------------------------------ subroutine mp_draw ( this , persist , err ) !! Launches GNUPLOT and draws the multiplot per the current state of !! the command list. 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. ! Parameters character ( len = * ), parameter :: fname = \"temp_gnuplot_file.plt\" ! Local Variables logical :: p integer ( int32 ) :: fid , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr class ( terminal ), pointer :: term ! Initialization if ( present ( persist )) then p = persist else p = . true . end if if ( present ( err )) then errmgr => err else errmgr => deferr end if term => this % get_terminal () ! Open the file for writing, and write the contents to file open ( newunit = fid , file = fname , iostat = flag ) if ( flag > 0 ) then call report_file_create_error ( errmgr , \"mp_draw\" , fname , flag ) return end if write ( fid , '(A)' ) term % get_command_string () write ( fid , '(A)' ) new_line ( 'a' ) write ( fid , '(A)' ) this % get_command_string () close ( fid ) ! Launch GNUPLOT if ( p ) then call execute_command_line ( \"gnuplot --persist \" // fname ) else call execute_command_line ( \"gnuplot \" // fname ) end if ! Clean up by deleting the file open ( newunit = fid , file = fname ) close ( fid , status = \"delete\" ) end subroutine ! ------------------------------------------------------------------------------ function mp_get ( this , i , j ) result ( x ) !! Gets the requested plot object. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ), intent ( in ) :: i !! The row index of the plot to retrieve. integer ( int32 ), intent ( in ) :: j !! The column index of the plot to retrieve. class ( plot ), pointer :: x !! A pointer to the plot object. ! Local Variables class ( * ), pointer :: item integer ( int32 ) :: ind ! Process ind = this % m_rows * ( j - 1 ) + i item => this % m_plots % get ( ind ) select type ( item ) class is ( plot ) x => item class default nullify ( x ) end select end function ! -------------------- subroutine mp_set ( this , i , j , x ) !! Replaces the specified plot. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. integer ( int32 ), intent ( in ) :: i !! The row index of the plot to replace. integer ( int32 ), intent ( in ) :: j !! The column index of the plot to replace. class ( plot ), intent ( in ) :: x !! The new plot. ! Local Variables integer ( int32 ) :: ind ! Process ind = this % m_rows * ( j - 1 ) + i call this % m_plots % set ( ind , x ) end subroutine ! ------------------------------------------------------------------------------ pure function mp_has_title ( this ) result ( x ) !! Gets a value determining if a title has been defined for the !! multiplot object. class ( multiplot ), intent ( in ) :: this !! The multiplot object. logical :: x !! Returns true if a title has been defined for this multiplot; !! else, returns false. x = this % m_hasTitle end function ! ------------------------------------------------------------------------------ function mp_get_term ( this ) result ( x ) !! Gets the GNUPLOT terminal object. class ( multiplot ), intent ( in ) :: this !! The multiplot object. class ( terminal ), pointer :: x !! A pointer to the terminal object. x => this % m_terminal end function ! ------------------------------------------------------------------------------ subroutine mp_save ( this , fname , err ) !! Saves a GNUPLOT command file. 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. ! Local Variables integer ( int32 ) :: fid , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr class ( terminal ), pointer :: term ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if term => this % get_terminal () ! Open the file for writing, and write the contents to file open ( newunit = fid , file = fname , iostat = flag ) if ( flag > 0 ) then call report_file_create_error ( errmgr , \"mp_save\" , fname , flag ) return end if write ( fid , '(A)' ) term % get_command_string () write ( fid , '(A)' ) new_line ( 'a' ) write ( fid , '(A)' ) this % get_command_string () close ( fid ) end subroutine ! ------------------------------------------------------------------------------ function mp_get_font ( this ) result ( x ) !! Gets the name of the font used for plot text. class ( multiplot ), intent ( in ) :: this !! The multiplot object. character ( len = :), allocatable :: x !! The font name. class ( terminal ), pointer :: term term => this % get_terminal () x = term % get_font_name () end function ! -------------------- subroutine mp_set_font ( this , x ) !! Sets the name of the font used for plot text. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. character ( len = * ), intent ( in ) :: x !! The font name. class ( terminal ), pointer :: term term => this % get_terminal () call term % set_font_name ( x ) end subroutine ! ------------------------------------------------------------------------------ function mp_get_font_size ( this ) result ( x ) !! Gets the size of the font used by the plot. class ( multiplot ), intent ( in ) :: this !! The multiplot object. integer ( int32 ) :: x !! The font size. class ( terminal ), pointer :: term term => this % get_terminal () x = term % get_font_size () end function ! -------------------- subroutine mp_set_font_size ( this , x ) !! Sets the size of the font used by the plot. class ( multiplot ), intent ( inout ) :: this !! The multiplot object. integer ( int32 ), intent ( in ) :: x !! The font size. class ( terminal ), pointer :: term term => this % get_terminal () call term % set_font_size ( x ) end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_multiplot.f90.html"},{"title":"fplot_plot.f90 – FPLOT","text":"Contents Modules fplot_plot Source Code fplot_plot.f90 Source Code ! fplot_plot.f90 module fplot_plot use iso_fortran_env use fplot_plot_object use fplot_plot_data use fplot_terminal use fplot_windows_terminal use fplot_qt_terminal use fplot_wxt_terminal use fplot_png_terminal use fplot_latex_terminal use fplot_colormap use fplot_colors use fplot_errors use fplot_constants use fplot_legend use fplot_label use fplot_arrow use ferror use strings use collections implicit none private public :: plot type , extends ( plot_object ) :: plot !! Defines the basic GNUPLOT plot. character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_title = \"\" !! The plot title. logical , private :: m_hasTitle = . false . !! Has a title? class ( terminal ), private , pointer :: m_terminal => null () !! The GNUPLOT terminal object to target. type ( list ), private :: m_data !! A collection of plot_data items to plot. type ( legend ), private , pointer :: m_legend => null () !! The legend. logical , private :: m_showGrid = . true . !! Show grid lines? logical , private :: m_ticsIn = . true . !! Point tic marks in? logical , private :: m_drawBorder = . true . !! Draw the border? type ( list ), private :: m_labels ! Added 6/22/2018, JAC !! A collection of plot_label items to draw. integer ( int32 ), private :: m_colorIndex = 1 !! The color index to use for automatic line coloring for scatter plots. logical , private :: m_axisEqual = . false . !! Determines if the axes should be scaled proportionally. class ( colormap ), private , pointer :: m_colormap !! The colormap. logical , private :: m_showColorbar = . true . !! Show the colorbar? type ( list ), private :: m_arrows ! Added 1/3/2024, JAC !! A collection of plot_arrow items to draw. real ( real32 ), private :: m_leftMargin = - 1.0 real ( real32 ), private :: m_rightMargin = - 1.0 real ( real32 ), private :: m_topMargin = - 1.0 real ( real32 ), private :: m_bottomMargin = - 1.0 contains procedure , public :: free_resources => plt_clean_up procedure , public :: initialize => plt_init procedure , public :: get_title => plt_get_title procedure , public :: set_title => plt_set_title procedure , public :: is_title_defined => plt_has_title procedure , public :: get_legend => plt_get_legend procedure , public :: get_count => plt_get_count procedure , public :: push => plt_push_data procedure , public :: pop => plt_pop_data procedure , public :: clear_all => plt_clear_all procedure , public :: get => plt_get procedure , public :: set => plt_set procedure , public :: get_terminal => plt_get_term procedure , public :: get_show_gridlines => plt_get_show_grid procedure , public :: set_show_gridlines => plt_set_show_grid procedure , public :: draw => plt_draw procedure , public :: save_file => plt_save procedure , public :: get_font_name => plt_get_font procedure , public :: set_font_name => plt_set_font procedure , public :: get_font_size => plt_get_font_size procedure , public :: set_font_size => plt_set_font_size procedure , public :: get_tics_inward => plt_get_tics_in procedure , public :: set_tics_inward => plt_set_tics_in procedure , public :: get_draw_border => plt_get_draw_border procedure , public :: set_draw_border => plt_set_draw_border procedure , public :: push_label => plt_push_label procedure , public :: pop_label => plt_pop_label procedure , public :: get_label => plt_get_label procedure , public :: set_label => plt_set_label procedure , public :: get_label_count => plt_get_label_count procedure , public :: clear_all_labels => plt_clear_labels procedure , public :: get_axis_equal => plt_get_axis_equal procedure , public :: set_axis_equal => plt_set_axis_equal procedure , public :: get_colormap => plt_get_colormap procedure , public :: set_colormap => plt_set_colormap procedure , public :: get_show_colorbar => plt_get_show_colorbar procedure , public :: set_show_colorbar => plt_set_show_colorbar procedure , public :: get_command_string => plt_get_cmd procedure , public :: push_arrow => plt_push_arrow procedure , public :: pop_arrow => plt_pop_arrow procedure , public :: get_arrow => plt_get_arrow procedure , public :: set_arrow => plt_set_arrow procedure , public :: get_arrow_count => plt_get_arrow_count procedure , public :: clear_arrows => plt_clear_arrows procedure , public :: get_left_margin => plt_get_left_margin procedure , public :: set_left_margin => plt_set_left_margin procedure , public :: get_right_margin => plt_get_right_margin procedure , public :: set_right_margin => plt_set_right_margin procedure , public :: get_top_margin => plt_get_top_margin procedure , public :: set_top_margin => plt_set_top_margin procedure , public :: get_bottom_margin => plt_get_bottom_margin procedure , public :: set_bottom_margin => plt_set_bottom_margin end type contains ! ------------------------------------------------------------------------------ subroutine plt_clean_up ( this ) !! Cleans up resources held by the plot object. Inheriting !! classes are expected to call this routine to free internally held !! resources. class ( plot ), intent ( inout ) :: this !! The plot object. if ( associated ( this % m_terminal )) then deallocate ( this % m_terminal ) nullify ( this % m_terminal ) end if if ( associated ( this % m_legend )) then deallocate ( this % m_legend ) nullify ( this % m_legend ) end if if ( associated ( this % m_colormap )) then deallocate ( this % m_colormap ) nullify ( this % m_colormap ) end if end subroutine ! ------------------------------------------------------------------------------ subroutine plt_init ( this , term , fname , err ) !! Initializes the plot object. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag , t class ( errors ), pointer :: errmgr type ( errors ), target :: deferr type ( wxt_terminal ), pointer :: wxt type ( windows_terminal ), pointer :: win type ( qt_terminal ), pointer :: qt type ( png_terminal ), pointer :: png type ( latex_terminal ), pointer :: latex ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if if ( present ( term )) then t = term else t = GNUPLOT_TERMINAL_WXT end if ! Process flag = 0 if ( associated ( this % m_terminal )) deallocate ( this % m_terminal ) select case ( t ) case ( GNUPLOT_TERMINAL_PNG ) allocate ( png , stat = flag ) if ( present ( fname )) call png % set_filename ( fname ) this % m_terminal => png case ( GNUPLOT_TERMINAL_QT ) allocate ( qt , stat = flag ) this % m_terminal => qt case ( GNUPLOT_TERMINAL_WIN32 ) allocate ( win , stat = flag ) this % m_terminal => win case ( GNUPLOT_TERMINAL_LATEX ) allocate ( latex , stat = flag ) if ( present ( fname )) call latex % set_filename ( fname ) this % m_terminal => latex case default ! WXT is the default allocate ( wxt , stat = flag ) this % m_terminal => wxt end select ! Establish the colormap nullify ( this % m_colormap ) if ( flag == 0 . and . . not . associated ( this % m_legend )) then allocate ( this % m_legend , stat = flag ) end if ! Error Checking if ( flag /= 0 ) then call report_memory_error ( errmgr , \"plt_init\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ function plt_get_title ( this ) result ( txt ) !! Gets the plot's title. class ( plot ), intent ( in ) :: this !! The plot object. character ( len = :), allocatable :: txt !! The title. integer ( int32 ) :: n n = len_trim ( this % m_title ) allocate ( character ( len = n ) :: txt ) txt = trim ( this % m_title ) end function ! -------------------- subroutine plt_set_title ( this , txt ) !! Sets the plot's title. class ( plot ), intent ( inout ) :: this !! The plot object. character ( len = * ), intent ( in ) :: txt !! The title. integer :: n n = min ( len_trim ( txt ), PLOTDATA_MAX_NAME_LENGTH ) this % m_title = \"\" if ( n /= 0 ) then this % m_title ( 1 : n ) = txt ( 1 : n ) this % m_hasTitle = . true . else this % m_hasTitle = . false . end if end subroutine ! ------------------------------------------------------------------------------ pure function plt_has_title ( this ) result ( x ) !! Gets a value determining if a title has been defined for the plot !! object. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if a title has been defined for this plot; else, !! returns false. x = this % m_hasTitle end function ! ------------------------------------------------------------------------------ function plt_get_legend ( this ) result ( x ) !! Gets the plot's legend object. class ( plot ), intent ( in ) :: this !! The plot object. type ( legend ), pointer :: x !! A pointer to the legend object. x => this % m_legend end function ! ------------------------------------------------------------------------------ pure function plt_get_count ( this ) result ( x ) !! Gets the number of stored plot_data objects. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ) :: x !! The number of plot_data objects. x = this % m_data % count () end function ! ------------------------------------------------------------------------------ subroutine plt_push_data ( this , x , err ) !! Pushes a plot_data object onto the stack. class ( plot ), intent ( inout ) :: this !! The plot object. class ( plot_data ), intent ( inout ) :: x !! The plot_data object. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Index the color tracking index if the type is of plot_data_colored select type ( x ) class is ( plot_data_colored ) call x % set_color_index ( this % m_colorIndex ) if ( this % m_colorIndex == size ( color_list )) then this % m_colorIndex = 1 else this % m_colorIndex = this % m_colorIndex + 1 end if end select ! Store the object call this % m_data % push ( x , err = err ) end subroutine ! ------------------------------------------------------------------------------ subroutine plt_pop_data ( this ) !! Pops the last plot_data object from the stack. class ( plot ), intent ( inout ) :: this !! The plot object. ! Process call this % m_data % pop () end subroutine ! ------------------------------------------------------------------------------ subroutine plt_clear_all ( this ) !! Removes all plot_data objects from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. ! Process this % m_colorIndex = 1 call this % m_data % clear () end subroutine ! ------------------------------------------------------------------------------ function plt_get ( this , i ) result ( x ) !! Gets a pointer to the requested plot_data object. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_data object. class ( plot_data ), pointer :: x !! A pointer to the requested plot_data object. ! Local Variables class ( * ), pointer :: item ! Process item => this % m_data % get ( i ) select type ( item ) class is ( plot_data ) x => item class default nullify ( x ) end select end function ! -------------------- subroutine plt_set ( this , i , x ) !! Sets the requested plot_data object into the plot. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_data object. class ( plot_data ), intent ( in ) :: x !! The plot_data object. call this % m_data % set ( i , x ) end subroutine ! ------------------------------------------------------------------------------ function plt_get_term ( this ) result ( x ) !! Gets the GNUPLOT terminal object. class ( plot ), intent ( in ) :: this !! The plot object. class ( terminal ), pointer :: x !! A pointer to the GNUPLOT terminal object. x => this % m_terminal end function ! ------------------------------------------------------------------------------ pure function plt_get_show_grid ( this ) result ( x ) !! Gets a flag determining if the grid lines should be shown. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if the grid lines should be shown; else, false. x = this % m_showGrid end function ! -------------------- subroutine plt_set_show_grid ( this , x ) !! Sets a flag determining if the grid lines should be shown. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the grid lines should be shown; else, false. this % m_showGrid = x end subroutine ! ------------------------------------------------------------------------------ subroutine plt_draw ( this , persist , err ) !! Launches GNUPLOT and draws the plot per the current state of !! the command list. class ( plot ), intent ( in ) :: this !! The 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. ! Parameters character ( len = * ), parameter :: fname = \"temp_gnuplot_file.plt\" ! Local Variables logical :: p integer ( int32 ) :: fid , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr class ( terminal ), pointer :: term ! Initialization if ( present ( persist )) then p = persist else p = . true . end if if ( present ( err )) then errmgr => err else errmgr => deferr end if term => this % get_terminal () ! Open the file for writing, and write the contents to file open ( newunit = fid , file = fname , iostat = flag ) if ( flag > 0 ) then call report_file_create_error ( errmgr , \"plt_draw\" , fname , flag ) return end if write ( fid , '(A)' ) term % get_command_string () write ( fid , '(A)' ) new_line ( 'a' ) write ( fid , '(A)' ) this % get_command_string () close ( fid ) ! Launch GNUPLOT if ( p ) then call execute_command_line ( \"gnuplot --persist \" // fname ) else call execute_command_line ( \"gnuplot \" // fname ) end if ! Clean up by deleting the file open ( newunit = fid , file = fname ) close ( fid , status = \"delete\" ) end subroutine ! ------------------------------------------------------------------------------ subroutine plt_save ( this , fname , err ) !! Saves a GNUPLOT command file. class ( plot ), intent ( in ) :: this !! The plot object. character ( len = * ), intent ( in ) :: fname !! The filename. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: fid , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr class ( terminal ), pointer :: term ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if term => this % get_terminal () ! Open the file for writing, and write the contents to file open ( newunit = fid , file = fname , iostat = flag ) if ( flag > 0 ) then call report_file_create_error ( errmgr , \"plt_save\" , fname , flag ) return end if write ( fid , '(A)' ) term % get_command_string () write ( fid , '(A)' ) new_line ( 'a' ) write ( fid , '(A)' ) this % get_command_string () close ( fid ) end subroutine ! ------------------------------------------------------------------------------ function plt_get_font ( this ) result ( x ) !! Gets the name of the font used for plot text. class ( plot ), intent ( in ) :: this !! The plot object. character ( len = :), allocatable :: x !! The font name. class ( terminal ), pointer :: term term => this % get_terminal () x = term % get_font_name () end function ! -------------------- subroutine plt_set_font ( this , x ) !! Sets the name of the font used for plot text. class ( plot ), intent ( inout ) :: this !! The plot object. character ( len = * ), intent ( in ) :: x !! The font name. class ( terminal ), pointer :: term term => this % get_terminal () call term % set_font_name ( x ) end subroutine ! ------------------------------------------------------------------------------ function plt_get_font_size ( this ) result ( x ) !! Gets the size of the font used by the plot. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ) :: x !! The size of the font, in points. class ( terminal ), pointer :: term term => this % get_terminal () x = term % get_font_size () end function ! -------------------- subroutine plt_set_font_size ( this , x ) !! Sets the size of the font used by the plot. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: x !! The font size, in points. If a value of zero is provided, !! the font size is reset to its default value; or, if a negative !! value is provided, the absolute value of the supplied value is !! utilized. class ( terminal ), pointer :: term term => this % get_terminal () call term % set_font_size ( x ) end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_tics_in ( this ) result ( x ) !! Gets a value determining if the axis tic marks should point inwards. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if the tic marks should point inwards; else, false !! if the tic marks should point outwards. x = this % m_ticsIn end function ! -------------------- subroutine plt_set_tics_in ( this , x ) !! Sets a value determining if the axis tic marks should point inwards. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the tic marks should point inwards; else, false !! if the tic marks should point outwards. this % m_ticsIn = x end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_draw_border ( this ) result ( x ) !! Gets a value determining if the border should be drawn. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if the border should be drawn; else, false. x = this % m_drawBorder end function ! -------------------- subroutine plt_set_draw_border ( this , x ) !! Sets a value determining if the border should be drawn. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the border should be drawn; else, false. this % m_drawBorder = x end subroutine ! ****************************************************************************** ! ADDED: JUNE 22, 2018 - JAC ! ------------------------------------------------------------------------------ subroutine plt_push_label ( this , lbl , err ) !! Adds a label to the plot. class ( plot ), intent ( inout ) :: this !! The plot object. class ( plot_label ), intent ( in ) :: lbl !! The plot label. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Process call this % m_labels % push ( lbl , err = err ) end subroutine ! ------------------------------------------------------------------------------ subroutine plt_pop_label ( this ) !! Removes the last label from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. call this % m_labels % pop () end subroutine ! ------------------------------------------------------------------------------ function plt_get_label ( this , i ) result ( x ) !! Gets the requested plot_label from the plot. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_label object to retrieve. class ( plot_label ), pointer :: x !! A pointer to the requested plot_label object. ! Local Variables class ( * ), pointer :: item ! Process item => this % m_labels % get ( i ) select type ( item ) class is ( plot_label ) x => item class default nullify ( x ) end select end function ! -------------------- subroutine plt_set_label ( this , i , x ) !! Sets the specified plot_label object. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_label to replace. class ( plot_label ), intent ( in ) :: x !! The new plot_label object. call this % m_labels % set ( i , x ) end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_label_count ( this ) result ( x ) !! Gets the number of plot_label objects belonging to the plot. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ) :: x !! The number of plot_label objects. x = this % m_labels % count () end function ! ------------------------------------------------------------------------------ subroutine plt_clear_labels ( this ) !! Clears all plot_label objects from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. call this % m_labels % clear () end subroutine ! ****************************************************************************** ! ADDED: SEPT. 25, 2020 - JAC ! ------------------------------------------------------------------------------ pure function plt_get_axis_equal ( this ) result ( rst ) !! Gets a flag determining if the axes should be equally scaled. class ( plot ), intent ( in ) :: this !! The plot object. logical :: rst !! Returns true if the axes should be scaled equally; else, false. rst = this % m_axisEqual end function ! -------------------- subroutine plt_set_axis_equal ( this , x ) !! Sets a flag determining if the axes should be equally scaled. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the axes should be scaled equally; else, false. this % m_axisEqual = x end subroutine ! ****************************************************************************** ! ADDED: OCT. 8, 2020 - JAC ! ------------------------------------------------------------------------------ function plt_get_colormap ( this ) result ( x ) !! Gets a pointer to the colormap object. class ( plot ), intent ( in ) :: this !! The plot object. class ( colormap ), pointer :: x !! A pointer to the colormap object. If no colormap is defined, a !! null pointer is returned. x => this % m_colormap end function ! -------------------- subroutine plt_set_colormap ( this , x , err ) !! Sets the colormap object. class ( plot ), intent ( inout ) :: this !! The plot object. class ( colormap ), intent ( in ) :: x !! The colormap object. Notice, a copy of this object is !! stored, and the plot object then manages the lifetime of the !! copy. class ( errors ), intent ( inout ), optional , target :: err !! An error handler object. ! Local Variables integer ( int32 ) :: flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Process if ( associated ( this % m_colormap )) deallocate ( this % m_colormap ) allocate ( this % m_colormap , stat = flag , source = x ) if ( flag /= 0 ) then call errmgr % report_error ( \"surf_set_colormap\" , & \"Insufficient memory available.\" , PLOT_OUT_OF_MEMORY_ERROR ) return end if end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_show_colorbar ( this ) result ( x ) !! Gets a value determining if the colorbar should be shown. class ( plot ), intent ( in ) :: this !! The plot object. logical :: x !! Returns true if the colorbar should be drawn; else, false. x = this % m_showColorbar end function ! -------------------- subroutine plt_set_show_colorbar ( this , x ) !! Sets a value determining if the colorbar should be shown. class ( plot ), intent ( inout ) :: this !! The plot object. logical , intent ( in ) :: x !! Set to true if the colorbar should be drawn; else, false. this % m_showColorbar = x end subroutine ! ------------------------------------------------------------------------------ function plt_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot object. class ( plot ), intent ( in ) :: this !! The plot object. character ( len = :), allocatable :: x !! The command string. ! Local Variables integer ( int32 ) :: i type ( string_builder ) :: str class ( colormap ), pointer :: clr class ( plot_arrow ), pointer :: arrow class ( plot_label ), pointer :: lbl ! Initialization call str % initialize () ! Define the colormap clr => this % get_colormap () if ( associated ( clr )) then call str % append ( new_line ( 'a' )) call str % append ( clr % get_command_string ()) end if ! Show the colorbar if (. not . this % get_show_colorbar ()) then call str % append ( new_line ( 'a' )) call str % append ( \"unset colorbox\" ) end if ! Arrows do i = 1 , this % get_arrow_count () arrow => this % get_arrow ( i ) if (. not . associated ( arrow )) cycle call str % append ( new_line ( 'a' )) call str % append ( arrow % get_command_string ()) end do ! Labels do i = 1 , this % get_label_count () lbl => this % get_label ( i ) if (. not . associated ( lbl )) cycle call str % append ( new_line ( 'a' )) call str % append ( lbl % get_command_string ()) end do ! End x = char ( str % to_string ()) end function ! ****************************************************************************** ! ADDED: 1/3/2024 - JAC ! ------------------------------------------------------------------------------ subroutine plt_push_arrow ( this , x , err ) !! Pushes a new @ref plot_arrow object onto the plot. class ( plot ), intent ( inout ) :: this !! The plot object. class ( plot_arrow ), intent ( in ) :: x !! The plot_arrow object. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. call this % m_arrows % push ( x , manage = . true ., err = err ) end subroutine ! ------------------------------------------------------------------------------ subroutine plt_pop_arrow ( this ) !! Pops the last plot_arrow object from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. call this % m_arrows % pop () end subroutine ! ------------------------------------------------------------------------------ function plt_get_arrow ( this , i ) result ( rst ) !! Gets a pointer to the requested plot_arrow object. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_arrow to retrieve. class ( plot_arrow ), pointer :: rst !! The plot_arrow object to retrieve. class ( * ), pointer :: ptr ptr => this % m_arrows % get ( i ) select type ( ptr ) class is ( plot_arrow ) rst => ptr class default nullify ( rst ) end select end function ! ------------------------------------------------------------------------------ subroutine plt_set_arrow ( this , i , x ) !! Sets a plot_arrow into the plot. class ( plot ), intent ( inout ) :: this !! The plot object. integer ( int32 ), intent ( in ) :: i !! The index of the plot_arrow object to replace. class ( plot_arrow ), intent ( in ) :: x !! The new plot_arrow object. call this % m_arrows % set ( i , x ) end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_arrow_count ( this ) result ( rst ) !! Gets the number of plot_arrow objects held by the plot object. class ( plot ), intent ( in ) :: this !! The plot object. integer ( int32 ) :: rst !! The plot_arrow objects count. rst = this % m_arrows % count () end function ! ------------------------------------------------------------------------------ subroutine plt_clear_arrows ( this ) !! Clears all plot_arrow objects from the plot. class ( plot ), intent ( inout ) :: this !! The plot object. call this % m_arrows % clear () end subroutine ! ****************************************************************************** ! ADDED: 4/7/2025 - JAC ! ------------------------------------------------------------------------------ pure function plt_get_left_margin ( this ) result ( x ) !! Gets the left margin of the plot. class ( plot ), intent ( in ) :: this !! The plot object. real ( real32 ) :: x !! The margin, in percent of screen. A negative value indicates the !! default margin is used. x = this % m_leftMargin end function ! ---------- subroutine plt_set_left_margin ( this , x ) !! Sets the left margin of the plot. If the value is negative, the !! default margin is used. class ( plot ), intent ( inout ) :: this !! The plot object. real ( real32 ), intent ( in ) :: x !! The margin, in percent of screen. A negative value indicates the !! default margin is used. this % m_leftMargin = x end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_right_margin ( this ) result ( x ) !! Gets the right margin of the plot. class ( plot ), intent ( in ) :: this !! The plot object. real ( real32 ) :: x !! The margin, in percent of screen. A negative value indicates the !! default margin is used. x = this % m_rightMargin end function ! ---------- subroutine plt_set_right_margin ( this , x ) !! Sets the right margin of the plot. If the value is negative, the !! default margin is used. class ( plot ), intent ( inout ) :: this !! The plot object. real ( real32 ), intent ( in ) :: x !! The margin, in percent of screen. A negative value indicates the !! default margin is used. this % m_rightMargin = x end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_top_margin ( this ) result ( x ) !! Gets the top margin of the plot. class ( plot ), intent ( in ) :: this !! The plot object. real ( real32 ) :: x !! The margin, in percent of screen. A negative value indicates the !! default margin is used. x = this % m_topMargin end function ! ---------- subroutine plt_set_top_margin ( this , x ) !! Sets the top margin of the plot. If the value is negative, the !! default margin is used. class ( plot ), intent ( inout ) :: this !! The plot object. real ( real32 ), intent ( in ) :: x !! The margin, in percent of screen. A negative value indicates the !! default margin is used. this % m_topMargin = x end subroutine ! ------------------------------------------------------------------------------ pure function plt_get_bottom_margin ( this ) result ( x ) !! Gets the bottom margin of the plot. class ( plot ), intent ( in ) :: this !! The plot object. real ( real32 ) :: x !! The margin, in percent of screen. A negative value indicates the !! default margin is used. x = this % m_bottomMargin end function ! ---------- subroutine plt_set_bottom_margin ( this , x ) !! Sets the bottom margin of the plot. If the value is negative, the !! default margin is used. class ( plot ), intent ( inout ) :: this !! The plot object. real ( real32 ), intent ( in ) :: x !! The margin, in percent of screen. A negative value indicates the !! default margin is used. this % m_bottomMargin = x end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot.f90.html"},{"title":"fplot_plot_2d.f90 – FPLOT","text":"Contents Modules fplot_plot_2d Source Code fplot_plot_2d.f90 Source Code ! fplot_plot_2d.f90 module fplot_plot_2d use iso_fortran_env use fplot_plot_data use fplot_plot use fplot_errors use fplot_plot_axis use fplot_legend use ferror use strings implicit none private public :: plot_2d type , extends ( plot ) :: plot_2d !! A plot object defining a 2D plot. type ( x_axis ), private , pointer :: m_xAxis => null () !! The x-axis. type ( y_axis ), private , pointer :: m_yAxis => null () !! The y-axis. type ( y2_axis ), private , pointer :: m_y2Axis => null () !! The secondary y-axis. logical , private :: m_useY2 = . false . !! Display the secondary y axis? logical , private :: m_set2square = . false . !! Set to square scaling. contains final :: p2d_clean_up procedure , public :: initialize => p2d_init procedure , public :: get_command_string => p2d_get_cmd procedure , public :: get_x_axis => p2d_get_x_axis procedure , public :: get_y_axis => p2d_get_y_axis procedure , public :: get_y2_axis => p2d_get_y2_axis procedure , public :: get_use_y2_axis => p2d_get_use_y2 procedure , public :: set_use_y2_axis => p2d_set_use_y2 procedure , public :: get_square_axes => p2d_get_square_axes procedure , public :: set_square_axes => p2d_set_square_axes end type contains ! ------------------------------------------------------------------------------ subroutine p2d_clean_up ( this ) !! Cleans up resources held by the plot_2d object. type ( plot_2d ), intent ( inout ) :: this !! The plot_2d object. call this % free_resources () if ( associated ( this % m_xAxis )) then deallocate ( this % m_xAxis ) nullify ( this % m_xAxis ) end if if ( associated ( this % m_yAxis )) then deallocate ( this % m_yAxis ) nullify ( this % m_yAxis ) end if if ( associated ( this % m_y2Axis )) then deallocate ( this % m_y2Axis ) nullify ( this % m_y2Axis ) end if end subroutine ! ------------------------------------------------------------------------------ subroutine p2d_init ( this , term , fname , err ) !! Initializes the plot_2d object. class ( plot_2d ), intent ( inout ) :: this !! The plot_2d object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Initialize the base class ! call plt_init(this, term, fname, errmgr) call this % plot % initialize ( term , fname , errmgr ) if ( errmgr % has_error_occurred ()) return ! Process flag = 0 if (. not . associated ( this % m_xAxis )) then allocate ( this % m_xAxis , stat = flag ) end if if ( flag == 0 . and . . not . associated ( this % m_yAxis )) then allocate ( this % m_yAxis , stat = flag ) end if if ( flag == 0 . and . . not . associated ( this % m_y2Axis )) then allocate ( this % m_y2Axis , stat = flag ) end if ! Error Checking if ( flag /= 0 ) then call report_memory_error ( errmgr , \"p2d_init\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ function p2d_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot_2d object. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , n real ( real32 ) :: lmargin , rmargin , tmargin , bmargin class ( plot_data ), pointer :: ptr class ( plot_axis ), pointer :: axis , xAxis , yAxis type ( legend ), pointer :: leg ! class(plot_label), pointer :: lbl ! Initialization call str % initialize () ! Call the base routine call str % append ( this % plot % get_command_string ()) ! Grid if ( this % get_show_gridlines ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set grid\" ) end if ! Title n = len_trim ( this % get_title ()) if ( n > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( 'set title \"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if ! Margin lmargin = this % get_left_margin () rmargin = this % get_right_margin () tmargin = this % get_top_margin () bmargin = this % get_bottom_margin () if ( lmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set lmargin at screen \" ) call str % append ( to_string ( lmargin )) end if if ( rmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set rmargin at screen \" ) call str % append ( to_string ( rmargin )) end if if ( tmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set tmargin at screen \" ) call str % append ( to_string ( tmargin )) end if if ( bmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set bmargin at screen \" ) call str % append ( to_string ( bmargin )) end if ! Axes call str % append ( new_line ( 'a' )) xAxis => this % get_x_axis () if ( associated ( xAxis )) call str % append ( xAxis % get_command_string ()) call str % append ( new_line ( 'a' )) yAxis => this % get_y_axis () if ( associated ( yAxis )) call str % append ( yAxis % get_command_string ()) ! Secondary Axes if ( this % get_use_y2_axis ()) then call str % append ( new_line ( 'a' )) axis => this % get_y2_axis () if ( associated ( axis )) then call str % append ( axis % get_command_string ()) call str % append ( new_line ( 'a' )) call str % append ( \"set y2tics\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set ytics nomirror\" ) end if end if ! Tic Marks if (. not . this % get_tics_inward ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set tics out\" ) end if if ( xAxis % get_zero_axis ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set xtics axis\" ) end if if ( yAxis % get_zero_axis ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set ytics axis\" ) end if ! Border call str % append ( new_line ( 'a' )) call str % append ( \"set border back\" ) if ( this % get_draw_border ()) then n = 31 else n = 0 if (. not . xAxis % get_zero_axis ()) n = n + 1 if (. not . yAxis % get_zero_axis ()) n = n + 2 call str % append ( new_line ( 'a' )) call str % append ( \"set xtics nomirror\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set ytics nomirror\" ) if ( this % get_use_y2_axis ()) then n = n + 8 end if end if call str % append ( new_line ( 'a' )) if ( n > 0 ) then call str % append ( \"set border \" ) call str % append ( to_string ( n )) else call str % append ( \"unset border\" ) end if ! Scaling if ( this % get_axis_equal ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set view equal xy\" ) end if if ( this % get_square_axes ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set size square\" ) end if ! Legend call str % append ( new_line ( 'a' )) leg => this % get_legend () if ( associated ( leg )) call str % append ( leg % get_command_string ()) ! ! Labels ! do i = 1, this%get_label_count() ! lbl => this%get_label(i) ! if (.not.associated(lbl)) cycle ! call str%append(new_line('a')) ! call str%append(lbl%get_command_string()) ! end do ! Define the plot function and data formatting commands n = this % get_count () call str % append ( new_line ( 'a' )) call str % append ( \"plot \" ) do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( ptr % get_command_string ()) if ( i /= n ) call str % append ( \", \" ) end do ! Define the data to plot do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( new_line ( 'a' )) call str % append ( ptr % get_data_string ()) call str % append ( \"e\" ) ! if (i /= n) then ! call str%append(\"e\") ! end if end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function p2d_get_x_axis ( this ) result ( ptr ) !! Gets the x-axis object. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. class ( plot_axis ), pointer :: ptr !! A pointer to the x-axis object. ptr => this % m_xAxis end function ! ------------------------------------------------------------------------------ function p2d_get_y_axis ( this ) result ( ptr ) !! Gets the y-axis object. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. class ( plot_axis ), pointer :: ptr !! A pointer to the y-axis object. ptr => this % m_yAxis end function ! ------------------------------------------------------------------------------ function p2d_get_y2_axis ( this ) result ( ptr ) !! Gets the secondary y-axis object. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. class ( plot_axis ), pointer :: ptr !! A pointer to the secondary y-axis object. ptr => this % m_y2Axis end function ! ------------------------------------------------------------------------------ pure function p2d_get_use_y2 ( this ) result ( x ) !! Gets a flag determining if the secondary y-axis should be !! displayed. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. logical :: x !! Returns true if the axis should be displayed; else, false. x = this % m_useY2 end function ! -------------------- subroutine p2d_set_use_y2 ( this , x ) !! Sets a flag determining if the secondary y-axis should be !! displayed. class ( plot_2d ), intent ( inout ) :: this !! The plot_2d object. logical , intent ( in ) :: x !! Set to true if the axis should be displayed; else, false. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ pure function p2d_get_square_axes ( this ) result ( rst ) !! Gets a logical flag determining if the axes size should be squared !! off. class ( plot_2d ), intent ( in ) :: this !! The plot_2d object. logical :: rst !! Returns true if the axes are to be sized to a square; else, !! false. rst = this % m_set2square end function ! -------------------- subroutine p2d_set_square_axes ( this , x ) !! Sets a logical flag determining if the axes size should be !! squared off. class ( plot_2d ), intent ( inout ) :: this !! The plot_2d object. logical , intent ( in ) :: x !! Set to true if the axes are to be sized to a square; else, !! false. this % m_set2square = x end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_2d.f90.html"},{"title":"fplot_plot_3d.f90 – FPLOT","text":"Contents Modules fplot_plot_3d Source Code fplot_plot_3d.f90 Source Code ! fplot_plot_3d.f90 module fplot_plot_3d use iso_fortran_env use fplot_plot use fplot_errors use fplot_plot_axis use fplot_constants use fplot_plot_data use fplot_legend use ferror use strings implicit none private public :: plot_3d type , extends ( plot ) :: plot_3d !! A plot object defining a 3D plot. type ( x_axis ), private , pointer :: m_xAxis => null () !! The x-axis. type ( y_axis ), private , pointer :: m_yAxis => null () !! The y-axis. type ( z_axis ), private , pointer :: m_zAxis => null () !! The z-axis. real ( real64 ), private :: m_elevation = 6 0.0d0 !! The elevation angle. real ( real64 ), private :: m_azimuth = 3 0.0d0 !! The azimuth. logical , private :: m_zIntersect = . true . !! Z-axis intersect X-Y plane? logical , private :: m_setMap = . false . !! Set map projection. integer ( int32 ), private :: m_csys = COORDINATES_CARTESIAN !! Plot coordinate system. contains final :: p3d_clean_up procedure , public :: initialize => p3d_init procedure , public :: get_command_string => p3d_get_cmd procedure , public :: get_x_axis => p3d_get_x_axis procedure , public :: get_y_axis => p3d_get_y_axis procedure , public :: get_z_axis => p3d_get_z_axis procedure , public :: get_elevation => p3d_get_elevation procedure , public :: set_elevation => p3d_set_elevation procedure , public :: get_azimuth => p3d_get_azimuth procedure , public :: set_azimuth => p3d_set_azimuth procedure , public :: get_z_intersect_xy => p3d_get_z_axis_intersect procedure , public :: set_z_intersect_xy => p3d_set_z_axis_intersect procedure , public :: get_use_map_view => p3d_get_use_map_view procedure , public :: set_use_map_view => p3d_set_use_map_view procedure , public :: get_coordinate_system => p3d_get_csys procedure , public :: set_coordinate_system => p3d_set_csys end type contains ! ------------------------------------------------------------------------------ subroutine p3d_clean_up ( this ) !! Cleans up resources held by the plot_3d object. type ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. call this % free_resources () if ( associated ( this % m_xAxis )) then deallocate ( this % m_xAxis ) nullify ( this % m_xAxis ) end if if ( associated ( this % m_yAxis )) then deallocate ( this % m_yAxis ) nullify ( this % m_yAxis ) end if if ( associated ( this % m_zAxis )) then deallocate ( this % m_zAxis ) nullify ( this % m_zAxis ) end if end subroutine ! ------------------------------------------------------------------------------ subroutine p3d_init ( this , term , fname , err ) !! Initializes the plot_3d object. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Initialize the base class ! call plt_init(this, term, fname, errmgr) call this % plot % initialize ( term , fname , errmgr ) if ( errmgr % has_error_occurred ()) return ! Process flag = 0 if (. not . associated ( this % m_xAxis )) then allocate ( this % m_xAxis , stat = flag ) end if if ( flag == 0 . and . . not . associated ( this % m_yAxis )) then allocate ( this % m_yAxis , stat = flag ) end if if ( flag == 0 . and . . not . associated ( this % m_zAxis )) then allocate ( this % m_zAxis , stat = flag ) end if ! Error Checking if ( flag /= 0 ) then call report_memory_error ( errmgr , \"p3d_init\" , flag ) return end if end subroutine ! ------------------------------------------------------------------------------ function p3d_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot_3d object. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , n real ( real64 ) :: lmargin , rmargin , tmargin , bmargin class ( plot_data ), pointer :: ptr class ( plot_axis ), pointer :: xAxis , yAxis , zAxis type ( legend ), pointer :: leg ! class(plot_label), pointer :: lbl ! Initialization call str % initialize () ! Call the base routine call str % append ( this % plot % get_command_string ()) ! Grid if ( this % get_show_gridlines ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set grid\" ) end if ! Title n = len_trim ( this % get_title ()) if ( n > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( 'set title \"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if ! Margin lmargin = this % get_left_margin () rmargin = this % get_right_margin () tmargin = this % get_top_margin () bmargin = this % get_bottom_margin () if ( lmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set lmargin at screen \" ) call str % append ( to_string ( lmargin )) end if if ( rmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set rmargin at screen \" ) call str % append ( to_string ( rmargin )) end if if ( tmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set tmargin at screen \" ) call str % append ( to_string ( tmargin )) end if if ( bmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set bmargin at screen \" ) call str % append ( to_string ( bmargin )) end if ! Axes call str % append ( new_line ( 'a' )) xAxis => this % get_x_axis () if ( associated ( xAxis )) call str % append ( xAxis % get_command_string ()) call str % append ( new_line ( 'a' )) yAxis => this % get_y_axis () if ( associated ( yAxis )) call str % append ( yAxis % get_command_string ()) call str % append ( new_line ( 'a' )) zAxis => this % get_z_axis () if ( associated ( zAxis )) call str % append ( zAxis % get_command_string ()) ! Tic Marks if (. not . this % get_tics_inward ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set tics out\" ) end if if ( xAxis % get_zero_axis () . or . yAxis % get_zero_axis () . or . & zAxis % get_zero_axis ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set tics axis\" ) end if ! Border if ( this % get_draw_border ()) then n = 31 else n = 0 if (. not . xAxis % get_zero_axis ()) n = n + 1 if (. not . yAxis % get_zero_axis ()) n = n + 4 if (. not . zAxis % get_zero_axis ()) n = n + 16 call str % append ( new_line ( 'a' )) call str % append ( \"set xtics nomirror\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set ytics nomirror\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set ztics nomirror\" ) end if call str % append ( new_line ( 'a' )) if ( n > 0 ) then call str % append ( \"set border \" ) call str % append ( to_string ( n )) else call str % append ( \"unset border\" ) end if ! Force the z-axis to move to the x-y plane if ( this % get_z_intersect_xy ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set ticslevel 0\" ) end if ! Scaling if ( this % get_axis_equal ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set view equal xyz\" ) end if ! Legend call str % append ( new_line ( 'a' )) leg => this % get_legend () if ( associated ( leg )) call str % append ( leg % get_command_string ()) ! ! Labels ! do i = 1, this%get_label_count() ! lbl => this%get_label(i) ! if (.not.associated(lbl)) cycle ! call str%append(new_line('a')) ! call str%append(lbl%get_command_string()) ! end do ! Orientation call str % append ( new_line ( 'a' )) call str % append ( \"set view \" ) if ( this % get_use_map_view ()) then call str % append ( \"map\" ) else call str % append ( to_string ( this % get_elevation ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_azimuth ())) end if ! Coordinate system if ( this % get_coordinate_system () == COORDINATES_CYLINDRICAL ) then call str % append ( new_line ( 'a' )) call str % append ( \"set mapping cylindrical\" ) else if ( this % get_coordinate_system () == COORDINATES_SPHERICAL ) then call str % append ( new_line ( 'a' )) call str % append ( \"set mapping spherical\" ) end if ! Define the plot function and data formatting commands n = this % get_count () call str % append ( new_line ( 'a' )) call str % append ( \"splot \" ) do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( ptr % get_command_string ()) if ( i /= n ) call str % append ( \", \" ) end do ! Define the data to plot do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( new_line ( 'a' )) call str % append ( ptr % get_data_string ()) call str % append ( \"e\" ) ! if (i /= n) then ! call str%append(\"e\") ! end if end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function p3d_get_x_axis ( this ) result ( ptr ) !! Gets the x-axis object. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. class ( plot_axis ), pointer :: ptr !! A pointer to the x-axis object. ptr => this % m_xAxis end function ! ------------------------------------------------------------------------------ function p3d_get_y_axis ( this ) result ( ptr ) !! Gets the y-axis object. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. class ( plot_axis ), pointer :: ptr !! A pointer to the y-axis object. ptr => this % m_yAxis end function ! ------------------------------------------------------------------------------ function p3d_get_z_axis ( this ) result ( ptr ) !! Gets the z-axis object. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. class ( plot_axis ), pointer :: ptr !! A pointer to the z-axis object. ptr => this % m_zAxis end function ! ------------------------------------------------------------------------------ pure function p3d_get_elevation ( this ) result ( x ) !! Gets the plot elevation angle. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. real ( real64 ) :: x !! The elevation angle, in degrees. x = this % m_elevation end function ! -------------------- subroutine p3d_set_elevation ( this , x ) !! Sets the plot elevation angle. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. real ( real64 ), intent ( in ) :: x !! The elevation angle, in degrees. this % m_elevation = x end subroutine ! ------------------------------------------------------------------------------ pure function p3d_get_azimuth ( this ) result ( x ) !! Gets the plot azimuth angle. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. real ( real64 ) :: x !! The azimuth angle, in degrees. x = this % m_azimuth end function ! -------------------- subroutine p3d_set_azimuth ( this , x ) !! Sets the plot azimuth angle. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. real ( real64 ), intent ( in ) :: x !! The azimuth angle, in degrees. this % m_azimuth = x end subroutine ! ------------------------------------------------------------------------------ pure function p3d_get_z_axis_intersect ( this ) result ( x ) !! Gets a value determining if the z-axis should intersect the !! x-y plane. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. logical :: x !! Returns true if the z-axis should intersect the x-y plane; else, !! false to allow the z-axis to float. x = this % m_zIntersect end function ! -------------------- subroutine p3d_set_z_axis_intersect ( this , x ) !! Sets a value determining if the z-axis should intersect the !! x-y plane. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. logical , intent ( in ) :: x !! Set to true if the z-axis should intersect the x-y plane; else, !! false to allow the z-axis to float. this % m_zIntersect = x end subroutine ! ADDED March 29, 2023 - JAC ! ------------------------------------------------------------------------------ pure function p3d_get_use_map_view ( this ) result ( rst ) !! Gets a value determining if the view should be set to a 2D !! map view. If true, the azimuth and elevation terms are ignored. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. logical :: rst !! Returns true if the map view will be used; else, false. rst = this % m_setMap end function ! -------------------- subroutine p3d_set_use_map_view ( this , x ) !! Sets a value determining if the view should be set to a 2D !! map view. If true, the azimuth and elevation terms are ignored. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. logical , intent ( in ) :: x !! Seturns true if the map view will be used; else, false. this % m_setMap = x end subroutine ! ADDED Sept. 15, 2023 - JAC ! ------------------------------------------------------------------------------ pure function p3d_get_csys ( this ) result ( rst ) !! Gets a value determining the coordinate system. class ( plot_3d ), intent ( in ) :: this !! The plot_3d object. integer ( int32 ) :: rst !! The coordinate system ID, which must be one of the following. !! !! - COORDINATES_CARTESIAN !! !! - COORDINATES_CYLINDRICAL !! !! - COORDINATES_SPHERICAL rst = this % m_csys end function ! -------------------- subroutine p3d_set_csys ( this , x ) !! Sets a value determining the coordinate system. class ( plot_3d ), intent ( inout ) :: this !! The plot_3d object. integer ( int32 ), intent ( in ) :: x !! The coordinate system ID, which must be one of the following. !! !! - COORDINATES_CARTESIAN !! !! - COORDINATES_CYLINDRICAL !! !! - COORDINATES_SPHERICAL if ( x /= COORDINATES_CARTESIAN . and . & x /= COORDINATES_CYLINDRICAL . and . & x /= COORDINATES_SPHERICAL ) & then ! Set to default as the input is nonsensical this % m_csys = COORDINATES_CARTESIAN else this % m_csys = x end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_3d.f90.html"},{"title":"fplot_plot_axis.f90 – FPLOT","text":"Contents Modules fplot_plot_axis Source Code fplot_plot_axis.f90 Source Code ! fplot_plot_axis.f90 module fplot_plot_axis use iso_fortran_env use fplot_plot_object use fplot_constants use strings implicit none private public :: plot_axis public :: pa_get_string_result public :: x_axis public :: y_axis public :: y2_axis public :: z_axis type , abstract , extends ( plot_object ) :: plot_axis !! Defines a plot axis object. logical , private :: m_hasTitle = . false . !! Has a title? character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_title = \"\" !! Axis title. logical , private :: m_autoscale = . true . !! Autoscale? real ( real64 ), private , dimension ( 2 ) :: m_limits = [ 0.0d0 , 1.0d0 ] !! Display limits. logical , private :: m_logScale = . false . !! Log scaled? logical , private :: m_zeroAxis = . false . !! Has a zero axis? real ( real32 ), private :: m_axisWidth = 1.0 !! The width, in pixels, of the zero-axis line. logical , private :: m_defaultTicLabels = . true . !! Use default tic label format? character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_ticLabelFmt = \"%g\" !! The tic lablel format. logical , private :: m_showTicLabels = . true . !! Show tic labels? integer ( int32 ), private :: m_ticXOffset = 0 !! The tic label x-offset, in characters. integer ( int32 ), private :: m_ticYOffset = 0 !! The tic label y-offset, in characters. character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: & m_ticLabelAlignment = GNUPLOT_HORIZONTAL_ALIGN_CENTER !! The tic label alignment. !! !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT !! !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER !! !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT logical , private :: m_offsetTics = . false . !! Offset tics? real ( real32 ), private :: m_ticLabelAngle = 0.0 !! The tic label angle, in degrees. character ( len = PLOTDATA_MAX_NAME_LENGTH ), private :: m_ticRotationOrigin = & GNUPLOT_ROTATION_ORIGIN_CENTER !! The tic label rotation origin. !! !! - GNUPLOT_ROTATION_ORIGIN_RIGHT !! !! - GNUPLOT_ROTATION_ORIGIN_LEFT !! !! - GNUPLOT_ROTATION_ORIGIN_CENTER integer ( int32 ), private :: m_titleXOffset = 0 !! The axis title x offset, in characters. integer ( int32 ), private :: m_titleYOffset = 0 !! The axis title y offset, in characters. contains procedure , public :: get_title => pa_get_title procedure , public :: set_title => pa_set_title procedure , public :: is_title_defined => pa_has_title procedure , public :: get_autoscale => pa_get_autoscale procedure , public :: set_autoscale => pa_set_autoscale procedure , public :: get_limits => pa_get_axis_limits procedure , public :: set_limits => pa_set_axis_limits procedure , public :: get_is_log_scaled => pa_get_log_scale procedure , public :: set_is_log_scaled => pa_set_log_scale procedure , public :: get_command_string => pa_get_cmd_string procedure , public :: get_zero_axis => pa_get_zero_axis procedure , public :: set_zero_axis => pa_set_zero_axis procedure , public :: get_zero_axis_line_width => pa_get_zero_axis_width procedure , public :: set_zero_axis_line_width => pa_set_zero_axis_width procedure ( pa_get_string_result ), deferred , public :: get_id_string procedure , public :: get_use_default_tic_label_format => & pa_get_use_dft_tic_lbl_fmt procedure , public :: set_use_default_tic_label_format => & pa_set_use_dft_tic_lbl_fmt procedure , public :: get_tic_label_format => pa_get_tic_label_fmt procedure , public :: set_tic_label_format => pa_set_tic_label_fmt procedure , public :: get_show_tic_labels => pa_get_show_tic_labels procedure , public :: set_show_tic_labels => pa_set_show_tic_labels procedure , public :: get_tic_label_x_offset => pa_get_tic_x_offset procedure , public :: set_tic_label_x_offset => pa_set_tic_x_offset procedure , public :: get_tic_label_y_offset => pa_get_tic_y_offset procedure , public :: set_tic_label_y_offset => pa_set_tic_y_offset procedure , public :: get_tic_label_angle => pa_get_tic_label_angle procedure , public :: set_tic_label_angle => pa_set_tic_label_angle procedure , public :: get_tic_label_rotation_origin => & pa_get_tic_rotation_origin procedure , public :: set_tic_label_rotation_origin => & pa_set_tic_rotation_origin procedure , public :: get_tic_label_alignment => & pa_get_tic_label_alignment procedure , public :: set_tic_label_alignment => & pa_set_tic_label_alignment procedure , public :: get_offset_tics => pa_get_offset_tics procedure , public :: set_offset_tics => pa_set_offset_tics procedure , public :: get_title_x_offset => pa_get_title_x_offset procedure , public :: set_title_x_offset => pa_set_title_x_offset procedure , public :: get_title_y_offset => pa_get_title_y_offset procedure , public :: set_title_y_offset => pa_set_title_y_offset end type interface function pa_get_string_result ( this ) result ( x ) !! Retrieves a string from a plot_axis. import plot_axis class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: x !! The string. end function end interface type , extends ( plot_axis ) :: x_axis !! Defines an x-axis object. character , private :: m_id = \"x\" !! The ID character. contains procedure , public :: get_id_string => xa_get_id end type type , extends ( plot_axis ) :: y_axis !! Defines a y-axis object. character , private :: m_id = \"y\" !! The ID character. contains procedure , public :: get_id_string => ya_get_id end type type , extends ( plot_axis ) :: y2_axis !! Defines a secondary y-axis object. character ( len = 2 ), private :: m_id = \"y2\" !! The ID character. contains procedure , public :: get_id_string => y2a_get_id end type type , extends ( plot_axis ) :: z_axis !! Defines a z-axis object. character , private :: m_id = \"z\" !! The ID character. contains procedure , public :: get_id_string => za_get_id end type contains ! ------------------------------------------------------------------------------ function pa_get_title ( this ) result ( txt ) !! Gets the axis title. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: txt !! The title. integer ( int32 ) :: n n = len_trim ( this % m_title ) allocate ( character ( len = n ) :: txt ) txt = trim ( this % m_title ) end function ! -------------------- subroutine pa_set_title ( this , txt ) !! Sets the axis title. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. character ( len = * ), intent ( in ) :: txt !! The title. ! Local Variables integer ( int32 ) :: n ! Process n = min ( len_trim ( txt ), PLOTDATA_MAX_NAME_LENGTH ) this % m_title = \"\" if ( n /= 0 ) then this % m_title ( 1 : n ) = txt ( 1 : n ) this % m_hasTitle = . true . else this % m_hasTitle = . false . end if end subroutine ! ------------------------------------------------------------------------------ pure function pa_has_title ( this ) result ( x ) !! Gets a value determining if a title has been defined for this axis. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true if a title has been defined; else, false. x = this % m_hasTitle end function ! ------------------------------------------------------------------------------ pure function pa_get_autoscale ( this ) result ( x ) !! Gets a value determining if the axis should be automatically scaled !! to fit the data. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true if the axis should be automatically scaled; else, !! false. x = this % m_autoscale end function ! -------------------- subroutine pa_set_autoscale ( this , x ) !! Sets a value determining if the axis should be automatically scaled !! to fit the data. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true if the axis should be automatically scaled; else, !! set to false. this % m_autoscale = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_axis_limits ( this ) result ( x ) !! Gets the axis display limits, assuming autoscaling is not !! active for this axis. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. real ( real64 ), dimension ( 2 ) :: x !! A two-element array containing the limits as follows: !! [lower, upper]. x ( 1 ) = minval ( this % m_limits ) x ( 2 ) = maxval ( this % m_limits ) end function ! -------------------- subroutine pa_set_axis_limits ( this , lower , upper ) !! Gets the axis display limits, assuming autoscaling is not !! active for this axis. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. real ( real64 ), intent ( in ) :: lower !! The lower display limit. real ( real64 ), intent ( in ) :: upper !! The upper display limit. this % m_limits ( 1 ) = min ( lower , upper ) this % m_limits ( 2 ) = max ( lower , upper ) end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_log_scale ( this ) result ( x ) !! Gets a logical value defining if the axis should be log scaled. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true if log scaling is applied to the axis; else, false. x = this % m_logScale end function ! -------------------- subroutine pa_set_log_scale ( this , x ) !! Sets a logical value defining if the axis should be log scaled. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true if log scaling is applied to the axis; else, false. this % m_logScale = x end subroutine ! ------------------------------------------------------------------------------ function pa_get_cmd_string ( this ) result ( txt ) !! Returns the appropriate GNUPLOT command string to define the !! plot_axis properties. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: txt !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str real ( real32 ) :: angle character ( len = :), allocatable :: axis , fmt real ( real64 ) :: lim ( 2 ) ! Process axis = this % get_id_string () fmt = this % get_tic_label_format () lim = this % get_limits () call str % initialize () ! Formatting if (. not . this % get_use_default_tic_label_format ()) then call str % append ( \"set format \" ) call str % append ( axis ) call str % append ( '\"' ) call str % append ( fmt ) call str % append ( '\"' ) call str % append ( new_line ( 'a' )) end if ! Show Tic Labels? if ( this % get_show_tic_labels ()) then call str % append ( \"set \" ) else call str % append ( \"unset \" ) end if call str % append ( axis ) call str % append ( \"tics\" ) call str % append ( new_line ( 'a' )) ! Tic Label Offsets if ( this % get_show_tic_labels () . and . this % get_offset_tics ()) then call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"tics \" ) call str % append ( this % get_tic_label_alignment ()) call str % append ( \" offset \" ) call str % append ( to_string ( this % get_tic_label_x_offset ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_tic_label_y_offset ())) call str % append ( new_line ( 'a' )) end if ! Tic Label Rotation angle = this % get_tic_label_angle () if ( this % get_show_tic_labels () . and . angle /= 0.0 ) then call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"tics rotate by \" ) call str % append ( to_string ( angle )) call str % append ( \" \" ) call str % append ( this % get_tic_label_rotation_origin ()) call str % append ( new_line ( 'a' )) end if ! Axis Limits if ( this % get_autoscale ()) then call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"range [*:*]\" ) else call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"range [\" ) call str % append ( to_string ( lim ( 1 ))) call str % append ( \":\" ) call str % append ( to_string ( lim ( 2 ))) call str % append ( \"]\" ) end if ! Titles call str % append ( new_line ( 'a' )) if ( this % is_title_defined ()) then ! Title call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"label \" ) call str % append ( '\"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) ! Offsets if ( this % get_title_x_offset () /= 0 . or . & this % get_title_y_offset () /= 0 ) & then call str % append ( \" offset \" ) call str % append ( to_string ( this % get_title_x_offset ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_title_y_offset ())) end if else call str % append ( \"set \" ) call str % append ( axis ) call str % append ( \"label \" ) call str % append ( '\"\"' ) end if call str % append ( new_line ( 'a' )) ! Scaling call str % append ( new_line ( 'a' )) if ( this % get_is_log_scaled ()) then call str % append ( \"set log \" ) call str % append ( axis ) else call str % append ( \"unset log \" ) call str % append ( axis ) end if ! Zero Axis if ( this % get_zero_axis ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set \" ) call str % append ( this % get_id_string ()) call str % append ( \"zeroaxis linestyle -1 linewidth \" ) call str % append ( to_string ( this % get_zero_axis_line_width ())) end if ! Output txt = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function pa_get_zero_axis ( this ) result ( x ) !! Gets a value determining if the axis should be drawn through !! zero of opposing axes. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true to draw as a zero axis; else, set to false. x = this % m_zeroAxis end function ! -------------------- subroutine pa_set_zero_axis ( this , x ) !! Sets a value determining if the axis should be drawn through !! zero of opposing axes. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true to draw as a zero axis; else, set to false. this % m_zeroAxis = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_zero_axis_width ( this ) result ( x ) !! Gets the width of the line used to represent the zero axis line, if !! active. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. real ( real32 ) :: x !! The width of the line, in pixels. x = this % m_axisWidth end function ! -------------------- subroutine pa_set_zero_axis_width ( this , x ) !! Sets the width of the line used to represent the zero axis line, if !! active. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. real ( real32 ), intent ( in ) :: x !! The width of the line, in pixels. this % m_axisWidth = x end subroutine ! ADDED March 29, 2023 - JAC ! ------------------------------------------------------------------------------ pure function pa_get_use_dft_tic_lbl_fmt ( this ) result ( rst ) !! Gets a value determining if the default tic label format will be !! used. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: rst !! Returns true if the default tic label format will be used; else, !! false. rst = this % m_defaultTicLabels end function ! -------------------- subroutine pa_set_use_dft_tic_lbl_fmt ( this , x ) !! Sets a value determining if the default tic label format will be !! used. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true if the default tic label format will be used; else, !! false. this % m_defaultTicLabels = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_tic_label_fmt ( this ) result ( rst ) !! Gets the tic label format. The format string can be any format !! string accepted by the C command 'printf.' class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: rst !! The tic label format string. rst = trim ( this % m_ticLabelFmt ) end function ! -------------------- subroutine pa_set_tic_label_fmt ( this , x ) !! Sets the tic label format. The format string can be any format !! string accepted by the C command 'printf.' class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. character ( len = * ), intent ( in ) :: x !! The tic label format string. this % m_ticLabelFmt = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_show_tic_labels ( this ) result ( x ) !! Gets a value determining if tic labels should be shown. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true to show tic labels; else, set to false. x = this % m_showTicLabels end function ! -------------------- subroutine pa_set_show_tic_labels ( this , x ) !! Sets a value determining if tic labels should be shown. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true to show tic labels; else, set to false. this % m_showTicLabels = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_tic_x_offset ( this ) result ( x ) !! Gets the tic label x-offset, in characters. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. integer ( int32 ) :: x !! The tic label x-offset, in characters. x = this % m_ticXOffset end function ! -------------------- subroutine pa_set_tic_x_offset ( this , x ) !! Sets the tic label x-offset, in characters. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. integer ( int32 ), intent ( in ) :: x !! The tic label x-offset, in characters. this % m_ticXOffset = x call this % set_offset_tics (. true .) end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_tic_y_offset ( this ) result ( x ) !! Gets the tic label y-offset, in characters. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. integer ( int32 ) :: x !! The tic label y-offset, in characters. x = this % m_ticYOffset end function ! -------------------- subroutine pa_set_tic_y_offset ( this , x ) !! Sets the tic label y-offset, in characters. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. integer ( int32 ), intent ( in ) :: x !! The tic label y-offset, in characters. this % m_ticYOffset = x call this % set_offset_tics (. true .) end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_tic_label_angle ( this ) result ( x ) !! Gets the tic label angle, in degrees. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. real ( real32 ) :: x !! The tic label angle, in degrees. x = this % m_ticLabelAngle end function ! -------------------- subroutine pa_set_tic_label_angle ( this , x ) !! Sets the tic label angle, in degrees. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. real ( real32 ), intent ( in ) :: x !! The tic label angle, in degrees. this % m_ticLabelAngle = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_tic_rotation_origin ( this ) result ( x ) !! Gets the tic label rotation origin. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: x !! The tic label rotation origin. The tic label rotation origin !! must be one of the following: !! !! - GNUPLOT_ROTATION_ORIGIN_RIGHT !! !! - GNUPLOT_ROTATION_ORIGIN_LEFT !! !! - GNUPLOT_ROTATION_ORIGIN_CENTER integer ( int32 ) :: n n = len_trim ( this % m_ticRotationOrigin ) allocate ( character ( len = n ) :: x ) x = trim ( this % m_ticRotationOrigin ) end function ! -------------------- subroutine pa_set_tic_rotation_origin ( this , x ) !! Sets the tic label rotation origin. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. character ( len = * ), intent ( in ) :: x !! The tic label rotation origin. The tic label rotation origin !! must be one of the following: !! !! - GNUPLOT_ROTATION_ORIGIN_RIGHT !! !! - GNUPLOT_ROTATION_ORIGIN_LEFT !! !! - GNUPLOT_ROTATION_ORIGIN_CENTER this % m_ticRotationOrigin = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_tic_label_alignment ( this ) result ( x ) !! Gets the tic label alignment. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. character ( len = :), allocatable :: x !! The tic label alignment. The tic label alignment must be one of !! the following: !! !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT !! !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER !! !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT integer ( int32 ) :: n n = len_trim ( this % m_ticLabelAlignment ) allocate ( character ( len = n ) :: x ) x = trim ( this % m_ticLabelAlignment ) end function ! -------------------- subroutine pa_set_tic_label_alignment ( this , x ) !! Sets the tic label alignment. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. character ( len = * ), intent ( in ) :: x !! The tic label alignment. The tic label alignment must be one of !! the following: !! !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT !! !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER !! !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT this % m_ticLabelAlignment = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_offset_tics ( this ) result ( x ) !! Gets a value determining if the tics should be offset. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. logical :: x !! Returns true to offset the tics; else, set to false. x = this % m_offsetTics end function ! -------------------- subroutine pa_set_offset_tics ( this , x ) !! Sets a value determining if the tics should be offset. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. logical , intent ( in ) :: x !! Set to true to offset the tics; else, set to false. this % m_offsetTics = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_title_x_offset ( this ) result ( x ) !! Gets the axis title x-offset, in characters. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. integer ( int32 ) :: x !! The axis title x-offset, in characters. x = this % m_titleXOffset end function ! -------------------- subroutine pa_set_title_x_offset ( this , x ) !! Sets the axis title x-offset, in characters. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. integer ( int32 ), intent ( in ) :: x !! The axis title x-offset, in characters. this % m_titleXOffset = x end subroutine ! ------------------------------------------------------------------------------ pure function pa_get_title_y_offset ( this ) result ( x ) !! Gets the axis title y-offset, in characters. class ( plot_axis ), intent ( in ) :: this !! The plot_axis object. integer ( int32 ) :: x !! The axis title y-offset, in characters. x = this % m_titleYOffset end function ! -------------------- subroutine pa_set_title_y_offset ( this , x ) !! Sets the axis title y-offset, in characters. class ( plot_axis ), intent ( inout ) :: this !! The plot_axis object. integer ( int32 ), intent ( in ) :: x !! The axis title y-offset, in characters. this % m_titleYOffset = x end subroutine ! ****************************************************************************** ! X_AXIS MEMBERS ! ------------------------------------------------------------------------------ function xa_get_id ( this ) result ( x ) !! Gets the axis identification string. class ( x_axis ), intent ( in ) :: this !! The x_axis object. character ( len = :), allocatable :: x !! The identification string. x = this % m_id end function ! ****************************************************************************** ! Y_AXIS MEMBERS ! ------------------------------------------------------------------------------ function ya_get_id ( this ) result ( x ) !! Gets the axis identification string. class ( y_axis ), intent ( in ) :: this !! The y_axis object. character ( len = :), allocatable :: x !! The identification string. x = this % m_id end function ! ****************************************************************************** ! Y2_AXIS MEMBERS ! ------------------------------------------------------------------------------ function y2a_get_id ( this ) result ( x ) !! Gets the axis identification string. class ( y2_axis ), intent ( in ) :: this !! The y2_axis object. character ( len = :), allocatable :: x !! The identification string. x = this % m_id end function ! ****************************************************************************** ! Z_AXIS MEMBERS ! ------------------------------------------------------------------------------ function za_get_id ( this ) result ( x ) !! Gets the axis identification string. class ( z_axis ), intent ( in ) :: this !! The z_axis object. character ( len = :), allocatable :: x !! The identification string. x = this % m_id end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_axis.f90.html"},{"title":"fplot_plot_bar.f90 – FPLOT","text":"Contents Modules fplot_plot_bar Source Code fplot_plot_bar.f90 Source Code ! fplot_plot_bar.f90 module fplot_plot_bar use iso_fortran_env use fplot_plot_2d use strings implicit none private public :: plot_bar type , extends ( plot_2d ) :: plot_bar !! Defines a 2D plot tailored towards bar plotting. real ( real32 ), private :: m_barWidth = 1.0d0 !! A relative scaling of the width of a single bar. The value !! must be between 0 and 1 with 1 being full width. contains procedure , public :: get_bar_width => pb_get_bar_width procedure , public :: set_bar_width => pb_set_bar_width procedure , public :: get_command_string => pb_get_cmd end type contains ! ------------------------------------------------------------------------------ pure function pb_get_bar_width ( this ) result ( x ) !! Gets the bar width scaling factor. class ( plot_bar ), intent ( in ) :: this !! The plot_bar object. real ( real32 ) :: x !! The scaling factor. x = this % m_barWidth end function ! ------------------------------------------------------------------------------ subroutine pb_set_bar_width ( this , x ) !! Sets the bar width scaling factor. class ( plot_bar ), intent ( inout ) :: this !! The plot_bar object. real ( real32 ), intent ( in ) :: x !! The scaling factor. The value must be in the set [0, 1]; else, the !! value will be shifted accordingly. if ( x > 1.0 ) then this % m_barWidth = 1.0 else if ( x < 0.0 ) then this % m_barWidth = 0.0 else this % m_barWidth = x end if end subroutine ! ------------------------------------------------------------------------------ function pb_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT commands required to draw the plot. class ( plot_bar ), intent ( in ) :: this !! The plot_bar object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str ! Initialization call str % initialize () ! Box Width call str % append ( new_line ( 'a' )) call str % append ( \"set boxwidth \" ) call str % append ( to_string ( this % get_bar_width ())) call str % append ( \" relative\" ) ! Call the base routine to establish the remainder of the plot call str % append ( this % plot_2d % get_command_string ()) ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ ! TO DO YET: ! - clustering ! - stacking ! - lighting end module","tags":"","loc":"sourcefile\\fplot_plot_bar.f90.html"},{"title":"fplot_plot_data.f90 – FPLOT","text":"Contents Modules fplot_plot_data Source Code fplot_plot_data.f90 Source Code ! fplot_plot_data.f90 module fplot_plot_data use iso_fortran_env use fplot_plot_object use fplot_constants use fplot_colors use strings use ferror use fplot_errors implicit none private public :: plot_data public :: pd_get_string_result public :: plot_data_colored public :: scatter_plot_data public :: spd_get_int_value public :: spd_get_string_result public :: spd_get_value public :: spd_set_value type , abstract , extends ( plot_object ) :: plot_data !! A container for plot data. private character ( len = PLOTDATA_MAX_NAME_LENGTH ) :: m_name = \"\" !! The name to associate with the data set. contains procedure , public :: get_name => pd_get_name procedure , public :: set_name => pd_set_name procedure ( pd_get_string_result ), deferred , public :: get_data_string end type interface function pd_get_string_result ( this ) result ( x ) !! Retrieves a string from a plot_data object. import plot_data class ( plot_data ), intent ( in ) :: this !! The plot_data object. character ( len = :), allocatable :: x !! The string. end function end interface type , abstract , extends ( plot_data ) :: plot_data_colored !! Defines a colored plot data set. private type ( color ) :: m_color = CLR_BLUE !! The line color. logical :: m_useAutoColor = . true . !! Let the object choose colors automatically? integer ( int32 ) :: m_colorIndex = 1 !! The color index to use, assuming we're using auto color contains procedure , public :: get_line_color => pdc_get_line_color procedure , public :: set_line_color => pdc_set_line_color procedure , public :: get_color_index => pdc_get_color_index procedure , public :: set_color_index => pdc_set_color_index end type type , abstract , extends ( plot_data_colored ) :: scatter_plot_data !! A plot_data object for describing scatter plot data sets. private logical :: m_drawLine = . true . !! Draw a line connecting the dots? logical :: m_drawMarkers = . false . !! Draw the markers? integer ( int32 ) :: m_markerFrequency = 1 !! Marker frequency. real ( real32 ) :: m_lineWidth = 1.0 !! Line width. integer ( int32 ) :: m_lineStyle = LINE_SOLID !! Line style. integer ( int32 ) :: m_markerType = MARKER_FILLED_CIRCLE !! Marker type. real ( real32 ) :: m_markerSize = 0.5 !! Marker size multiplier. logical :: m_simplifyData = . true . !! True if large data sets should be simplified before sending to !! GNUPLOT. real ( real64 ) :: m_simplifyFactor = 1.0d-3 !! A scaling factor used to establish the simplification tolerance. !! The simplification tolerance is established by multiplying this !! factor by the range in the dependent variable data. logical :: m_dataDependentColors = . false . !! Determines if the data should utilize data-dependent colors. logical :: m_filledCurve = . false . !! Fill the curve? logical :: m_useVariableSizePoints = . false . !! Use variable size data points? contains procedure , public :: get_command_string => spd_get_cmd procedure , public :: get_line_width => spd_get_line_width procedure , public :: set_line_width => spd_set_line_width procedure , public :: get_line_style => spd_get_line_style procedure , public :: set_line_style => spd_set_line_style procedure , public :: get_draw_line => spd_get_draw_line procedure , public :: set_draw_line => spd_set_draw_line procedure , public :: get_draw_markers => spd_get_draw_markers procedure , public :: set_draw_markers => spd_set_draw_markers procedure , public :: get_marker_style => spd_get_marker_style procedure , public :: set_marker_style => spd_set_marker_style procedure , public :: get_marker_scaling => spd_get_marker_scaling procedure , public :: set_marker_scaling => spd_set_marker_scaling procedure , public :: get_marker_frequency => spd_get_marker_frequency procedure , public :: set_marker_frequency => spd_set_marker_frequency procedure ( spd_get_int_value ), deferred , public :: get_count procedure ( spd_get_value ), deferred , public :: get_x procedure ( spd_set_value ), deferred , public :: set_x procedure ( spd_get_value ), deferred , public :: get_y procedure ( spd_set_value ), deferred , public :: set_y procedure ( spd_get_string_result ), deferred , public :: get_axes_string procedure , public :: get_simplify_data => spd_get_simplify_data procedure , public :: set_simplify_data => spd_set_simplify_data procedure , public :: get_simplification_factor => spd_get_simplify_factor procedure , public :: set_simplification_factor => spd_set_simplify_factor procedure , public :: get_use_data_dependent_colors => & spd_get_data_dependent_colors procedure , public :: set_use_data_dependent_colors => & spd_set_data_dependent_colors procedure , public :: get_fill_curve => spd_get_filled procedure , public :: set_fill_curve => spd_set_filled procedure , public :: get_use_variable_size_points => spd_get_use_var_point_size procedure , public :: set_use_variable_size_points => spd_set_use_var_point_size end type interface pure function spd_get_value ( this , index ) result ( x ) !! Gets an indexed value from the scatter_plot_data object. use , intrinsic :: iso_fortran_env , only : int32 , real64 import scatter_plot_data class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: index !! The index. real ( real64 ) :: x !! The value. end function subroutine spd_set_value ( this , index , x ) !! Sets an indexed value from the scatter_plot_data object. use , intrinsic :: iso_fortran_env , only : int32 , real64 import scatter_plot_data class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: index !! The index. real ( real64 ), intent ( in ) :: x !! The value. end subroutine pure function spd_get_int_value ( this ) result ( x ) !! Gets an integer value from the scatter_plot_data object. use , intrinsic :: iso_fortran_env , only : int32 import scatter_plot_data class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ) :: x !! The value. end function function spd_get_string_result ( this ) result ( x ) !! Gets a string value from the scatter_plot_data object. import scatter_plot_data class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. character ( len = :), allocatable :: x !! The string. end function end interface contains ! ------------------------------------------------------------------------------ pure function pd_get_name ( this ) result ( txt ) !! Gets the name to associate with this data set. class ( plot_data ), intent ( in ) :: this !! The plot_data object. character ( len = :), allocatable :: txt !! The name. txt = trim ( this % m_name ) end function ! -------------------- subroutine pd_set_name ( this , txt ) !! Sets the name to associate with this data set. class ( plot_data ), intent ( inout ) :: this !! The plot_data object. character ( len = * ), intent ( in ) :: txt !! The name. integer ( int32 ) :: n n = min ( len ( txt ), PLOTDATA_MAX_NAME_LENGTH ) this % m_name = \"\" if ( n /= 0 ) then this % m_name ( 1 : n ) = txt ( 1 : n ) end if end subroutine ! ****************************************************************************** ! PLOT_DATA_COLORED ! ------------------------------------------------------------------------------ pure function pdc_get_line_color ( this ) result ( x ) !! Gets the object color. class ( plot_data_colored ), intent ( in ) :: this !! The plot_data_colored object. type ( color ) :: x !! The color. if ( this % m_useAutoColor ) then x = color_list ( this % get_color_index ()) else x = this % m_color end if end function ! -------------------- subroutine pdc_set_line_color ( this , x ) !! Sets the object color. class ( plot_data_colored ), intent ( inout ) :: this !! The plot_data_colored object. type ( color ), intent ( in ) :: x !! The color. this % m_color = x this % m_useAutoColor = . false . end subroutine ! ------------------------------------------------------------------------------ pure function pdc_get_color_index ( this ) result ( x ) !! Gets the color index. class ( plot_data_colored ), intent ( in ) :: this !! The plot_data_colored object. integer ( int32 ) :: x !! The index value. x = this % m_colorIndex end function ! -------------------- subroutine pdc_set_color_index ( this , x ) !! Sets the color index. class ( plot_data_colored ), intent ( inout ) :: this !! The plot_data_colored object. integer ( int32 ), intent ( in ) :: x !! The index value. this % m_colorIndex = x end subroutine ! ****************************************************************************** ! SCATTER_PLOT_DATA ! ------------------------------------------------------------------------------ function spd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this !! scatter_plot_data object. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Lines, points, or filled if ( this % get_fill_curve ()) then call str % append ( \" with filledcurves\" ) else if ( this % get_draw_line () . and . this % get_draw_markers ()) then call str % append ( \" with linespoints\" ) else if (. not . this % get_draw_line () . and . this % get_draw_markers ()) then call str % append ( \" with points\" ) else call str % append ( \" with lines\" ) end if end if ! Line Width call str % append ( \" lw \" ) call str % append ( to_string ( this % get_line_width ())) ! Line Color if ( this % get_use_data_dependent_colors ()) then ! http://www.gnuplotting.org/using-a-palette-as-line-color/ call str % append ( \" lc palette\" ) else clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) end if ! Define other properties specific to the lines and points if ( this % get_draw_line ()) then call str % append ( \" lt \" ) call str % append ( to_string ( this % get_line_style ())) if ( this % get_line_style () /= LINE_SOLID ) then call str % append ( \" dashtype \" ) call str % append ( to_string ( this % get_line_style ())) end if end if if ( this % get_draw_markers ()) then call str % append ( \" pi \" ) call str % append ( to_string ( this % get_marker_frequency ())) call str % append ( \" pt \" ) call str % append ( to_string ( this % get_marker_style ())) call str % append ( \" ps \" ) if ( this % get_use_variable_size_points ()) then call str % append ( \"variable\" ) else call str % append ( to_string ( this % get_marker_scaling ())) end if end if ! Define the axes structure call str % append ( \" \" ) call str % append ( this % get_axes_string ()) ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function spd_get_line_width ( this ) result ( x ) !! Gets the width of the line, in pixels. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. real ( real32 ) :: x !! The line width. x = this % m_lineWidth end function ! -------------------- subroutine spd_set_line_width ( this , x ) !! Sets the width of the line, in pixels. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. real ( real32 ), intent ( in ) :: x !! The line width. this % m_lineWidth = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_line_style ( this ) result ( x ) !! Gets the line style. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ) :: x !! The line style. The line style must be one of the following. !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! - LINE_SOLID x = this % m_lineStyle end function ! -------------------- subroutine spd_set_line_style ( this , x ) !! Sets the line style. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: x !! The line style. The line style must be one of the following. !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! - LINE_SOLID if ( x == LINE_DASHED . or . & x == LINE_DASH_DOTTED . or . & x == LINE_DASH_DOT_DOT . or . & x == LINE_DOTTED . or . & x == LINE_SOLID ) then ! Only reset the line style if it is a valid type. this % m_lineStyle = x end if end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_draw_line ( this ) result ( x ) !! Gets a value determining if a line should be drawn. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: x !! Returns true if the line should be drawn; else, false. x = this % m_drawLine end function ! -------------------- subroutine spd_set_draw_line ( this , x ) !! Sets a value determining if a line should be drawn. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! Set to true if the line should be drawn; else, false. this % m_drawLine = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_draw_markers ( this ) result ( x ) !! Gets a value determining if data point markers should be drawn. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: x !! Returns true if the markers should be drawn; else, false. x = this % m_drawMarkers end function ! -------------------- subroutine spd_set_draw_markers ( this , x ) !! Sets a value determining if data point markers should be drawn. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! Set to true if the markers should be drawn; else, false. this % m_drawMarkers = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_marker_style ( this ) result ( x ) !! Gets the marker style. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ) :: x !! The marker type. The marker type must be one of the following: !! !! - MARKER_ASTERISK !! !! - MARKER_EMPTY_CIRCLE !! !! - MARKER_EMPTY_NABLA !! !! - MARKER_EMPTY_RHOMBUS !! !! - MARKER_EMPTY_SQUARE !! !! - MARKER_EMPTY_TRIANGLE !! !! - MARKER_FILLED_CIRCLE !! !! - MARKER_FILLED_NABLA !! !! - MARKER_FILLED_RHOMBUS !! !! - MARKER_FILLED_SQUARE !! !! - MARKER_FILLED_TRIANGLE !! !! - MARKER_PLUS !! !! - MARKER_X x = this % m_markerType end function ! -------------------- subroutine spd_set_marker_style ( this , x ) !! Sets the marker style. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: x !! The marker type. The marker type must be one of the following: !! !! - MARKER_ASTERISK !! !! - MARKER_EMPTY_CIRCLE !! !! - MARKER_EMPTY_NABLA !! !! - MARKER_EMPTY_RHOMBUS !! !! - MARKER_EMPTY_SQUARE !! !! - MARKER_EMPTY_TRIANGLE !! !! - MARKER_FILLED_CIRCLE !! !! - MARKER_FILLED_NABLA !! !! - MARKER_FILLED_RHOMBUS !! !! - MARKER_FILLED_SQUARE !! !! - MARKER_FILLED_TRIANGLE !! !! - MARKER_PLUS !! !! - MARKER_X if ( x == MARKER_ASTERISK . or . & x == MARKER_EMPTY_CIRCLE . or . & x == MARKER_EMPTY_NABLA . or . & x == MARKER_EMPTY_RHOMBUS . or . & x == MARKER_EMPTY_SQUARE . or . & x == MARKER_EMPTY_TRIANGLE . or . & x == MARKER_FILLED_CIRCLE . or . & x == MARKER_FILLED_NABLA . or . & x == MARKER_FILLED_RHOMBUS . or . & x == MARKER_FILLED_SQUARE . or . & x == MARKER_FILLED_TRIANGLE . or . & x == MARKER_PLUS . or . & x == MARKER_X ) then ! Only alter the value if the marker is a known type this % m_markerType = x end if end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_marker_scaling ( this ) result ( x ) !! Gets the marker scaling. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. real ( real32 ) :: x !! The scaling factor. x = this % m_markerSize end function ! -------------------- subroutine spd_set_marker_scaling ( this , x ) !! Sets the marker scaling. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. real ( real32 ), intent ( in ) :: x !! The scaling factor. this % m_markerSize = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_marker_frequency ( this ) result ( x ) !! Gets the marker frequency. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. integer ( int32 ) :: x !! The marker frequency. x = this % m_markerFrequency end function ! -------------------- subroutine spd_set_marker_frequency ( this , x ) !! Sets the marker frequency. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. integer ( int32 ), intent ( in ) :: x !! The marker frequency. this % m_markerFrequency = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_simplify_data ( this ) result ( x ) !! Gets a value determining if the stored data should be !! simplified (reduced) before passing to GNUPLOT. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: x !! True if the data should be simplified prior to sending !! to GNUPLOT; else, false to leave the data alone. x = this % m_simplifyData end function ! -------------------- subroutine spd_set_simplify_data ( this , x ) !! Sets a value determining if the stored data should be !! simplified (reduced) before passing to GNUPLOT. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! True if the data should be simplified prior to sending !! to GNUPLOT; else, false to leave the data alone. this % m_simplifyData = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_simplify_factor ( this ) result ( x ) !! Gets a factor used to establish the simplification tolerance. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. real ( real64 ) :: x !! The scaling factor. x = this % m_simplifyFactor end function ! -------------------- subroutine spd_set_simplify_factor ( this , x ) !! Sets a factor used to establish the simplification tolerance. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. real ( real64 ), intent ( in ) :: x !! The scaling factor. this % m_simplifyFactor = x end subroutine ! ------------------------------------------------------------------------------ pure function spd_get_data_dependent_colors ( this ) result ( rst ) !! Gets a value determing if data-dependent colors should be used. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: rst !! True if data-dependent colors should be used; else, false. rst = this % m_dataDependentColors end function ! -------------------- subroutine spd_set_data_dependent_colors ( this , x ) !! Sets a value determing if data-dependent colors should be used. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! True if data-dependent colors should be used; else, false. this % m_dataDependentColors = x end subroutine ! ****************************************************************************** ! ADDED: JUNE 28, 2021 - JAC ! ------------------------------------------------------------------------------ pure function spd_get_filled ( this ) result ( rst ) !! Gets a logical value determining if a filled curve should be drawn. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: rst !! True if the curve should be filled; else, false. rst = this % m_filledCurve end function ! -------------------- subroutine spd_set_filled ( this , x ) !! Sets a logical value determining if a filled curve should be drawn. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! True if the curve should be filled; else, false. this % m_filledCurve = x end subroutine ! ****************************************************************************** ! ADDED: JAN 12, 2024 - JAC ! ------------------------------------------------------------------------------ pure function spd_get_use_var_point_size ( this ) result ( rst ) !! Gets a logical value determining if variable sized data points !! should be used. The default is false, such that points will be of !! a constant size. class ( scatter_plot_data ), intent ( in ) :: this !! The scatter_plot_data object. logical :: rst !! True if variable size points should be used; else, false. rst = this % m_useVariableSizePoints end function ! -------------------- subroutine spd_set_use_var_point_size ( this , x ) !! Sets a logical value determining if variable sized data points !! should be used. The default is false, such that points will be of !! a constant size. class ( scatter_plot_data ), intent ( inout ) :: this !! The scatter_plot_data object. logical , intent ( in ) :: x !! True if variable size points should be used; else, false. this % m_useVariableSizePoints = x end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data.f90.html"},{"title":"fplot_plot_data_2d.f90 – FPLOT","text":"Contents Modules fplot_plot_data_2d Source Code fplot_plot_data_2d.f90 Source Code module fplot_plot_data_2d use iso_fortran_env use fplot_plot_data use fplot_simplify use fplot_errors use ferror use strings implicit none private public :: plot_data_2d type , extends ( scatter_plot_data ) :: plot_data_2d !! Defines a two-dimensional plot data set. real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! An N-by-2 matrix containing the x and y data points. !> Draw against the secondary y axis? logical , private :: m_useY2 = . false . !! Draw against the secondary y axis? contains procedure , public :: get_axes_string => pd2d_get_axes_cmd procedure , public :: get_data_string => pd2d_get_data_cmd procedure , public :: get_count => pd2d_get_data_count procedure , public :: get_x => pd2d_get_x_data procedure , public :: set_x => pd2d_set_x_data procedure , public :: get_y => pd2d_get_y_data procedure , public :: set_y => pd2d_set_y_data procedure , public :: get_draw_against_y2 => pd2d_get_draw_against_y2 procedure , public :: set_draw_against_y2 => pd2d_set_draw_against_y2 generic , public :: define_data => pd2d_set_data_1 , pd2d_set_data_2 procedure :: pd2d_set_data_1 procedure :: pd2d_set_data_2 procedure , public :: get_x_data => pd2d_get_x_array procedure , public :: get_y_data => pd2d_get_y_array procedure , public :: get_color_data => pd2d_get_c_array procedure , public :: get_point_size_data => pd2d_get_ps_array end type contains ! ------------------------------------------------------------------------------ function pd2d_get_axes_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string defining which axes the data !! is to be plotted against. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. character ( len = :), allocatable :: x !! The command string. ! Define which axes the data is to be plotted against if ( this % get_draw_against_y2 ()) then x = \"axes x1y2\" else x = \"axes x1y1\" end if end function ! ------------------------------------------------------------------------------ function pd2d_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data !! to plot. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i character :: delimiter , nl real ( real64 ), allocatable , dimension (:) :: xv , yv , cv , ps real ( real64 ), allocatable , dimension (:,:) :: pts real ( real64 ) :: tol , maxy , miny , eps logical :: usecolors , usevarpoints ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) usecolors = this % get_use_data_dependent_colors () usevarpoints = this % get_use_variable_size_points () ! Process xv = this % get_x_data () yv = this % get_y_data () if ( usecolors . and . usevarpoints ) then cv = this % get_color_data () ps = this % get_point_size_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( ps ( i ))) call str % append ( delimiter ) call str % append ( to_string ( cv ( i ))) call str % append ( nl ) end do else if ( usecolors . and . . not . usevarpoints ) then cv = this % get_color_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( cv ( i ))) call str % append ( nl ) end do else if (. not . usecolors . and . usevarpoints ) then ps = this % get_point_size_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( ps ( i ))) call str % append ( nl ) end do else if ( this % get_simplify_data ()) then maxy = maxval ( yv ) miny = minval ( yv ) tol = abs ( this % get_simplification_factor () * ( maxy - miny )) eps = 1 0.0d0 * epsilon ( eps ) if ( tol < eps ) tol = eps pts = simplify_polyline ( xv , yv , tol ) do i = 1 , size ( pts , 1 ) call str % append ( to_string ( pts ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( pts ( i , 2 ))) call str % append ( nl ) end do else do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( nl ) end do end if end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function pd2d_get_data_count ( this ) result ( x ) !! Gets the number of data points. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. integer ( int32 ) :: x !! The number of data points. if ( allocated ( this % m_data )) then x = size ( this % m_data , 1 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pd2d_get_x_data ( this , index ) result ( x ) !! Gets the requested X data point. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 1 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd2d_set_x_data ( this , index , x ) !! Sets the requested X data point. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 1 ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pd2d_get_y_data ( this , index ) result ( x ) !! Gets the requested Y data point. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 2 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd2d_set_y_data ( this , index , x ) !! Sets the requested Y data point. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 2 ) = x end if end subroutine ! ------------------------------------------------------------------------------ subroutine pd2d_set_data_1 ( this , x , y , c , ps , err ) !! Defines the data set to plot. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinate data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinate data. real ( real64 ), intent ( in ), dimension (:), optional :: c !! An N-element array defining how color should vary with the !! current colormap for each value. real ( real64 ), intent ( in ), dimension (:), optional :: ps !! An N-element array defining the size of each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error-handling object. ! Local Variables integer ( int32 ) :: i , n , flag , ncols class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) ncols = 2 if ( present ( c )) ncols = ncols + 1 if ( present ( ps )) ncols = ncols + 1 if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pd2d_set_data_1\" , & \"y\" , n , size ( y )) return end if if ( present ( c )) then if ( size ( c ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pd2d_set_data_1\" , \"c\" , n , size ( c )) return end if end if if ( present ( ps )) then if ( size ( ps ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pd2d_set_data_1\" , \"ps\" , n , size ( ps )) return end if end if ! Process if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , ncols ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pd2d_set_data_1\" , flag ) return end if ! if (present(c)) then ! call this%set_use_data_dependent_colors(.true.) ! do concurrent (i = 1:n) ! this%m_data(i, 1) = x(i) ! this%m_data(i, 2) = y(i) ! this%m_data(i, 3) = c(i) ! end do ! else ! call this%set_use_data_dependent_colors(.false.) ! do concurrent (i = 1:n) ! this%m_data(i, 1) = x(i) ! this%m_data(i, 2) = y(i) ! end do ! end if if ( present ( c ) . and . present ( ps )) then call this % set_use_data_dependent_colors (. true .) call this % set_use_variable_size_points (. true .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = ps ( i ) this % m_data ( i , 4 ) = c ( i ) end do else if ( present ( c ) . and . . not . present ( ps )) then call this % set_use_data_dependent_colors (. true .) call this % set_use_variable_size_points (. false .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = c ( i ) end do else if (. not . present ( c ) . and . present ( ps )) then call this % set_use_data_dependent_colors (. false .) call this % set_use_variable_size_points (. true .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = ps ( i ) end do else call this % set_use_data_dependent_colors (. false .) call this % set_use_variable_size_points (. false .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) end do end if end subroutine ! ------------------------------------------------------------------------------ pure function pd2d_get_draw_against_y2 ( this ) result ( x ) !! Gets a value determining if the data should be plotted against !! the secondary y-axis. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. logical :: x !! Returns true if the data should be plotted against the secondary !! y-axis; else, false to plot against the primary y-axis. x = this % m_useY2 end function ! -------------------- subroutine pd2d_set_draw_against_y2 ( this , x ) !! Sets a value determining if the data should be plotted against !! the secondary y-axis. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. logical , intent ( in ) :: x !! Set to true if the data should be plotted against the !! secondary y-axis; else, false to plot against the primary y-axis. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ subroutine pd2d_set_data_2 ( this , y , err ) !! Defines the data set to plot. class ( plot_data_2d ), intent ( inout ) :: this !! The plot_data_2d object. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y-coordinate data. This !! data will be plotted against its own index. class ( errors ), intent ( inout ), optional , target :: err !! An error-handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( y ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Process if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 2 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pd2d_set_data_2\" , flag ) return end if do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = real ( i , real64 ) this % m_data ( i , 2 ) = y ( i ) end do end subroutine ! ------------------------------------------------------------------------------ function pd2d_get_x_array ( this ) result ( x ) !! Gets the stored X data array. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 1 ) end if end function ! ------------------------------------------------------------------------------ function pd2d_get_y_array ( this ) result ( x ) !! Gets the stored Y data array. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 2 ) end if end function ! ****************************************************************************** ! ADDED: OCT. 8, 2020 - JAC ! ------------------------------------------------------------------------------ function pd2d_get_c_array ( this ) result ( x ) !! Gets the stored color scaling data array. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then if ( size ( this % m_data , 2 ) == 3 ) then x = this % m_data (:, 3 ) else if ( size ( this % m_data , 2 ) == 4 ) then x = this % m_data (:, 4 ) end if end if end function ! ****************************************************************************** ! ADDED: JAN. 12, 2024 - JAC ! ------------------------------------------------------------------------------ function pd2d_get_ps_array ( this ) result ( x ) !! Gets the stored point size data array. class ( plot_data_2d ), intent ( in ) :: this !! The plot_data_2d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then if ( size ( this % m_data , 2 ) > 2 ) then x = this % m_data (:, 3 ) end if end if end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_2d.f90.html"},{"title":"fplot_plot_data_3d.f90 – FPLOT","text":"Contents Modules fplot_plot_data_3d Source Code fplot_plot_data_3d.f90 Source Code module fplot_plot_data_3d use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_simplify use ferror use strings implicit none private public :: plot_data_3d type , extends ( scatter_plot_data ) :: plot_data_3d !! Defines a three-dimensional plot data set. real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! An N-by-3 matrix containing the x, y, and z data points. contains procedure , public :: get_count => pd3d_get_data_count procedure , public :: get_x => pd3d_get_x_data procedure , public :: set_x => pd3d_set_x_data procedure , public :: get_y => pd3d_get_y_data procedure , public :: set_y => pd3d_set_y_data procedure , public :: get_z => pd3d_get_z_data procedure , public :: set_z => pd3d_set_z_data procedure , public :: get_axes_string => pd3d_get_axes_cmd procedure , public :: get_data_string => pd3d_get_data_cmd procedure , public :: define_data => pd3d_set_data_1 procedure , public :: get_x_data => pd3d_get_x_array procedure , public :: get_y_data => pd3d_get_y_array procedure , public :: get_z_data => pd3d_get_z_array procedure , public :: get_color_data => pd3d_get_c_array procedure , public :: get_point_size_data => pd3d_get_c_array end type contains ! ------------------------------------------------------------------------------ pure function pd3d_get_data_count ( this ) result ( x ) !! Gets the number of data points. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. integer ( int32 ) :: x !! The number of data points. if ( allocated ( this % m_data )) then x = size ( this % m_data , 1 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pd3d_get_x_data ( this , index ) result ( x ) !! Gets the requested X data point. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 1 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd3d_set_x_data ( this , index , x ) !! Sets the requested X data point. class ( plot_data_3d ), intent ( inout ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 1 ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pd3d_get_y_data ( this , index ) result ( x ) !! Gets the requested Y data point. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 2 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd3d_set_y_data ( this , index , x ) !! Sets the requested Y data point. class ( plot_data_3d ), intent ( inout ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 2 ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pd3d_get_z_data ( this , index ) result ( x ) !! Gets the requested Z data point. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to retrieve. real ( real64 ) :: x !! The requested data point. if ( allocated ( this % m_data )) then x = this % m_data ( index , 3 ) else x = 0.0d0 end if end function ! -------------------- subroutine pd3d_set_z_data ( this , index , x ) !! Sets the requested Z data point. class ( plot_data_3d ), intent ( inout ) :: this !! The plot_data_3d object. integer ( int32 ), intent ( in ) :: index !! The index of the data point to replace. real ( real64 ), intent ( in ) :: x !! The data point. if ( allocated ( this % m_data )) then this % m_data ( index , 3 ) = x end if end subroutine ! ------------------------------------------------------------------------------ function pd3d_get_axes_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string defining which axes the data !! is to be plotted against. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. character ( len = :), allocatable :: x !! The command string. ! Output x = \"\" end function ! ------------------------------------------------------------------------------ function pd3d_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data to plot. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i character :: delimiter , nl real ( real64 ), allocatable , dimension (:) :: xv , yv , zv , cv , ps real ( real64 ), allocatable , dimension (:,:) :: pts real ( real64 ) :: tol , maxz , minz , eps logical :: usecolors , usevarpoints ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) usecolors = this % get_use_data_dependent_colors () usevarpoints = this % get_use_variable_size_points () ! Process xv = this % get_x_data () yv = this % get_y_data () zv = this % get_z_data () if ( usecolors . and . usevarpoints ) then cv = this % get_color_data () ps = this % get_point_size_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( zv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( ps ( i ))) call str % append ( delimiter ) call str % append ( to_string ( cv ( i ))) call str % append ( nl ) end do else if ( usecolors . and . . not . usevarpoints ) then cv = this % get_color_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( zv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( cv ( i ))) call str % append ( nl ) end do else if (. not . usecolors . and . usevarpoints ) then ps = this % get_point_size_data () do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( zv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( ps ( i ))) call str % append ( nl ) end do else if ( this % get_simplify_data ()) then maxz = maxval ( zv ) minz = minval ( zv ) tol = abs ( this % get_simplification_factor () * ( maxz - minz )) eps = 1 0.0d0 * epsilon ( eps ) if ( tol < eps ) tol = eps pts = simplify_polyline ( xv , yv , zv , tol ) do i = 1 , size ( pts , 1 ) call str % append ( to_string ( pts ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( pts ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( pts ( i , 3 ))) call str % append ( nl ) end do else do i = 1 , size ( xv ) call str % append ( to_string ( xv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( yv ( i ))) call str % append ( delimiter ) call str % append ( to_string ( zv ( i ))) call str % append ( nl ) end do end if end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine pd3d_set_data_1 ( this , x , y , z , c , ps , err ) !! Defines the data set. class ( plot_data_3d ), intent ( inout ) :: this !! The plot_data_3d object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinate data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinate data. real ( real64 ), intent ( in ), dimension (:) :: z !! An N-element array containing the z coordinate data. real ( real64 ), intent ( in ), dimension (:), optional :: c !! An N-element array defining how color should vary with the !! current colormap for each value. real ( real64 ), intent ( in ), dimension (:), optional :: ps !! An N-element array defining the size of each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag , ncols class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) ncols = 3 if ( present ( c )) ncols = ncols + 1 if ( present ( ps )) ncols = ncols + 1 if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pd3d_set_data_1\" , & \"y\" , n , size ( y )) return end if if ( size ( z ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pd3d_set_data_1\" , & \"z\" , n , size ( z )) return end if if ( present ( c )) then if ( size ( c ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pd3d_set_data_1\" , \"c\" , n , size ( c )) return end if end if if ( present ( ps )) then if ( size ( ps ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pd3d_set_data_1\" , \"ps\" , n , size ( ps )) end if end if ! Process if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , ncols ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pd3d_set_data_1\" , flag ) return end if if ( present ( c ) . and . present ( ps )) then call this % set_use_data_dependent_colors (. true .) call this % set_use_variable_size_points (. true .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = z ( i ) this % m_data ( i , 4 ) = ps ( i ) this % m_data ( i , 5 ) = c ( i ) end do else if ( present ( c ) . and . . not . present ( ps )) then call this % set_use_data_dependent_colors (. true .) call this % set_use_variable_size_points (. false .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = z ( i ) this % m_data ( i , 4 ) = c ( i ) end do else if (. not . present ( c ) . and . present ( ps )) then call this % set_use_data_dependent_colors (. false .) call this % set_use_variable_size_points (. true .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = z ( i ) this % m_data ( i , 4 ) = ps ( i ) end do else call this % set_use_data_dependent_colors (. false .) call this % set_use_variable_size_points (. false .) do concurrent ( i = 1 : n ) this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = z ( i ) end do end if end subroutine ! ------------------------------------------------------------------------------ function pd3d_get_x_array ( this ) result ( x ) !! Gets the stored X data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 1 ) end if end function ! ------------------------------------------------------------------------------ function pd3d_get_y_array ( this ) result ( x ) !! Gets the stored Y data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 2 ) end if end function ! ------------------------------------------------------------------------------ function pd3d_get_z_array ( this ) result ( x ) !! Gets the stored Z data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then x = this % m_data (:, 3 ) end if end function ! ****************************************************************************** ! ADDED: OCT. 9, 2020 - JAC ! ------------------------------------------------------------------------------ function pd3d_get_c_array ( this ) result ( x ) !! Gets the stored color scaling data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then if ( size ( this % m_data , 2 ) == 4 ) then x = this % m_data (:, 4 ) else if ( size ( this % m_data , 2 ) == 5 ) then x = this % m_data (:, 5 ) end if end if end function ! ****************************************************************************** ! ADDED: JAN. 12, 2020 - JAC ! ------------------------------------------------------------------------------ function pd3d_get_ps_array ( this ) result ( x ) !! Gets the stored point scaling data array. class ( plot_data_3d ), intent ( in ) :: this !! The plot_data_3d object. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the stored data array. ! Process if ( allocated ( this % m_data )) then if ( size ( this % m_data , 2 ) > 3 ) then x = this % m_data (:, 4 ) end if end if end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_3d.f90.html"},{"title":"fplot_plot_data_bar.f90 – FPLOT","text":"Contents Modules fplot_plot_data_bar Source Code fplot_plot_data_bar.f90 Source Code ! fplot_plot_data_bar.f90 module fplot_plot_data_bar use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_colors use strings use ferror implicit none private public :: plot_data_bar type , extends ( plot_data_colored ) :: plot_data_bar !! Defines a data set tailored to bar charts. type ( string ), private , allocatable , dimension (:) :: m_axisLabels !! An array containing axis labels to associate with each bar. real ( real64 ), private , allocatable , dimension (:,:) :: m_barData !! An array of data defining each bar - the matrix contains !! multiple columns to allow multiple bars per label. logical , private :: m_useAxisLabels = . true . !! Determines if the axis labels should be used - only applicable !! if there is existing data stored in m_axisLabels & m_axisLabels !! is the same size as m_barData. logical , private :: m_useY2 = . false . !! Draw against the secondary y axis? logical , private :: m_filled = . true . !! Determines if each bar is filled. real ( real32 ), private :: m_alpha = 1.0 !! The alpha value (transparency) for each bar. contains procedure , public :: get_count => pdb_get_count procedure , public :: get => pdb_get_data procedure , public :: set => pdb_set_data procedure , public :: get_data => pdb_get_data_set procedure , public :: get_label => pdb_get_label procedure , public :: set_label => pdb_set_label procedure , public :: get_use_labels => pdb_get_use_labels procedure , public :: set_use_labels => pdb_set_use_labels procedure , public :: get_command_string => pdb_get_cmd procedure , public :: get_data_string => pdb_get_data_cmd procedure , public :: get_axes_string => pdb_get_axes_cmd procedure , public :: get_bar_per_label_count => pdb_get_col_count procedure , public :: get_draw_against_y2 => pdb_get_use_y2 procedure , public :: set_draw_against_y2 => pdb_set_use_y2 procedure , public :: get_is_filled => pdb_get_is_filled procedure , public :: set_is_filled => pdb_set_is_filled procedure , public :: get_transparency => pdb_get_alpha procedure , public :: set_transparency => pdb_set_alpha generic , public :: define_data => pdb_set_data_1 , pdb_set_data_2 , & pdb_set_data_3 procedure , private :: pdb_set_data_1 procedure , private :: pdb_set_data_2 procedure , private :: pdb_set_data_3 procedure , public :: set_data_1 => pdb_set_data_1_core procedure , public :: set_data_2 => pdb_set_data_2_core procedure , public :: set_data_3 => pdb_set_data_3_core end type contains ! ------------------------------------------------------------------------------ pure function pdb_get_count ( this ) result ( x ) !! Gets the number of stored data points. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ) :: x !! The number of stored data points. if ( allocated ( this % m_barData )) then x = size ( this % m_barData , 1 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pdb_get_data ( this , index , col ) result ( x ) !! Gets the requested data point. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ), intent ( in ) :: index !! The data point index. integer ( int32 ), intent ( in ) :: col !! The column index. real ( real64 ) :: x !! The value. if ( allocated ( this % m_barData )) then x = this % m_barData ( index , col ) else x = 0.0d0 end if end function ! ------------------------------------------------------------------------------ subroutine pdb_set_data ( this , index , col , x ) !! Replaces the requested data point. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. integer ( int32 ), intent ( in ) :: index !! The data point index. integer ( int32 ), intent ( in ) :: col !! The column index. real ( real64 ), intent ( in ) :: x !! The new value. if ( allocated ( this % m_barData )) then this % m_barData ( index , col ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pdb_get_data_set ( this , col ) result ( x ) !! Gets the requested data set. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ), intent ( in ) :: col !! The column index. real ( real64 ), allocatable , dimension (:) :: x !! A copy of the data set. if ( allocated ( this % m_barData )) then x = this % m_barData (:, col ) else allocate ( x ( 0 )) end if end function ! ------------------------------------------------------------------------------ pure function pdb_get_label ( this , index ) result ( x ) !! Gets the axis label associated with a specific data set. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ), intent ( in ) :: index !! The index of the data set. character ( len = :), allocatable :: x !! The label. if ( allocated ( this % m_axisLabels )) then x = char ( this % m_axisLabels ( index )) else x = \"\" end if end function ! ------------------------------------------------------------------------------ subroutine pdb_set_label ( this , index , txt ) !! Sets the axis label for a specific data set. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. integer ( int32 ) :: index !! The index of the data set. character ( len = * ), intent ( in ) :: txt !! The label. if ( allocated ( this % m_axisLabels )) then this % m_axisLabels ( index ) = txt end if end subroutine ! ------------------------------------------------------------------------------ pure function pdb_get_use_labels ( this ) result ( x ) !! Gets a value determining if labels are used to identify the data. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. logical :: x !! Returns true if labels are used; else, false. x = this % m_useAxisLabels end function ! ------------------------------------------------------------------------------ subroutine pdb_set_use_labels ( this , x ) !! Sets a value determining if labels are used to identify the data. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. logical , intent ( in ) :: x !! Set to true if labels are used; else, false. this % m_useAxisLabels = x end subroutine ! ------------------------------------------------------------------------------ function pdb_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for this object. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n , ncols type ( color ) :: clr ! Initialization call str % initialize () ! Starting off... call str % append ( ' \"-\" ' ) ! Tic Labels if ( this % get_use_labels () . and . allocated ( this % m_barData ) . and . & allocated ( this % m_axisLabels )) then ncols = size ( this % m_barData , 2 ) if ( ncols == 1 ) then call str % append ( \" using 2:xtic(1) \" ) else call str % append ( \" using 2:\" ) call str % append ( to_string ( ncols )) call str % append ( \":xtic(1) \" ) end if end if ! Enforce a box plot call str % append ( \" with boxes \" ) ! Filled? if ( this % get_is_filled ()) then call str % append ( \" fill solid \" ) else call str % append ( \" fill empty \" ) end if ! Transparency call str % append ( to_string ( this % get_transparency ())) ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' notitle' ) end if ! Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Define the axes structure call str % append ( \" \" ) call str % append ( this % get_axes_string ()) ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pdb_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string defining the data for this object. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , nbars , ncols character :: delimiter , nl ! Initialization call str % initialize () delimiter = achar ( 9 ) nl = new_line ( nl ) nbars = this % get_count () ncols = this % get_bar_per_label_count () ! Process if ( this % get_use_labels () . and . allocated ( this % m_axisLabels ) . and . & allocated ( this % m_barData )) then do i = 1 , nbars call str % append ( char ( this % m_axisLabels ( i ))) call str % append ( delimiter ) do j = 1 , ncols call str % append ( to_string ( this % get ( i , j ))) if ( j /= nbars ) call str % append ( delimiter ) end do call str % append ( nl ) end do else do i = 1 , nbars do j = 1 , ncols call str % append ( to_string ( this % get ( i , j ))) if ( j /= nbars ) call str % append ( delimiter ) end do call str % append ( nl ) end do end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pdb_get_axes_cmd ( this ) result ( x ) !! Gets the GNUPLOT command defining which axes to plot against. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. character ( len = :), allocatable :: x !! The command string. ! Define which axes the data is to be plotted against if ( this % get_draw_against_y2 ()) then x = \"axes x1y2\" else x = \"axes x1y1\" end if end function ! ------------------------------------------------------------------------------ pure function pdb_get_col_count ( this ) result ( x ) !! Gets the number of data sets (columns). class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. integer ( int32 ) :: x !! The count. if ( allocated ( this % m_barData )) then x = size ( this % m_barData , 2 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pdb_get_use_y2 ( this ) result ( x ) !! Gets a value determining if the data should be plotted against a !! secondary y-axis. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. logical :: x !! Returns true to plot against a secondary y-axis; else, false. x = this % m_useY2 end function ! ------------------------------------------------------------------------------ subroutine pdb_set_use_y2 ( this , x ) !! Sets a value determining if the data should be plotted against a !! secondary y-axis. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. logical , intent ( in ) :: x !! Set to true to plot against a secondary y-axis; else, false. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_1 ( this , x , err ) !! Defines a single data set. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real64 ), intent ( in ), dimension (:) :: x !! The data to plot. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Process call this % set_data_1 ( x , err ) end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_2 ( this , labels , x , err ) !! Defines data along with associated axis labels. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. class ( string ), intent ( in ), dimension (:) :: labels !! The axis labels to associate with the data. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Process call this % set_data_2 ( labels , x , err ) end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_3 ( this , labels , x , fmt , err ) !! Defines data along with labels and formatting information. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real64 ), intent ( in ), dimension (:) :: labels !! The axis labels to associate with the data. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. character ( len = * ), intent ( in ), optional :: fmt !! The format string for the labels (e.g. '(I0)', etc.). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Process call this % set_data_3 ( labels , x , fmt , err ) end subroutine ! ------------------------------------------------------------------------------ pure function pdb_get_is_filled ( this ) result ( x ) !! Gets a value determining if each bar is filled. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. logical :: x !! Returns true if the bars are to be filled; else, false. x = this % m_filled end function ! ------------------------------------------------------------------------------ subroutine pdb_set_is_filled ( this , x ) !! Sets a value determining if each bar is filled. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. logical , intent ( in ) :: x !! Set to true if the bars are to be filled; else, false. this % m_filled = x end subroutine ! ------------------------------------------------------------------------------ pure function pdb_get_alpha ( this ) result ( x ) !! Gets the alpha (transparency) for the bar color. class ( plot_data_bar ), intent ( in ) :: this !! The plot_data_bar object. real ( real32 ) :: x !! The alpha value ([0, 1]). x = this % m_alpha end function ! ------------------------------------------------------------------------------ subroutine pdb_set_alpha ( this , x ) !! Gets the alpha (transparency) for the bar color. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real32 ), intent ( in ) :: x !! The alpha value ([0, 1]). if ( x > 1.0 ) then this % m_alpha = 1.0 else if ( x < 0.0 ) then this % m_alpha = 0.0 else this % m_alpha = x end if end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_1_core ( this , x , err ) !! Defines the data set. class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: n , flag ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x ) ! Process if ( allocated ( this % m_axisLabels )) deallocate ( this % m_axisLabels ) if ( allocated ( this % m_barData )) deallocate ( this % m_barData ) allocate ( this % m_barData ( n , 1 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdb_set_data_1_core\" , flag ) return end if this % m_barData (:, 1 ) = x end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_2_core ( this , labels , x , err ) ! Arguments class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. class ( string ), intent ( in ), dimension (:) :: labels !! The axis labels. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: n , flag ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x ) ! Input Check if ( size ( labels ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pdb_set_data_2_core\" , & \"labels\" , n , size ( labels )) return end if ! Process if ( allocated ( this % m_axisLabels )) deallocate ( this % m_axisLabels ) if ( allocated ( this % m_barData )) deallocate ( this % m_barData ) allocate ( this % m_barData ( n , 1 ), stat = flag ) if ( flag == 0 ) allocate ( this % m_axisLabels ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdb_set_data_2_core\" , flag ) return end if this % m_barData (:, 1 ) = x this % m_axisLabels = labels end subroutine ! ------------------------------------------------------------------------------ subroutine pdb_set_data_3_core ( this , labels , x , fmt , err ) ! Arguments class ( plot_data_bar ), intent ( inout ) :: this !! The plot_data_bar object. real ( real64 ), intent ( in ), dimension (:) :: labels !! The axis labels. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set. character ( len = * ), intent ( in ), optional :: fmt !! The format string for the labels (e.g. '(I0)', etc.). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: i , n , flag type ( string ), allocatable , dimension (:) :: lbls ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x ) ! Input Check if ( size ( labels ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pdb_set_data_3_core\" , & \"labels\" , n , size ( labels )) return end if ! Convert the numeric labels to strings allocate ( lbls ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdb_set_data_3_core\" , flag ) return end if do i = 1 , n lbls ( i ) = to_string ( labels ( i ), fmt ) end do ! Store the data if ( allocated ( this % m_axisLabels )) deallocate ( this % m_axisLabels ) if ( allocated ( this % m_barData )) deallocate ( this % m_barData ) allocate ( this % m_barData ( n , 1 ), stat = flag ) if ( flag == 0 ) allocate ( this % m_axisLabels ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdb_set_data_3_core\" , flag ) return end if this % m_barData (:, 1 ) = x this % m_axisLabels = lbls end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_bar.f90.html"},{"title":"fplot_plot_data_error_bars.f90 – FPLOT","text":"Contents Modules fplot_plot_data_error_bars Source Code fplot_plot_data_error_bars.f90 Source Code ! fplot_plot_data_error_bars.f90 module fplot_plot_data_error_bars use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_colors use ferror use strings implicit none private public :: plot_data_error_bars type , extends ( plot_data_colored ) :: plot_data_error_bars !! Defines a 2D error-bar based data set. logical , private :: m_xBars = . false . !! Display x error bars? logical , private :: m_yBars = . false . !! Display y error bars? real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! A matrix containing the raw and error data. Column 1 is for the !! x coordinate, column 2 for the y coordinate, and the remaining !! columns are for the error data (x, then y if applicable). logical , private :: m_box = . false . !! Display an error box for the case where x and y errors are !! defined. logical , private :: m_range = . false . !! Plot error bars using a defined range vs. a +/- value. contains procedure , public :: get_command_string => pde_get_cmd procedure , public :: get_data_string => pde_get_data_cmd generic , public :: define_x_error_data => pde_define_x_err , & pde_define_x_err_lim generic , public :: define_y_error_data => pde_define_y_err , & pde_define_y_err_lim generic , public :: define_xy_error_data => pde_define_xy_err , & pde_define_xy_err_lim procedure , public :: get_plot_x_error_bars => pde_get_plot_x_err procedure , public :: get_plot_y_error_bars => pde_get_plot_y_err procedure , public :: get_count => pde_get_count procedure , public :: get_use_error_box => pde_get_box procedure , public :: set_use_error_box => pde_set_box procedure , public :: get_use_range => pde_get_use_range procedure :: pde_define_x_err procedure :: pde_define_y_err procedure :: pde_define_xy_err procedure :: pde_define_x_err_lim procedure :: pde_define_y_err_lim procedure :: pde_define_xy_err_lim end type contains ! ------------------------------------------------------------------------------ function pde_get_cmd ( this ) result ( cmd ) !! Gets the appropriate GNUPLOT command string for the object. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. character ( len = :), allocatable :: cmd !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Error Bars if ( this % get_plot_x_error_bars () . and . this % get_plot_y_error_bars ()) then if ( this % get_use_error_box ()) then call str % append ( \" w boxxyerr\" ) else call str % append ( \" w xyerr\" ) end if else if ( this % get_plot_x_error_bars () . and . . not . this % get_plot_y_error_bars ()) then call str % append ( \" w xerr\" ) else if (. not . this % get_plot_x_error_bars () . and . this % get_plot_y_error_bars ()) then call str % append ( \" w yerr\" ) end if ! Output cmd = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pde_get_data_cmd ( this ) result ( cmd ) !! Gets the appropriate GNUPLOT commands to plot the data itself. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. character ( len = :), allocatable :: cmd !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , n character :: delimiter , nl ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) n = this % get_count () ! Process if ( this % get_plot_x_error_bars () . and . this % get_plot_y_error_bars ()) then if ( this % get_use_range ()) then do i = 1 , n call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 4 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 5 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 6 ))) call str % append ( nl ) end do else do i = 1 , n call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 4 ))) call str % append ( nl ) end do end if else if ( this % get_use_range ()) then do i = 1 , n call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 4 ))) call str % append ( nl ) end do else do i = 1 , n call str % append ( to_string ( this % m_data ( i , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , 3 ))) call str % append ( nl ) end do end if end if ! if (this%get_plot_x_error_bars() .and. this%get_plot_y_error_bars()) then ! do i = 1, n ! call str%append(to_string(this%m_data(i, 1))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 2))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 3))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 4))) ! call str%append(nl) ! end do ! else ! do i = 1, n ! call str%append(to_string(this%m_data(i, 1))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 2))) ! call str%append(delimiter) ! call str%append(to_string(this%m_data(i, 3))) ! call str%append(nl) ! end do ! end if ! End cmd = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine pde_define_x_err ( this , x , y , xerr , err ) !! Defines the x error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: xerr !! An N-element array containing the x errors at each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_x_err\" , & \"y\" , n , size ( y )) return end if if ( size ( xerr ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_x_err\" , & \"xerr\" , n , size ( xerr )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 3 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_x_err\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = xerr ( i ) end do this % m_xBars = . true . this % m_range = . false . end subroutine ! ------------------------------------------------------------------------------ subroutine pde_define_y_err ( this , x , y , yerr , err ) !! Defines the y error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: yerr !! An N-element array containing the y errors at each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_y_err\" , & \"y\" , n , size ( y )) return end if if ( size ( yerr ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_y_err\" , & \"yerr\" , n , size ( yerr )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 3 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_y_err\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = yerr ( i ) end do this % m_yBars = . true . this % m_range = . false . end subroutine ! ------------------------------------------------------------------------------ subroutine pde_define_xy_err ( this , x , y , xerr , yerr , err ) !! Defines x and y error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: xerr !! An N-element array containing the x errors at each data point. real ( real64 ), intent ( in ), dimension (:) :: yerr !! An N-element array containing the y errors at each data point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_xy_err\" , & \"y\" , n , size ( y )) return end if if ( size ( xerr ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_xy_err\" , & \"xerr\" , n , size ( xerr )) return end if if ( size ( yerr ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"pde_define_xy_err\" , & \"yerr\" , n , size ( yerr )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 4 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_xy_err\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = xerr ( i ) this % m_data ( i , 4 ) = yerr ( i ) end do this % m_xBars = . true . this % m_yBars = . true . this % m_range = . false . end subroutine ! ------------------------------------------------------------------------------ pure function pde_get_plot_x_err ( this ) result ( x ) !! Checks to see if the x error bar data has been defined, and as !! a result, if the x error data is to be plotted. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. logical :: x !! Returns true if the x error bars are to be plotted; else, false. x = this % m_xBars end function ! ------------------------------------------------------------------------------ pure function pde_get_plot_y_err ( this ) result ( x ) !! Checks to see if the y error bar data has been defined, and as !! a result, if the x error data is to be plotted. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. logical :: x !! Returns true if the y error bars are to be plotted; else, false. x = this % m_yBars end function ! ------------------------------------------------------------------------------ pure function pde_get_count ( this ) result ( x ) !! Gets the number of stored data points. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. integer ( int32 ) :: x !! The number of data points. if ( allocated ( this % m_data )) then x = size ( this % m_data , 1 ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function pde_get_box ( this ) result ( x ) !! Checks to see if the x and y error boxes should be utilized. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. logical :: x !! Returns true if the error boxes are to be plotted; else, !! false. Notice, the error boxes are only utilized if there is !! both x and y error data defined, regardless of the value of this !! property. x = this % m_box end function ! -------------------- subroutine pde_set_box ( this , x ) !! Deterimines if the x and y error boxes should be utilized. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. logical , intent ( in ) :: x !! Set to true if the error boxes are to be plotted; else, !! false. Notice, the error boxes are only utilized if there is !! both x and y error data defined, regardless of the value of this !! property. this % m_box = x end subroutine ! ------------------------------------------------------------------------------ pure function pde_get_use_range ( this ) result ( x ) !! Gets a value determining if a defined range is being used !! to define the error bar extremes. class ( plot_data_error_bars ), intent ( in ) :: this !! The plot_data_error_bars object. logical :: x !! True if a defined range is being used; else, false. x = this % m_range end function ! ------------------------------------------------------------------------------ subroutine pde_define_x_err_lim ( this , x , y , xmin , xmax , err ) !! Defines the x error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: xmin !! An N-element array containing the minimum x values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: xmax !! An N-element array containing the maximum x values at each data !! point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_x_err_lim\" , \"y\" , n , size ( y )) return end if if ( size ( xmin ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_x_err_lim\" , \"xmin\" , n , size ( xmin )) return end if if ( size ( xmax ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_x_err_lim\" , \"xmax\" , n , size ( xmax )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 4 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_x_err_lim\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = xmin ( i ) this % m_data ( i , 4 ) = xmax ( i ) end do this % m_xBars = . true . this % m_range = . true . end subroutine ! ------------------------------------------------------------------------------ subroutine pde_define_y_err_lim ( this , x , y , ymin , ymax , err ) !! Defines the y error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: ymin !! An N-element array containing the minimum y values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: ymax !! An N-element array containing the maximum y values at each data !! point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_y_err_lim\" , \"y\" , n , size ( y )) return end if if ( size ( ymin ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_y_err_lim\" , \"ymin\" , n , size ( ymin )) return end if if ( size ( ymax ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_y_err_lim\" , \"ymax\" , n , size ( ymax )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 4 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_y_err_lim\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = ymin ( i ) this % m_data ( i , 4 ) = ymax ( i ) end do this % m_yBars = . true . this % m_range = . true . end subroutine ! ------------------------------------------------------------------------------ subroutine pde_define_xy_err_lim ( this , x , y , xmin , xmax , ymin , & ymax , err ) !! Defines the x and y error data. class ( plot_data_error_bars ), intent ( inout ) :: this !! The plot_data_error_bars object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y coordinates of the data. real ( real64 ), intent ( in ), dimension (:) :: xmin !! An N-element array containing the minimum x values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: xmax !! An N-element array containing the maximum x values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: ymin !! An N-element array containing the minimum y values at each data !! point. real ( real64 ), intent ( in ), dimension (:) :: ymax !! An N-element array containing the maximum x values at each data !! point. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization n = size ( x ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"y\" , n , size ( y )) return end if if ( size ( xmin ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"xmin\" , n , size ( xmin )) return end if if ( size ( xmax ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"xmax\" , n , size ( xmax )) return end if if ( size ( ymin ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"ymin\" , n , size ( ymin )) return end if if ( size ( ymax ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"pde_define_xy_err_lim\" , \"ymax\" , n , size ( ymax )) return end if ! Process this % m_xBars = . false . this % m_yBars = . false . this % m_range = . false . if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( n , 6 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pde_define_xy_err_lim\" , flag ) return end if do i = 1 , n this % m_data ( i , 1 ) = x ( i ) this % m_data ( i , 2 ) = y ( i ) this % m_data ( i , 3 ) = xmin ( i ) this % m_data ( i , 4 ) = xmax ( i ) this % m_data ( i , 5 ) = ymin ( i ) this % m_data ( i , 6 ) = ymax ( i ) end do this % m_xBars = . true . this % m_yBars = . true . this % m_range = . true . end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_error_bars.f90.html"},{"title":"fplot_plot_data_histogram.f90 – FPLOT","text":"Contents Modules fplot_plot_data_histogram Source Code fplot_plot_data_histogram.f90 Source Code ! fplot_plot_data_histogram.f90 module fplot_plot_data_histogram use iso_fortran_env use fplot_plot_data use fplot_errors use ferror use strings use fplot_colors use fplot_errors implicit none private public :: plot_data_histogram type , extends ( plot_data_colored ) :: plot_data_histogram !! A container for plotting data in the form of a histogram. integer ( int32 ), private :: m_binCount = 20 !! The number of bins. real ( real64 ), private :: m_minX !! The minimum data value. real ( real64 ), private :: m_maxX !! The maximum data value. real ( real64 ), private , allocatable , dimension (:,:) :: m_data !! Column 1 is the center of each bin and column 2 is the number !! of items in each bin. logical , private :: m_filled = . true . !! Determines if each bar is filled. logical , private :: m_useY2 = . false . !! Draw against the secondary y axis? contains procedure , public :: get_bin_count => pdh_get_bin_count procedure , public :: set_bin_count => pdh_set_bin_count procedure , public :: get_minimum_value => pdh_get_min_x procedure , public :: get_maximum_value => pdh_get_max_x procedure , public :: define_data => pdh_define_data procedure , public :: get_command_string => pdh_get_cmd procedure , public :: get_data_string => pdh_get_data_cmd procedure , public :: get_axes_string => pdh_get_axes_cmd procedure , public :: get_is_filled => pdh_get_is_filled procedure , public :: set_is_filled => pdh_set_is_filled procedure , public :: get_draw_against_y2 => pdh_get_use_y2 procedure , public :: set_draw_against_y2 => pdh_set_use_y2 procedure , public :: get => pdh_get_bin_data end type contains ! ------------------------------------------------------------------------------ pure function pdh_get_bin_count ( this ) result ( x ) !! Gets the number of bins. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. integer ( int32 ) :: x !! The bin count. x = this % m_binCount end function ! ------------------------------------------------------------------------------ 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. class ( plot_data_histogram ), intent ( inout ) :: this !! The plot_data_histogram object. integer ( int32 ), intent ( in ) :: x !! The bin count. this % m_binCount = x end subroutine ! ------------------------------------------------------------------------------ pure function pdh_get_min_x ( this ) result ( x ) !! Gets the minimum data value. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. real ( real64 ) :: x !! The minimum data value. x = this % m_minX end function ! ------------------------------------------------------------------------------ pure function pdh_get_max_x ( this ) result ( x ) !! Gets the maximum data value. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. real ( real64 ) :: x !! The maximum data value. x = this % m_maxX end function ! ------------------------------------------------------------------------------ subroutine pdh_define_data ( this , x , err ) !! Defines the data set to plot. class ( plot_data_histogram ), intent ( inout ) :: this !! The plot_data_histogram object. real ( real64 ), intent ( in ), dimension (:) :: x !! The data set to plot. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , j , n , nbins , flag real ( real64 ) :: maxX , minX , width , val real ( real64 ), allocatable , dimension (:,:) :: ranges class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x ) nbins = this % get_bin_count () ! Get the max and min of the entire data set maxX = maxval ( x ) minX = minval ( x ) width = ( maxX - minX ) / ( nbins - 1.0 ) this % m_minX = minX this % m_maxX = maxX ! Allocate space for the output if ( allocated ( this % m_data )) deallocate ( this % m_data ) allocate ( this % m_data ( nbins , 2 ), stat = flag , source = 0.0d0 ) if ( flag == 0 ) allocate ( ranges ( nbins , 2 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"pdh_define_data\" , flag ) return end if ! Define each range ranges ( 1 ,:) = [ minX , minX + width ] do i = 2 , nbins ranges ( i , 1 ) = ranges ( i - 1 , 2 ) ranges ( i , 2 ) = ranges ( i , 1 ) + width end do ! Construct the bins do i = 1 , n val = x ( i ) do j = 1 , nbins if (( val >= ranges ( j , 1 )) . and . ( val <= ranges ( j , 2 ))) then this % m_data ( j , 1 ) = this % m_data ( j , 1 ) + 1.0d0 ! Counter exit ! Exit the inner do loop end if end do end do ! Now compute the center of each bin - store in column 2 of this%m_data this % m_data (:, 2 ) = 0.5d0 * ( ranges (:, 1 ) + ranges (:, 2 )) end subroutine ! ------------------------------------------------------------------------------ function pdh_get_cmd ( this ) result ( rst ) !! Gets the GNUPLOT command string for this object. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. character ( len = :), allocatable :: rst !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n , ncols type ( color ) :: clr ! Process call str % append ( ' \"-\" ' ) call str % append ( \" with boxes \" ) ! Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Filled if ( this % get_is_filled ()) then call str % append ( \" fill solid \" ) else call str % append ( \" fill empty \" ) end if ! Define the axes structure call str % append ( \" \" ) call str % append ( this % get_axes_string ()) ! End rst = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pdh_get_data_cmd ( this ) result ( rst ) !! Gets the GNUPLOT command string defining the data for this object. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. character ( len = :), allocatable :: rst !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , nbars , cnt real ( real64 ) :: val character :: delimiter , nl ! Initialization delimiter = achar ( 9 ) nl = new_line ( nl ) nbars = size ( this % m_data , 1 ) ! Process do i = 1 , nbars call this % get ( i , val , cnt ) call str % append ( to_string ( val )) call str % append ( delimiter ) call str % append ( to_string ( cnt )) call str % append ( nl ) end do ! End rst = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pdh_get_axes_cmd ( this ) result ( rst ) !! Gets the GNUPLOT command string defining which axes the data is to be !! plotted against. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. character ( len = :), allocatable :: rst !! The command string. ! Define which axes the data is to be plotted against if ( this % get_draw_against_y2 ()) then rst = \"axes x1y2\" else rst = \"axes x1y1\" end if end function ! ------------------------------------------------------------------------------ pure function pdh_get_is_filled ( this ) result ( rst ) !! Gets a value determining if each box is filled. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. logical :: rst !! Returns true if the boxes are filled; else, false for an empty box. rst = this % m_filled end function ! -------------------- subroutine pdh_set_is_filled ( this , x ) !! Sets a value determining if each box is filled. 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. this % m_filled = x end subroutine ! ------------------------------------------------------------------------------ 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. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. logical :: rst !! Returns true if the data is to be plotted against the secondary y !! axis; else, false for the primary y axis. rst = this % m_useY2 end function ! -------------------- subroutine pdh_set_use_y2 ( this , x ) !! Sets a value determining if the data is to be plotted against the !! secondary y axis. 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. this % m_useY2 = x end subroutine ! ------------------------------------------------------------------------------ subroutine pdh_get_bin_data ( this , i , x , cnt ) !! Gets the requested binned data. class ( plot_data_histogram ), intent ( in ) :: this !! The plot_data_histogram object. integer ( int32 ), intent ( in ) :: i !! The bin number to get. real ( real64 ), intent ( out ) :: x !! The center of the bin. integer ( int32 ), intent ( out ) :: cnt !! The number of items in the bin. ! Process if (. not . allocated ( this % m_data )) then cnt = 0 x = 0.0d0 return end if x = this % m_data ( i , 2 ) cnt = floor ( this % m_data ( i , 1 )) end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_histogram.f90.html"},{"title":"fplot_plot_data_tri_2d.f90 – FPLOT","text":"Contents Modules fplot_plot_data_tri_2d Source Code fplot_plot_data_tri_2d.f90 Source Code ! fplot_plot_data_tri_2d.f90 module fplot_plot_data_tri_2d use iso_fortran_env use fplot_plot_data use fplot_constants use fplot_triangulations_delaunay_2d use fplot_colors use strings implicit none private public :: plot_data_tri_2d type , extends ( plot_data_colored ) :: plot_data_tri_2d !! Defines a 2D triangulated data set. real ( real64 ), private , allocatable , dimension (:) :: m_x !! An array of the x-coordinates of each point. real ( real64 ), private , allocatable , dimension (:) :: m_y !! An array of the y-coordinates of each point. integer ( int32 ), private , allocatable , dimension (:,:) :: m_indices !! A 3-column matrix containing the indices of each triangle's !! vertex. real ( real32 ), private :: m_lineWidth = 1.0 !! The line width. integer ( int32 ), private :: m_lineStyle = LINE_SOLID !! The line style contains procedure , public :: get_data_string => pdt2d_get_data_cmd procedure , public :: get_command_string => pdt2d_get_cmd procedure , public :: define_data => pdt2d_define_data procedure , public :: get_line_width => pdt2d_get_line_width procedure , public :: set_line_width => pdt2d_set_line_width procedure , public :: get_line_style => pdt2d_get_line_style procedure , public :: set_line_style => pdt2d_set_line_style end type contains ! ------------------------------------------------------------------------------ function pdt2d_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string describing the data to plot. class ( plot_data_tri_2d ), intent ( in ) :: this !! The plot_data_tri_2d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , n character :: delimiter , nl ! Initialization call str % initialize () n = size ( this % m_indices , 1 ) delimiter = achar ( 9 ) nl = new_line ( nl ) ! Process ! https://stackoverflow.com/questions/42784369/drawing-triangular-mesh-using-gnuplot ! http://www.gnuplot.info/faq/faq.html#x1-530005.10 ! https://codeyarns.com/2011/01/25/gnuplot-plotting-a-3d-triangulation/ do i = 1 , n ! Line 1-2 ! Vertex 1 j = this % m_indices ( i , 1 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Vertex 2 j = this % m_indices ( i , 2 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Line 2-3 ! Vertex 2 call str % append ( nl ) j = this % m_indices ( i , 2 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Vertex 3 j = this % m_indices ( i , 3 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Line 3-1 ! Vertex 3 call str % append ( nl ) j = this % m_indices ( i , 3 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Vertex 1 j = this % m_indices ( i , 1 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( \"0.0\" ) call str % append ( nl ) ! Add in the two blank lines if ( i /= n ) then call str % append ( nl ) call str % append ( nl ) end if end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function pdt2d_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for the object. class ( plot_data_tri_2d ), intent ( in ) :: this !! The plot_data_tri_2d object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Lines call str % append ( \" with lines\" ) ! Line Width call str % append ( \" lw \" ) call str % append ( to_string ( this % get_line_width ())) ! Line Color clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) ! Line Style call str % append ( \" lt \" ) call str % append ( to_string ( this % get_line_style ())) if ( this % get_line_style () /= LINE_SOLID ) then call str % append ( \" dashtype \" ) call str % append ( to_string ( this % get_line_style ())) end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine pdt2d_define_data ( this , tri ) !! Defines the data to plot. class ( plot_data_tri_2d ), intent ( inout ) :: this !! The plot_data_tri_2d object. class ( delaunay_tri_2d ), intent ( in ) :: tri !! The triangulation data to plot. ! Process if ( allocated ( this % m_x )) deallocate ( this % m_x ) if ( allocated ( this % m_y )) deallocate ( this % m_y ) if ( allocated ( this % m_indices )) deallocate ( this % m_indices ) this % m_x = tri % get_points_x () this % m_y = tri % get_points_y () this % m_indices = tri % get_indices () end subroutine ! ------------------------------------------------------------------------------ pure function pdt2d_get_line_width ( this ) result ( rst ) !! Gets the width of the lines used to draw the triangulation. class ( plot_data_tri_2d ), intent ( in ) :: this !! The plot_data_tri_2d object. real ( real32 ) :: rst !! The line width. rst = this % m_lineWidth end function ! -------------------- subroutine pdt2d_set_line_width ( this , x ) !! Sets the width of the lines used to draw the triangulation. class ( plot_data_tri_2d ), intent ( inout ) :: this !! The plot_data_tri_2d object. real ( real32 ), intent ( in ) :: x !! The line width. if ( x <= 0.0d0 ) then this % m_lineWidth = 1.0d0 else this % m_lineWidth = x end if end subroutine ! ------------------------------------------------------------------------------ pure function pdt2d_get_line_style ( this ) result ( rst ) !! Gets the line style. class ( plot_data_tri_2d ), intent ( in ) :: this !! The plot_data_tri_2d object. integer ( int32 ) :: rst !! The line style. The line style must be one of the following !! constants. !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! - LINE_SOLID rst = this % m_lineStyle end function ! -------------------- subroutine pdt2d_set_line_style ( this , x ) !! Sets the line style. class ( plot_data_tri_2d ), intent ( inout ) :: this !! The plot_data_tri_2d object. integer ( int32 ), intent ( in ) :: x !! The line style. The line style must be one of the following !! constants. !! !! - LINE_DASHED !! !! - LINE_DASH_DOTTED !! !! - LINE_DASH_DOT_DOT !! !! - LINE_DOTTED !! !! - LINE_SOLID if ( x == LINE_DASHED . or . & x == LINE_DASH_DOTTED . or . & x == LINE_DASH_DOT_DOT . or . & x == LINE_DOTTED . or . & x == LINE_SOLID ) then ! Only reset the line style if it is a valid type. this % m_lineStyle = x end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_data_tri_2d.f90.html"},{"title":"fplot_plot_object.f90 – FPLOT","text":"Contents Modules fplot_plot_object Source Code fplot_plot_object.f90 Source Code module fplot_plot_object use iso_fortran_env implicit none type , abstract :: plot_object !! The base type for all plot objects. contains procedure ( get_string_result ), deferred , public :: get_command_string end type interface function get_string_result ( this ) result ( x ) !! Returns a string from a plot_object. import plot_object class ( plot_object ), intent ( in ) :: this !! The plot_object object. character ( len = :), allocatable :: x !! The result string. end function end interface end module","tags":"","loc":"sourcefile\\fplot_plot_object.f90.html"},{"title":"fplot_plot_polar.f90 – FPLOT","text":"Contents Modules fplot_plot_polar Source Code fplot_plot_polar.f90 Source Code ! fplot_polar.f90 module fplot_plot_polar use iso_fortran_env use fplot_plot use fplot_terminal use fplot_errors use fplot_constants use fplot_legend use fplot_plot_data use ferror use strings implicit none private public :: plot_polar type , extends ( plot ) :: plot_polar private !> @brief Allow the plot to autoscale? logical :: m_autoscale = . true . !> @brief The minimum radius value - only applicable if m_autoscale is !! false. real ( real64 ) :: m_minrad = 0.0d0 !> @brief The maximum radius value - only applicable if m_autoscale is !! false. real ( real64 ) :: m_maxrad = 1.0d0 !> @brief The location for theta = 0 character ( len = :), allocatable :: m_thetaStart !> @brief The direction for theta character ( len = :), allocatable :: m_thetaDirection contains final :: plr_clean_up procedure , public :: initialize => plr_init procedure , public :: get_command_string => plr_get_cmd procedure , public :: get_autoscale => plr_get_autoscale procedure , public :: set_autoscale => plr_set_autoscale procedure , public :: get_radial_limits => plr_get_limits procedure , public :: set_radial_limits => plr_set_limits procedure , public :: get_theta_start_position => plr_get_theta_start procedure , public :: set_theta_start_position => plr_set_theta_start procedure , public :: get_theta_direction => plr_get_theta_direction procedure , public :: set_theta_direction => plr_set_theta_direction end type contains ! ------------------------------------------------------------------------------ subroutine plr_clean_up ( this ) !! Cleans up resources held by the plot_polar object. type ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. call this % free_resources () end subroutine ! ------------------------------------------------------------------------------ subroutine plr_init ( this , term , fname , err ) !! Initializes the plot_polar object. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Initialize the base class ! call plt_init(this, term, fname, errmgr) call this % plot % initialize ( term , fname , errmgr ) if ( errmgr % has_error_occurred ()) return ! Initialize the rest of the object this % m_thetaStart = POLAR_THETA_RIGHT this % m_thetaDirection = POLAR_THETA_CCW end subroutine ! ------------------------------------------------------------------------------ function plr_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot_polar object. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. character ( len = :), allocatable :: x !! The command string. ! Local Variables integer ( int32 ) :: i , n type ( string_builder ) :: str type ( legend ), pointer :: leg real ( real64 ) :: lmargin , rmargin , tmargin , bmargin real ( real64 ) :: lim ( 2 ) ! class(plot_label), pointer :: lbl class ( plot_data ), pointer :: ptr ! Initialization call str % initialize () ! Call the base routine call str % append ( this % plot % get_command_string ()) ! Margin lmargin = this % get_left_margin () rmargin = this % get_right_margin () tmargin = this % get_top_margin () bmargin = this % get_bottom_margin () if ( lmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set lmargin at screen \" ) call str % append ( to_string ( lmargin )) end if if ( rmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set rmargin at screen \" ) call str % append ( to_string ( rmargin )) end if if ( tmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set tmargin at screen \" ) call str % append ( to_string ( tmargin )) end if if ( bmargin >= 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set bmargin at screen \" ) call str % append ( to_string ( bmargin )) end if ! Polar-Specific Settings call str % append ( new_line ( 'a' )) call str % append ( \"unset border\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set polar\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set size square\" ) call str % append ( new_line ( 'a' )) call str % append ( \"unset xtics\" ) call str % append ( new_line ( 'a' )) call str % append ( \"unset ytics\" ) call str % append ( new_line ( 'a' )) call str % append ( 'set ttics 0, 30 format \"%g\".GPVAL_DEGREE_SIGN' ) call str % append ( new_line ( 'a' )) call str % append ( \"set mttics 3\" ) call str % append ( new_line ( 'a' )) call str % append ( \"set theta \" ) call str % append ( this % get_theta_start_position ()) call str % append ( \" \" ) call str % append ( this % get_theta_direction ()) ! Radial Limits if (. not . this % get_autoscale ()) then lim = this % get_radial_limits () call str % append ( new_line ( 'a' )) call str % append ( \"set rrange [\" ) call str % append ( to_string ( lim ( 1 ))) call str % append ( \":\" ) call str % append ( to_string ( lim ( 2 ))) call str % append ( \"]\" ) end if ! Grid if ( this % get_show_gridlines ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set grid r polar\" ) end if ! Title n = len_trim ( this % get_title ()) if ( n > 0 ) then call str % append ( new_line ( 'a' )) call str % append ( 'set title \"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if ! Border call str % append ( new_line ( 'a' )) if ( this % get_draw_border ()) then call str % append ( \"set border polar\" ) else call str % append ( \"set border 0\" ) end if ! Legend call str % append ( new_line ( 'a' )) leg => this % get_legend () if ( associated ( leg )) call str % append ( leg % get_command_string ()) ! ! Labels ! do i = 1, this%get_label_count() ! lbl => this%get_label(i) ! if (.not.associated(lbl)) cycle ! call str%append(new_line('a')) ! call str%append(lbl%get_command_string()) ! end do ! Define the plot function and data formatting commands n = this % get_count () call str % append ( new_line ( 'a' )) call str % append ( \"plot \" ) do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( ptr % get_command_string ()) if ( i /= n ) call str % append ( \", \" ) end do ! Define the data to plot do i = 1 , n ptr => this % get ( i ) if (. not . associated ( ptr )) cycle call str % append ( new_line ( 'a' )) call str % append ( ptr % get_data_string ()) call str % append ( \"e\" ) end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function plr_get_autoscale ( this ) result ( rst ) !! Gets a logical value determining if the axis should be !! automatically scaled to fit the data. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. logical :: rst !! Returns true if the plot will autoscale; else, false. rst = this % m_autoscale end function ! -------------------- subroutine plr_set_autoscale ( this , x ) !! Sets a logical value determining if the axis should be !! automatically scaled to fit the data. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. logical , intent ( in ) :: x !! Set to true if the plot will autoscale; else, false. this % m_autoscale = x end subroutine ! ------------------------------------------------------------------------------ pure function plr_get_limits ( this ) result ( rst ) !! Gets the radial axis limits if autoscaling is inactive. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. real ( real64 ) :: rst ( 2 ) !! A 2-element array containing the minimum and maximum limit !! values in that order. rst = [ this % m_minrad , this % m_maxrad ] end function ! -------------------- subroutine plr_set_limits ( this , x ) !! Sets the radial axis limits if autoscaling is inactive. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. real ( real64 ), intent ( in ) :: x ( 2 ) !! A 2-element array containing the minimum and maximum limit !! values in that order. this % m_minrad = minval ( x ) this % m_maxrad = maxval ( x ) end subroutine ! ------------------------------------------------------------------------------ pure function plr_get_theta_start ( this ) result ( rst ) !! Gets the position for \\theta = 0. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. character ( len = :), allocatable :: rst !! The starting position. It is one of the following flags. !! !! - POLAR_THETA_BOTTOM !! !! - POLAR_THETA_TOP !! !! - POLAR_THETA_RIGHT !! !! - POLAR_THETA_LEFT rst = this % m_thetaStart end function ! -------------------- subroutine plr_set_theta_start ( this , x ) !! Sets the position for \\theta = 0. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. character ( len = * ), intent ( in ) :: x !! The starting position. It is one of the following flags. !! !! - POLAR_THETA_BOTTOM !! !! - POLAR_THETA_TOP !! !! - POLAR_THETA_RIGHT !! !! - POLAR_THETA_LEFT if ( x /= POLAR_THETA_BOTTOM . and . & x /= POLAR_THETA_TOP . and . & x /= POLAR_THETA_LEFT . and . & x /= POLAR_THETA_RIGHT ) & then ! Reset to default this % m_thetaStart = POLAR_THETA_RIGHT else this % m_thetaStart = x end if end subroutine ! ------------------------------------------------------------------------------ pure function plr_get_theta_direction ( this ) result ( rst ) !! Gets the \\theta direction. class ( plot_polar ), intent ( in ) :: this !! The plot_polar object. character ( len = :), allocatable :: rst !! The direction. It is one of the following flags. !! !! - POLAR_THETA_CCW !! !! - POLAR_THETA_CW rst = this % m_thetaDirection end function ! -------------------- subroutine plr_set_theta_direction ( this , x ) !! Sets the \\theta direction. class ( plot_polar ), intent ( inout ) :: this !! The plot_polar object. character ( len = * ), intent ( in ) :: x !! The direction. It is one of the following flags. !! !! - POLAR_THETA_CCW !! !! - POLAR_THETA_CW if ( x /= POLAR_THETA_CCW . and . x /= POLAR_THETA_CW ) then ! Reset to default this % m_thetaDirection = POLAR_THETA_CCW else this % m_thetaDirection = x end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_plot_polar.f90.html"},{"title":"fplot_png_terminal.f90 – FPLOT","text":"Contents Modules fplot_png_terminal Source Code fplot_png_terminal.f90 Source Code ! fplot_png_terminal.f90 module fplot_png_terminal use iso_fortran_env use strings use fplot_terminal use fplot_constants implicit none private public :: png_terminal type , extends ( terminal ) :: png_terminal !! Defines a terminal used for producing PNG outputs. character ( len = 3 ), private :: m_id = \"png\" !! The terminal ID string character ( len = GNUPLOT_MAX_PATH_LENGTH ), private :: m_fname = \"default.png\" !! The filename of the PNG file to write. contains procedure , public :: get_filename => png_get_filename procedure , public :: set_filename => png_set_filename procedure , public :: get_id_string => png_get_term_string procedure , public :: get_command_string => png_get_command_string end type contains ! ------------------------------------------------------------------------------ function png_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( png_terminal ), intent ( in ) :: this !! The png_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function ! ------------------------------------------------------------------------------ function png_get_filename ( this ) result ( txt ) !! Gets the filename for the output PNG file. class ( png_terminal ), intent ( in ) :: this !! The png_terminal object. character ( len = :), allocatable :: txt !! The filename, including the file extension (.png). integer ( int32 ) :: n n = len_trim ( this % m_fname ) allocate ( character ( len = n ) :: txt ) txt = trim ( this % m_fname ) end function ! -------------------- subroutine png_set_filename ( this , txt ) !!Sets the filename for the output PNG file. class ( png_terminal ), intent ( inout ) :: this !! The png_terminal object. character ( len = * ), intent ( in ) :: txt !! The filename, including the file extension (.png). integer ( int32 ) :: n n = min ( len_trim ( txt ), GNUPLOT_MAX_PATH_LENGTH ) this % m_fname = \"\" if ( n /= 0 ) then this % m_fname ( 1 : n ) = txt ( 1 : n ) else this % m_fname = \"default.png\" end if end subroutine ! ------------------------------------------------------------------------------ function png_get_command_string ( this ) result ( x ) !! Returns the appropriate GNUPLOT command string to establish !! appropriate parameters. class ( png_terminal ), intent ( in ) :: this !! The png_terminal object. character ( len = :), allocatable :: x !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str ! Process call str % initialize () call str % append ( \"set term pngcairo enhanced \" ) call str % append ( \" font \" ) call str % append ( '\"' ) call str % append ( this % get_font_name ()) call str % append ( ',' ) call str % append ( to_string ( this % get_font_size ())) call str % append ( '\"' ) call str % append ( \" size \" ) call str % append ( to_string ( this % get_window_width ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_window_height ())) call str % append ( new_line ( 'a' )) call str % append ( \"set output \" ) call str % append ( '\"' ) call str % append ( this % get_filename ()) call str % append ( '\"' ) x = char ( str % to_string ()) end function end module","tags":"","loc":"sourcefile\\fplot_png_terminal.f90.html"},{"title":"fplot_qt_terminal.f90 – FPLOT","text":"Contents Modules fplot_qt_terminal Source Code fplot_qt_terminal.f90 Source Code ! fplot_qt_terminal.f90 module fplot_qt_terminal use iso_fortran_env use fplot_terminal implicit none private public :: qt_terminal type , extends ( terminal ) :: qt_terminal !! Defines a terminal that utilizes QT. character ( len = 2 ), private :: m_id = \"qt\" !! The terminal ID string contains procedure , public :: get_id_string => qt_get_term_string end type contains function qt_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( qt_terminal ), intent ( in ) :: this !! The qt_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function end module","tags":"","loc":"sourcefile\\fplot_qt_terminal.f90.html"},{"title":"fplot_simplify.f90 – FPLOT","text":"Contents Modules fplot_simplify Source Code fplot_simplify.f90 Source Code ! fplot_simplify.f90 ! References: ! - https://www.codeproject.com/Articles/114797/Polyline-Simplification ! - https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm module fplot_simplify use iso_fortran_env use ferror use fplot_errors implicit none private public :: simplify_polyline interface simplify_polyline module procedure :: simplify_polyline_2d1 module procedure :: simplify_polyline_3d1 module procedure :: simplify_polyline_mtx end interface contains function simplify_polyline_2d1 ( x , y , tol , err ) result ( ln ) !! Simplifies a 2D polyline by removing points too close to !! discern given a specified tolerance. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ) :: tol !! The distance tolerance to use when simplifying the polyline. !! This value must be positive, and larger than machine epsilon. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. real ( real64 ), allocatable , dimension (:,:) :: ln !! A matrix containing the simplified polyline vertices. The first !! column of the matrix contains the x-coordinates, and the second !! column contains the y-coordinates. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: n real ( real64 ) :: eps ! Initialization n = size ( x ) eps = epsilon ( eps ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"simplify_polyline_2d1\" , \"y\" , n , size ( y )) return end if if ( tol < eps ) then call errmgr % report_error ( \"simplify_polyline_2d1\" , & \"The tolerance value is either negative or less \" // & \"than machine precision.\" , PLOT_INVALID_INPUT_ERROR ) return end if ! Process ln = radial_distance_2d ( x , y , tol , err ) end function function simplify_polyline_3d1 ( x , y , z , tol , err ) result ( ln ) !! Simplifies a 3D polyline by removing points too close to !! discern given a specified tolerance. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ), dimension (:) :: z !! An N-element array containing the z-coordinates of the vertices !! making up the polyline. real ( real64 ), intent ( in ) :: tol !! The distance tolerance to use when simplifying the polyline. !! This value must be positive, and larger than machine epsilon. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. real ( real64 ), allocatable , dimension (:,:) :: ln !! A matrix containing the simplified polyline vertices. The first !! column of the matrix contains the x-coordinates, the second !! column contains the y-coordinates, and the third column contains !! the z-coordinates. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: n real ( real64 ) :: eps ! Initialization n = size ( x ) eps = epsilon ( eps ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"simplify_polyline_3d1\" , \"y\" , n , size ( y )) return end if if ( size ( z ) /= n ) then call report_array_size_mismatch_error ( errmgr , & \"simplify_polyline_3d1\" , \"z\" , n , size ( z )) return end if if ( tol < eps ) then call errmgr % report_error ( \"simplify_polyline_3d1\" , & \"The tolerance value is either negative or less \" // & \"than machine precision.\" , PLOT_INVALID_INPUT_ERROR ) return end if ! Process ln = radial_distance_3d ( x , y , z , tol , errmgr ) end function function simplify_polyline_mtx ( xy , tol , err ) result ( ln ) !! Simplifies a 2D or 3D polyline by removing points too close to !! discern given a specified tolerance. real ( real64 ), intent ( in ), dimension (:,:) :: xy !! An N-by-2 or N-by-3 matrix containing the polyline vertex data. real ( real64 ), intent ( in ) :: tol !! The distance tolerance to use when simplifying the polyline. !! This value must be positive, and larger than machine epsilon. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. real ( real64 ), allocatable , dimension (:,:) :: ln !! A matrix containing the simplified polyline vertices. The first !! column of the matrix contains the x-coordinates, the second !! column contains the y-coordinates, and if necessary, the third !! column contains the z-coordinates. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Ensure there are at least 2 columns of data in XY if ( size ( xy , 2 ) < 2 ) then call report_matrix_size_mismatch_error ( errmgr , & \"simplify_polyline_mtx\" , \"xy\" , size ( xy , 1 ), 2 , size ( xy , 1 ), & size ( xy , 2 )) return end if ! Process if ( size ( xy , 2 ) == 2 ) then ln = simplify_polyline_2d1 ( xy (:, 1 ), xy (:, 2 ), tol , errmgr ) else ln = simplify_polyline_3d1 ( xy (:, 1 ), xy (:, 2 ), xy (:, 3 ), tol , errmgr ) end if end function function radial_distance_2d ( x , y , tol , err ) result ( pts ) ! Arguments real ( real64 ), intent ( in ), dimension (:) :: x , y real ( real64 ), intent ( in ) :: tol class ( errors ), intent ( inout ) :: err real ( real64 ), allocatable , dimension (:,:) :: pts ! Local Variables integer ( int32 ) :: i , j , n , nvalid , flag logical , allocatable , dimension (:) :: valid real ( real64 ) :: r , xref , yref ! Initialization n = size ( x ) if ( n == 0 ) return i = 2 xref = x ( 1 ) yref = y ( 1 ) nvalid = 1 ! Local Memory Allocation allocate ( valid ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( err , \"radial_distance_2d\" , flag ) return end if valid ( 1 ) = . true . ! Cycle through and determine which points to keep do if ( i > n ) exit r = pythag2 ( x ( i ), y ( i ), xref , yref ) if ( r < tol ) then ! The point is too close, reject it valid ( i ) = . false . else ! The point is outside the tolerance, and is OK valid ( i ) = . true . nvalid = nvalid + 1 ! Move the reference point xref = x ( i ) yref = y ( i ) end if i = i + 1 end do ! Allocate space, and collect all valid points allocate ( pts ( nvalid , 2 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( err , \"radial_distance_2d\" , flag ) return end if j = 1 do i = 1 , n if ( valid ( i )) then pts ( j , 1 ) = x ( i ) pts ( j , 2 ) = y ( i ) j = j + 1 end if end do end function function radial_distance_3d ( x , y , z , tol , err ) result ( pts ) ! Arguments real ( real64 ), intent ( in ), dimension (:) :: x , y , z real ( real64 ), intent ( in ) :: tol class ( errors ), intent ( inout ) :: err real ( real64 ), allocatable , dimension (:,:) :: pts ! Local Variables integer ( int32 ) :: i , j , n , nvalid , flag logical , allocatable , dimension (:) :: valid real ( real64 ) :: r , xref , yref , zref ! Initialization n = size ( x ) if ( n == 0 ) return i = 2 xref = x ( 1 ) yref = y ( 1 ) zref = z ( 1 ) nvalid = 1 ! Local Memory Allocation allocate ( valid ( n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( err , \"radial_distance_3d\" , flag ) return end if valid ( 1 ) = . true . ! Cycle through and determine which points to keep do if ( i > n ) exit r = pythag3 ( x ( i ), y ( i ), z ( i ), xref , yref , zref ) if ( r < tol ) then ! The point is too close, reject it valid ( i ) = . false . else ! The point is outside the tolerance, and is OK valid ( i ) = . true . nvalid = nvalid + 1 ! Move the reference point xref = x ( i ) yref = y ( i ) zref = z ( i ) end if i = i + 1 end do ! Allocate space, and collect all valid points allocate ( pts ( nvalid , 3 ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( err , \"radial_distance_3d\" , flag ) return end if j = 1 do i = 1 , n if ( valid ( i )) then pts ( j , 1 ) = x ( i ) pts ( j , 2 ) = y ( i ) pts ( j , 3 ) = z ( i ) j = j + 1 end if end do end function pure function pythag2 ( x , y , xo , yo ) result ( r ) ! Arguments real ( real64 ), intent ( in ) :: x , y , xo , yo real ( real64 ) :: r ! Local Variables real ( real64 ) :: w , xabs , yabs ! Process xabs = abs ( x - xo ) yabs = abs ( y - yo ) w = max ( xabs , yabs ) if ( w < epsilon ( w )) then r = xabs + yabs else r = w * sqrt (( xabs / w ) ** 2 + ( yabs / w ) ** 2 ) end if end function pure function pythag3 ( x , y , z , xo , yo , zo ) result ( r ) ! Arguments real ( real64 ), intent ( in ) :: x , y , z , xo , yo , zo real ( real64 ) :: r ! Local Variables real ( real64 ) :: w , xabs , yabs , zabs ! Process xabs = abs ( x - xo ) yabs = abs ( y - yo ) zabs = abs ( z - zo ) w = max ( xabs , yabs , zabs ) if ( w < epsilon ( w )) then r = xabs + yabs + zabs else r = w * sqrt (( xabs / w ) ** 2 + ( yabs / w ) ** 2 + ( zabs / w ) ** 2 ) end if end function end module","tags":"","loc":"sourcefile\\fplot_simplify.f90.html"},{"title":"fplot_stats_plots.f90 – FPLOT","text":"Contents Modules fplot_stats_plots Source Code fplot_stats_plots.f90 Source Code module fplot_stats_plots use iso_fortran_env use fplot_plot_object use fplot_plot use fplot_plot_data_2d use fplot_plot_data_histogram use fplot_plot_2d use fplot_multiplot use fplot_terminal use fplot_constants use fplot_errors use fplot_colors use fplot_plot_axis use collections use strings use ferror implicit none private public :: correlation_plot type , extends ( plot_object ) :: correlation_plot !! Defines a multiplot arrangement designed to illustrate correlation !! between data sets. type ( multiplot ), private :: m_plt !! The multiplot object. contains procedure , public :: get_command_string => cp_get_command procedure , public :: initialize => cp_init procedure , public :: get_row_count => cp_get_rows procedure , public :: get_column_count => cp_get_cols procedure , public :: get_plot_count => cp_get_count procedure , public :: draw => cp_draw procedure , public :: save_file => cp_save procedure , public :: get => cp_get procedure , public :: get_terminal => cp_get_term procedure , public :: get_font_name => cp_get_font procedure , public :: set_font_name => cp_set_font procedure , public :: get_font_size => cp_get_font_size procedure , public :: set_font_size => cp_set_font_size end type contains ! ------------------------------------------------------------------------------ function cp_get_command ( this ) result ( x ) !! Gets the GNUPLOT commands for this object. class ( correlation_plot ), intent ( in ) :: this !! The correlation_plot object. character ( len = :), allocatable :: x !! The command string. end function ! ------------------------------------------------------------------------------ subroutine cp_init ( this , x , labels , term , width , height , err ) !! Initializes the correlation_plot object. class ( correlation_plot ), intent ( inout ) :: this !! The correlation_plot object. real ( 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 ( 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 ( int32 ), intent ( in ), optional :: width !! Optionally, the width of the plot window. integer ( int32 ), intent ( in ), optional :: height !! Optionally, the height of the plot window. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , j , k , t , n , flag real ( real64 ) :: m , b real ( real64 ), allocatable , dimension (:) :: mdl class ( errors ), pointer :: errmgr type ( errors ), target :: deferr type ( plot_2d ), allocatable , dimension (:) :: plts type ( plot_data_2d ) :: pdata , mdata type ( plot_data_histogram ) :: hdata class ( plot_axis ), pointer :: xAxis , yAxis ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if n = size ( x , 2 ) call this % m_plt % initialize ( n , n , term = term , width = width , & height = height , err = errmgr ) if ( errmgr % has_error_occurred ()) return allocate ( plts ( n * n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"cp_init\" , flag ) return end if call this % m_plt % set_font_size ( 11 ) ! use a small font size ! Input Checking if ( present ( labels )) then if ( size ( labels ) /= n ) then call report_array_size_mismatch_error ( errmgr , \"cp_init\" , & \"labels\" , n , size ( labels )) return end if end if ! Create plots k = 0 call pdata % set_draw_line (. false .) call pdata % set_draw_markers (. true .) call pdata % set_marker_style ( MARKER_FILLED_CIRCLE ) call pdata % set_marker_scaling ( 0.5 ) call mdata % set_line_width ( 2.0 ) call mdata % set_line_color ( CLR_BLACK ) if ( errmgr % has_error_occurred ()) return do j = 1 , n do i = 1 , n k = k + 1 call plts ( k )% initialize ( err = errmgr ) if ( errmgr % has_error_occurred ()) return if ( i == j ) then ! Plot a histogram of the data call hdata % define_data ( x (:, i ), err = errmgr ) if ( errmgr % has_error_occurred ()) return call plts ( k )% push ( hdata ) else ! Plot a scatter plot call pdata % define_data ( x (:, j ), x (:, i ), err = errmgr ) if ( errmgr % has_error_occurred ()) return call plts ( k )% push ( pdata ) ! Fit a line to the data call compute_linear_fit ( x (:, j ), x (:, i ), m , b ) mdl = m * x (:, j ) + b ! Plot the fitted line call mdata % define_data ( x (:, j ), mdl , err = err ) if ( errmgr % has_error_occurred ()) return call plts ( k )% push ( mdata ) end if ! Deal with axis labels if ( j == 1 ) then ! Display y axis labels for these plots yAxis => plts ( k )% get_y_axis () if ( present ( labels )) then call yAxis % set_title ( char ( labels ( i ))) else call yAxis % set_title ( char ( \"x_{\" // to_string ( i ) // \"}\" )) end if end if ! Get an x-axis object for the plot xAxis => plts ( k )% get_x_axis () ! Define axis labels if ( i == n ) then ! Display x axis labels for these plots if ( present ( labels )) then call xAxis % set_title ( char ( labels ( j ))) else call xAxis % set_title ( char ( \"x_{\" // to_string ( j ) // \"}\" )) end if end if ! Rotate histogram tic labels call xAxis % set_tic_label_angle ( 4 5.0 ) call xAxis % set_tic_label_rotation_origin ( GNUPLOT_ROTATION_ORIGIN_RIGHT ) ! Store the plot - the collection makes a copy of the plot and ! manages it's lifetime call this % m_plt % set ( i , j , plts ( k )) end do end do end subroutine ! ------------------------------------------------------------------------------ pure function cp_get_rows ( this ) result ( x ) !! Gets the number of rows of plots. class ( correlation_plot ), intent ( in ) :: this !! The correlation_plot object. integer ( int32 ) :: x !! The row count. x = this % m_plt % get_row_count () end function ! -------------------- pure function cp_get_cols ( this ) result ( x ) !! Gets the number of columns of plots. class ( correlation_plot ), intent ( in ) :: this !! The correlation_plot object. integer ( int32 ) :: x !! The column count. x = this % m_plt % get_column_count () end function ! -------------------- pure function cp_get_count ( this ) result ( x ) !! Gets the total number of plots. class ( correlation_plot ), intent ( in ) :: this !! The correlation_plot object. integer ( int32 ) :: x !! The plot count. x = this % m_plt % get_plot_count () end function ! ------------------------------------------------------------------------------ subroutine cp_draw ( this , persist , err ) !! Launches GNUPLOT and draws the correlation_plot per the current !! state of the command list. 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. call this % m_plt % draw ( persist , err ) end subroutine ! ------------------------------------------------------------------------------ subroutine cp_save ( this , fname , err ) !! Saves a GNUPLOT command file. 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. call this % m_plt % save_file ( fname , err ) end subroutine ! ------------------------------------------------------------------------------ function cp_get ( this , i , j ) result ( x ) !! Gets the requested plot object. class ( correlation_plot ), intent ( in ) :: this !! The correlation_plot object. integer ( int32 ), intent ( in ) :: i !! The row index of the plot to retrieve. integer ( int32 ), intent ( in ) :: j !! The column index of the plot to retrieve. class ( plot ), pointer :: x !! A pointer to the plot object. x => this % m_plt % get ( i , j ) end function ! ------------------------------------------------------------------------------ function cp_get_term ( this ) result ( x ) !! Gets the GNUPLOT terminal object. class ( correlation_plot ), intent ( in ) :: this !! The correlation_plot object. class ( terminal ), pointer :: x !! A pointer to the terminal object. x => this % m_plt % get_terminal () end function ! ------------------------------------------------------------------------------ function cp_get_font ( this ) result ( x ) !! Gets the name of the font used for plot text. class ( correlation_plot ), intent ( in ) :: this !! The correlation_plot object. character ( len = :), allocatable :: x !! The font name. x = this % m_plt % get_font_name () end function ! -------------------- subroutine cp_set_font ( this , x ) !! Sets the name of the font used for plot text. class ( correlation_plot ), intent ( inout ) :: this !! The correlation_plot object. character ( len = * ), intent ( in ) :: x !! The font name. call this % m_plt % set_font_name ( x ) end subroutine ! ------------------------------------------------------------------------------ function cp_get_font_size ( this ) result ( x ) !! Gets the size of the font used by the plot. class ( correlation_plot ), intent ( in ) :: this !! The correlation_plot object. integer ( int32 ) :: x !! The font size. x = this % m_plt % get_font_size () end function ! -------------------- subroutine cp_set_font_size ( this , x ) !! Sets the size of the font used by the plot. class ( correlation_plot ), intent ( inout ) :: this !! The correlation_plot object. integer ( int32 ), intent ( in ) :: x !! The font size. call this % m_plt % set_font_size ( x ) end subroutine ! ****************************************************************************** ! PRIVATE HELPER ROUTINES ! ------------------------------------------------------------------------------ subroutine compute_linear_fit ( x , y , m , b ) !! Computes the coefficients of a linear equation (y = m * x + b) using a !! least-squares approach. real ( real64 ), intent ( in ), dimension (:) :: x !! The x-coordinate data. real ( real64 ), intent ( in ), dimension (:) :: y !! The y-coordinate data. real ( real64 ), intent ( out ) :: m !! The slope term. real ( real64 ), intent ( out ) :: b !! The intercept term. ! Local Variables integer ( int32 ) :: i , n real ( real64 ) :: sumX , sumY , sumX2 , sumY2 , sumXY ! Initialization n = size ( x ) sumX = 0.0d0 sumY = 0.0d0 sumX2 = 0.0d0 sumY2 = 0.0d0 sumXY = 0.0d0 ! Process do i = 1 , n sumX = sumX + x ( i ) sumY = sumY + y ( i ) sumXY = sumXY + x ( i ) * y ( i ) sumX2 = sumX2 + ( x ( i )) ** 2 sumY2 = sumY2 + ( y ( i )) ** 2 end do m = ( n * sumXY - sumX * sumY ) / ( n * sumX2 - sumX ** 2 ) b = ( sumY * sumX2 - sumX * sumXY ) / ( n * sumX2 - sumX ** 2 ) end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_stats_plots.f90.html"},{"title":"fplot_surface_plot.f90 – FPLOT","text":"Contents Modules fplot_surface_plot Source Code fplot_surface_plot.f90 Source Code ! fplot_surface_plot.f90 module fplot_surface_plot use iso_fortran_env use fplot_plot_3d use fplot_errors use fplot_legend use ferror use strings implicit none private public :: surface_plot type , extends ( plot_3d ) :: surface_plot logical , private :: m_showHidden = . false . !! Show hidden lines? logical , private :: m_smooth = . true . !! Smooth the surface? logical , private :: m_contour = . false . !! Show a contour plot as well as the surface plot? logical , private :: m_useLighting = . false . !! Use lighting? real ( real32 ), private :: m_lightIntensity = 0.5 !! Lighting intensity (0 - 1) - default is 0.5 real ( real32 ), private :: m_specular = 0.5 !! Specular highlight intensity (0 - 1). real ( real32 ), private :: m_transparency = 1.0 !! Defines the translucency value. Must exist on (0, 1]. contains procedure , public :: initialize => surf_init procedure , public :: get_show_hidden => surf_get_show_hidden procedure , public :: set_show_hidden => surf_set_show_hidden procedure , public :: get_command_string => surf_get_cmd procedure , public :: get_allow_smoothing => surf_get_smooth procedure , public :: set_allow_smoothing => surf_set_smooth procedure , public :: get_show_contours => surf_get_show_contours procedure , public :: set_show_contours => surf_set_show_contours procedure , public :: get_use_lighting => surf_get_use_lighting procedure , public :: set_use_lighting => surf_set_use_lighting procedure , public :: get_light_intensity => surf_get_light_intensity procedure , public :: set_light_intensity => surf_set_light_intensity procedure , public :: get_specular_intensity => surf_get_specular_intensity procedure , public :: set_specular_intensity => surf_set_specular_intensity procedure , public :: get_transparency => surf_get_transparency procedure , public :: set_transparency => surf_set_transparency end type contains ! ------------------------------------------------------------------------------ subroutine surf_init ( this , term , fname , err ) !! Initializes the surface_plot object. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. integer ( 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 character ( len = * ), intent ( in ), optional :: fname !! A filename to pass to the terminal in the event the !! terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG). class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables type ( legend ), pointer :: lgnd ! Initialize the base class call this % plot_3d % initialize ( term , fname , err ) ! Do not display the legend lgnd => this % get_legend () call lgnd % set_is_visible (. false .) end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_show_hidden ( this ) result ( x ) !! Gets a value indicating if hidden lines should be shown. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. logical :: x !! Returns true if hidden lines should be shown; else, false. x = this % m_showHidden end function ! ------------------------------------------------------------------------------ subroutine surf_set_show_hidden ( this , x ) !! Sets a value indicating if hidden lines should be shown. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. logical , intent ( in ) :: x !! Set to true if hidden lines should be shown; else, false. this % m_showHidden = x end subroutine ! ------------------------------------------------------------------------------ function surf_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this plot_3d !! object. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str ! class(colormap), pointer :: clr ! Initialization call str % initialize () ! Call the base routine call str % append ( this % plot % get_command_string ()) ! Hidden Stuff call str % append ( new_line ( 'a' )) if ( this % get_show_hidden ()) then call str % append ( \"unset hidden3d\" ) else call str % append ( \"set hidden3d\" ) end if ! Define the colormap ! clr => this%get_colormap() ! if (associated(clr)) then ! call str%append(new_line('a')) ! call str%append(clr%get_command_string()) ! end if ! Allow for smoothing interpolation if ( this % get_allow_smoothing ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set pm3d interpolate 0,0\" ) end if ! Draw a contour plot as well? if ( this % get_show_contours ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set contour\" ) end if ! Show colorbar ! if (.not.this%get_show_colorbar()) then ! call str%append(new_line('a')) ! call str%append(\"unset colorbox\") ! end if ! Lighting if ( this % get_use_lighting ()) then call str % append ( new_line ( 'a' )) call str % append ( \"set pm3d lighting primary \" ) call str % append ( to_string ( this % get_light_intensity ())) call str % append ( \" specular \" ) call str % append ( to_string ( this % get_specular_intensity ())) end if ! Translucent if ( this % get_transparency () < 1.0 . and . this % get_transparency () > 0.0 ) then call str % append ( new_line ( 'a' )) call str % append ( \"set style fill transparent solid \" ) call str % append ( to_string ( this % get_transparency ())) end if ! Call the base class to define the rest of the plot commands call str % append ( new_line ( 'a' )) call str % append ( this % plot_3d % get_command_string ()) ! Output x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ ! module function surf_get_colormap(this) result(x) ! class(surface_plot), intent(in) :: this ! class(colormap), pointer :: x ! x => this%m_colormap ! end function ! ! -------------------- ! module subroutine surf_set_colormap(this, x, err) ! ! Arguments ! class(surface_plot), intent(inout) :: this ! class(colormap), intent(in) :: x ! class(errors), intent(inout), optional, target :: err ! ! Local Variables ! integer(int32) :: flag ! class(errors), pointer :: errmgr ! type(errors), target :: deferr ! ! Initialization ! if (present(err)) then ! errmgr => err ! else ! errmgr => deferr ! end if ! ! Process ! if (associated(this%m_colormap)) deallocate(this%m_colormap) ! allocate(this%m_colormap, stat = flag, source = x) ! if (flag /= 0) then ! call errmgr%report_error(\"surf_set_colormap\", & ! \"Insufficient memory available.\", PLOT_OUT_OF_MEMORY_ERROR) ! return ! end if ! end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_smooth ( this ) result ( x ) !! Gets a value determining if the plotted surfaces should be !! smoothed. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. logical :: x !! Returns true if the surface should be smoothed; else, false. x = this % m_smooth end function ! -------------------- subroutine surf_set_smooth ( this , x ) !! Sets a value determining if the plotted surfaces should be !! smoothed. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. logical , intent ( in ) :: x !! Set to true if the surface should be smoothed; else, false. this % m_smooth = x end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_show_contours ( this ) result ( x ) !! Gets a value determining if a contour plot should be drawn in !! conjunction with the surface plot. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. logical :: x !! Returns true if the contour plot should be drawn; else, false to !! only draw the surface. x = this % m_contour end function ! -------------------- subroutine surf_set_show_contours ( this , x ) !! Sets a value determining if a contour plot should be drawn in !! conjunction with the surface plot. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. logical , intent ( in ) :: x !! Set to true if the contour plot should be drawn; else, false to !! only draw the surface. this % m_contour = x end subroutine ! ------------------------------------------------------------------------------ ! pure module function surf_get_show_colorbar(this) result(x) ! class(surface_plot), intent(in) :: this ! logical :: x ! x = this%m_showColorbar ! end function ! ! -------------------- ! module subroutine surf_set_show_colorbar(this, x) ! class(surface_plot), intent(inout) :: this ! logical, intent(in) :: x ! this%m_showColorbar = x ! end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_use_lighting ( this ) result ( x ) !! Gets a value indicating if lighting, beyond the ambient !! light source, is to be used. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. logical :: x !! True if lighting should be used; else, false. x = this % m_useLighting end function ! -------------------- subroutine surf_set_use_lighting ( this , x ) !! Sets a value indicating if lighting, beyond the ambient !! light source, is to be used. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. logical , intent ( in ) :: x !! True if lighting should be used; else, false. this % m_useLighting = x end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_light_intensity ( this ) result ( x ) !! Gets the ratio of the strength of the light source relative !! to the ambient light. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. real ( real32 ) :: x !! The light intensity ratio. x = this % m_lightIntensity end function ! -------------------- subroutine surf_set_light_intensity ( this , x ) !! Sets the ratio of the strength of the light source relative !! to the ambient light. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. real ( real32 ), intent ( in ) :: x !! The light intensity ratio. The value must exist in the !! set [0, 1]; else, it will be clipped to lie within the range. if ( x < 0.0 ) then this % m_lightIntensity = 0.0 else if ( x > 1.0 ) then this % m_lightIntensity = 1.0 else this % m_lightIntensity = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_specular_intensity ( this ) result ( x ) !! Gets the ratio of the strength of the specular light source !! relative to the ambient light. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. real ( real32 ) :: x !! The specular light intensity ratio. x = this % m_specular end function ! -------------------- subroutine surf_set_specular_intensity ( this , x ) !! Sets the ratio of the strength of the specular light source !! relative to the ambient light. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. real ( real32 ), intent ( in ) :: x !! The specular light intensity ratio. The value must exist in the !! set [0, 1]; else, it will be clipped to lie within the range. if ( x < 0.0 ) then this % m_specular = 0.0 else if ( x > 1.0 ) then this % m_specular = 1.0 else this % m_specular = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surf_get_transparency ( this ) result ( x ) !! Gets a factor defining the transparency of plotted surfaces. class ( surface_plot ), intent ( in ) :: this !! The surface_plot object. real ( real32 ) :: x !! A value existing on the set (0 1] defining the level of !! transparency. A value of 1 indicates a fully opaque surface. x = this % m_transparency end function ! -------------------- subroutine surf_set_transparency ( this , x ) !! Sets a factor defining the transparency of plotted surfaces. class ( surface_plot ), intent ( inout ) :: this !! The surface_plot object. real ( real32 ), intent ( in ) :: x !! A value existing on the set (0 1] defining the level of !! transparency. A value of 1 indicates a fully opaque surface. !! Any values supplied outside of the set are clipped to fit within !! (0 1]. if ( x > 1.0 ) then this % m_transparency = 1.0 else if ( x <= 0.0 ) then this % m_transparency = 0.1 else this % m_transparency = x end if end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_surface_plot.f90.html"},{"title":"fplot_surface_plot_data.f90 – FPLOT","text":"Contents Modules fplot_surface_plot_data Source Code fplot_surface_plot_data.f90 Source Code module fplot_surface_plot_data use iso_fortran_env use fplot_plot_data use ferror use fplot_errors use strings implicit none private public :: surface_plot_data type , extends ( plot_data ) :: surface_plot_data !! Provides a three-dimensional surface plot data set. real ( real64 ), private , allocatable , dimension (:,:) :: m_x !! Stores the x-coordinate data real ( real64 ), private , allocatable , dimension (:,:) :: m_y !! Stores the y-coordinate data real ( real64 ), private , allocatable , dimension (:,:) :: m_z !! Stores the z-coordinate data logical , private :: m_wireframe = . false . !! Set to true to display a wireframe of the surface; else, just a !! smooth surface will be drawn contains procedure , public :: get_size => surfd_get_size procedure , public :: get_x => surfd_get_x procedure , public :: set_x => surfd_set_x procedure , public :: get_y => surfd_get_y procedure , public :: set_y => surfd_set_y procedure , public :: get_z => surfd_get_z procedure , public :: set_z => surfd_set_z procedure , public :: get_use_wireframe => surfd_get_wireframe procedure , public :: set_use_wireframe => surfd_set_wireframe procedure , public :: get_command_string => surfd_get_cmd procedure , public :: get_data_string => surfd_get_data_cmd procedure , public :: define_data => surfd_set_data_1 end type contains ! ------------------------------------------------------------------------------ pure function surfd_get_size ( this , dim ) result ( x ) !! Gets the size of the stored data set. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: dim !! The dimension of interest. Notice, data is stored as a !! 2D matrix (i.e. only 1 and 2 are valid inputs). integer ( int32 ) :: x !! The size of the requested dimension. if ( allocated ( this % m_x )) then x = size ( this % m_x , dim ) else x = 0 end if end function ! ------------------------------------------------------------------------------ pure function surfd_get_x ( this , i , j ) result ( x ) !! Gets the requested X data point. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ) :: x !! The value. if ( allocated ( this % m_x )) then x = this % m_x ( i , j ) else x = 0.0d0 end if end function ! -------------------- subroutine surfd_set_x ( this , i , j , x ) !! Sets the requested X data point. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ), intent ( in ) :: x !! The value. if ( allocated ( this % m_x )) then this % m_x ( i , j ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surfd_get_y ( this , i , j ) result ( x ) !! Gets the requested Y data point. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ) :: x !! The value. if ( allocated ( this % m_y )) then x = this % m_y ( i , j ) else x = 0.0d0 end if end function ! -------------------- subroutine surfd_set_y ( this , i , j , x ) !! Sets the requested Y data point. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ), intent ( in ) :: x !! The value. if ( allocated ( this % m_y )) then this % m_y ( i , j ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surfd_get_z ( this , i , j ) result ( x ) !! Gets the requested Z data point. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ) :: x !! The value. if ( allocated ( this % m_z )) then x = this % m_z ( i , j ) else x = 0.0d0 end if end function ! -------------------- subroutine surfd_set_z ( this , i , j , x ) !! Sets the requested Z data point. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. integer ( int32 ), intent ( in ) :: i !! The row index. integer ( int32 ), intent ( in ) :: j !! The column index. real ( real64 ), intent ( in ) :: x !! The value. if ( allocated ( this % m_z )) then this % m_z ( i , j ) = x end if end subroutine ! ------------------------------------------------------------------------------ pure function surfd_get_wireframe ( this ) result ( x ) !! Gets a value determining if a wireframe mesh should be displayed. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. logical :: x !! Returns true if a wireframe mesh should be displayed; else, !! false to display a solid surface. x = this % m_wireframe end function ! -------------------- subroutine surfd_set_wireframe ( this , x ) !! Sets a value determining if a wireframe mesh should be displayed. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. logical , intent ( in ) :: x !! Set to true if a wireframe mesh should be displayed; else, !! false to display a solid surface. this % m_wireframe = x end subroutine ! ------------------------------------------------------------------------------ function surfd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this surface_plot_data !! object. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! PM3D or wireframe? if ( this % get_use_wireframe ()) then call str % append ( \" with lines\" ) else call str % append ( \" with pm3d\" ) end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function surfd_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data to plot. class ( surface_plot_data ), intent ( in ) :: this !! The suface_plot_data object. character ( len = :), allocatable :: x !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , m , n character :: delimiter , nl ! Initialization call str % initialize () m = this % get_size ( 1 ) n = this % get_size ( 2 ) delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) ! Process do j = 1 , n do i = 1 , m call str % append ( to_string ( this % get_x ( i , j ))) call str % append ( delimiter ) call str % append ( to_string ( this % get_y ( i , j ))) call str % append ( delimiter ) call str % append ( to_string ( this % get_z ( i , j ))) call str % append ( nl ) end do if ( j /= n ) call str % append ( nl ) end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine surfd_set_data_1 ( this , x , y , z , err ) !! Defines the data set. class ( surface_plot_data ), intent ( inout ) :: this !! The suface_plot_data object. real ( real64 ), intent ( in ), dimension (:,:) :: x !! An M-by-N matrix containing the x-coordinate data. real ( real64 ), intent ( in ), dimension (:,:) :: y !! An M-by-N matrix containing the y-coordinate data. real ( real64 ), intent ( in ), dimension (:,:) :: z !! An M-by-N matrix containing the z-coordinate data. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , j , m , n , flag class ( errors ), pointer :: errmgr type ( errors ), target :: deferr ! Initialization m = size ( x , 1 ) n = size ( x , 2 ) if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Check if ( size ( y , 1 ) /= m . or . size ( y , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"surfd_set_data_1\" , & \"y\" , m , n , size ( y , 1 ), size ( y , 2 )) return end if if ( size ( z , 1 ) /= m . or . size ( z , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"surfd_set_data_1\" , & \"z\" , m , n , size ( z , 1 ), size ( z , 2 )) return end if ! Process if ( allocated ( this % m_x )) deallocate ( this % m_x ) if ( allocated ( this % m_y )) deallocate ( this % m_y ) if ( allocated ( this % m_z )) deallocate ( this % m_z ) allocate ( this % m_x ( m , n ), stat = flag ) if ( flag == 0 ) allocate ( this % m_y ( m , n ), stat = flag ) if ( flag == 0 ) allocate ( this % m_z ( m , n ), stat = flag ) if ( flag /= 0 ) then call report_memory_error ( errmgr , \"surfd_set_data_1\" , flag ) return end if do concurrent ( j = 1 : n ) do i = 1 , m this % m_x ( i , j ) = x ( i , j ) this % m_y ( i , j ) = y ( i , j ) this % m_z ( i , j ) = z ( i , j ) end do end do end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_surface_plot_data.f90.html"},{"title":"fplot_terminal.f90 – FPLOT","text":"Contents Modules fplot_terminal Source Code fplot_terminal.f90 Source Code ! fplot_terminal.f90 module fplot_terminal use iso_fortran_env use fplot_plot_object use fplot_constants use strings implicit none private public :: terminal public :: term_get_string_result type , abstract , extends ( plot_object ) :: terminal !! A GNUPLOT terminal object. private integer ( int32 ) :: m_windowHeight = GNUPLOT_DEFAULT_WINDOW_HEIGHT !! The window height, in pixels. integer ( int32 ) :: m_windowWidth = GNUPLOT_DEFAULT_WINDOW_WIDTH !! The window width, in pixels. integer ( int32 ) :: m_termID = 0 !! The terminal ID number. character ( len = GNUPLOT_MAX_LABEL_LENGTH ) :: m_title = \"\" !! The plot window title. logical :: m_hasTitle = . false . !! Determines if the plot title is defined. character ( len = GNUPLOT_MAX_LABEL_LENGTH ) :: m_fontName = & GNUPLOT_DEFAULT_FONTNAME !! The font used by the graph. integer ( int32 ) :: m_fontSize = GNUPLOT_DEFAULT_FONT_SIZE !! The size of the font used by the graph. contains procedure , public :: get_window_width => term_get_window_width procedure , public :: set_window_width => term_set_window_width procedure , public :: get_window_height => term_get_window_height procedure , public :: set_window_height => term_set_window_height procedure , public :: get_command_string => term_get_command_string procedure , public :: get_plot_window_number => & term_get_plot_window_number procedure , public :: set_plot_window_number => & term_set_plot_window_number procedure , public :: get_title => term_get_title procedure , public :: set_title => term_set_title procedure , public :: get_font_name => term_get_font_name procedure , public :: set_font_name => term_set_font_name procedure , public :: get_font_size => term_get_font_size procedure , public :: set_font_size => term_set_font_size procedure ( term_get_string_result ), deferred , public :: get_id_string end type interface function term_get_string_result ( this ) result ( x ) !! Retrieves a string from a terminal. import terminal class ( terminal ), intent ( in ) :: this !! The terminal object. character ( len = :), allocatable :: x !! The string. end function end interface contains ! ------------------------------------------------------------------------------ pure function term_get_window_width ( this ) result ( x ) !! Gets the width of the plot window. class ( terminal ), intent ( in ) :: this !! The terminal object. integer :: x !! The width of the plot window. x = this % m_windowWidth end function ! -------------------- subroutine term_set_window_width ( this , x ) !! Sets the width of the plot window. class ( terminal ), intent ( inout ) :: this !! The terminal object. integer , intent ( in ) :: x !! The width of the plot window. if ( x == 0 ) then this % m_windowWidth = GNUPLOT_DEFAULT_WINDOW_WIDTH else this % m_windowWidth = abs ( x ) end if end subroutine ! ------------------------------------------------------------------------------ pure function term_get_window_height ( this ) result ( x ) !! Gets the height of the plot window. class ( terminal ), intent ( in ) :: this !! The terminal object. integer :: x !! The height of the plot window. x = this % m_windowHeight end function ! -------------------- subroutine term_set_window_height ( this , x ) !! Sets the height of the plot window. class ( terminal ), intent ( inout ) :: this !! The terminal object. integer , intent ( in ) :: x !! The height of the plot window. if ( x == 0 ) then this % m_windowHeight = GNUPLOT_DEFAULT_WINDOW_HEIGHT else this % m_windowHeight = abs ( x ) end if end subroutine ! ------------------------------------------------------------------------------ pure function term_get_plot_window_number ( this ) result ( x ) !! Gets the targeted plot window number. class ( terminal ), intent ( in ) :: this !! The terminal object. integer ( int32 ) :: x !! The plot window number. x = this % m_termID end function ! -------------------- subroutine term_set_plot_window_number ( this , x ) !! Sets the targeted plot window number. class ( terminal ), intent ( inout ) :: this !! The terminal object. integer ( int32 ), intent ( in ) :: x !! The plot window number. this % m_termID = x end subroutine ! ------------------------------------------------------------------------------ function term_get_title ( this ) result ( str ) !! Gets the plot window's title. class ( terminal ), intent ( in ) :: this !! The terminal object. character ( len = :), allocatable :: str !! The title. integer ( int32 ) :: n n = len_trim ( str ) allocate ( character ( len = n ) :: str ) str = trim ( this % m_title ) end function ! -------------------- subroutine term_set_title ( this , txt ) !! Sets the plot window's title. class ( terminal ), intent ( inout ) :: this !! The terminal object. character ( len = * ), intent ( in ) :: txt !! The title. integer ( int32 ) :: n n = min ( len_trim ( txt ), GNUPLOT_MAX_LABEL_LENGTH ) this % m_title = \"\" if ( n /= 0 ) then this % m_title ( 1 : n ) = txt ( 1 : n ) this % m_hasTitle = . true . else this % m_hasTitle = . false . end if end subroutine ! ------------------------------------------------------------------------------ function term_get_font_name ( this ) result ( name ) !! Gets the name of the font used for text displayed by the graph. class ( terminal ), intent ( in ) :: this !! The terminal object. character ( len = :), allocatable :: name !! The font name. integer ( int32 ) :: n n = len_trim ( this % m_fontName ) allocate ( character ( len = n ) :: name ) name = trim ( this % m_fontName ) end function ! -------------------- subroutine term_set_font_name ( this , name ) !! Sets the name of the font used for text displayed by the graph. class ( terminal ), intent ( inout ) :: this !! The terminal object. character ( len = * ), intent ( in ) :: name !! The font name. integer ( int32 ) :: n n = min ( len_trim ( name ), GNUPLOT_MAX_LABEL_LENGTH ) this % m_fontName = \"\" if ( n == 0 ) then this % m_fontName = GNUPLOT_DEFAULT_FONTNAME else this % m_fontName ( 1 : n ) = name ( 1 : n ) end if end subroutine ! ------------------------------------------------------------------------------ pure function term_get_font_size ( this ) result ( sz ) !! Gets the size of the font used by the graph. class ( terminal ), intent ( in ) :: this !! The terminal object. integer ( int32 ) :: sz !! The font size, in points. sz = this % m_fontSize end function ! -------------------- subroutine term_set_font_size ( this , sz ) !! Sets the size of the font used by the graph. class ( terminal ), intent ( inout ) :: this !! The terminal object. integer ( int32 ), intent ( in ) :: sz !! The font size, in points. if ( sz == 0 ) then this % m_fontSize = GNUPLOT_DEFAULT_FONT_SIZE else this % m_fontSize = abs ( sz ) end if end subroutine ! ------------------------------------------------------------------------------ function term_get_command_string ( this ) result ( x ) !! Returns the appropriate GNUPLOT command string to establish !! appropriate parameters. class ( terminal ), intent ( in ) :: this !! The terminal object. character ( len = :), allocatable :: x !! The GNUPLOT command string. ! Local Variables type ( string_builder ) :: str ! Process call str % initialize () call str % append ( \"set term \" ) call str % append ( this % get_id_string ()) call str % append ( \" enhanced \" ) call str % append ( to_string ( this % get_plot_window_number ())) call str % append ( \" font \" ) call str % append ( '\"' ) call str % append ( this % get_font_name ()) call str % append ( ',' ) call str % append ( to_string ( this % get_font_size ())) call str % append ( '\"' ) call str % append ( \" size \" ) call str % append ( to_string ( this % get_window_width ())) call str % append ( \",\" ) call str % append ( to_string ( this % get_window_height ())) if ( this % m_hasTitle ) then call str % append ( ' title \"' ) call str % append ( this % get_title ()) call str % append ( '\"' ) end if x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_terminal.f90.html"},{"title":"fplot_triangulations_delaunay_2d.f90 – FPLOT","text":"Contents Modules fplot_triangulations_delaunay_2d Source Code fplot_triangulations_delaunay_2d.f90 Source Code module fplot_triangulations_delaunay_2d use iso_fortran_env use geompack use ferror use fplot_errors implicit none private public :: delaunay_tri_2d type delaunay_tri_2d !! Provides a container for a 2D Delaunay triangulation. real ( real64 ), private , allocatable , dimension (:) :: m_x !! An array of the x-coordinates of each point. real ( real64 ), private , allocatable , dimension (:) :: m_y !! An array of the y-coordinates of each point. integer ( int32 ), private , allocatable , dimension (:,:) :: m_indices !! A 3-column matrix containing the indices of each triangle's !! vertex. contains procedure , public :: create => d2d_init procedure , public :: get_point_count => d2d_get_pt_count procedure , public :: get_triangle_count => d2d_get_tri_count procedure , public :: get_points_x => d2d_get_x_pts procedure , public :: get_points_y => d2d_get_y_pts procedure , public :: get_indices => d2d_get_tris procedure , public :: find_triangle => d2d_get_tri_with_pt end type contains ! ------------------------------------------------------------------------------ subroutine d2d_init ( this , x , y , err ) !! Creates an unconstrained 2D Delaunay triangulation given a !! set of x-y points. class ( delaunay_tri_2d ), intent ( inout ) :: this !! The delaunay_tri_2d object. real ( real64 ), intent ( in ), dimension (:) :: x !! An N-element array containing the x-coordinates of each !! data point. real ( real64 ), intent ( in ), dimension (:) :: y !! An N-element array containing the y-coordinates of each !! data point. class ( errors ), intent ( inout ), target , optional :: err !! An error handling object. ! Local Variables class ( errors ), pointer :: errmgr type ( errors ), target :: deferr integer ( int32 ) :: i , npts , ntri , flag real ( real64 ), allocatable , dimension (:,:) :: nodexy integer ( int32 ), allocatable , dimension (:,:) :: trinode , trinbr ! Initialization if ( present ( err )) then errmgr => err else errmgr => deferr end if npts = size ( x ) ! Input Check if ( size ( y ) /= npts ) then call report_array_size_mismatch_error ( errmgr , \"d2d_init\" , \"y\" , & npts , size ( y )) return end if ! Clean up incase of an existing triangulation if ( allocated ( this % m_x )) deallocate ( this % m_x ) if ( allocated ( this % m_y )) deallocate ( this % m_y ) if ( allocated ( this % m_indices )) deallocate ( this % m_indices ) ! Allocate workspace arrays for the triangulation allocate ( nodexy ( 2 , npts ), stat = flag ) if ( flag == 0 ) allocate ( trinode ( 3 , 2 * npts ), stat = flag ) if ( flag == 0 ) allocate ( trinbr ( 3 , 2 * npts ), stat = flag ) if ( flag /= 0 ) go to 100 ! Generate the points list do i = 1 , npts nodexy ( 1 , i ) = x ( i ) nodexy ( 2 , i ) = y ( i ) end do ! Compute the triangulation call r8tris2 ( npts , nodexy , ntri , trinode , trinbr ) ! Populate the remainder of the object allocate ( this % m_x ( npts ), stat = flag ) if ( flag == 0 ) allocate ( this % m_y ( npts ), stat = flag ) if ( flag == 0 ) allocate ( this % m_indices ( ntri , 3 ), stat = flag ) do i = 1 , npts this % m_x ( i ) = nodexy ( 1 , i ) this % m_y ( i ) = nodexy ( 2 , i ) end do do i = 1 , ntri this % m_indices ( i ,:) = trinode (:, i ) end do ! End return ! Memory Error Handler 100 continue call report_memory_error ( errmgr , \"d2d_init\" , flag ) return end subroutine ! ------------------------------------------------------------------------------ pure function d2d_get_pt_count ( this ) result ( rst ) !! Gets the number of points in the triangulation. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. integer ( int32 ) :: rst !! The number of points in the triangulation. if ( allocated ( this % m_x )) then rst = size ( this % m_x ) else rst = 0 end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_tri_count ( this ) result ( rst ) !! Gets the number of triangles in the triangulation. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. integer ( int32 ) :: rst !! The number of triangles in the triangulation. if ( allocated ( this % m_indices )) then rst = size ( this % m_indices , 1 ) else rst = 0 end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_x_pts ( this ) result ( rst ) !! Gets the x-coordinates of each point. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. real ( real64 ), allocatable , dimension (:) :: rst !! An array of the x-coordinates of each point. if ( allocated ( this % m_x )) then rst = this % m_x else allocate ( rst ( 0 )) end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_y_pts ( this ) result ( rst ) !! Gets the y-coordinates of each point. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. real ( real64 ), allocatable , dimension (:) :: rst !! An array of the y-coordinates of each point. if ( allocated ( this % m_y )) then rst = this % m_y else allocate ( rst ( 0 )) end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_tris ( this ) result ( rst ) !! Gets a list of the indices of each triangle vertex. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. integer ( int32 ), allocatable , dimension (:,:) :: rst !! An N-by-3 matrix with each column containing the index of the !! vertex of each triangle where N is the number of triangles. if ( allocated ( this % m_indices )) then rst = this % m_indices else allocate ( rst ( 0 , 0 )) end if end function ! ------------------------------------------------------------------------------ pure function d2d_get_tri_with_pt ( this , x , y ) result ( rst ) !! Finds the triangle that contains the specified point. class ( delaunay_tri_2d ), intent ( in ) :: this !! The delaunay_tri_2d object. real ( real64 ), intent ( in ) :: x !! The x-coordinate of the point. real ( real64 ), intent ( in ) :: y !! The y-coordinate of the point. integer ( int32 ) :: rst !! Returns the index of the triangle containing the specified !! point. If no triangle contains the specified point, a value of !! -1 is returned. ! Local Variables integer ( int32 ) :: i , j real ( real64 ) :: x1 , y1 , x2 , y2 , x3 , y3 logical :: check ! Initialization rst = - 1 ! Process do i = 1 , this % get_triangle_count () j = this % m_indices ( i , 1 ) x1 = this % m_x ( j ) y1 = this % m_y ( j ) j = this % m_indices ( i , 2 ) x2 = this % m_x ( j ) y2 = this % m_y ( j ) j = this % m_indices ( i , 3 ) x3 = this % m_x ( j ) y3 = this % m_y ( j ) check = point_inside_triangle ( x1 , y1 , x2 , y2 , x3 , y3 , x , y ) if ( check ) then rst = i end if end do end function ! ------------------------------------------------------------------------------ ! Determine if a point lies within a triangle. ! https://stackoverflow.com/questions/2049582/how-to-determine-if-a-point-is-in-a-2d-triangle ! https://en.wikipedia.org/wiki/Barycentric_coordinate_system pure elemental function point_inside_triangle ( x1 , y1 , x2 , y2 , x3 , y3 , & x , y ) result ( rst ) ! Arguments real ( real64 ), intent ( in ) :: x1 , y1 , x2 , y2 , x3 , y3 , x , y logical :: rst ! Local Variables real ( real64 ) :: lambda1 , lambda2 , dT ! Initialization dT = ( y2 - y3 ) * ( x1 - x3 ) + ( x3 - x2 ) * ( y1 - y3 ) lambda1 = (( y2 - y3 ) * ( x - x3 ) + ( x3 - x2 ) * ( y - y3 )) / dT lambda2 = (( y3 - y1 ) * ( x - x3 ) + ( x1 - x3 ) * ( y - y3 )) / dT ! The point is within the triangle if: ! 0 <= lambda1 <= 1 ! 0 <= lambda2 <= 1 ! 0 <= lambda1 + lambda2 <= 1 rst = ( lambda1 <= 1.0d0 . and . lambda1 >= 0.0d0 ) . and . & ( lambda2 <= 1.0d0 . and . lambda2 >= 0.0d0 ) . and . & ( lambda1 + lambda2 >= 0.0d0 . and . lambda1 + lambda2 <= 1.0d0 ) end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_triangulations_delaunay_2d.f90.html"},{"title":"fplot_tri_surface_plot_data.f90 – FPLOT","text":"Contents Modules fplot_tri_surface_plot_data Source Code fplot_tri_surface_plot_data.f90 Source Code ! fplot_tri_surface_plot_data.f90 module fplot_tri_surface_plot_data use iso_fortran_env use fplot_plot_data use fplot_delaunay_tri_surface use strings implicit none private public :: tri_surface_plot_data type , extends ( plot_data ) :: tri_surface_plot_data !! Provides a three-dimensional surface plot data set constructed of !! triangulated points. real ( real64 ), private , allocatable , dimension (:) :: m_x !! An array of the x-coordinates of each point. real ( real64 ), private , allocatable , dimension (:) :: m_y !! An array of the y-coordinates of each point. real ( real64 ), private , allocatable , dimension (:) :: m_z !! An array of the z-coordinates of each point. integer ( int32 ), private , allocatable , dimension (:,:) :: m_indices !! A 3-column matrix containing the indices of each triangle's !! vertex. logical , private :: m_wireframe = . true . !! Determines if the surface should be drawn as a wireframe. contains procedure , public :: get_data_string => tspd_get_data_cmd procedure , public :: get_command_string => tspd_get_cmd procedure , public :: get_use_wireframe => tspd_get_wireframe procedure , public :: set_use_wireframe => tspd_set_wireframe procedure , public :: define_data => tspd_define_data end type contains ! ------------------------------------------------------------------------------ function tspd_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for representing the data. class ( tri_surface_plot_data ), intent ( in ) :: this !! The tri_surface_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , n character :: delimiter , nl ! Initialization call str % initialize () n = size ( this % m_indices , 1 ) delimiter = achar ( 9 ) nl = new_line ( nl ) ! Process ! https://stackoverflow.com/questions/42784369/drawing-triangular-mesh-using-gnuplot ! http://www.gnuplot.info/faq/faq.html#x1-530005.10 do i = 1 , n ! Line 1-2 ! Vertex 1 j = this % m_indices ( i , 1 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Vertex 2 j = this % m_indices ( i , 2 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Line 2-3 ! Vertex 2 call str % append ( nl ) j = this % m_indices ( i , 2 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Vertex 3 j = this % m_indices ( i , 3 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Line 3-1 ! Vertex 3 call str % append ( nl ) j = this % m_indices ( i , 3 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Vertex 1 j = this % m_indices ( i , 1 ) call str % append ( to_string ( this % m_x ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_y ( j ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_z ( j ))) call str % append ( nl ) ! Add in the two blank lines if ( i /= n ) then call str % append ( nl ) call str % append ( nl ) end if end do ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function tspd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string for the object. class ( tri_surface_plot_data ), intent ( in ) :: this !! The tri_surface_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! PM3D or wireframe? if ( this % get_use_wireframe ()) then call str % append ( \" with lines\" ) else call str % append ( \" with pm3d\" ) end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ pure function tspd_get_wireframe ( this ) result ( rst ) !! Gets a value determining if a wireframe mesh should be displayed. class ( tri_surface_plot_data ), intent ( in ) :: this !! The tri_surface_plot_data object. logical :: rst !! Returns true if the plot is to be drawn as a wireframe; else, !! false to draw as a surface. rst = this % m_wireframe end function ! ------------------------------------------------------------------------------ subroutine tspd_set_wireframe ( this , x ) !! Sets a value determining if a wireframe mesh should be displayed. class ( tri_surface_plot_data ), intent ( inout ) :: this !! The tri_surface_plot_data object. logical , intent ( in ) :: x !! Set to true if the plot is to be drawn as a wireframe; else, !! false to draw as a surface. this % m_wireframe = x end subroutine ! ------------------------------------------------------------------------------ subroutine tspd_define_data ( this , tri ) !! Defines the data to plot. class ( tri_surface_plot_data ), intent ( inout ) :: this !! The tri_surface_plot_data object. class ( delaunay_tri_surface ), intent ( in ) :: tri !! The triangulation to plot. ! Process if ( allocated ( this % m_x )) deallocate ( this % m_x ) if ( allocated ( this % m_y )) deallocate ( this % m_y ) if ( allocated ( this % m_z )) deallocate ( this % m_z ) if ( allocated ( this % m_indices )) deallocate ( this % m_indices ) this % m_x = tri % get_points_x () this % m_y = tri % get_points_y () this % m_z = tri % get_points_z () this % m_indices = tri % get_indices () end subroutine ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_tri_surface_plot_data.f90.html"},{"title":"fplot_vector_field_plot_data.f90 – FPLOT","text":"Contents Modules fplot_vector_field_plot_data Source Code fplot_vector_field_plot_data.f90 Source Code ! fplot_vector_field_plot_data.f90 ! REF: ! http://www.gnuplotting.org/vector-field-from-data-file/ ! http://gnuplot.sourceforge.net/demo_5.4/vector.html ! http://www.gnuplot.info/docs_5.4/Gnuplot_5_4.pdf (pg 79) module fplot_vector_field_plot_data use iso_fortran_env use fplot_plot_data use fplot_errors use fplot_colors use ferror use strings implicit none private public :: vector_field_plot_data type , extends ( plot_data_colored ) :: vector_field_plot_data !! Defines a two-dimensional vector-field plot data set. real ( real64 ), private , allocatable , dimension (:,:,:) :: m_data !! An M-by-N-by-4 array containing the x, y, dx, and dy plot !! data points. Optionally, a 5th page can be added to define the !! color for each arrow. real ( real64 ), private :: m_arrowSize = 1.0d0 !! The vector size (scaling factor). logical , private :: m_filledHeads = . false . !! Fill the arrow heads? contains procedure , public :: get_data_string => vfpd_get_data_cmd procedure , public :: get_command_string => vfpd_get_cmd procedure , public :: define_data => vfpd_define_data procedure , public :: get_arrow_size => vfpd_get_arrow_size procedure , public :: set_arrow_size => vfpd_set_arrow_size procedure , public :: get_fill_arrow => vfpd_get_fill_arrow procedure , public :: set_fill_arrow => vfpd_set_fill_arrow procedure , public :: get_use_data_dependent_colors => & vfpd_get_use_data_dependent_colors end type contains ! ------------------------------------------------------------------------------ function vfpd_get_data_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string containing the actual data to plot. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: i , j , m , n character :: delimiter , nl real ( real64 ) :: scaling ! Initialization call str % initialize () delimiter = achar ( 9 ) ! tab delimiter nl = new_line ( nl ) scaling = this % get_arrow_size () ! Fix later m = size ( this % m_data , 1 ) n = size ( this % m_data , 2 ) ! Need a quick return in the event no data exists ! Process if ( this % get_use_data_dependent_colors ()) then do j = 1 , n do i = 1 , m ! ORDER: X, Y, DX, DY call str % append ( to_string ( this % m_data ( i , j , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , j , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( scaling * this % m_data ( i , j , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( scaling * this % m_data ( i , j , 4 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , j , 5 ))) call str % append ( nl ) end do end do else do j = 1 , n do i = 1 , m ! ORDER: X, Y, DX, DY call str % append ( to_string ( this % m_data ( i , j , 1 ))) call str % append ( delimiter ) call str % append ( to_string ( this % m_data ( i , j , 2 ))) call str % append ( delimiter ) call str % append ( to_string ( scaling * this % m_data ( i , j , 3 ))) call str % append ( delimiter ) call str % append ( to_string ( scaling * this % m_data ( i , j , 4 ))) call str % append ( nl ) end do end do end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ function vfpd_get_cmd ( this ) result ( x ) !! Gets the GNUPLOT command string to represent this !! vector_field_plot_data object. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. character ( len = :), allocatable :: x !! The command string. ! Local Variables type ( string_builder ) :: str integer ( int32 ) :: n type ( color ) :: clr ! Initialization call str % initialize () ! Title n = len_trim ( this % get_name ()) if ( n > 0 ) then call str % append ( ' \"-\" title \"' ) call str % append ( this % get_name ()) call str % append ( '\"' ) else call str % append ( ' \"-\" notitle' ) end if ! Property Definition call str % append ( \" with vectors\" ) if ( this % get_fill_arrow ()) then call str % append ( \" filled head\" ) end if if ( this % get_use_data_dependent_colors ()) then call str % append ( \" lc palette\" ) else clr = this % get_line_color () call str % append ( ' lc rgb \"#' ) call str % append ( clr % to_hex_string ()) call str % append ( '\"' ) end if ! End x = char ( str % to_string ()) end function ! ------------------------------------------------------------------------------ subroutine vfpd_define_data ( this , x , y , dx , dy , c , err ) !! Defines the data set. class ( vector_field_plot_data ), intent ( inout ) :: this !! The vector_field_plot_data object. real ( real64 ), intent ( in ), dimension (:,:) :: x !! An M-by-N matrix containing the x-locations of each arrow's !! origin. real ( real64 ), intent ( in ), dimension (:,:) :: y !! An M-by-N matrix containing the y-locations of each arrow's !! origin. real ( real64 ), intent ( in ), dimension (:,:) :: dx !! An M-by-N matrix containing the x-direction of each arrow. real ( real64 ), intent ( in ), dimension (:,:) :: dy !! An M-by-N matrix containing the y-direction of each arrow. real ( real64 ), intent ( in ), dimension (:,:), optional :: c !! An optional M-by-N matrix containing information on how to color !! the arrows. The colors are determined by the active colormap. class ( errors ), intent ( inout ), optional , target :: err !! An error handling object. ! Local Variables integer ( int32 ) :: i , j , m , n , flag type ( errors ), target :: deferr class ( errors ), pointer :: errmgr character ( len = 256 ) :: errmsg ! Set up error handling if ( present ( err )) then errmgr => err else errmgr => deferr end if ! Input Checking m = size ( x , 1 ) n = size ( x , 2 ) if ( size ( y , 1 ) /= m . or . size ( y , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"vfpd_define_data\" , & \"y\" , m , n , size ( y , 1 ), size ( y , 2 )) return end if if ( size ( dx , 1 ) /= m . or . size ( dx , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"vfpd_define_data\" , & \"dx\" , m , n , size ( dx , 1 ), size ( dx , 2 )) return end if if ( size ( dy , 1 ) /= m . or . size ( dy , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , \"vfpd_define_data\" , & \"dy\" , m , n , size ( dy , 1 ), size ( dy , 2 )) return end if if ( present ( c )) then if ( size ( c , 1 ) /= m . or . size ( c , 2 ) /= n ) then call report_matrix_size_mismatch_error ( errmgr , & \"vfpd_define_data\" , \"c\" , m , n , size ( c , 1 ), size ( c , 2 )) return end if end if ! Allocate space for the data if ( allocated ( this % m_data )) deallocate ( this % m_data ) if ( present ( c )) then allocate ( this % m_data ( m , n , 5 ), stat = flag ) else allocate ( this % m_data ( m , n , 4 ), stat = flag ) end if if ( flag /= 0 ) then call report_memory_error ( errmgr , \"vfpd_define_data\" , flag ) return end if ! Store the data if ( present ( c )) then do concurrent ( j = 1 : n ) do i = 1 , m this % m_data ( i , j , 1 ) = x ( i , j ) this % m_data ( i , j , 2 ) = y ( i , j ) this % m_data ( i , j , 3 ) = dx ( i , j ) this % m_data ( i , j , 4 ) = dy ( i , j ) this % m_data ( i , j , 5 ) = c ( i , j ) end do end do else do concurrent ( j = 1 : n ) do i = 1 , m this % m_data ( i , j , 1 ) = x ( i , j ) this % m_data ( i , j , 2 ) = y ( i , j ) this % m_data ( i , j , 3 ) = dx ( i , j ) this % m_data ( i , j , 4 ) = dy ( i , j ) end do end do end if ! End return end subroutine ! ------------------------------------------------------------------------------ pure function vfpd_get_arrow_size ( this ) result ( rst ) !! Gets the scaling factor used to determine the arrow size. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. real ( real64 ) :: rst !! The scaling factor. rst = this % m_arrowSize end function ! -------------------- subroutine vfpd_set_arrow_size ( this , x ) !! Sets the scaling factor used to determine the arrow size. class ( vector_field_plot_data ), intent ( inout ) :: this !! The vector_field_plot_data object. real ( real64 ), intent ( in ) :: x !! The scaling factor. this % m_arrowSize = x end subroutine ! ------------------------------------------------------------------------------ pure function vfpd_get_fill_arrow ( this ) result ( rst ) !! Gets a value determining if the arrow heads should be filled. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. logical :: rst !! True if the arrow heads should be filled; else, false. rst = this % m_filledHeads end function ! -------------------- subroutine vfpd_set_fill_arrow ( this , x ) !! Sets a value determining if the arrow heads should be filled. class ( vector_field_plot_data ), intent ( inout ) :: this !! The vector_field_plot_data object. logical , intent ( in ) :: x !! True if the arrow heads should be filled; else, false. this % m_filledHeads = x end subroutine ! ------------------------------------------------------------------------------ pure function vfpd_get_use_data_dependent_colors ( this ) result ( rst ) !! Gets a value indicating if data-dependent coloring should be !! used. This is defined by supplying information on how to scale the !! coloring when calling define_data. class ( vector_field_plot_data ), intent ( in ) :: this !! The vector_field_plot_data object. logical :: rst !! Returns true if data-dependent coloring is being used; else, !! false. rst = . false . if (. not . allocated ( this % m_data )) return rst = size ( this % m_data , 3 ) >= 5 end function ! ------------------------------------------------------------------------------ end module","tags":"","loc":"sourcefile\\fplot_vector_field_plot_data.f90.html"},{"title":"fplot_windows_terminal.f90 – FPLOT","text":"Contents Modules fplot_windows_terminal Source Code fplot_windows_terminal.f90 Source Code ! fplot_windows_terminal.f90 module fplot_windows_terminal use iso_fortran_env use fplot_terminal implicit none private public :: windows_terminal type , extends ( terminal ) :: windows_terminal !! A Windows-specific terminal. character ( len = 3 ), private :: m_id = \"win\" !! The terminal ID string contains procedure , public :: get_id_string => wt_get_term_string end type contains function wt_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( windows_terminal ), intent ( in ) :: this !! The windows_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function end module","tags":"","loc":"sourcefile\\fplot_windows_terminal.f90.html"},{"title":"fplot_wxt_terminal.f90 – FPLOT","text":"Contents Modules fplot_wxt_terminal Source Code fplot_wxt_terminal.f90 Source Code ! fplot_wxt_terminal.f90 module fplot_wxt_terminal use iso_fortran_env use fplot_terminal implicit none private public :: wxt_terminal type , extends ( terminal ) :: wxt_terminal !! A WXT terminal. character ( len = 3 ), private :: m_id = \"wxt\" !! The terminal ID string contains procedure , public :: get_id_string => wxt_get_term_string end type contains function wxt_get_term_string ( this ) result ( x ) !! Retrieves a GNUPLOT terminal identifier string. class ( wxt_terminal ), intent ( in ) :: this !! The wxt_terminal object. character ( len = :), allocatable :: x !! The string. integer ( int32 ) :: n n = len_trim ( this % m_id ) allocate ( character ( len = n ) :: x ) x = this % m_id end function end module","tags":"","loc":"sourcefile\\fplot_wxt_terminal.f90.html"}]} \ No newline at end of file diff --git a/doc/type/color.html b/doc/type/color.html index bb2d9c8..08b3d07 100644 --- a/doc/type/color.html +++ b/doc/type/color.html @@ -96,7 +96,7 @@

    color
  • 8 statements + title="

    1.1% of total for derived types.

    Including implementation: 51 statements, 0.4% of total for derived types.">9 statements
  • @@ -133,6 +133,7 @@

    + alpha blue green red @@ -192,6 +193,7 @@

    + alpha blue green red @@ -246,6 +248,24 @@

    Components

    Initial + + + + integer(kind=int32), + + public + + + + :: + alpha + = + 0 + +

    The alpha component of the color (must be between 0 and 255). +Notice, 0 is fully opaque and 255 is fully transparent.

    + + @@ -407,7 +427,7 @@

    Arguments

    Return Value - character(len=6) + character(len=8)

    A string containing the hexadecimal equivalent.

    @@ -433,7 +453,7 @@

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/colormap.html b/doc/type/colormap.html index aba830c..279ace2 100644 --- a/doc/type/colormap.html +++ b/doc/type/colormap.html @@ -96,7 +96,7 @@

    colormap
  • 17 statements + title="

    2.2% of total for derived types.

    Including implementation: 100 statements, 0.8% of total for derived types.">17 statements
  • @@ -779,7 +779,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


  • diff --git a/doc/type/cool_colormap.html b/doc/type/cool_colormap.html index 149832c..c3c9fee 100644 --- a/doc/type/cool_colormap.html +++ b/doc/type/cool_colormap.html @@ -96,7 +96,7 @@

    cool_colormap
  • 4 statements + title="

    0.5% of total for derived types.

    Including implementation: 101 statements, 0.8% of total for derived types.">4 statements
  • @@ -779,7 +779,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/correlation_plot.html b/doc/type/correlation_plot.html new file mode 100644 index 0000000..f54c798 --- /dev/null +++ b/doc/type/correlation_plot.html @@ -0,0 +1,1134 @@ + + + + + + + + + + + correlation_plot – FPLOT + + + + + + + + + + + + + + + + + + + + +
    +
    +

    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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + 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

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(correlation_plot), + intent(inout) + + ::this +

      The correlation_plot object.

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

      The font size.

      +
      + + +
    • +
    +
    + +
    + + +
    +
    + +
    +
    +
    +
    +
    +

    FPLOT was developed by Jason Christopherson
    © 2025 +

    +
    +
    +

    + Documentation generated by + FORD + on 2025-04-10 13:38

    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/type/custom_colormap.html b/doc/type/custom_colormap.html index de1ed42..b0e39fc 100644 --- a/doc/type/custom_colormap.html +++ b/doc/type/custom_colormap.html @@ -96,7 +96,7 @@

    custom_colormap
  • 8 statements + title="

    1.0% of total for derived types.

    Including implementation: 147 statements, 1.2% of total for derived types.">8 statements
  • @@ -989,7 +989,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/delaunay_tri_2d.html b/doc/type/delaunay_tri_2d.html index 74ae775..b9456c3 100644 --- a/doc/type/delaunay_tri_2d.html +++ b/doc/type/delaunay_tri_2d.html @@ -96,7 +96,7 @@

    delaunay_tri_2d
  • 13 statements + title="

    1.7% of total for derived types.

    Including implementation: 130 statements, 1.1% of total for derived types.">13 statements
  • @@ -658,7 +658,7 @@

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/delaunay_tri_surface.html b/doc/type/delaunay_tri_surface.html index 082a622..3799a3b 100644 --- a/doc/type/delaunay_tri_surface.html +++ b/doc/type/delaunay_tri_surface.html @@ -96,7 +96,7 @@

    delaunay_tri_surface
  • 9 statements + title="

    1.1% of total for derived types.

    Including implementation: 298 statements, 2.5% of total for derived types.">9 statements
  • @@ -946,7 +946,7 @@

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/earth_colormap.html b/doc/type/earth_colormap.html index 8643afb..cb4f8e6 100644 --- a/doc/type/earth_colormap.html +++ b/doc/type/earth_colormap.html @@ -96,7 +96,7 @@

    earth_colormap
  • 4 statements + title="

    0.5% of total for derived types.

    Including implementation: 101 statements, 0.8% of total for derived types.">4 statements
  • @@ -779,7 +779,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/filled_plot_data.html b/doc/type/filled_plot_data.html index 0bd6eda..a5c76e8 100644 --- a/doc/type/filled_plot_data.html +++ b/doc/type/filled_plot_data.html @@ -96,7 +96,7 @@

    filled_plot_data
  • 11 statements + title="

    1.4% of total for derived types.

    Including implementation: 148 statements, 1.2% of total for derived types.">11 statements
  • @@ -939,7 +939,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/grey_colormap.html b/doc/type/grey_colormap.html index 49a676a..e9a05e9 100644 --- a/doc/type/grey_colormap.html +++ b/doc/type/grey_colormap.html @@ -96,7 +96,7 @@

    grey_colormap
  • 4 statements + title="

    0.5% of total for derived types.

    Including implementation: 101 statements, 0.8% of total for derived types.">4 statements
  • @@ -779,7 +779,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/hot_colormap.html b/doc/type/hot_colormap.html index ba83de9..37839ee 100644 --- a/doc/type/hot_colormap.html +++ b/doc/type/hot_colormap.html @@ -96,7 +96,7 @@

    hot_colormap
  • 4 statements + title="

    0.5% of total for derived types.

    Including implementation: 92 statements, 0.8% of total for derived types.">4 statements
  • @@ -779,7 +779,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/latex_terminal.html b/doc/type/latex_terminal.html index aeb790d..df0aec8 100644 --- a/doc/type/latex_terminal.html +++ b/doc/type/latex_terminal.html @@ -96,7 +96,7 @@

    latex_terminal
  • 9 statements + title="

    1.1% of total for derived types.

    Including implementation: 153 statements, 1.3% of total for derived types.">9 statements
  • @@ -1112,7 +1112,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/legend.html b/doc/type/legend.html index e9fb957..b542144 100644 --- a/doc/type/legend.html +++ b/doc/type/legend.html @@ -96,7 +96,7 @@

    legend
  • 25 statements + title="

    3.2% of total for derived types.

    Including implementation: 141 statements, 1.2% of total for derived types.">25 statements
  • @@ -1070,7 +1070,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/multiplot.html b/doc/type/multiplot.html index c7db8a6..7cb6b67 100644 --- a/doc/type/multiplot.html +++ b/doc/type/multiplot.html @@ -96,7 +96,7 @@

    multiplot
  • 27 statements + title="

    3.4% of total for derived types.

    Including implementation: 284 statements, 2.4% of total for derived types.">27 statements
  • @@ -932,7 +932,7 @@

    • - private subroutine mp_init(this, m, n, term, err) + private subroutine mp_init(this, m, n, term, width, height, err)

      Initializes the multiplot object.

      @@ -1025,6 +1025,36 @@

      Arguments

    + + + + 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.

    + + @@ -1457,7 +1487,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/parula_colormap.html b/doc/type/parula_colormap.html index 38e179c..3488c05 100644 --- a/doc/type/parula_colormap.html +++ b/doc/type/parula_colormap.html @@ -96,7 +96,7 @@

    parula_colormap
  • 4 statements + title="

    0.5% of total for derived types.

    Including implementation: 102 statements, 0.9% of total for derived types.">4 statements
  • @@ -779,7 +779,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot.html b/doc/type/plot.html index 80814b6..d2c9c5a 100644 --- a/doc/type/plot.html +++ b/doc/type/plot.html @@ -96,7 +96,7 @@

    plot
  • 61 statements + title="

    9.3% of total for derived types.

    Including implementation: 537 statements, 4.5% of total for derived types.">73 statements
  • @@ -158,6 +158,7 @@

    get_arrow get_arrow_count get_axis_equal + get_bottom_margin get_colormap get_command_string get_count @@ -166,12 +167,15 @@

    get_font_size get_label get_label_count + get_left_margin get_legend + get_right_margin get_show_colorbar get_show_gridlines get_terminal get_tics_inward get_title + get_top_margin initialize is_title_defined pop @@ -184,15 +188,19 @@

    set set_arrow set_axis_equal + set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label + set_left_margin + set_right_margin set_show_colorbar set_show_gridlines set_tics_inward set_title + set_top_margin @@ -245,6 +253,7 @@

    get_arrow get_arrow_count get_axis_equal + get_bottom_margin get_colormap get_command_string get_count @@ -253,12 +262,15 @@

    get_font_size get_label get_label_count + get_left_margin get_legend + get_right_margin get_show_colorbar get_show_gridlines get_terminal get_tics_inward get_title + get_top_margin initialize is_title_defined pop @@ -271,15 +283,19 @@

    set set_arrow set_axis_equal + set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label + set_left_margin + set_right_margin set_show_colorbar set_show_gridlines set_tics_inward set_title + set_top_margin @@ -772,6 +788,56 @@

    Returns true if the axes should be scaled equally; else, false.

    +
  • + + + +
    +

    procedure, public :: get_bottom_margin => plt_get_bottom_margin +

    +
      +
    • +

      + private pure function plt_get_bottom_margin(this) result(x) +

      +

      Gets the bottom margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1180,6 +1246,56 @@

    The number of plot_label objects.

    +
  • + + + +
    +

    procedure, public :: get_left_margin => plt_get_left_margin +

    +
      +
    • +

      + private pure function plt_get_left_margin(this) result(x) +

      +

      Gets the left margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1229,6 +1345,56 @@

    A pointer to the legend object.

    +
  • + + + +
    +

    procedure, public :: get_right_margin => plt_get_right_margin +

    +
      +
    • +

      + private pure function plt_get_right_margin(this) result(x) +

      +

      Gets the right margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1475,6 +1641,56 @@

    The title.

    +
  • + + + +
    +

    procedure, public :: get_top_margin => plt_get_top_margin +

    +
      +
    • +

      + private pure function plt_get_top_margin(this) result(x) +

      +

      Gets the top margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -2270,6 +2486,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_bottom_margin => plt_set_bottom_margin +

    +
      +
    • +

      + private subroutine plt_set_bottom_margin(this, x) +

      +

      Sets the bottom margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -2600,6 +2877,128 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_left_margin => plt_set_left_margin +

    +
      +
    • +

      + private subroutine plt_set_left_margin(this, x) +

      +

      Sets the left margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_right_margin => plt_set_right_margin +

    +
      +
    • +

      + private subroutine plt_set_right_margin(this, x) +

      +

      Sets the right margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -2837,6 +3236,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_top_margin => plt_set_top_margin +

    +
      +
    • +

      + private subroutine plt_set_top_margin(this, x) +

      +

      Sets the top margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -2859,7 +3319,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_2d.html b/doc/type/plot_2d.html index 480ed28..bef7d9b 100644 --- a/doc/type/plot_2d.html +++ b/doc/type/plot_2d.html @@ -96,7 +96,7 @@

    plot_2d
  • 18 statements + title="

    2.3% of total for derived types.

    Including implementation: 605 statements, 5.1% of total for derived types.">18 statements
  • @@ -170,6 +170,7 @@

    get_arrow get_arrow_count get_axis_equal + get_bottom_margin get_colormap get_command_string get_count @@ -178,13 +179,16 @@

    get_font_size get_label get_label_count + get_left_margin get_legend + get_right_margin get_show_colorbar get_show_gridlines get_square_axes get_terminal get_tics_inward get_title + get_top_margin get_use_y2_axis get_x_axis get_y2_axis @@ -201,16 +205,20 @@

    set set_arrow set_axis_equal + set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label + set_left_margin + set_right_margin set_show_colorbar set_show_gridlines set_square_axes set_tics_inward set_title + set_top_margin set_use_y2_axis @@ -276,6 +284,7 @@

    get_arrow get_arrow_count get_axis_equal + get_bottom_margin get_colormap get_command_string get_count @@ -284,13 +293,16 @@

    get_font_size get_label get_label_count + get_left_margin get_legend + get_right_margin get_show_colorbar get_show_gridlines get_square_axes get_terminal get_tics_inward get_title + get_top_margin get_use_y2_axis get_x_axis get_y2_axis @@ -307,16 +319,20 @@

    set set_arrow set_axis_equal + set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label + set_left_margin + set_right_margin set_show_colorbar set_show_gridlines set_square_axes set_tics_inward set_title + set_top_margin set_use_y2_axis @@ -865,6 +881,56 @@

    Returns true if the axes should be scaled equally; else, false.

    +
  • + + + +
    +

    procedure, public :: get_bottom_margin => plt_get_bottom_margin +

    +
      +
    • +

      + private pure function plt_get_bottom_margin(this) result(x) +

      +

      Gets the bottom margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1273,6 +1339,56 @@

    The number of plot_label objects.

    +
  • + + + +
    +

    procedure, public :: get_left_margin => plt_get_left_margin +

    +
      +
    • +

      + private pure function plt_get_left_margin(this) result(x) +

      +

      Gets the left margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1322,6 +1438,56 @@

    A pointer to the legend object.

    +
  • + + + +
    +

    procedure, public :: get_right_margin => plt_get_right_margin +

    +
      +
    • +

      + private pure function plt_get_right_margin(this) result(x) +

      +

      Gets the right margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1619,6 +1785,56 @@

    The title.

    +
  • + + + +
    +

    procedure, public :: get_top_margin => plt_get_top_margin +

    +
      +
    • +

      + private pure function plt_get_top_margin(this) result(x) +

      +

      Gets the top margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -2611,6 +2827,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_bottom_margin => plt_set_bottom_margin +

    +
      +
    • +

      + private subroutine plt_set_bottom_margin(this, x) +

      +

      Sets the bottom margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -2941,6 +3218,128 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_left_margin => plt_set_left_margin +

    +
      +
    • +

      + private subroutine plt_set_left_margin(this, x) +

      +

      Sets the left margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_right_margin => plt_set_right_margin +

    +
      +
    • +

      + private subroutine plt_set_right_margin(this, x) +

      +

      Sets the right margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3239,6 +3638,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_top_margin => plt_set_top_margin +

    +
      +
    • +

      + private subroutine plt_set_top_margin(this, x) +

      +

      Sets the top margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3321,7 +3781,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_3d.html b/doc/type/plot_3d.html index 10e04fc..5d20f19 100644 --- a/doc/type/plot_3d.html +++ b/doc/type/plot_3d.html @@ -96,7 +96,7 @@

    plot_3d
  • 27 statements + title="

    3.4% of total for derived types.

    Including implementation: 650 statements, 5.5% of total for derived types.">27 statements
  • @@ -171,6 +171,7 @@

    get_arrow_count get_axis_equal get_azimuth + get_bottom_margin get_colormap get_command_string get_coordinate_system @@ -181,12 +182,15 @@

    get_font_size get_label get_label_count + get_left_margin get_legend + get_right_margin get_show_colorbar get_show_gridlines get_terminal get_tics_inward get_title + get_top_margin get_use_map_view get_x_axis get_y_axis @@ -205,6 +209,7 @@

    set_arrow set_axis_equal set_azimuth + set_bottom_margin set_colormap set_coordinate_system set_draw_border @@ -212,10 +217,13 @@

    set_font_name set_font_size set_label + set_left_margin + set_right_margin set_show_colorbar set_show_gridlines set_tics_inward set_title + set_top_margin set_use_map_view set_z_intersect_xy @@ -283,6 +291,7 @@

    get_arrow_count get_axis_equal get_azimuth + get_bottom_margin get_colormap get_command_string get_coordinate_system @@ -293,12 +302,15 @@

    get_font_size get_label get_label_count + get_left_margin get_legend + get_right_margin get_show_colorbar get_show_gridlines get_terminal get_tics_inward get_title + get_top_margin get_use_map_view get_x_axis get_y_axis @@ -317,6 +329,7 @@

    set_arrow set_axis_equal set_azimuth + set_bottom_margin set_colormap set_coordinate_system set_draw_border @@ -324,10 +337,13 @@

    set_font_name set_font_size set_label + set_left_margin + set_right_margin set_show_colorbar set_show_gridlines set_tics_inward set_title + set_top_margin set_use_map_view set_z_intersect_xy @@ -926,6 +942,56 @@

    The azimuth angle, in degrees.

    +
  • + + + +
    +

    procedure, public :: get_bottom_margin => plt_get_bottom_margin +

    +
      +
    • +

      + private pure function plt_get_bottom_margin(this) result(x) +

      +

      Gets the bottom margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1443,6 +1509,56 @@

    The number of plot_label objects.

    +
  • + + + +
    +

    procedure, public :: get_left_margin => plt_get_left_margin +

    +
      +
    • +

      + private pure function plt_get_left_margin(this) result(x) +

      +

      Gets the left margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1492,6 +1608,56 @@

    A pointer to the legend object.

    +
  • + + + +
    +

    procedure, public :: get_right_margin => plt_get_right_margin +

    +
      +
    • +

      + private pure function plt_get_right_margin(this) result(x) +

      +

      Gets the right margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1738,6 +1904,56 @@

    The title.

    +
  • + + + +
    +

    procedure, public :: get_top_margin => plt_get_top_margin +

    +
      +
    • +

      + private pure function plt_get_top_margin(this) result(x) +

      +

      Gets the top margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -2840,6 +3056,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_bottom_margin => plt_set_bottom_margin +

    +
      +
    • +

      + private subroutine plt_set_bottom_margin(this, x) +

      +

      Sets the bottom margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3299,6 +3576,128 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_left_margin => plt_set_left_margin +

    +
      +
    • +

      + private subroutine plt_set_left_margin(this, x) +

      +

      Sets the left margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_right_margin => plt_set_right_margin +

    +
      +
    • +

      + private subroutine plt_set_right_margin(this, x) +

      +

      Sets the right margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3536,6 +3935,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_top_margin => plt_set_top_margin +

    +
      +
    • +

      + private subroutine plt_set_top_margin(this, x) +

      +

      Sets the top margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3679,7 +4139,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_arrow.html b/doc/type/plot_arrow.html index 57ca03f..6369458 100644 --- a/doc/type/plot_arrow.html +++ b/doc/type/plot_arrow.html @@ -96,7 +96,7 @@

    plot_arrow
  • 49 statements + title="

    6.2% of total for derived types.

    Including implementation: 321 statements, 2.7% of total for derived types.">49 statements
  • @@ -2084,7 +2084,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_axis.html b/doc/type/plot_axis.html index a82ebb1..1d8f786 100644 --- a/doc/type/plot_axis.html +++ b/doc/type/plot_axis.html @@ -96,7 +96,7 @@

    plot_axis
  • 32 statements + title="

    7.4% of total for derived types.

    Including implementation: 354 statements, 3.0% of total for derived types.">58 statements
  • @@ -154,8 +154,17 @@

    get_id_string get_is_log_scaled get_limits + get_offset_tics + get_show_tic_labels + get_tic_label_alignment + get_tic_label_angle get_tic_label_format + get_tic_label_rotation_origin + get_tic_label_x_offset + get_tic_label_y_offset get_title + get_title_x_offset + get_title_y_offset get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width @@ -163,8 +172,17 @@

    set_autoscale set_is_log_scaled set_limits + set_offset_tics + set_show_tic_labels + set_tic_label_alignment + set_tic_label_angle set_tic_label_format + set_tic_label_rotation_origin + set_tic_label_x_offset + set_tic_label_y_offset set_title + set_title_x_offset + set_title_y_offset set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width @@ -181,7 +199,7 @@

    -

    procedure, public :: get_tic_label_format => pa_get_tic_label_fmt +

    procedure, public :: get_offset_tics => pa_get_offset_tics

    • - private pure function pa_get_tic_label_fmt(this) result(rst) + private pure function pa_get_offset_tics(this) result(x)

      -

      Gets the tic label format. The format string can be any format -string accepted by the C command 'printf.'

      +

      Gets a value determining if the tics should be offset.

      Arguments

      @@ -537,23 +572,23 @@

      Arguments

      Return Value - character(len=:), allocatable + logical

      -

      The tic label format string.

      +

      Returns true to offset the tics; else, set to false.

      -

      procedure, public :: get_title => pa_get_title +

      procedure, public :: get_show_tic_labels => pa_get_show_tic_labels

      • - private function pa_get_title(this) result(txt) + private pure function pa_get_show_tic_labels(this) result(x)

        -

        Gets the axis title.

        +

        Gets a value determining if tic labels should be shown.

        Arguments

      @@ -586,24 +621,23 @@

      Arguments

      Return Value - character(len=:), allocatable + logical

      -

      The title.

      +

      Returns true to show tic labels; else, set to false.

      -

      procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

      procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment

      • - private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) + private pure function pa_get_tic_label_alignment(this) result(x)

        -

        Gets a value determining if the default tic label format will be -used.

        +

        Gets the tic label alignment.

        Arguments

      @@ -636,25 +670,35 @@

      Arguments

      Return Value - logical + character(len=:), allocatable

      -

      Returns true if the default tic label format will be used; else, -false.

      +

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      -

      procedure, public :: get_zero_axis => pa_get_zero_axis +

      procedure, public :: get_tic_label_angle => pa_get_tic_label_angle

      • - private pure function pa_get_zero_axis(this) result(x) + private pure function pa_get_tic_label_angle(this) result(x)

        -

        Gets a value determining if the axis should be drawn through -zero of opposing axes.

        +

        Gets the tic label angle, in degrees.

        Arguments

      @@ -687,24 +731,24 @@

      Arguments

      Return Value - logical + real(kind=real32)

      -

      Returns true to draw as a zero axis; else, set to false.

      +

      The tic label angle, in degrees.

      -

      procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

      procedure, public :: get_tic_label_format => pa_get_tic_label_fmt

      • - private pure function pa_get_zero_axis_width(this) result(x) + private pure function pa_get_tic_label_fmt(this) result(rst)

        -

        Gets the width of the line used to represent the zero axis line, if -active.

        +

        Gets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

        Arguments

      @@ -737,23 +781,23 @@

      Arguments

      Return Value - real(kind=real32) + character(len=:), allocatable

      -

      The width of the line, in pixels.

      +

      The tic label format string.

      -

      procedure, public :: is_title_defined => pa_has_title +

      procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin

      • - private pure function pa_has_title(this) result(x) + private pure function pa_get_tic_rotation_origin(this) result(x)

        -

        Gets a value determining if a title has been defined for this axis.

        +

        Gets the tic label rotation origin.

        Arguments

      @@ -786,24 +830,35 @@

      Arguments

      Return Value - logical + character(len=:), allocatable

      -

      Returns true if a title has been defined; else, false.

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      -

      procedure, public :: set_autoscale => pa_set_autoscale +

      procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset

      • - private subroutine pa_set_autoscale(this, x) + private pure function pa_get_tic_x_offset(this) result(x)

        -

        Sets a value determining if the axis should be automatically scaled -to fit the data.

        +

        Gets the tic label x-offset, in characters.

        Arguments

      @@ -821,7 +876,7 @@

      Arguments

      class(plot_axis), - + @@ -831,39 +886,28 @@

      Arguments

      The plot_axis object.

      - - - - - - - -
      intent(inout)intent(in)
      - - logical, - intent(in) - - ::x -

      Set to true if the axis should be automatically scaled; else, -set to false.

      -
      +

      + Return Value + integer(kind=int32) +

      +

      The tic label x-offset, in characters.

    -

    procedure, public :: set_is_log_scaled => pa_set_log_scale +

    procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset

    • - private subroutine pa_set_log_scale(this, x) + private pure function pa_get_tic_y_offset(this) result(x)

      -

      Sets a logical value defining if the axis should be log scaled.

      +

      Gets the tic label y-offset, in characters.

      Arguments

      @@ -881,7 +925,7 @@

      Arguments

      class(plot_axis), - + @@ -891,39 +935,28 @@

      Arguments

      The plot_axis object.

      - - - - - - - -
      intent(inout)intent(in)
      - - logical, - intent(in) - - ::x -

      Set to true if log scaling is applied to the axis; else, false.

      -
      +

      + Return Value + integer(kind=int32) +

      +

      The tic label y-offset, in characters.

    -

    procedure, public :: set_limits => pa_set_axis_limits +

    procedure, public :: get_title => pa_get_title

    • - private subroutine pa_set_axis_limits(this, lower, upper) + private function pa_get_title(this) result(txt)

      -

      Gets the axis display limits, assuming autoscaling is not -active for this axis.

      +

      Gets the axis title.

      Arguments

      @@ -941,7 +974,7 @@

      Arguments

      class(plot_axis), - + @@ -951,54 +984,127 @@

      Arguments

      The plot_axis object.

      + +
      intent(inout)intent(in)
      + +

      + Return Value + character(len=:), allocatable +

      +

      The title.

      + +
    • +
    +

    + +
    +

    procedure, public :: get_title_x_offset => pa_get_title_x_offset +

    +
      +
    • +

      + private pure function pa_get_title_x_offset(this) result(x) +

      +

      Gets the axis title x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + - + + +
      TypeIntentOptional AttributesName
      - real(kind=real64), + class(plot_axis), intent(in) ::lowerthis -

      The lower display limit.

      +

      The plot_axis object.

      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_y_offset => pa_get_title_y_offset +

    +
      +
    • +

      + private pure function pa_get_title_y_offset(this) result(x) +

      +

      Gets the axis title y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + - +
      TypeIntentOptional AttributesName
      - real(kind=real64), + class(plot_axis), intent(in) ::upperthis -

      The upper display limit.

      +

      The plot_axis object.

      +

      + Return Value + integer(kind=int32) +

      +

      The axis title y-offset, in characters.

    -

    procedure, public :: set_tic_label_format => pa_set_tic_label_fmt +

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt

    • - private subroutine pa_set_tic_label_fmt(this, x) + private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst)

      -

      Sets the tic label format. The format string can be any format -string accepted by the C command 'printf.'

      +

      Gets a value determining if the default tic label format will be +used.

      Arguments

      @@ -1016,7 +1122,7 @@

      Arguments

      class(plot_axis), - + @@ -1026,38 +1132,80 @@

      Arguments

      The plot_axis object.

      + +
      intent(inout)intent(in)
      + +

      + Return Value + logical +

      +

      Returns true if the default tic label format will be used; else, +false.

      + +
    • +
    +

    + +
    +

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    +
      +
    • +

      + private pure function pa_get_zero_axis(this) result(x) +

      +

      Gets a value determining if the axis should be drawn through +zero of opposing axes.

      + +

      Arguments

      + + + + + + + + + + - +
      TypeIntentOptional AttributesName
      - character(len=*), + class(plot_axis), intent(in) ::xthis -

      The tic label format string.

      +

      The plot_axis object.

      +

      + Return Value + logical +

      +

      Returns true to draw as a zero axis; else, set to false.

    -

    procedure, public :: set_title => pa_set_title +

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width

    • - private subroutine pa_set_title(this, txt) + private pure function pa_get_zero_axis_width(this) result(x)

      -

      Sets the axis title.

      +

      Gets the width of the line used to represent the zero axis line, if +active.

      Arguments

      @@ -1075,7 +1223,7 @@

      Arguments

      class(plot_axis), - + @@ -1085,17 +1233,807 @@

      Arguments

      The plot_axis object.

      - - - - - - + +
      intent(inout)intent(in)
      - - character(len=*), - intent(in) - - ::txt
      + +

      + Return Value + real(kind=real32) +

      +

      The width of the line, in pixels.

      + +
    • +
    +

    + +
    +

    procedure, public :: is_title_defined => pa_has_title +

    +
      +
    • +

      + private pure function pa_has_title(this) result(x) +

      +

      Gets a value determining if a title has been defined for this axis.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if a title has been defined; else, false.

      + +
    • +
    +
    + +
    +

    procedure, public :: set_autoscale => pa_set_autoscale +

    +
      +
    • +

      + private subroutine pa_set_autoscale(this, x) +

      +

      Sets a value determining if the axis should be automatically scaled +to fit the data.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if the axis should be automatically scaled; else, +set to false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_is_log_scaled => pa_set_log_scale +

    +
      +
    • +

      + private subroutine pa_set_log_scale(this, x) +

      +

      Sets a logical value defining if the axis should be log scaled.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if log scaling is applied to the axis; else, false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_limits => pa_set_axis_limits +

    +
      +
    • +

      + private subroutine pa_set_axis_limits(this, lower, upper) +

      +

      Gets the axis display limits, assuming autoscaling is not +active for this axis.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + real(kind=real64), + intent(in) + + ::lower +

      The lower display limit.

      +
      + + real(kind=real64), + intent(in) + + ::upper +

      The upper display limit.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_offset_tics => pa_set_offset_tics +

    +
      +
    • +

      + private subroutine pa_set_offset_tics(this, x) +

      +

      Sets a value determining if the tics should be offset.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true to offset the tics; else, set to false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_show_tic_labels => pa_set_show_tic_labels +

    +
      +
    • +

      + private subroutine pa_set_show_tic_labels(this, x) +

      +

      Sets a value determining if tic labels should be shown.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true to show tic labels; else, set to false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment +

    +
      +
    • +

      + private subroutine pa_set_tic_label_alignment(this, x) +

      +

      Sets the tic label alignment.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

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

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_tic_label_angle => pa_set_tic_label_angle +

    +
      +
    • +

      + private subroutine pa_set_tic_label_angle(this, x) +

      +

      Sets the tic label angle, in degrees.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The tic label angle, in degrees.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_tic_label_format => pa_set_tic_label_fmt +

    +
      +
    • +

      + private subroutine pa_set_tic_label_fmt(this, x) +

      +

      Sets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

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

      The tic label format string.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin +

    +
      +
    • +

      + private subroutine pa_set_tic_rotation_origin(this, x) +

      +

      Sets the tic label rotation origin.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

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

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset +

    +
      +
    • +

      + private subroutine pa_set_tic_x_offset(this, x) +

      +

      Sets the tic label x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

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

      The tic label x-offset, in characters.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset +

    +
      +
    • +

      + private subroutine pa_set_tic_y_offset(this, x) +

      +

      Sets the tic label y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

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

      The tic label y-offset, in characters.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_title => pa_set_title +

    +
      +
    • +

      + private subroutine pa_set_title(this, txt) +

      +

      Sets the axis title.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + @@ -1104,6 +2042,124 @@

      Arguments

      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

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

      The title.

      +
    • +
    +
    + +
    +

    procedure, public :: set_title_x_offset => pa_set_title_x_offset +

    +
      +
    • +

      + private subroutine pa_set_title_x_offset(this, x) +

      +

      Sets the axis title x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

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

      The axis title x-offset, in characters.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_title_y_offset => pa_set_title_y_offset +

    +
      +
    • +

      + private subroutine pa_set_title_y_offset(this, x) +

      +

      Sets the axis title y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

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

      The axis title y-offset, in characters.

      +
      + +
    @@ -1307,7 +2363,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_bar.html b/doc/type/plot_bar.html index 3945845..96007f8 100644 --- a/doc/type/plot_bar.html +++ b/doc/type/plot_bar.html @@ -96,7 +96,7 @@

    plot_bar
  • 7 statements + title="

    0.9% of total for derived types.

    Including implementation: 479 statements, 4.0% of total for derived types.">7 statements
  • @@ -159,6 +159,7 @@

    get_arrow_count get_axis_equal get_bar_width + get_bottom_margin get_colormap get_command_string get_count @@ -167,13 +168,16 @@

    get_font_size get_label get_label_count + get_left_margin get_legend + get_right_margin get_show_colorbar get_show_gridlines get_square_axes get_terminal get_tics_inward get_title + get_top_margin get_use_y2_axis get_x_axis get_y2_axis @@ -191,16 +195,20 @@

    set_arrow set_axis_equal set_bar_width + set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label + set_left_margin + set_right_margin set_show_colorbar set_show_gridlines set_square_axes set_tics_inward set_title + set_top_margin set_use_y2_axis

  • @@ -255,6 +263,7 @@

    get_arrow_count get_axis_equal get_bar_width + get_bottom_margin get_colormap get_command_string get_count @@ -263,13 +272,16 @@

    get_font_size get_label get_label_count + get_left_margin get_legend + get_right_margin get_show_colorbar get_show_gridlines get_square_axes get_terminal get_tics_inward get_title + get_top_margin get_use_y2_axis get_x_axis get_y2_axis @@ -287,16 +299,20 @@

    set_arrow set_axis_equal set_bar_width + set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label + set_left_margin + set_right_margin set_show_colorbar set_show_gridlines set_square_axes set_tics_inward set_title + set_top_margin set_use_y2_axis

    @@ -839,6 +855,56 @@

    The scaling factor.

    +
  • + + + +
    +

    procedure, public :: get_bottom_margin => plt_get_bottom_margin +

    +
      +
    • +

      + private pure function plt_get_bottom_margin(this) result(x) +

      +

      Gets the bottom margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1247,6 +1313,56 @@

    The number of plot_label objects.

    +
  • + + + +
    +

    procedure, public :: get_left_margin => plt_get_left_margin +

    +
      +
    • +

      + private pure function plt_get_left_margin(this) result(x) +

      +

      Gets the left margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1296,6 +1412,56 @@

    A pointer to the legend object.

    +
  • + + + +
    +

    procedure, public :: get_right_margin => plt_get_right_margin +

    +
      +
    • +

      + private pure function plt_get_right_margin(this) result(x) +

      +

      Gets the right margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1593,6 +1759,56 @@

    The title.

    +
  • + + + +
    +

    procedure, public :: get_top_margin => plt_get_top_margin +

    +
      +
    • +

      + private pure function plt_get_top_margin(this) result(x) +

      +

      Gets the top margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -2645,6 +2861,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_bottom_margin => plt_set_bottom_margin +

    +
      +
    • +

      + private subroutine plt_set_bottom_margin(this, x) +

      +

      Sets the bottom margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -2975,6 +3252,128 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_left_margin => plt_set_left_margin +

    +
      +
    • +

      + private subroutine plt_set_left_margin(this, x) +

      +

      Sets the left margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_right_margin => plt_set_right_margin +

    +
      +
    • +

      + private subroutine plt_set_right_margin(this, x) +

      +

      Sets the right margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3273,6 +3672,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_top_margin => plt_set_top_margin +

    +
      +
    • +

      + private subroutine plt_set_top_margin(this, x) +

      +

      Sets the top margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3355,7 +3815,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_data.html b/doc/type/plot_data.html index f0032d6..26c513b 100644 --- a/doc/type/plot_data.html +++ b/doc/type/plot_data.html @@ -96,7 +96,7 @@

    plot_data
  • 8 statements + title="

    1.0% of total for derived types.

    Including implementation: 23 statements, 0.2% of total for derived types.">8 statements
  • @@ -439,7 +439,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_data_2d.html b/doc/type/plot_data_2d.html index b81da7b..fdb36ed 100644 --- a/doc/type/plot_data_2d.html +++ b/doc/type/plot_data_2d.html @@ -96,7 +96,7 @@

    plot_data_2d
  • 21 statements + title="

    2.7% of total for derived types.

    Including implementation: 616 statements, 5.2% of total for derived types.">21 statements
  • @@ -3229,7 +3229,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_data_3d.html b/doc/type/plot_data_3d.html index 7e4b2c4..f67b32e 100644 --- a/doc/type/plot_data_3d.html +++ b/doc/type/plot_data_3d.html @@ -96,7 +96,7 @@

    plot_data_3d
  • 19 statements + title="

    2.4% of total for derived types.

    Including implementation: 523 statements, 4.4% of total for derived types.">19 statements
  • @@ -3053,7 +3053,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_data_bar.html b/doc/type/plot_data_bar.html index abe32a2..b18f7ed 100644 --- a/doc/type/plot_data_bar.html +++ b/doc/type/plot_data_bar.html @@ -96,7 +96,7 @@

    plot_data_bar
  • 34 statements + title="

    4.3% of total for derived types.

    Including implementation: 400 statements, 3.4% of total for derived types.">34 statements
  • @@ -2174,7 +2174,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_data_colored.html b/doc/type/plot_data_colored.html index 8f3f2cd..a480eff 100644 --- a/doc/type/plot_data_colored.html +++ b/doc/type/plot_data_colored.html @@ -96,7 +96,7 @@

    plot_data_colored
  • 11 statements + title="

    1.4% of total for derived types.

    Including implementation: 51 statements, 0.4% of total for derived types.">11 statements
  • @@ -663,7 +663,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_data_error_bars.html b/doc/type/plot_data_error_bars.html index 9c1739e..1114fbf 100644 --- a/doc/type/plot_data_error_bars.html +++ b/doc/type/plot_data_error_bars.html @@ -96,7 +96,7 @@

    plot_data_error_bars
  • 25 statements + title="

    3.2% of total for derived types.

    Including implementation: 750 statements, 6.3% of total for derived types.">25 statements
  • @@ -2429,7 +2429,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_data_histogram.html b/doc/type/plot_data_histogram.html index e201304..f9ba11b 100644 --- a/doc/type/plot_data_histogram.html +++ b/doc/type/plot_data_histogram.html @@ -96,7 +96,7 @@

    plot_data_histogram
  • 14 statements + title="

    2.8% of total for derived types.

    Including implementation: 208 statements, 1.7% of total for derived types.">22 statements
  • @@ -149,40 +149,25 @@

    @@ -195,7 +180,7 @@

    -

    type, public, extends(plot_data_bar) :: plot_data_histogram

    +

    type, public, extends(plot_data_colored) :: plot_data_histogram

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


    @@ -226,40 +211,25 @@

    @@ -276,14 +246,14 @@

    Type-Bound Procedures

    -

    procedure, public :: bin_data => pdh_bin_data +

    procedure, public :: define_data => pdh_define_data

    • - private function pdh_bin_data(this, x, err) result(bx) + private subroutine pdh_define_data(this, x, err)

      -

      Bins the supplied data set.

      +

      Defines the data set to plot.

      Arguments

      @@ -301,7 +271,7 @@

      Arguments

      class(plot_data_histogram), - + @@ -323,7 +293,7 @@

      Arguments

      @@ -344,25 +314,20 @@

      Arguments

      intent(in)intent(inout) :: x -

      The data set to bin.

      +

      The data set to plot.

      -

      - Return Value - real(kind=real64), allocatable, dimension(:,:) -

      -

      The binned data.

    -

    generic, public :: define_data => pdb_set_data_1, pdb_set_data_2, pdb_set_data_3 +

    procedure, public :: get => pdh_get_bin_data

    • - private subroutine pdb_set_data_1(this, x, err) + private subroutine pdh_get_bin_data(this, i, x, cnt)

      -

      Defines a single data set.

      +

      Gets the requested binned data.

      Arguments

      @@ -378,16 +343,31 @@

      Arguments

      - + + + + + + + + + @@ -395,29 +375,29 @@

      Arguments

      real(kind=real64), - + - - + - + @@ -425,11 +405,19 @@

      Arguments

      + + + +
      +

      procedure, public :: get_axes_string => pdh_get_axes_cmd +

      +
      • - private subroutine pdb_set_data_2(this, labels, x, err) + private function pdh_get_axes_cmd(this) result(rst)

        -

        Defines data along with associated axis labels.

        +

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

        Arguments

      - class(plot_data_bar), + class(plot_data_histogram), intent(inout)intent(in) :: this -

      The plot_data_bar object.

      +

      The plot_data_histogram object.

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

      The bin number to get.

      intent(in),intent(out) - dimension(:) + :: x -

      The data to plot.

      +

      The center of the bin.

      - class(errors), + integer(kind=int32), intent(inout),optional, - target +intent(out) + ::errcnt -

      An error handling object.

      +

      The number of items in the bin.

      @@ -445,73 +433,40 @@

      Arguments

      - + - - - - - - - - - - - - - - - - - - - - - - - -
      - class(plot_data_bar), + class(plot_data_histogram), intent(inout)intent(in) :: this -

      The plot_data_bar object.

      -
      - - class(string), - intent(in), - dimension(:) - ::labels -

      The axis labels to associate with the data.

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

      The data set.

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

      An error handling object.

      +

      The plot_data_histogram object.

      +

      + Return Value + character(len=:), allocatable +

      +

      The command string.

    • +
    +

    + +
    +

    procedure, public :: get_bin_count => pdh_get_bin_count +

    +
    • - private subroutine pdb_set_data_3(this, labels, x, fmt, err) + private pure function pdh_get_bin_count(this) result(x)

      -

      Defines data along with labels and formatting information.

      +

      Gets the number of bins.

      Arguments

      @@ -527,95 +482,40 @@

      Arguments

      - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - class(plot_data_bar), + class(plot_data_histogram), intent(inout)intent(in) :: this -

      The plot_data_bar object.

      -
      - - real(kind=real64), - intent(in), - dimension(:) - ::labels -

      The axis labels to associate with the data.

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

      The data set.

      -
      - - character(len=*), - intent(in),optional - - ::fmt -

      The format string for the labels (e.g. '(I0)', etc.).

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

      An error handling object.

      +

      The plot_data_histogram object.

      +

      + Return Value + integer(kind=int32) +

      +

      The bin count.

    -

    procedure, public :: get => pdb_get_data +

    procedure, public :: get_color_index => pdc_get_color_index

    • - private pure function pdb_get_data(this, index, col) result(x) + private pure function pdc_get_color_index(this) result(x)

      -

      Gets the requested data point.

      +

      Gets the color index.

      Arguments

      @@ -631,7 +531,7 @@

      Arguments

      - - - - - - - - - - - - - - - - @@ -678,23 +548,23 @@

      Arguments

      Return Value - real(kind=real64) + integer(kind=int32)

      -

      The value.

      +

      The index value.

      -

      procedure, public :: get_axes_string => pdb_get_axes_cmd +

      procedure, public :: get_command_string => pdh_get_cmd

      • - private function pdb_get_axes_cmd(this) result(x) + private function pdh_get_cmd(this) result(rst)

        -

        Gets the GNUPLOT command defining which axes to plot against.

        +

        Gets the GNUPLOT command string for this object.

        Arguments

      - class(plot_data_bar), + class(plot_data_colored), intent(in) @@ -640,37 +540,7 @@

      Arguments

      :: this -

      The plot_data_bar object.

      -
      - - integer(kind=int32), - intent(in) - - ::index -

      The data point index.

      -
      - - integer(kind=int32), - intent(in) - - ::col -

      The column index.

      +

      The plot_data_colored object.

      @@ -710,7 +580,7 @@

      Arguments

      @@ -736,14 +606,14 @@

      -

      procedure, public :: get_bar_per_label_count => pdb_get_col_count +

      procedure, public :: get_data_string => pdh_get_data_cmd

      • - private pure function pdb_get_col_count(this) result(x) + private function pdh_get_data_cmd(this) result(rst)

        -

        Gets the number of data sets (columns).

        +

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

        Arguments

      - class(plot_data_bar), + class(plot_data_histogram), intent(in) @@ -719,7 +589,7 @@

      Arguments

      :: this -

      The plot_data_bar object.

      +

      The plot_data_histogram object.

      @@ -759,7 +629,7 @@

      Arguments

      @@ -776,23 +646,24 @@

      Arguments

      Return Value - integer(kind=int32) + character(len=:), allocatable

      -

      The count.

      +

      The command string.

      -

      procedure, public :: get_bin_count => pdh_get_bin_count +

      procedure, public :: get_draw_against_y2 => pdh_get_use_y2

      • - private pure function pdh_get_bin_count(this) result(x) + private pure function pdh_get_use_y2(this) result(rst)

        -

        Gets the number of bins.

        +

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

        Arguments

      - class(plot_data_bar), + class(plot_data_histogram), intent(in) @@ -768,7 +638,7 @@

      Arguments

      :: this -

      The plot_data_bar object.

      +

      The plot_data_histogram object.

      @@ -825,23 +696,24 @@

      Arguments

      Return Value - integer(kind=int32) + logical

      -

      The bin count.

      +

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

      -

      procedure, public :: get_color_index => pdc_get_color_index +

      procedure, public :: get_is_filled => pdh_get_is_filled

      • - private pure function pdc_get_color_index(this) result(x) + private pure function pdh_get_is_filled(this) result(rst)

        -

        Gets the color index.

        +

        Gets a value determining if each box is filled.

        Arguments

      @@ -857,7 +729,7 @@

      Arguments

      @@ -874,23 +746,23 @@

      Arguments

      Return Value - integer(kind=int32) + logical

      -

      The index value.

      +

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

      -

      procedure, public :: get_command_string => pdb_get_cmd +

      procedure, public :: get_line_color => pdc_get_line_color

      • - private function pdb_get_cmd(this) result(x) + private pure function pdc_get_line_color(this) result(x)

        -

        Gets the GNUPLOT command string for this object.

        +

        Gets the object color.

        Arguments

      - class(plot_data_colored), + class(plot_data_histogram), intent(in) @@ -866,7 +738,7 @@

      Arguments

      :: this -

      The plot_data_colored object.

      +

      The plot_data_histogram object.

      @@ -906,7 +778,7 @@

      Arguments

      @@ -923,23 +795,23 @@

      Arguments

      Return Value - character(len=:), allocatable + type(color)

      -

      The command string.

      +

      The color.

      -

      procedure, public :: get_count => pdb_get_count +

      procedure, public :: get_maximum_value => pdh_get_max_x

      • - private pure function pdb_get_count(this) result(x) + private pure function pdh_get_max_x(this) result(x)

        -

        Gets the number of stored data points.

        +

        Gets the maximum data value.

        Arguments

      - class(plot_data_bar), + class(plot_data_colored), intent(in) @@ -915,7 +787,7 @@

      Arguments

      :: this -

      The plot_data_bar object.

      +

      The plot_data_colored object.

      @@ -955,7 +827,7 @@

      Arguments

      @@ -972,23 +844,23 @@

      Arguments

      Return Value - integer(kind=int32) + real(kind=real64)

      -

      The number of stored data points.

      +

      The maximum data value.

      -

      procedure, public :: get_data => pdb_get_data_set +

      procedure, public :: get_minimum_value => pdh_get_min_x

      • - private pure function pdb_get_data_set(this, col) result(x) + private pure function pdh_get_min_x(this) result(x)

        -

        Gets the requested data set.

        +

        Gets the minimum data value.

        Arguments

      - class(plot_data_bar), + class(plot_data_histogram), intent(in) @@ -964,7 +836,7 @@

      Arguments

      :: this -

      The plot_data_bar object.

      +

      The plot_data_histogram object.

      @@ -1004,7 +876,7 @@

      Arguments

      - - - - - - - - @@ -1036,23 +893,23 @@

      Arguments

      Return Value - real(kind=real64), allocatable, dimension(:) + real(kind=real64)

      -

      A copy of the data set.

      +

      The minimum data value.

      -

      procedure, public :: get_data_string => pdb_get_data_cmd +

      procedure, public :: get_name => pd_get_name

      • - private function pdb_get_data_cmd(this) result(x) + private pure function pd_get_name(this) result(txt)

        -

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

        +

        Gets the name to associate with this data set.

        Arguments

      - class(plot_data_bar), + class(plot_data_histogram), intent(in) @@ -1013,22 +885,7 @@

      Arguments

      :: this -

      The plot_data_bar object.

      -
      - - integer(kind=int32), - intent(in) - - ::col -

      The column index.

      +

      The plot_data_histogram object.

      @@ -1068,7 +925,7 @@

      Arguments

      - - -
      - class(plot_data_bar), + class(plot_data), intent(in) @@ -1077,860 +934,32 @@

      Arguments

      :: this -

      The plot_data_bar object.

      -
      - -

      - Return Value - character(len=:), allocatable -

      -

      The command string.

      - -
    • -
    -

    - -
    -

    procedure, public :: get_draw_against_y2 => pdb_get_use_y2 -

    -
      -
    • -

      - private pure function pdb_get_use_y2(this) result(x) -

      -

      Gets a value determining if the data should be plotted against a -secondary y-axis.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_bar), - intent(in) - - ::this -

      The plot_data_bar object.

      -
      - -

      - Return Value - logical -

      -

      Returns true to plot against a secondary y-axis; else, false.

      - -
    • -
    -
    - -
    -

    procedure, public :: get_extreme_values => pdh_get_extremes -

    -
      -
    • -

      - private pure function pdh_get_extremes(this) result(x) -

      -

      Returns the extreme values in the data set.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_histogram), - intent(in) - - ::this -

      The plot_data_histogram object.

      -
      - -

      - Return Value - real(kind=real64), dimension(2) -

      -

      A two-element array containing the minimum and maximum values, in -that order.

      - -
    • -
    -
    - -
    -

    procedure, public :: get_is_filled => pdb_get_is_filled -

    -
      -
    • -

      - private pure function pdb_get_is_filled(this) result(x) -

      -

      Gets a value determining if each bar is filled.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_bar), - intent(in) - - ::this -

      The plot_data_bar object.

      -
      - -

      - Return Value - logical -

      -

      Returns true if the bars are to be filled; else, false.

      - -
    • -
    -
    - -
    -

    procedure, public :: get_label => pdb_get_label -

    -
      -
    • -

      - private pure function pdb_get_label(this, index) result(x) -

      -

      Gets the axis label associated with a specific data set.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_bar), - intent(in) - - ::this -

      The plot_data_bar object.

      -
      - - integer(kind=int32), - intent(in) - - ::index -

      The index of the data set.

      -
      - -

      - Return Value - character(len=:), allocatable -

      -

      The label.

      - -
    • -
    -
    - -
    -

    procedure, public :: get_line_color => pdc_get_line_color -

    -
      -
    • -

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

      -

      Gets the object color.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_colored), - intent(in) - - ::this -

      The plot_data_colored object.

      -
      - -

      - Return Value - type(color) -

      -

      The color.

      - -
    • -
    -
    - -
    -

    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

      - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data), - intent(in) - - ::this -

      The plot_data object.

      -
      - -

      - Return Value - character(len=:), allocatable -

      -

      The name.

      - -
    • -
    -
    - -
    -

    procedure, public :: get_number_format => pdh_get_num_fmt -

    -
      -
    • -

      - private pure function pdh_get_num_fmt(this) result(x) -

      -

      Gets the numerical format string used for the labels.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_histogram), - intent(in) - - ::this -

      The plot_data_histogram object.

      -
      - -

      - Return Value - character(len=:), allocatable -

      -

      The format string.

      - -
    • -
    -
    - -
    -

    procedure, public :: get_transparency => pdb_get_alpha -

    -
      -
    • -

      - private pure function pdb_get_alpha(this) result(x) -

      -

      Gets the alpha (transparency) for the bar color.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_bar), - intent(in) - - ::this -

      The plot_data_bar object.

      -
      - -

      - Return Value - real(kind=real32) -

      -

      The alpha value ([0, 1]).

      - -
    • -
    -
    - -
    -

    procedure, public :: get_use_labels => pdb_get_use_labels -

    -
      -
    • -

      - private pure function pdb_get_use_labels(this) result(x) -

      -

      Gets a value determining if labels are used to identify the data.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_bar), - intent(in) - - ::this -

      The plot_data_bar object.

      -
      - -

      - Return Value - logical -

      -

      Returns true if labels are used; else, false.

      - -
    • -
    -
    - -
    -

    procedure, public :: set => pdb_set_data -

    -
      -
    • -

      - private subroutine pdb_set_data(this, index, col, x) -

      -

      Replaces the requested data point.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_bar), - intent(inout) - - ::this -

      The plot_data_bar object.

      -
      - - integer(kind=int32), - intent(in) - - ::index -

      The data point index.

      -
      - - integer(kind=int32), - intent(in) - - ::col -

      The column index.

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

      The new value.

      -
      - - -
    • -
    -
    - -
    -

    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

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - 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

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_colored), - intent(inout) - - ::this -

      The plot_data_colored object.

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

      The index value.

      -
      - - -
    • -
    -
    - -
    -

    procedure, public :: set_data_1 => pdh_set_data_1 -

    -
      -
    • -

      - private subroutine pdh_set_data_1(this, x, err) -

      -

      Defines the data set.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_histogram), - intent(inout) - - ::this -

      The plot_data_histogram object.

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

      The data set.

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

      An error handling object.

      -
      - - -
    • -
    -
    - -
    -

    procedure, public :: set_data_2 => pdh_set_data_2 -

    -
      -
    • -

      - private subroutine pdh_set_data_2(this, labels, x, err) -

      -

      Defines the data set with associated axis labels.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_histogram), - intent(inout) - - ::this -

      The plot_data_histogram object.

      -
      - - class(string), - intent(in), - dimension(:) - ::labels -

      The axis labels.

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

      The data set.

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

      An error handling object.

      +

      The plot_data object.

      +

      + Return Value + character(len=:), allocatable +

      +

      The name.

    -

    procedure, public :: set_data_3 => pdh_set_data_3 +

    procedure, public :: set_bin_count => pdh_set_bin_count

    • - private subroutine pdh_set_data_3(this, labels, x, fmt, err) + private subroutine pdh_set_bin_count(this, x)

      -

      Defines the data set with associated axis labels with a specific format.

      +

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

      Arguments

      @@ -1961,61 +990,16 @@

      Arguments

      - - - - - - - - - + - - - - - - - - - - - - - - - - - + @@ -2027,15 +1011,14 @@

      Arguments

      -

      procedure, public :: set_draw_against_y2 => pdb_set_use_y2 +

      procedure, public :: set_color_index => pdc_set_color_index

      • - private subroutine pdb_set_use_y2(this, x) + private subroutine pdc_set_color_index(this, x)

        -

        Sets a value determining if the data should be plotted against a -secondary y-axis.

        +

        Sets the color index.

        Arguments

      - real(kind=real64), - intent(in), - dimension(:) - ::labels -

      The axis labels.

      -
      - - real(kind=real64), + integer(kind=int32), intent(in),intent(in) - dimension(:) - ::x -

      The data set.

      -
      - - character(len=*), - intent(in),optional ::fmt -

      The format string for the labels (e.g. '(I0)', etc.).

      -
      - - class(errors), - intent(inout),optional, - target - ::errx -

      An error handling object.

      +

      The bin count.

      @@ -2051,7 +1034,7 @@

      Arguments

      @@ -2087,14 +1070,15 @@

      Arguments

      -

      procedure, public :: set_is_filled => pdb_set_is_filled +

      procedure, public :: set_draw_against_y2 => pdh_set_use_y2

      • - private subroutine pdb_set_is_filled(this, x) + private subroutine pdh_set_use_y2(this, x)

        -

        Sets a value determining if each bar is filled.

        +

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

        Arguments

      - class(plot_data_bar), + class(plot_data_colored), intent(inout) @@ -2060,13 +1043,13 @@

      Arguments

      :: this -

      The plot_data_bar object.

      +

      The plot_data_colored object.

      - logical, + integer(kind=int32), intent(in) @@ -2075,7 +1058,7 @@

      Arguments

      :: x -

      Set to true to plot against a secondary y-axis; else, false.

      +

      The index value.

      @@ -2110,7 +1094,7 @@

      Arguments

      @@ -2134,7 +1118,8 @@

      Arguments

      @@ -2146,14 +1131,14 @@

      Arguments

      -

      procedure, public :: set_label => pdb_set_label +

      procedure, public :: set_is_filled => pdh_set_is_filled

      • - private subroutine pdb_set_label(this, index, txt) + private subroutine pdh_set_is_filled(this, x)

        -

        Sets the axis label for a specific data set.

        +

        Sets a value determining if each box is filled.

        Arguments

      - class(plot_data_bar), + class(plot_data_histogram), intent(inout) @@ -2119,7 +1103,7 @@

      Arguments

      :: this -

      The plot_data_bar object.

      +

      The plot_data_histogram object.

      :: x -

      Set to true if the bars are to be filled; else, false.

      +

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

      @@ -2169,7 +1154,7 @@

      Arguments

      - - - - - - - - - + @@ -2333,183 +1304,6 @@

      Arguments

      - class(plot_data_bar), + class(plot_data_histogram), intent(inout) @@ -2178,37 +1163,23 @@

      Arguments

      :: this -

      The plot_data_bar object.

      -
      - - integer(kind=int32) - - - ::index -

      The index of the data set.

      +

      The plot_data_histogram object.

      - character(len=*), + logical, intent(in) ::txtx -

      The label.

      +

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

      -
    • -
    -

    - -
    -

    procedure, public :: set_number_format => pdh_set_num_fmt -

    -
      -
    • -

      - private subroutine pdh_set_num_fmt(this, x) -

      -

      Sets the numerical format string used for the labels.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_histogram), - intent(inout) - - ::this -

      The plot_data_histogram object.

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

      The format string (e.g. "(F6.2)").

      -
      - - -
    • -
    -
    - -
    -

    procedure, public :: set_transparency => pdb_set_alpha -

    -
      -
    • -

      - private subroutine pdb_set_alpha(this, x) -

      -

      Gets the alpha (transparency) for the bar color.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_bar), - intent(inout) - - ::this -

      The plot_data_bar object.

      -
      - - real(kind=real32), - intent(in) - - ::x -

      The alpha value ([0, 1]).

      -
      - - -
    • -
    -
    - -
    -

    procedure, public :: set_use_labels => pdb_set_use_labels -

    -
      -
    • -

      - private subroutine pdb_set_use_labels(this, x) -

      -

      Sets a value determining if labels are used to identify the data.

      - -

      Arguments

      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      TypeIntentOptional AttributesName
      - - class(plot_data_bar), - intent(inout) - - ::this -

      The plot_data_bar object.

      -
      - - logical, - intent(in) - - ::x -

      Set to true if labels are used; else, false.

      -
      - -
    @@ -2532,7 +1326,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/plot_data_tri_2d.html b/doc/type/plot_data_tri_2d.html index 1c097a6..598754e 100644 --- a/doc/type/plot_data_tri_2d.html +++ b/doc/type/plot_data_tri_2d.html @@ -96,7 +96,7 @@

    plot_data_tri_2d
  • 15 statements + title="

    1.9% of total for derived types.

    Including implementation: 183 statements, 1.5% of total for derived types.">15 statements
  • @@ -151,8 +151,8 @@

    define_data get_color_index - get_command_string - get_data_string + get_command_string + get_data_string get_line_color get_line_style get_line_width @@ -207,8 +207,8 @@

    define_data get_color_index - get_command_string - get_data_string + get_command_string + get_data_string get_line_color get_line_style get_line_width @@ -239,7 +239,7 @@

    Type-Bound Procedures

    • - private module subroutine pdt2d_define_data(this, tri) + private subroutine pdt2d_define_data(this, tri)

      Defines the data to plot.

      @@ -342,12 +342,12 @@

    -

    procedure, public :: get_command_string => pdt2d_get_cmd +

    procedure, public :: get_command_string => pdt2d_get_cmd

    • - private module function pdt2d_get_cmd(this) result(x) + private function pdt2d_get_cmd(this) result(x)

      Gets the GNUPLOT command string for the object.

      @@ -391,12 +391,12 @@

    -

    procedure, public :: get_data_string => pdt2d_get_data_cmd +

    procedure, public :: get_data_string => pdt2d_get_data_cmd

    • - private module function pdt2d_get_data_cmd(this) result(x) + private function pdt2d_get_data_cmd(this) result(x)

      Gets the GNUPLOT command string describing the data to plot.

      @@ -494,7 +494,7 @@

      • - private pure module function pdt2d_get_line_style(this) result(rst) + private pure function pdt2d_get_line_style(this) result(rst)

        Gets the line style.

        @@ -561,7 +561,7 @@

        • - private pure module function pdt2d_get_line_width(this) result(rst) + private pure function pdt2d_get_line_width(this) result(rst)

          Gets the width of the lines used to draw the triangulation.

          @@ -777,7 +777,7 @@

          Arguments

          • - private module subroutine pdt2d_set_line_style(this, x) + private subroutine pdt2d_set_line_style(this, x)

            Sets the line style.

            @@ -854,7 +854,7 @@

            Arguments

            • - private module subroutine pdt2d_set_line_width(this, x) + private subroutine pdt2d_set_line_width(this, x)

              Sets the width of the lines used to draw the triangulation.

              @@ -984,7 +984,7 @@

              Arguments

              Documentation generated by FORD - on 2025-03-28 05:45

              + on 2025-04-10 13:38


    diff --git a/doc/type/plot_label.html b/doc/type/plot_label.html index 557986f..880fce1 100644 --- a/doc/type/plot_label.html +++ b/doc/type/plot_label.html @@ -96,7 +96,7 @@

    plot_label
  • 16 statements + title="

    2.0% of total for derived types.

    Including implementation: 81 statements, 0.7% of total for derived types.">16 statements
  • @@ -726,7 +726,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


  • diff --git a/doc/type/plot_object.html b/doc/type/plot_object.html index d21fd7e..54d7da4 100644 --- a/doc/type/plot_object.html +++ b/doc/type/plot_object.html @@ -96,7 +96,7 @@

    plot_object
  • 4 statements + title="

    0.5% of total for derived types.

    Including implementation: 4 statements, 0.0% of total for derived types.">4 statements
  • @@ -276,7 +276,7 @@

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


  • diff --git a/doc/type/plot_polar.html b/doc/type/plot_polar.html index 2227123..75bef23 100644 --- a/doc/type/plot_polar.html +++ b/doc/type/plot_polar.html @@ -96,7 +96,7 @@

    plot_polar
  • 20 statements + title="

    2.6% of total for derived types.

    Including implementation: 570 statements, 4.8% of total for derived types.">20 statements
  • @@ -171,16 +171,19 @@

    get_arrow_count get_autoscale get_axis_equal + get_bottom_margin get_colormap - get_command_string + get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count + get_left_margin get_legend get_radial_limits + get_right_margin get_show_colorbar get_show_gridlines get_terminal @@ -188,6 +191,7 @@

    get_theta_start_position get_tics_inward get_title + get_top_margin initialize is_title_defined pop @@ -201,18 +205,22 @@

    set_arrow set_autoscale set_axis_equal + set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label + set_left_margin set_radial_limits + set_right_margin set_show_colorbar set_show_gridlines set_theta_direction set_theta_start_position set_tics_inward set_title + set_top_margin @@ -278,16 +286,19 @@

    get_arrow_count get_autoscale get_axis_equal + get_bottom_margin get_colormap - get_command_string + get_command_string get_count get_draw_border get_font_name get_font_size get_label get_label_count + get_left_margin get_legend get_radial_limits + get_right_margin get_show_colorbar get_show_gridlines get_terminal @@ -295,6 +306,7 @@

    get_theta_start_position get_tics_inward get_title + get_top_margin initialize is_title_defined pop @@ -308,18 +320,22 @@

    set_arrow set_autoscale set_axis_equal + set_bottom_margin set_colormap set_draw_border set_font_name set_font_size set_label + set_left_margin set_radial_limits + set_right_margin set_show_colorbar set_show_gridlines set_theta_direction set_theta_start_position set_tics_inward set_title + set_top_margin @@ -917,6 +933,56 @@

    Returns true if the axes should be scaled equally; else, false.

    +
  • + + + +
    +

    procedure, public :: get_bottom_margin => plt_get_bottom_margin +

    +
      +
    • +

      + private pure function plt_get_bottom_margin(this) result(x) +

      +

      Gets the bottom margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -972,7 +1038,7 @@

    -

    procedure, public :: get_command_string => plr_get_cmd +

    procedure, public :: get_command_string => plr_get_cmd

    • @@ -1325,6 +1391,56 @@

      The number of plot_label objects.

      +
    • +
    +

    + +
    +

    procedure, public :: get_left_margin => plt_get_left_margin +

    +
      +
    • +

      + private pure function plt_get_left_margin(this) result(x) +

      +

      Gets the left margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1424,6 +1540,56 @@

    A 2-element array containing the minimum and maximum limit values in that order.

    +

  • + + + +
    +

    procedure, public :: get_right_margin => plt_get_right_margin +

    +
      +
    • +

      + private pure function plt_get_right_margin(this) result(x) +

      +

      Gets the right margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1790,6 +1956,56 @@

    The title.

    +
  • + + + +
    +

    procedure, public :: get_top_margin => plt_get_top_margin +

    +
      +
    • +

      + private pure function plt_get_top_margin(this) result(x) +

      +

      Gets the top margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -2645,6 +2861,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_bottom_margin => plt_set_bottom_margin +

    +
      +
    • +

      + private subroutine plt_set_bottom_margin(this, x) +

      +

      Sets the bottom margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -2975,6 +3252,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_left_margin => plt_set_left_margin +

    +
      +
    • +

      + private subroutine plt_set_left_margin(this, x) +

      +

      Sets the left margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3035,6 +3373,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_right_margin => plt_set_right_margin +

    +
      +
    • +

      + private subroutine plt_set_right_margin(this, x) +

      +

      Sets the right margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3412,6 +3811,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_top_margin => plt_set_top_margin +

    +
      +
    • +

      + private subroutine plt_set_top_margin(this, x) +

      +

      Sets the top margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3434,7 +3894,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/png_terminal.html b/doc/type/png_terminal.html index 7f1f02f..e164e8a 100644 --- a/doc/type/png_terminal.html +++ b/doc/type/png_terminal.html @@ -96,7 +96,7 @@

    png_terminal
  • 9 statements + title="

    1.1% of total for derived types.

    Including implementation: 153 statements, 1.3% of total for derived types.">9 statements
  • @@ -149,7 +149,7 @@

    - get_command_string + get_command_string get_filename get_font_name get_font_size @@ -240,7 +240,7 @@

    Type-Bound Procedures

    -

    procedure, public :: get_command_string => png_get_command_string +

    procedure, public :: get_command_string => png_get_command_string

    • @@ -1112,7 +1112,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


    diff --git a/doc/type/qt_terminal.html b/doc/type/qt_terminal.html index 29fd602..07b5f07 100644 --- a/doc/type/qt_terminal.html +++ b/doc/type/qt_terminal.html @@ -96,7 +96,7 @@

    qt_terminal
  • 5 statements + title="

    0.6% of total for derived types.

    Including implementation: 132 statements, 1.1% of total for derived types.">5 statements
  • @@ -149,7 +149,7 @@

  • - get_command_string + get_command_string get_font_name get_font_size get_id_string @@ -236,7 +236,7 @@

    Type-Bound Procedures

    -

    procedure, public :: get_command_string => term_get_command_string +

    procedure, public :: get_command_string => term_get_command_string

    • @@ -1000,7 +1000,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


    diff --git a/doc/type/rainbow_colormap.html b/doc/type/rainbow_colormap.html index fea4b04..5bc3d57 100644 --- a/doc/type/rainbow_colormap.html +++ b/doc/type/rainbow_colormap.html @@ -96,7 +96,7 @@

    rainbow_colormap
  • 4 statements + title="

    0.5% of total for derived types.

    Including implementation: 92 statements, 0.8% of total for derived types.">4 statements
  • @@ -779,7 +779,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


  • diff --git a/doc/type/scatter_plot_data.html b/doc/type/scatter_plot_data.html index 235b028..d47e336 100644 --- a/doc/type/scatter_plot_data.html +++ b/doc/type/scatter_plot_data.html @@ -96,7 +96,7 @@

    scatter_plot_data
  • 47 statements + title="

    6.0% of total for derived types.

    Including implementation: 271 statements, 2.3% of total for derived types.">47 statements
  • @@ -2518,7 +2518,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


  • diff --git a/doc/type/surface_plot.html b/doc/type/surface_plot.html index 31b2bf1..fe3f9da 100644 --- a/doc/type/surface_plot.html +++ b/doc/type/surface_plot.html @@ -96,7 +96,7 @@

    surface_plot
  • 26 statements + title="

    3.3% of total for derived types.

    Including implementation: 608 statements, 5.1% of total for derived types.">26 statements
  • @@ -160,8 +160,9 @@

    get_arrow_count get_axis_equal get_azimuth + get_bottom_margin get_colormap - get_command_string + get_command_string get_coordinate_system get_count get_draw_border @@ -170,8 +171,10 @@

    get_font_size get_label get_label_count + get_left_margin get_legend get_light_intensity + get_right_margin get_show_colorbar get_show_contours get_show_gridlines @@ -180,6 +183,7 @@

    get_terminal get_tics_inward get_title + get_top_margin get_transparency get_use_lighting get_use_map_view @@ -187,7 +191,7 @@

    get_y_axis get_z_axis get_z_intersect_xy - initialize + initialize is_title_defined pop pop_arrow @@ -201,6 +205,7 @@

    set_arrow set_axis_equal set_azimuth + set_bottom_margin set_colormap set_coordinate_system set_draw_border @@ -208,7 +213,9 @@

    set_font_name set_font_size set_label + set_left_margin set_light_intensity + set_right_margin set_show_colorbar set_show_contours set_show_gridlines @@ -216,6 +223,7 @@

    set_specular_intensity set_tics_inward set_title + set_top_margin set_transparency set_use_lighting set_use_map_view @@ -274,8 +282,9 @@

    get_arrow_count get_axis_equal get_azimuth + get_bottom_margin get_colormap - get_command_string + get_command_string get_coordinate_system get_count get_draw_border @@ -284,8 +293,10 @@

    get_font_size get_label get_label_count + get_left_margin get_legend get_light_intensity + get_right_margin get_show_colorbar get_show_contours get_show_gridlines @@ -294,6 +305,7 @@

    get_terminal get_tics_inward get_title + get_top_margin get_transparency get_use_lighting get_use_map_view @@ -301,7 +313,7 @@

    get_y_axis get_z_axis get_z_intersect_xy - initialize + initialize is_title_defined pop pop_arrow @@ -315,6 +327,7 @@

    set_arrow set_axis_equal set_azimuth + set_bottom_margin set_colormap set_coordinate_system set_draw_border @@ -322,7 +335,9 @@

    set_font_name set_font_size set_label + set_left_margin set_light_intensity + set_right_margin set_show_colorbar set_show_contours set_show_gridlines @@ -330,6 +345,7 @@

    set_specular_intensity set_tics_inward set_title + set_top_margin set_transparency set_use_lighting set_use_map_view @@ -925,6 +941,56 @@

    The azimuth angle, in degrees.

    +
  • + +

    + +
    +

    procedure, public :: get_bottom_margin => plt_get_bottom_margin +

    +
      +
    • +

      + private pure function plt_get_bottom_margin(this) result(x) +

      +

      Gets the bottom margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -980,7 +1046,7 @@

    -

    procedure, public :: get_command_string => surf_get_cmd +

    procedure, public :: get_command_string => surf_get_cmd

    • @@ -1443,6 +1509,56 @@

      The number of plot_label objects.

      +
    • +
    +

    + +
    +

    procedure, public :: get_left_margin => plt_get_left_margin +

    +
      +
    • +

      + private pure function plt_get_left_margin(this) result(x) +

      +

      Gets the left margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1542,6 +1658,56 @@

    The light intensity ratio.

    +

  • + + + +
    +

    procedure, public :: get_right_margin => plt_get_right_margin +

    +
      +
    • +

      + private pure function plt_get_right_margin(this) result(x) +

      +

      Gets the right margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -1938,6 +2104,56 @@

    The title.

    +
  • + + + +
    +

    procedure, public :: get_top_margin => plt_get_top_margin +

    +
      +
    • +

      + private pure function plt_get_top_margin(this) result(x) +

      +

      Gets the top margin of the plot.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(in) + + ::this +

      The plot object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
    @@ -2291,7 +2507,7 @@

    -

    procedure, public :: initialize => surf_init +

    procedure, public :: initialize => surf_init

    • @@ -3200,6 +3416,67 @@

      Arguments

      +
    • +
    +

    + +
    +

    procedure, public :: set_bottom_margin => plt_set_bottom_margin +

    +
      +
    • +

      + private subroutine plt_set_bottom_margin(this, x) +

      +

      Sets the bottom margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3659,6 +3936,67 @@

    Arguments

    +

  • + + + +
    +

    procedure, public :: set_left_margin => plt_set_left_margin +

    +
      +
    • +

      + private subroutine plt_set_left_margin(this, x) +

      +

      Sets the left margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -3720,6 +4058,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_right_margin => plt_set_right_margin +

    +
      +
    • +

      + private subroutine plt_set_right_margin(this, x) +

      +

      Sets the right margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -4138,6 +4537,67 @@

    Arguments

    +
  • + + + +
    +

    procedure, public :: set_top_margin => plt_set_top_margin +

    +
      +
    • +

      + private subroutine plt_set_top_margin(this, x) +

      +

      Sets the top margin of the plot. If the value is negative, the +default margin is used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot), + intent(inout) + + ::this +

      The plot object.

      +
      + + real(kind=real32), + intent(in) + + ::x +

      The margin, in percent of screen. A negative value indicates the +default margin is used.

      +
      + +
    @@ -4403,7 +4863,7 @@

    Arguments

    Documentation generated by FORD - on 2025-03-28 05:45

    + on 2025-04-10 13:38


    diff --git a/doc/type/surface_plot_data.html b/doc/type/surface_plot_data.html index 3fe66af..46281b2 100644 --- a/doc/type/surface_plot_data.html +++ b/doc/type/surface_plot_data.html @@ -96,7 +96,7 @@

    surface_plot_data
  • 19 statements + title="

    2.4% of total for derived types.

    Including implementation: 201 statements, 1.7% of total for derived types.">19 statements
  • @@ -150,8 +150,8 @@

    define_data - get_command_string - get_data_string + get_command_string + get_data_string get_name get_size get_use_wireframe @@ -207,8 +207,8 @@

    -

    procedure, public :: get_command_string => surfd_get_cmd +

    procedure, public :: get_command_string => surfd_get_cmd

    • @@ -390,7 +390,7 @@

    -

    procedure, public :: get_data_string => surfd_get_data_cmd +

    procedure, public :: get_data_string => surfd_get_data_cmd

    • @@ -1243,7 +1243,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


    diff --git a/doc/type/terminal.html b/doc/type/terminal.html index f2cd7e0..dbd547e 100644 --- a/doc/type/terminal.html +++ b/doc/type/terminal.html @@ -96,7 +96,7 @@

    terminal
  • 25 statements + title="

    3.2% of total for derived types.

    Including implementation: 144 statements, 1.2% of total for derived types.">25 statements
  • @@ -149,7 +149,7 @@

  • - get_command_string + get_command_string get_font_name get_font_size get_id_string @@ -236,7 +236,7 @@

    Type-Bound Procedures

    -

    procedure, public :: get_command_string => term_get_command_string +

    procedure, public :: get_command_string => term_get_command_string

    • @@ -1000,7 +1000,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


    diff --git a/doc/type/tri_surface_plot_data.html b/doc/type/tri_surface_plot_data.html index 9c9c554..9f69bd0 100644 --- a/doc/type/tri_surface_plot_data.html +++ b/doc/type/tri_surface_plot_data.html @@ -96,7 +96,7 @@

    tri_surface_plot_data
  • 13 statements + title="

    1.7% of total for derived types.

    Including implementation: 133 statements, 1.1% of total for derived types.">13 statements
  • @@ -150,8 +150,8 @@

    define_data - get_command_string - get_data_string + get_command_string + get_data_string get_name get_use_wireframe set_name @@ -201,8 +201,8 @@

    -

    procedure, public :: get_command_string => tspd_get_cmd +

    procedure, public :: get_command_string => tspd_get_cmd

    • @@ -331,7 +331,7 @@

    -

    procedure, public :: get_data_string => tspd_get_data_cmd +

    procedure, public :: get_data_string => tspd_get_data_cmd

    • @@ -615,7 +615,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


    diff --git a/doc/type/vector_field_plot_data.html b/doc/type/vector_field_plot_data.html index bcfd602..bd7a35d 100644 --- a/doc/type/vector_field_plot_data.html +++ b/doc/type/vector_field_plot_data.html @@ -96,7 +96,7 @@

    vector_field_plot_data
  • 14 statements + title="

    1.8% of total for derived types.

    Including implementation: 223 statements, 1.9% of total for derived types.">14 statements
  • @@ -152,8 +152,8 @@

    define_data get_arrow_size get_color_index - get_command_string - get_data_string + get_command_string + get_data_string get_fill_arrow get_line_color get_name @@ -209,8 +209,8 @@

    define_data get_arrow_size get_color_index - get_command_string - get_data_string + get_command_string + get_data_string get_fill_arrow get_line_color get_name @@ -471,7 +471,7 @@

  • -

    procedure, public :: get_command_string => vfpd_get_cmd +

    procedure, public :: get_command_string => vfpd_get_cmd

    • @@ -521,7 +521,7 @@

    -

    procedure, public :: get_data_string => vfpd_get_data_cmd +

    procedure, public :: get_data_string => vfpd_get_data_cmd

    • @@ -1081,7 +1081,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


    diff --git a/doc/type/windows_terminal.html b/doc/type/windows_terminal.html index 2138939..e97baae 100644 --- a/doc/type/windows_terminal.html +++ b/doc/type/windows_terminal.html @@ -96,7 +96,7 @@

    windows_terminal
  • 5 statements + title="

    0.6% of total for derived types.

    Including implementation: 132 statements, 1.1% of total for derived types.">5 statements
  • @@ -149,7 +149,7 @@

  • - get_command_string + get_command_string get_font_name get_font_size get_id_string @@ -236,7 +236,7 @@

    Type-Bound Procedures

    -

    procedure, public :: get_command_string => term_get_command_string +

    procedure, public :: get_command_string => term_get_command_string

    • @@ -1000,7 +1000,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


    diff --git a/doc/type/wxt_terminal.html b/doc/type/wxt_terminal.html index faa871c..5d3974f 100644 --- a/doc/type/wxt_terminal.html +++ b/doc/type/wxt_terminal.html @@ -96,7 +96,7 @@

    wxt_terminal
  • 5 statements + title="

    0.6% of total for derived types.

    Including implementation: 132 statements, 1.1% of total for derived types.">5 statements
  • @@ -149,7 +149,7 @@

  • - get_command_string + get_command_string get_font_name get_font_size get_id_string @@ -236,7 +236,7 @@

    Type-Bound Procedures

    -

    procedure, public :: get_command_string => term_get_command_string +

    procedure, public :: get_command_string => term_get_command_string

    • @@ -1000,7 +1000,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


    diff --git a/doc/type/x_axis.html b/doc/type/x_axis.html index 58e916a..3409c4c 100644 --- a/doc/type/x_axis.html +++ b/doc/type/x_axis.html @@ -96,7 +96,7 @@

    x_axis
  • 5 statements + title="

    0.6% of total for derived types.

    Including implementation: 306 statements, 2.6% of total for derived types.">5 statements
  • @@ -154,8 +154,17 @@

    get_id_string get_is_log_scaled get_limits + get_offset_tics + get_show_tic_labels + get_tic_label_alignment + get_tic_label_angle get_tic_label_format + get_tic_label_rotation_origin + get_tic_label_x_offset + get_tic_label_y_offset get_title + get_title_x_offset + get_title_y_offset get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width @@ -163,8 +172,17 @@

    set_autoscale set_is_log_scaled set_limits + set_offset_tics + set_show_tic_labels + set_tic_label_alignment + set_tic_label_angle set_tic_label_format + set_tic_label_rotation_origin + set_tic_label_x_offset + set_tic_label_y_offset set_title + set_title_x_offset + set_title_y_offset set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width @@ -216,8 +234,17 @@

    get_id_string get_is_log_scaled get_limits + get_offset_tics + get_show_tic_labels + get_tic_label_alignment + get_tic_label_angle get_tic_label_format + get_tic_label_rotation_origin + get_tic_label_x_offset + get_tic_label_y_offset get_title + get_title_x_offset + get_title_y_offset get_use_default_tic_label_format get_zero_axis get_zero_axis_line_width @@ -225,8 +252,17 @@

    set_autoscale set_is_log_scaled set_limits + set_offset_tics + set_show_tic_labels + set_tic_label_alignment + set_tic_label_angle set_tic_label_format + set_tic_label_rotation_origin + set_tic_label_x_offset + set_tic_label_y_offset set_title + set_title_x_offset + set_title_y_offset set_use_default_tic_label_format set_zero_axis set_zero_axis_line_width @@ -491,6 +527,214 @@

    A two-element array containing the limits as follows: [lower, upper].

    +

  • + +

    + +
    +

    procedure, public :: get_offset_tics => pa_get_offset_tics +

    +
      +
    • +

      + private pure function pa_get_offset_tics(this) result(x) +

      +

      Gets a value determining if the tics should be offset.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to offset the tics; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_show_tic_labels => pa_get_show_tic_labels +

    +
      +
    • +

      + private pure function pa_get_show_tic_labels(this) result(x) +

      +

      Gets a value determining if tic labels should be shown.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to show tic labels; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment +

    +
      +
    • +

      + private pure function pa_get_tic_label_alignment(this) result(x) +

      +

      Gets the tic label alignment.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_angle => pa_get_tic_label_angle +

    +
      +
    • +

      + private pure function pa_get_tic_label_angle(this) result(x) +

      +

      Gets the tic label angle, in degrees.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The tic label angle, in degrees.

      +
    @@ -501,10 +745,686 @@

    • - private pure function pa_get_tic_label_fmt(this) result(rst) + private pure function pa_get_tic_label_fmt(this) result(rst) +

      +

      Gets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label format string.

      + +
    • +
    +

    + +
    +

    procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin +

    +
      +
    • +

      + private pure function pa_get_tic_rotation_origin(this) result(x) +

      +

      Gets the tic label rotation origin.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset +

    +
      +
    • +

      + private pure function pa_get_tic_x_offset(this) result(x) +

      +

      Gets the tic label x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The tic label x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset +

    +
      +
    • +

      + private pure function pa_get_tic_y_offset(this) result(x) +

      +

      Gets the tic label y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The tic label y-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title => pa_get_title +

    +
      +
    • +

      + private function pa_get_title(this) result(txt) +

      +

      Gets the axis title.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The title.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_x_offset => pa_get_title_x_offset +

    +
      +
    • +

      + private pure function pa_get_title_x_offset(this) result(x) +

      +

      Gets the axis title x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_y_offset => pa_get_title_y_offset +

    +
      +
    • +

      + private pure function pa_get_title_y_offset(this) result(x) +

      +

      Gets the axis title y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title y-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

    +
      +
    • +

      + private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) +

      +

      Gets a value determining if the default tic label format will be +used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if the default tic label format will be used; else, +false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    +
      +
    • +

      + private pure function pa_get_zero_axis(this) result(x) +

      +

      Gets a value determining if the axis should be drawn through +zero of opposing axes.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to draw as a zero axis; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

    +
      +
    • +

      + private pure function pa_get_zero_axis_width(this) result(x) +

      +

      Gets the width of the line used to represent the zero axis line, if +active.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The width of the line, in pixels.

      + +
    • +
    +
    + +
    +

    procedure, public :: is_title_defined => pa_has_title +

    +
      +
    • +

      + private pure function pa_has_title(this) result(x) +

      +

      Gets a value determining if a title has been defined for this axis.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if a title has been defined; else, false.

      + +
    • +
    +
    + +
    +

    procedure, public :: set_autoscale => pa_set_autoscale +

    +
      +
    • +

      + private subroutine pa_set_autoscale(this, x) +

      +

      Sets a value determining if the axis should be automatically scaled +to fit the data.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if the axis should be automatically scaled; else, +set to false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_is_log_scaled => pa_set_log_scale +

    +
      +
    • +

      + private subroutine pa_set_log_scale(this, x) +

      +

      Sets a logical value defining if the axis should be log scaled.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if log scaling is applied to the axis; else, false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_limits => pa_set_axis_limits +

    +
      +
    • +

      + private subroutine pa_set_axis_limits(this, lower, upper)

      -

      Gets the tic label format. The format string can be any format -string accepted by the C command 'printf.'

      +

      Gets the axis display limits, assuming autoscaling is not +active for this axis.

      Arguments

      @@ -522,7 +1442,7 @@

      Arguments

      class(plot_axis), - + @@ -532,28 +1452,53 @@

      Arguments

      The plot_axis object.

      + + + + + + + + + + + + + + + +
      intent(in)intent(inout)
      + + real(kind=real64), + intent(in) + + ::lower +

      The lower display limit.

      +
      + + real(kind=real64), + intent(in) + + ::upper +

      The upper display limit.

      +
      -

      - Return Value - character(len=:), allocatable -

      -

      The tic label format string.

    -

    procedure, public :: get_title => pa_get_title +

    procedure, public :: set_offset_tics => pa_set_offset_tics

    • - private function pa_get_title(this) result(txt) + private subroutine pa_set_offset_tics(this, x)

      -

      Gets the axis title.

      +

      Sets a value determining if the tics should be offset.

      Arguments

      @@ -571,7 +1516,7 @@

      Arguments

      class(plot_axis), - + @@ -581,29 +1526,38 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + logical, + intent(in) + + ::x +

      Set to true to offset the tics; else, set to false.

      +
      -

      - Return Value - character(len=:), allocatable -

      -

      The title.

    -

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

    procedure, public :: set_show_tic_labels => pa_set_show_tic_labels

    • - private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) + private subroutine pa_set_show_tic_labels(this, x)

      -

      Gets a value determining if the default tic label format will be -used.

      +

      Sets a value determining if tic labels should be shown.

      Arguments

      @@ -621,7 +1575,7 @@

      Arguments

      class(plot_axis), - + @@ -631,30 +1585,38 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + logical, + intent(in) + + ::x +

      Set to true to show tic labels; else, set to false.

      +
      -

      - Return Value - logical -

      -

      Returns true if the default tic label format will be used; else, -false.

    -

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment

    • - private pure function pa_get_zero_axis(this) result(x) + private subroutine pa_set_tic_label_alignment(this, x)

      -

      Gets a value determining if the axis should be drawn through -zero of opposing axes.

      +

      Sets the tic label alignment.

      Arguments

      @@ -672,7 +1634,7 @@

      Arguments

      class(plot_axis), - + @@ -682,29 +1644,50 @@

      Arguments

      The plot_axis object.

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

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      +
      -

      - Return Value - logical -

      -

      Returns true to draw as a zero axis; else, set to false.

    -

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

    procedure, public :: set_tic_label_angle => pa_set_tic_label_angle

    • - private pure function pa_get_zero_axis_width(this) result(x) + private subroutine pa_set_tic_label_angle(this, x)

      -

      Gets the width of the line used to represent the zero axis line, if -active.

      +

      Sets the tic label angle, in degrees.

      Arguments

      @@ -722,7 +1705,7 @@

      Arguments

      class(plot_axis), - + @@ -732,28 +1715,39 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + real(kind=real32), + intent(in) + + ::x +

      The tic label angle, in degrees.

      +
      -

      - Return Value - real(kind=real32) -

      -

      The width of the line, in pixels.

    -

    procedure, public :: is_title_defined => pa_has_title +

    procedure, public :: set_tic_label_format => pa_set_tic_label_fmt

    • - private pure function pa_has_title(this) result(x) + private subroutine pa_set_tic_label_fmt(this, x)

      -

      Gets a value determining if a title has been defined for this axis.

      +

      Sets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      Arguments

      @@ -771,7 +1765,7 @@

      Arguments

      class(plot_axis), - + @@ -781,29 +1775,38 @@

      Arguments

      The plot_axis object.

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

      The tic label format string.

      +
      -

      - Return Value - logical -

      -

      Returns true if a title has been defined; else, false.

    -

    procedure, public :: set_autoscale => pa_set_autoscale +

    procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin

    • - private subroutine pa_set_autoscale(this, x) + private subroutine pa_set_tic_rotation_origin(this, x)

      -

      Sets a value determining if the axis should be automatically scaled -to fit the data.

      +

      Sets the tic label rotation origin.

      Arguments

      @@ -834,7 +1837,7 @@

      Arguments

      @@ -856,14 +1870,14 @@

      Arguments

      -

      procedure, public :: set_is_log_scaled => pa_set_log_scale +

      procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset

      • - private subroutine pa_set_log_scale(this, x) + private subroutine pa_set_tic_x_offset(this, x)

        -

        Sets a logical value defining if the axis should be log scaled.

        +

        Sets the tic label x-offset, in characters.

        Arguments

      - logical, + character(len=*), intent(in) @@ -843,8 +1846,19 @@

      Arguments

      :: x -

      Set to true if the axis should be automatically scaled; else, -set to false.

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      @@ -894,7 +1908,7 @@

      Arguments

      @@ -915,15 +1929,14 @@

      Arguments

      -

      procedure, public :: set_limits => pa_set_axis_limits +

      procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset

      • - private subroutine pa_set_axis_limits(this, lower, upper) + private subroutine pa_set_tic_y_offset(this, x)

        -

        Gets the axis display limits, assuming autoscaling is not -active for this axis.

        +

        Sets the tic label y-offset, in characters.

        Arguments

      - logical, + integer(kind=int32), intent(in) @@ -903,7 +1917,7 @@

      Arguments

      :: x -

      Set to true if log scaling is applied to the axis; else, false.

      +

      The tic label x-offset, in characters.

      @@ -954,31 +1967,75 @@

      Arguments

      - + + +
      - real(kind=real64), + integer(kind=int32), intent(in) ::lowerx -

      The lower display limit.

      +

      The tic label y-offset, in characters.

      + + +
    • +
    +

    + +
    +

    procedure, public :: set_title => pa_set_title +

    + +
    + +
    +

    procedure, public :: get_show_tic_labels => pa_get_show_tic_labels +

    +
      +
    • +

      + private pure function pa_get_show_tic_labels(this) result(x) +

      +

      Gets a value determining if tic labels should be shown.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to show tic labels; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment +

    +
      +
    • +

      + private pure function pa_get_tic_label_alignment(this) result(x) +

      +

      Gets the tic label alignment.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_angle => pa_get_tic_label_angle +

    +
      +
    • +

      + private pure function pa_get_tic_label_angle(this) result(x) +

      +

      Gets the tic label angle, in degrees.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The tic label angle, in degrees.

      +
    @@ -501,10 +745,686 @@

    • - private pure function pa_get_tic_label_fmt(this) result(rst) + private pure function pa_get_tic_label_fmt(this) result(rst) +

      +

      Gets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label format string.

      + +
    • +
    +

    + +
    +

    procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin +

    +
      +
    • +

      + private pure function pa_get_tic_rotation_origin(this) result(x) +

      +

      Gets the tic label rotation origin.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset +

    +
      +
    • +

      + private pure function pa_get_tic_x_offset(this) result(x) +

      +

      Gets the tic label x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The tic label x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset +

    +
      +
    • +

      + private pure function pa_get_tic_y_offset(this) result(x) +

      +

      Gets the tic label y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The tic label y-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title => pa_get_title +

    +
      +
    • +

      + private function pa_get_title(this) result(txt) +

      +

      Gets the axis title.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The title.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_x_offset => pa_get_title_x_offset +

    +
      +
    • +

      + private pure function pa_get_title_x_offset(this) result(x) +

      +

      Gets the axis title x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_y_offset => pa_get_title_y_offset +

    +
      +
    • +

      + private pure function pa_get_title_y_offset(this) result(x) +

      +

      Gets the axis title y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title y-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

    +
      +
    • +

      + private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) +

      +

      Gets a value determining if the default tic label format will be +used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if the default tic label format will be used; else, +false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    +
      +
    • +

      + private pure function pa_get_zero_axis(this) result(x) +

      +

      Gets a value determining if the axis should be drawn through +zero of opposing axes.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to draw as a zero axis; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

    +
      +
    • +

      + private pure function pa_get_zero_axis_width(this) result(x) +

      +

      Gets the width of the line used to represent the zero axis line, if +active.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The width of the line, in pixels.

      + +
    • +
    +
    + +
    +

    procedure, public :: is_title_defined => pa_has_title +

    +
      +
    • +

      + private pure function pa_has_title(this) result(x) +

      +

      Gets a value determining if a title has been defined for this axis.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if a title has been defined; else, false.

      + +
    • +
    +
    + +
    +

    procedure, public :: set_autoscale => pa_set_autoscale +

    +
      +
    • +

      + private subroutine pa_set_autoscale(this, x) +

      +

      Sets a value determining if the axis should be automatically scaled +to fit the data.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if the axis should be automatically scaled; else, +set to false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_is_log_scaled => pa_set_log_scale +

    +
      +
    • +

      + private subroutine pa_set_log_scale(this, x) +

      +

      Sets a logical value defining if the axis should be log scaled.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if log scaling is applied to the axis; else, false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_limits => pa_set_axis_limits +

    +
      +
    • +

      + private subroutine pa_set_axis_limits(this, lower, upper)

      -

      Gets the tic label format. The format string can be any format -string accepted by the C command 'printf.'

      +

      Gets the axis display limits, assuming autoscaling is not +active for this axis.

      Arguments

      @@ -522,7 +1442,7 @@

      Arguments

      class(plot_axis), - + @@ -532,28 +1452,53 @@

      Arguments

      The plot_axis object.

      + + + + + + + + + + + + + + + +
      intent(in)intent(inout)
      + + real(kind=real64), + intent(in) + + ::lower +

      The lower display limit.

      +
      + + real(kind=real64), + intent(in) + + ::upper +

      The upper display limit.

      +
      -

      - Return Value - character(len=:), allocatable -

      -

      The tic label format string.

    -

    procedure, public :: get_title => pa_get_title +

    procedure, public :: set_offset_tics => pa_set_offset_tics

    • - private function pa_get_title(this) result(txt) + private subroutine pa_set_offset_tics(this, x)

      -

      Gets the axis title.

      +

      Sets a value determining if the tics should be offset.

      Arguments

      @@ -571,7 +1516,7 @@

      Arguments

      class(plot_axis), - + @@ -581,29 +1526,38 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + logical, + intent(in) + + ::x +

      Set to true to offset the tics; else, set to false.

      +
      -

      - Return Value - character(len=:), allocatable -

      -

      The title.

    -

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

    procedure, public :: set_show_tic_labels => pa_set_show_tic_labels

    • - private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) + private subroutine pa_set_show_tic_labels(this, x)

      -

      Gets a value determining if the default tic label format will be -used.

      +

      Sets a value determining if tic labels should be shown.

      Arguments

      @@ -621,7 +1575,7 @@

      Arguments

      class(plot_axis), - + @@ -631,30 +1585,38 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + logical, + intent(in) + + ::x +

      Set to true to show tic labels; else, set to false.

      +
      -

      - Return Value - logical -

      -

      Returns true if the default tic label format will be used; else, -false.

    -

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment

    • - private pure function pa_get_zero_axis(this) result(x) + private subroutine pa_set_tic_label_alignment(this, x)

      -

      Gets a value determining if the axis should be drawn through -zero of opposing axes.

      +

      Sets the tic label alignment.

      Arguments

      @@ -672,7 +1634,7 @@

      Arguments

      class(plot_axis), - + @@ -682,29 +1644,50 @@

      Arguments

      The plot_axis object.

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

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      +
      -

      - Return Value - logical -

      -

      Returns true to draw as a zero axis; else, set to false.

    -

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

    procedure, public :: set_tic_label_angle => pa_set_tic_label_angle

    • - private pure function pa_get_zero_axis_width(this) result(x) + private subroutine pa_set_tic_label_angle(this, x)

      -

      Gets the width of the line used to represent the zero axis line, if -active.

      +

      Sets the tic label angle, in degrees.

      Arguments

      @@ -722,7 +1705,7 @@

      Arguments

      class(plot_axis), - + @@ -732,28 +1715,39 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + real(kind=real32), + intent(in) + + ::x +

      The tic label angle, in degrees.

      +
      -

      - Return Value - real(kind=real32) -

      -

      The width of the line, in pixels.

    -

    procedure, public :: is_title_defined => pa_has_title +

    procedure, public :: set_tic_label_format => pa_set_tic_label_fmt

    • - private pure function pa_has_title(this) result(x) + private subroutine pa_set_tic_label_fmt(this, x)

      -

      Gets a value determining if a title has been defined for this axis.

      +

      Sets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      Arguments

      @@ -771,7 +1765,7 @@

      Arguments

      class(plot_axis), - + @@ -781,29 +1775,38 @@

      Arguments

      The plot_axis object.

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

      The tic label format string.

      +
      -

      - Return Value - logical -

      -

      Returns true if a title has been defined; else, false.

    -

    procedure, public :: set_autoscale => pa_set_autoscale +

    procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin

    • - private subroutine pa_set_autoscale(this, x) + private subroutine pa_set_tic_rotation_origin(this, x)

      -

      Sets a value determining if the axis should be automatically scaled -to fit the data.

      +

      Sets the tic label rotation origin.

      Arguments

      @@ -834,7 +1837,7 @@

      Arguments

      @@ -856,14 +1870,14 @@

      Arguments

      -

      procedure, public :: set_is_log_scaled => pa_set_log_scale +

      procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset

      • - private subroutine pa_set_log_scale(this, x) + private subroutine pa_set_tic_x_offset(this, x)

        -

        Sets a logical value defining if the axis should be log scaled.

        +

        Sets the tic label x-offset, in characters.

        Arguments

      - logical, + character(len=*), intent(in) @@ -843,8 +1846,19 @@

      Arguments

      :: x -

      Set to true if the axis should be automatically scaled; else, -set to false.

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      @@ -894,7 +1908,7 @@

      Arguments

      @@ -915,15 +1929,14 @@

      Arguments

      -

      procedure, public :: set_limits => pa_set_axis_limits +

      procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset

      • - private subroutine pa_set_axis_limits(this, lower, upper) + private subroutine pa_set_tic_y_offset(this, x)

        -

        Gets the axis display limits, assuming autoscaling is not -active for this axis.

        +

        Sets the tic label y-offset, in characters.

        Arguments

      - logical, + integer(kind=int32), intent(in) @@ -903,7 +1917,7 @@

      Arguments

      :: x -

      Set to true if log scaling is applied to the axis; else, false.

      +

      The tic label x-offset, in characters.

      @@ -954,31 +1967,75 @@

      Arguments

      - + + +
      - real(kind=real64), + integer(kind=int32), intent(in) ::lowerx -

      The lower display limit.

      +

      The tic label y-offset, in characters.

      + + +
    • +
    +

    + +
    +

    procedure, public :: set_title => pa_set_title +

    + +
    + +
    +

    procedure, public :: get_show_tic_labels => pa_get_show_tic_labels +

    +
      +
    • +

      + private pure function pa_get_show_tic_labels(this) result(x) +

      +

      Gets a value determining if tic labels should be shown.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to show tic labels; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment +

    +
      +
    • +

      + private pure function pa_get_tic_label_alignment(this) result(x) +

      +

      Gets the tic label alignment.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_angle => pa_get_tic_label_angle +

    +
      +
    • +

      + private pure function pa_get_tic_label_angle(this) result(x) +

      +

      Gets the tic label angle, in degrees.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The tic label angle, in degrees.

      +
    @@ -501,10 +745,686 @@

    • - private pure function pa_get_tic_label_fmt(this) result(rst) + private pure function pa_get_tic_label_fmt(this) result(rst) +

      +

      Gets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label format string.

      + +
    • +
    +

    + +
    +

    procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin +

    +
      +
    • +

      + private pure function pa_get_tic_rotation_origin(this) result(x) +

      +

      Gets the tic label rotation origin.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset +

    +
      +
    • +

      + private pure function pa_get_tic_x_offset(this) result(x) +

      +

      Gets the tic label x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The tic label x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset +

    +
      +
    • +

      + private pure function pa_get_tic_y_offset(this) result(x) +

      +

      Gets the tic label y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The tic label y-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title => pa_get_title +

    +
      +
    • +

      + private function pa_get_title(this) result(txt) +

      +

      Gets the axis title.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The title.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_x_offset => pa_get_title_x_offset +

    +
      +
    • +

      + private pure function pa_get_title_x_offset(this) result(x) +

      +

      Gets the axis title x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_y_offset => pa_get_title_y_offset +

    +
      +
    • +

      + private pure function pa_get_title_y_offset(this) result(x) +

      +

      Gets the axis title y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title y-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

    +
      +
    • +

      + private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) +

      +

      Gets a value determining if the default tic label format will be +used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if the default tic label format will be used; else, +false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    +
      +
    • +

      + private pure function pa_get_zero_axis(this) result(x) +

      +

      Gets a value determining if the axis should be drawn through +zero of opposing axes.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to draw as a zero axis; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

    +
      +
    • +

      + private pure function pa_get_zero_axis_width(this) result(x) +

      +

      Gets the width of the line used to represent the zero axis line, if +active.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The width of the line, in pixels.

      + +
    • +
    +
    + +
    +

    procedure, public :: is_title_defined => pa_has_title +

    +
      +
    • +

      + private pure function pa_has_title(this) result(x) +

      +

      Gets a value determining if a title has been defined for this axis.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if a title has been defined; else, false.

      + +
    • +
    +
    + +
    +

    procedure, public :: set_autoscale => pa_set_autoscale +

    +
      +
    • +

      + private subroutine pa_set_autoscale(this, x) +

      +

      Sets a value determining if the axis should be automatically scaled +to fit the data.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if the axis should be automatically scaled; else, +set to false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_is_log_scaled => pa_set_log_scale +

    +
      +
    • +

      + private subroutine pa_set_log_scale(this, x) +

      +

      Sets a logical value defining if the axis should be log scaled.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if log scaling is applied to the axis; else, false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_limits => pa_set_axis_limits +

    +
      +
    • +

      + private subroutine pa_set_axis_limits(this, lower, upper)

      -

      Gets the tic label format. The format string can be any format -string accepted by the C command 'printf.'

      +

      Gets the axis display limits, assuming autoscaling is not +active for this axis.

      Arguments

      @@ -522,7 +1442,7 @@

      Arguments

      class(plot_axis), - + @@ -532,28 +1452,53 @@

      Arguments

      The plot_axis object.

      + + + + + + + + + + + + + + + +
      intent(in)intent(inout)
      + + real(kind=real64), + intent(in) + + ::lower +

      The lower display limit.

      +
      + + real(kind=real64), + intent(in) + + ::upper +

      The upper display limit.

      +
      -

      - Return Value - character(len=:), allocatable -

      -

      The tic label format string.

    -

    procedure, public :: get_title => pa_get_title +

    procedure, public :: set_offset_tics => pa_set_offset_tics

    • - private function pa_get_title(this) result(txt) + private subroutine pa_set_offset_tics(this, x)

      -

      Gets the axis title.

      +

      Sets a value determining if the tics should be offset.

      Arguments

      @@ -571,7 +1516,7 @@

      Arguments

      class(plot_axis), - + @@ -581,29 +1526,38 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + logical, + intent(in) + + ::x +

      Set to true to offset the tics; else, set to false.

      +
      -

      - Return Value - character(len=:), allocatable -

      -

      The title.

    -

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

    procedure, public :: set_show_tic_labels => pa_set_show_tic_labels

    • - private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) + private subroutine pa_set_show_tic_labels(this, x)

      -

      Gets a value determining if the default tic label format will be -used.

      +

      Sets a value determining if tic labels should be shown.

      Arguments

      @@ -621,7 +1575,7 @@

      Arguments

      class(plot_axis), - + @@ -631,30 +1585,38 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + logical, + intent(in) + + ::x +

      Set to true to show tic labels; else, set to false.

      +
      -

      - Return Value - logical -

      -

      Returns true if the default tic label format will be used; else, -false.

    -

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment

    • - private pure function pa_get_zero_axis(this) result(x) + private subroutine pa_set_tic_label_alignment(this, x)

      -

      Gets a value determining if the axis should be drawn through -zero of opposing axes.

      +

      Sets the tic label alignment.

      Arguments

      @@ -672,7 +1634,7 @@

      Arguments

      class(plot_axis), - + @@ -682,29 +1644,50 @@

      Arguments

      The plot_axis object.

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

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      +
      -

      - Return Value - logical -

      -

      Returns true to draw as a zero axis; else, set to false.

    -

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

    procedure, public :: set_tic_label_angle => pa_set_tic_label_angle

    • - private pure function pa_get_zero_axis_width(this) result(x) + private subroutine pa_set_tic_label_angle(this, x)

      -

      Gets the width of the line used to represent the zero axis line, if -active.

      +

      Sets the tic label angle, in degrees.

      Arguments

      @@ -722,7 +1705,7 @@

      Arguments

      class(plot_axis), - + @@ -732,28 +1715,39 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + real(kind=real32), + intent(in) + + ::x +

      The tic label angle, in degrees.

      +
      -

      - Return Value - real(kind=real32) -

      -

      The width of the line, in pixels.

    -

    procedure, public :: is_title_defined => pa_has_title +

    procedure, public :: set_tic_label_format => pa_set_tic_label_fmt

    • - private pure function pa_has_title(this) result(x) + private subroutine pa_set_tic_label_fmt(this, x)

      -

      Gets a value determining if a title has been defined for this axis.

      +

      Sets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      Arguments

      @@ -771,7 +1765,7 @@

      Arguments

      class(plot_axis), - + @@ -781,29 +1775,38 @@

      Arguments

      The plot_axis object.

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

      The tic label format string.

      +
      -

      - Return Value - logical -

      -

      Returns true if a title has been defined; else, false.

    -

    procedure, public :: set_autoscale => pa_set_autoscale +

    procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin

    • - private subroutine pa_set_autoscale(this, x) + private subroutine pa_set_tic_rotation_origin(this, x)

      -

      Sets a value determining if the axis should be automatically scaled -to fit the data.

      +

      Sets the tic label rotation origin.

      Arguments

      @@ -834,7 +1837,7 @@

      Arguments

      @@ -856,14 +1870,14 @@

      Arguments

      -

      procedure, public :: set_is_log_scaled => pa_set_log_scale +

      procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset

      • - private subroutine pa_set_log_scale(this, x) + private subroutine pa_set_tic_x_offset(this, x)

        -

        Sets a logical value defining if the axis should be log scaled.

        +

        Sets the tic label x-offset, in characters.

        Arguments

      - logical, + character(len=*), intent(in) @@ -843,8 +1846,19 @@

      Arguments

      :: x -

      Set to true if the axis should be automatically scaled; else, -set to false.

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      @@ -894,7 +1908,7 @@

      Arguments

      @@ -915,15 +1929,14 @@

      Arguments

      -

      procedure, public :: set_limits => pa_set_axis_limits +

      procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset

      • - private subroutine pa_set_axis_limits(this, lower, upper) + private subroutine pa_set_tic_y_offset(this, x)

        -

        Gets the axis display limits, assuming autoscaling is not -active for this axis.

        +

        Sets the tic label y-offset, in characters.

        Arguments

      - logical, + integer(kind=int32), intent(in) @@ -903,7 +1917,7 @@

      Arguments

      :: x -

      Set to true if log scaling is applied to the axis; else, false.

      +

      The tic label x-offset, in characters.

      @@ -954,31 +1967,75 @@

      Arguments

      - + + +
      - real(kind=real64), + integer(kind=int32), intent(in) ::lowerx -

      The lower display limit.

      +

      The tic label y-offset, in characters.

      + + +
    • +
    +

    + +
    +

    procedure, public :: set_title => pa_set_title +

    + +
    + +
    +

    procedure, public :: get_show_tic_labels => pa_get_show_tic_labels +

    +
      +
    • +

      + private pure function pa_get_show_tic_labels(this) result(x) +

      +

      Gets a value determining if tic labels should be shown.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to show tic labels; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_alignment => pa_get_tic_label_alignment +

    +
      +
    • +

      + private pure function pa_get_tic_label_alignment(this) result(x) +

      +

      Gets the tic label alignment.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_angle => pa_get_tic_label_angle +

    +
      +
    • +

      + private pure function pa_get_tic_label_angle(this) result(x) +

      +

      Gets the tic label angle, in degrees.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The tic label angle, in degrees.

      +
    @@ -501,10 +745,686 @@

    • - private pure function pa_get_tic_label_fmt(this) result(rst) + private pure function pa_get_tic_label_fmt(this) result(rst) +

      +

      Gets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label format string.

      + +
    • +
    +

    + +
    +

    procedure, public :: get_tic_label_rotation_origin => pa_get_tic_rotation_origin +

    +
      +
    • +

      + private pure function pa_get_tic_rotation_origin(this) result(x) +

      +

      Gets the tic label rotation origin.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset +

    +
      +
    • +

      + private pure function pa_get_tic_x_offset(this) result(x) +

      +

      Gets the tic label x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The tic label x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset +

    +
      +
    • +

      + private pure function pa_get_tic_y_offset(this) result(x) +

      +

      Gets the tic label y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The tic label y-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title => pa_get_title +

    +
      +
    • +

      + private function pa_get_title(this) result(txt) +

      +

      Gets the axis title.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + character(len=:), allocatable +

      +

      The title.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_x_offset => pa_get_title_x_offset +

    +
      +
    • +

      + private pure function pa_get_title_x_offset(this) result(x) +

      +

      Gets the axis title x-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title x-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_title_y_offset => pa_get_title_y_offset +

    +
      +
    • +

      + private pure function pa_get_title_y_offset(this) result(x) +

      +

      Gets the axis title y-offset, in characters.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + integer(kind=int32) +

      +

      The axis title y-offset, in characters.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

    +
      +
    • +

      + private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) +

      +

      Gets a value determining if the default tic label format will be +used.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if the default tic label format will be used; else, +false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    +
      +
    • +

      + private pure function pa_get_zero_axis(this) result(x) +

      +

      Gets a value determining if the axis should be drawn through +zero of opposing axes.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true to draw as a zero axis; else, set to false.

      + +
    • +
    +
    + +
    +

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

    +
      +
    • +

      + private pure function pa_get_zero_axis_width(this) result(x) +

      +

      Gets the width of the line used to represent the zero axis line, if +active.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + real(kind=real32) +

      +

      The width of the line, in pixels.

      + +
    • +
    +
    + +
    +

    procedure, public :: is_title_defined => pa_has_title +

    +
      +
    • +

      + private pure function pa_has_title(this) result(x) +

      +

      Gets a value determining if a title has been defined for this axis.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(in) + + ::this +

      The plot_axis object.

      +
      + +

      + Return Value + logical +

      +

      Returns true if a title has been defined; else, false.

      + +
    • +
    +
    + +
    +

    procedure, public :: set_autoscale => pa_set_autoscale +

    +
      +
    • +

      + private subroutine pa_set_autoscale(this, x) +

      +

      Sets a value determining if the axis should be automatically scaled +to fit the data.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if the axis should be automatically scaled; else, +set to false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_is_log_scaled => pa_set_log_scale +

    +
      +
    • +

      + private subroutine pa_set_log_scale(this, x) +

      +

      Sets a logical value defining if the axis should be log scaled.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      TypeIntentOptional AttributesName
      + + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + logical, + intent(in) + + ::x +

      Set to true if log scaling is applied to the axis; else, false.

      +
      + + +
    • +
    +
    + +
    +

    procedure, public :: set_limits => pa_set_axis_limits +

    +
      +
    • +

      + private subroutine pa_set_axis_limits(this, lower, upper)

      -

      Gets the tic label format. The format string can be any format -string accepted by the C command 'printf.'

      +

      Gets the axis display limits, assuming autoscaling is not +active for this axis.

      Arguments

      @@ -522,7 +1442,7 @@

      Arguments

      class(plot_axis), - + @@ -532,28 +1452,53 @@

      Arguments

      The plot_axis object.

      + + + + + + + + + + + + + + + +
      intent(in)intent(inout)
      + + real(kind=real64), + intent(in) + + ::lower +

      The lower display limit.

      +
      + + real(kind=real64), + intent(in) + + ::upper +

      The upper display limit.

      +
      -

      - Return Value - character(len=:), allocatable -

      -

      The tic label format string.

    -

    procedure, public :: get_title => pa_get_title +

    procedure, public :: set_offset_tics => pa_set_offset_tics

    • - private function pa_get_title(this) result(txt) + private subroutine pa_set_offset_tics(this, x)

      -

      Gets the axis title.

      +

      Sets a value determining if the tics should be offset.

      Arguments

      @@ -571,7 +1516,7 @@

      Arguments

      class(plot_axis), - + @@ -581,29 +1526,38 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + logical, + intent(in) + + ::x +

      Set to true to offset the tics; else, set to false.

      +
      -

      - Return Value - character(len=:), allocatable -

      -

      The title.

    -

    procedure, public :: get_use_default_tic_label_format => pa_get_use_dft_tic_lbl_fmt +

    procedure, public :: set_show_tic_labels => pa_set_show_tic_labels

    • - private pure function pa_get_use_dft_tic_lbl_fmt(this) result(rst) + private subroutine pa_set_show_tic_labels(this, x)

      -

      Gets a value determining if the default tic label format will be -used.

      +

      Sets a value determining if tic labels should be shown.

      Arguments

      @@ -621,7 +1575,7 @@

      Arguments

      class(plot_axis), - + @@ -631,30 +1585,38 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + logical, + intent(in) + + ::x +

      Set to true to show tic labels; else, set to false.

      +
      -

      - Return Value - logical -

      -

      Returns true if the default tic label format will be used; else, -false.

    -

    procedure, public :: get_zero_axis => pa_get_zero_axis +

    procedure, public :: set_tic_label_alignment => pa_set_tic_label_alignment

    • - private pure function pa_get_zero_axis(this) result(x) + private subroutine pa_set_tic_label_alignment(this, x)

      -

      Gets a value determining if the axis should be drawn through -zero of opposing axes.

      +

      Sets the tic label alignment.

      Arguments

      @@ -672,7 +1634,7 @@

      Arguments

      class(plot_axis), - + @@ -682,29 +1644,50 @@

      Arguments

      The plot_axis object.

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

      The tic label alignment. The tic label alignment must be one of +the following:

      +
        +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_LEFT

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_CENTER

        +
      • +
      • +

        GNUPLOT_HORIZONTAL_ALIGN_RIGHT

        +
      • +
      +
      -

      - Return Value - logical -

      -

      Returns true to draw as a zero axis; else, set to false.

    -

    procedure, public :: get_zero_axis_line_width => pa_get_zero_axis_width +

    procedure, public :: set_tic_label_angle => pa_set_tic_label_angle

    • - private pure function pa_get_zero_axis_width(this) result(x) + private subroutine pa_set_tic_label_angle(this, x)

      -

      Gets the width of the line used to represent the zero axis line, if -active.

      +

      Sets the tic label angle, in degrees.

      Arguments

      @@ -722,7 +1705,7 @@

      Arguments

      class(plot_axis), - + @@ -732,28 +1715,39 @@

      Arguments

      The plot_axis object.

      + + + + + + + +
      intent(in)intent(inout)
      + + real(kind=real32), + intent(in) + + ::x +

      The tic label angle, in degrees.

      +
      -

      - Return Value - real(kind=real32) -

      -

      The width of the line, in pixels.

    -

    procedure, public :: is_title_defined => pa_has_title +

    procedure, public :: set_tic_label_format => pa_set_tic_label_fmt

    • - private pure function pa_has_title(this) result(x) + private subroutine pa_set_tic_label_fmt(this, x)

      -

      Gets a value determining if a title has been defined for this axis.

      +

      Sets the tic label format. The format string can be any format +string accepted by the C command 'printf.'

      Arguments

      @@ -771,7 +1765,7 @@

      Arguments

      class(plot_axis), - + @@ -781,29 +1775,38 @@

      Arguments

      The plot_axis object.

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

      The tic label format string.

      +
      -

      - Return Value - logical -

      -

      Returns true if a title has been defined; else, false.

    -

    procedure, public :: set_autoscale => pa_set_autoscale +

    procedure, public :: set_tic_label_rotation_origin => pa_set_tic_rotation_origin

    • - private subroutine pa_set_autoscale(this, x) + private subroutine pa_set_tic_rotation_origin(this, x)

      -

      Sets a value determining if the axis should be automatically scaled -to fit the data.

      +

      Sets the tic label rotation origin.

      Arguments

      @@ -834,7 +1837,7 @@

      Arguments

      @@ -856,14 +1870,14 @@

      Arguments

      -

      procedure, public :: set_is_log_scaled => pa_set_log_scale +

      procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset

      • - private subroutine pa_set_log_scale(this, x) + private subroutine pa_set_tic_x_offset(this, x)

        -

        Sets a logical value defining if the axis should be log scaled.

        +

        Sets the tic label x-offset, in characters.

        Arguments

      - logical, + character(len=*), intent(in) @@ -843,8 +1846,19 @@

      Arguments

      :: x -

      Set to true if the axis should be automatically scaled; else, -set to false.

      +

      The tic label rotation origin. The tic label rotation origin +must be one of the following:

      +
        +
      • +

        GNUPLOT_ROTATION_ORIGIN_RIGHT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_LEFT

        +
      • +
      • +

        GNUPLOT_ROTATION_ORIGIN_CENTER

        +
      • +
      @@ -894,7 +1908,7 @@

      Arguments

      @@ -915,15 +1929,14 @@

      Arguments

      -

      procedure, public :: set_limits => pa_set_axis_limits +

      procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset

      • - private subroutine pa_set_axis_limits(this, lower, upper) + private subroutine pa_set_tic_y_offset(this, x)

        -

        Gets the axis display limits, assuming autoscaling is not -active for this axis.

        +

        Sets the tic label y-offset, in characters.

        Arguments

      - logical, + integer(kind=int32), intent(in) @@ -903,7 +1917,7 @@

      Arguments

      :: x -

      Set to true if log scaling is applied to the axis; else, false.

      +

      The tic label x-offset, in characters.

      @@ -954,31 +1967,75 @@

      Arguments

      - + + +
      - real(kind=real64), + integer(kind=int32), intent(in) ::lowerx -

      The lower display limit.

      +

      The tic label y-offset, in characters.

      + + +
    • +
    +

    + +
    +

    procedure, public :: set_title => pa_set_title +

    +
      +
    • +

      + private subroutine pa_set_title(this, txt) +

      +

      Sets the axis title.

      + +

      Arguments

      + + + + + + + + + + + + + + + + + + - + @@ -990,15 +2047,14 @@

      Arguments

      -

      procedure, public :: set_tic_label_format => pa_set_tic_label_fmt +

      procedure, public :: set_title_x_offset => pa_set_title_x_offset

      • - private subroutine pa_set_tic_label_fmt(this, x) + private subroutine pa_set_title_x_offset(this, x)

        -

        Sets the tic label format. The format string can be any format -string accepted by the C command 'printf.'

        +

        Sets the axis title x-offset, in characters.

        Arguments

      TypeIntentOptional AttributesName
      - real(kind=real64), + class(plot_axis), + intent(inout) + + ::this +

      The plot_axis object.

      +
      + + character(len=*), intent(in) ::uppertxt -

      The upper display limit.

      +

      The title.

      @@ -1029,7 +2085,7 @@

      Arguments

      @@ -1050,14 +2106,14 @@

      Arguments

      -

      procedure, public :: set_title => pa_set_title +

      procedure, public :: set_title_y_offset => pa_set_title_y_offset

      • - private subroutine pa_set_title(this, txt) + private subroutine pa_set_title_y_offset(this, x)

        -

        Sets the axis title.

        +

        Sets the axis title y-offset, in characters.

        Arguments

      - character(len=*), + integer(kind=int32), intent(in) @@ -1038,7 +2094,7 @@

      Arguments

      :: x -

      The tic label format string.

      +

      The axis title x-offset, in characters.

      @@ -1088,16 +2144,16 @@

      Arguments

      - + @@ -1307,7 +2363,7 @@

      Arguments

      Documentation generated by FORD - on 2025-03-28 05:45

      + on 2025-04-10 13:38


      diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index fa76007..6fbed93 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -137,4 +137,12 @@ target_link_libraries(variable_point_size_2d_example fplot) # Example 35 add_executable(variable_point_size_3d_example variable_point_size_3d_example.f90) -target_link_libraries(variable_point_size_3d_example fplot) \ No newline at end of file +target_link_libraries(variable_point_size_3d_example fplot) + +# Example 36 +add_executable(correlation_plot_example correlation_plot_example.f90) +target_link_libraries(correlation_plot_example fplot) + +# Example 37 +add_executable(margins_example margins_example.f90) +target_link_libraries(margins_example fplot) diff --git a/examples/correlation_plot_example.f90 b/examples/correlation_plot_example.f90 new file mode 100644 index 0000000..6b25d93 --- /dev/null +++ b/examples/correlation_plot_example.f90 @@ -0,0 +1,23 @@ +program example + use iso_fortran_env + use fplot_core + implicit none + + ! Parameters + integer(int32), parameter :: npts = 1000 + integer(int32), parameter :: nparams = 3 + + ! Local Variables + type(correlation_plot) :: plt + real(real64) :: m, x(npts, nparams) + + ! Generate some data + call random_number(m) + call random_number(x) + x(:,2) = m * x(:,1) * (1.0d0 + 0.5d0 * x(:,1)) + 0.1d0 * (x(:,2) - 1.0d0) + x(:,3) = 1.0d-2 * x(:,3) / (x(:,2) + 1.5d0) + + ! Create the plot + call plt%initialize(x, width = 1200, height = 800) + call plt%draw() +end program \ No newline at end of file diff --git a/examples/histogram_example.f90 b/examples/histogram_example.f90 index b190ebe..388d607 100644 --- a/examples/histogram_example.f90 +++ b/examples/histogram_example.f90 @@ -5,13 +5,15 @@ program example ! Local Variables integer(int32), parameter :: n = 5000 - integer(int32), parameter :: nbins = 12 + integer(int32), parameter :: nbins = 30 real(real64) :: x(n), u(n), v(n) - type(plot_bar) :: plt ! can also be plot_2d + type(plot_2d) :: plt type(plot_data_histogram) :: pd1 + class(plot_axis), pointer :: xAxis ! Initialization call plt%initialize() + xAxis => plt%get_x_axis() ! Create some data call random_number(u) @@ -19,10 +21,13 @@ program example v = v - 1.0d0 x = u * u - v * v + ! Rotate the labels on the x axis + call xAxis%set_tic_label_angle(90.0) + call xAxis%set_tic_label_rotation_origin(GNUPLOT_ROTATION_ORIGIN_RIGHT) + ! Plot the data - call pd1%set_bin_count(nbins) ! optiona, but must be done prior to define_data is used + call pd1%set_bin_count(nbins) ! optional, but must be done prior to define_data is used call pd1%define_data(x) - call pd1%set_transparency(0.5) ! optional - for illustration purposes call plt%push(pd1) call plt%draw() end program \ No newline at end of file diff --git a/examples/margins_example.f90 b/examples/margins_example.f90 new file mode 100644 index 0000000..bf9f44e --- /dev/null +++ b/examples/margins_example.f90 @@ -0,0 +1,68 @@ +program example + use, intrinsic :: iso_fortran_env + use fplot_core + implicit none + + ! Parameters + integer(int32), parameter :: n = 1000 + + ! Local Variables + real(real64), dimension(n) :: x, y1, y2 + type(plot_2d) :: plt + type(plot_data_2d) :: d1, d2 + class(plot_axis), pointer :: xAxis, yAxis + type(legend), pointer :: leg + + ! Initialize the plot object + call plt%initialize() + + ! Define titles + call plt%set_title("Example Plot") + call plt%set_font_size(14) + + xAxis => plt%get_x_axis() + call xAxis%set_title("X Axis") + + yAxis => plt%get_y_axis() + call yAxis%set_title("Y Axis") + + ! Set margins + call plt%set_left_margin(0.25) + call plt%set_right_margin(0.75) + call plt%set_top_margin(0.75) + call plt%set_bottom_margin(0.35) + + ! Establish legend properties + leg => plt%get_legend() + call leg%set_is_visible(.true.) + call leg%set_draw_inside_axes(.false.) + call leg%set_horizontal_position(LEGEND_CENTER) + call leg%set_vertical_position(LEGEND_BOTTOM) + call leg%set_draw_border(.false.) + + ! Define the data, and then add it to the plot + x = linspace(0.0d0, 10.0d0, n) + y1 = sin(5.0d0 * x) + y2 = 2.0d0 * cos(2.0d0 * x) + + call d1%define_data(x, y1) + call d2%define_data(x, y2) + + ! Define properties for each data set + call d1%set_name("Data Set 1") + call d1%set_draw_markers(.true.) + call d1%set_marker_frequency(10) + call d1%set_marker_style(MARKER_EMPTY_CIRCLE) + call d1%set_marker_scaling(2.0) + + call d2%set_name("Data Set 2") + call d2%set_line_style(LINE_DASHED) + call d2%set_line_width(2.0) + + ! Add the data sets to the plot + call plt%push(d1) + call plt%push(d2) + + ! Let GNUPLOT draw the plot + call plt%draw() +end program \ No newline at end of file diff --git a/fpm.toml b/fpm.toml index 5a5e0fa..3f8f963 100644 --- a/fpm.toml +++ b/fpm.toml @@ -1,5 +1,5 @@ name = "fplot" -version = "1.7.2" +version = "1.8.0" license = "GPL-3.0" author = "Jason Christopherson" maintainer = "Jason Christopherson" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8d2b387..0141f13 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -41,5 +41,6 @@ set(FPLOT_SOURCES ${dir}/fplot_plot_data_2d.f90 ${dir}/fplot_plot_data_3d.f90 ${dir}/fplot_surface_plot_data.f90 + ${dir}/fplot_stats_plots.f90 ) set(FPLOT_SOURCES ${FPLOT_SOURCES} PARENT_SCOPE) diff --git a/src/fplot_colormap.f90 b/src/fplot_colormap.f90 index 92dea51..17469e7 100644 --- a/src/fplot_colormap.f90 +++ b/src/fplot_colormap.f90 @@ -406,8 +406,8 @@ function custom_get_clr(this) result(x) !! The command string. type(string_builder) :: str - integer(int32) :: i, n, r, g, b - type(color) :: clr + integer(int32) :: i, n, r, g, b, c + character(len = 6) :: ctxt if (.not.associated(this%m_map)) then allocate(character(len = 0) :: x) @@ -417,12 +417,14 @@ function custom_get_clr(this) result(x) n = this%m_map%get_levels() do i = 0, n - 1 ! Get the RGB triple - call this%m_map%get_RGB(i, clr%red, clr%green, clr%blue) + call this%m_map%get_RGB(i, r, g, b) + c = ishft(r, 16) + ishft(g, 8) + b + write(ctxt, '(Z6.6)') c ! Append the color information call str%append(to_string(i)) call str%append(" '#") - call str%append(clr%to_hex_string()) + call str%append(ctxt) call str%append("'") if (i /= n - 1) then call str%append(",") diff --git a/src/fplot_colors.f90 b/src/fplot_colors.f90 index 8a8c486..3338c9b 100644 --- a/src/fplot_colors.f90 +++ b/src/fplot_colors.f90 @@ -34,6 +34,9 @@ module fplot_colors !! The green component of the color (must be between 0 and 255). integer(int32), public :: blue = 255 !! The blue component of the color (must be between 0 and 255). + integer(int32), public :: alpha = 0 + !! The alpha component of the color (must be between 0 and 255). + !! Notice, 0 is fully opaque and 255 is fully transparent. contains procedure, public, pass :: to_hex_string => clr_to_hex_string procedure, public, pass :: copy_from => clr_copy_from @@ -47,50 +50,50 @@ module fplot_colors module procedure :: clr_not_equals end interface - type(color), parameter :: CLR_BLACK = color(0, 0, 0) + type(color), parameter :: CLR_BLACK = color(0, 0, 0, 0) !! Black. - type(color), parameter :: CLR_WHITE = color(255, 255, 255) + type(color), parameter :: CLR_WHITE = color(255, 255, 255, 0) !! White. - type(color), parameter :: CLR_RED = color(255, 0, 0) + type(color), parameter :: CLR_RED = color(255, 0, 0, 0) !! Red. - type(color), parameter :: CLR_LIME = color(0, 255, 0) + type(color), parameter :: CLR_LIME = color(0, 255, 0, 0) !! Lime. - type(color), parameter :: CLR_BLUE = color(0, 0, 255) + type(color), parameter :: CLR_BLUE = color(0, 0, 255, 0) !! Blue. - type(color), parameter :: CLR_YELLOW = color(255, 255, 0) + type(color), parameter :: CLR_YELLOW = color(255, 255, 0, 0) !! Yellow. - type(color), parameter :: CLR_CYAN = color(0, 255, 255) + type(color), parameter :: CLR_CYAN = color(0, 255, 255, 0) !! Cyan. - type(color), parameter :: CLR_MAGENTA = color(255, 0, 255) + type(color), parameter :: CLR_MAGENTA = color(255, 0, 255, 0) !! Magenta. - type(color), parameter :: CLR_SILVER = color(192, 192, 192) + type(color), parameter :: CLR_SILVER = color(192, 192, 192, 0) !! Silver. - type(color), parameter :: CLR_GRAY = color(128, 128, 128) + type(color), parameter :: CLR_GRAY = color(128, 128, 128, 0) !! Gray. - type(color), parameter :: CLR_MAROON = color(128, 0, 0) + type(color), parameter :: CLR_MAROON = color(128, 0, 0, 0) !! Maroon. - type(color), parameter :: CLR_OLIVE = color(128, 128, 0) + type(color), parameter :: CLR_OLIVE = color(128, 128, 0, 0) !! Olive. - type(color), parameter :: CLR_GREEN = color(0, 128, 0) + type(color), parameter :: CLR_GREEN = color(0, 128, 0, 0) !! Green. - type(color), parameter :: CLR_PURPLE = color(128, 0, 128) + type(color), parameter :: CLR_PURPLE = color(128, 0, 128, 0) !! Purple. - type(color), parameter :: CLR_TEAL = color(0, 128, 128) + type(color), parameter :: CLR_TEAL = color(0, 128, 128, 0) !! Teal. - type(color), parameter :: CLR_NAVY = color(0, 0, 128) + type(color), parameter :: CLR_NAVY = color(0, 0, 128, 0) !! Navy. - type(color), parameter :: CLR_ORANGE = color(255, 165, 0) + type(color), parameter :: CLR_ORANGE = color(255, 165, 0, 0) !! Orange. ! A list of colors that can be cycled through by plotting code type(color), parameter, dimension(7) :: color_list = [ & - color(0, int(0.447 * 255), int(0.741 * 255)), & - color(int(0.85 * 255), int(0.325 * 255), int(0.098 * 255)), & - color(int(0.929 * 255), int(0.694 * 255), int(0.125 * 255)), & - color(int(0.494 * 255), int(0.184 * 255), int(0.556 * 255)), & - color(int(0.466 * 255), int(0.674 * 255), int(0.188 * 255)), & - color(int(0.301 * 255), int(0.745 * 255), int(0.933 * 255)), & - color(int(0.635 * 255), int(0.078 * 255), int(0.184 * 255))] + color(0, int(0.447 * 255), int(0.741 * 255), 0), & + color(int(0.85 * 255), int(0.325 * 255), int(0.098 * 255), 0), & + color(int(0.929 * 255), int(0.694 * 255), int(0.125 * 255), 0), & + color(int(0.494 * 255), int(0.184 * 255), int(0.556 * 255), 0), & + color(int(0.466 * 255), int(0.674 * 255), int(0.188 * 255), 0), & + color(int(0.301 * 255), int(0.745 * 255), int(0.933 * 255), 0), & + color(int(0.635 * 255), int(0.078 * 255), int(0.184 * 255), 0)] contains ! ------------------------------------------------------------------------------ @@ -98,11 +101,11 @@ pure function clr_to_hex_string(this) result(txt) !! Returns the color in hexadecimal format. class(color), intent(in) :: this !! The color object. - character(6) :: txt + character(8) :: txt !! A string containing the hexadecimal equivalent. ! Local Variables - integer(int32) :: r, g, b, clr + integer(int32) :: r, g, b, a, clr ! Clip each color if necessary if (this%red < 0) then @@ -129,11 +132,19 @@ pure function clr_to_hex_string(this) result(txt) b = this%blue end if + if (this%alpha < 0) then + a = 0 + else if (this%alpha > 255) then + a = 255 + else + a = this%alpha + end if + ! Build the color information - clr = ishft(r, 16) + ishft(g, 8) + b + clr = ishft(a, 24) + ishft(r, 16) + ishft(g, 8) + b ! Convert the integer to a hexadecimal string - write(txt, '(Z6.6)') clr + write(txt, '(Z8.8)') clr end function ! ------------------------------------------------------------------------------ diff --git a/src/fplot_constants.f90 b/src/fplot_constants.f90 index 1edd0cc..fb476a9 100644 --- a/src/fplot_constants.f90 +++ b/src/fplot_constants.f90 @@ -149,4 +149,23 @@ module fplot_constants integer(int32), parameter :: GNUPLOT_MAX_PATH_LENGTH = 256 !! Defines the maximum number of characters allowed in a file path. +! ****************************************************************************** +! HORIZONTAL ALIGNMENT CONSTANTS +! ------------------------------------------------------------------------------ + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_LEFT = "left" + !! Defines the text should be aligned to the left. + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_CENTER = "center" + !! Defines the text should be centered. + character(len = *), parameter :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT = "right" + !! Defines the text should be aligned to the right. + +! ****************************************************************************** +! ROTATION ORIGIN CONSTANTS +! ------------------------------------------------------------------------------ + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_RIGHT = "right" + !! Defines the text should be rotated around the right side of the text. + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_CENTER = "center" + !! Defines the text should be rotated around the center of the text. + character(len = *), parameter :: GNUPLOT_ROTATION_ORIGIN_LEFT = "left" + !! Defines the text should be rotated around the left side of the text. end module \ No newline at end of file diff --git a/src/fplot_core.f90 b/src/fplot_core.f90 index 12d590a..42abae9 100644 --- a/src/fplot_core.f90 +++ b/src/fplot_core.f90 @@ -40,6 +40,7 @@ module fplot_core use fplot_multiplot use fplot_plot_bar use fplot_plot_polar + use fplot_stats_plots implicit none private @@ -92,6 +93,12 @@ module fplot_core public :: ARROW_EMPTY public :: ARROW_NO_FILL public :: ARROW_NO_BORDER + public :: GNUPLOT_HORIZONTAL_ALIGN_LEFT + public :: GNUPLOT_HORIZONTAL_ALIGN_CENTER + public :: GNUPLOT_HORIZONTAL_ALIGN_RIGHT + public :: GNUPLOT_ROTATION_ORIGIN_RIGHT + public :: GNUPLOT_ROTATION_ORIGIN_CENTER + public :: GNUPLOT_ROTATION_ORIGIN_LEFT ! FPLOT_CORE_ROUTINES.F90 public :: linspace @@ -240,4 +247,6 @@ module fplot_core ! FPLOT_PLOT_POLAR.F90 public :: plot_polar + ! FPLOT_STATS_PLOTS.F90 + public :: correlation_plot end module diff --git a/src/fplot_multiplot.f90 b/src/fplot_multiplot.f90 index db0b2d5..571eb6f 100644 --- a/src/fplot_multiplot.f90 +++ b/src/fplot_multiplot.f90 @@ -105,7 +105,7 @@ function mp_get_command(this) result(x) end function ! ------------------------------------------------------------------------------ - subroutine mp_init(this, m, n, term, err) + subroutine mp_init(this, m, n, term, width, height, err) !! Initializes the multiplot object. class(multiplot), intent(inout) :: this !! The multiplot object. @@ -126,6 +126,10 @@ subroutine mp_init(this, m, n, term, err) !! - GNUPLOT_TERMINAL_WXT !! !! - GNUPLOT_TERMINAL_LATEX + integer(int32), intent(in), optional :: width + !! Optionally, the width of the plot window. + integer(int32), intent(in), optional :: height + !! Optionally, the height of the plot window. class(errors), intent(inout), optional, target :: err !! An error handling object. @@ -189,6 +193,14 @@ subroutine mp_init(this, m, n, term, err) call report_memory_error(errmgr, "mp_init", flag) return end if + + ! Size the window? + if (present(width)) then + call this%m_terminal%set_window_width(width) + end if + if (present(height)) then + call this%m_terminal%set_window_height(height) + end if end subroutine ! ------------------------------------------------------------------------------ @@ -283,7 +295,6 @@ subroutine mp_draw(this, persist, err) integer(int32) :: fid, flag class(errors), pointer :: errmgr type(errors), target :: deferr - character(len = 256) :: errmsg class(terminal), pointer :: term ! Initialization @@ -320,8 +331,6 @@ subroutine mp_draw(this, persist, err) ! Clean up by deleting the file open(newunit = fid, file = fname) close(fid, status = "delete") - -100 format(A, I0, A) end subroutine ! ------------------------------------------------------------------------------ diff --git a/src/fplot_plot.f90 b/src/fplot_plot.f90 index 7b75a96..6a51e7b 100644 --- a/src/fplot_plot.f90 +++ b/src/fplot_plot.f90 @@ -54,6 +54,10 @@ module fplot_plot !! Show the colorbar? type(list), private :: m_arrows ! Added 1/3/2024, JAC !! A collection of plot_arrow items to draw. + real(real32), private :: m_leftMargin = -1.0 + real(real32), private :: m_rightMargin = -1.0 + real(real32), private :: m_topMargin = -1.0 + real(real32), private :: m_bottomMargin = -1.0 contains procedure, public :: free_resources => plt_clean_up procedure, public :: initialize => plt_init @@ -99,6 +103,14 @@ module fplot_plot procedure, public :: set_arrow => plt_set_arrow procedure, public :: get_arrow_count => plt_get_arrow_count procedure, public :: clear_arrows => plt_clear_arrows + procedure, public :: get_left_margin => plt_get_left_margin + procedure, public :: set_left_margin => plt_set_left_margin + procedure, public :: get_right_margin => plt_get_right_margin + procedure, public :: set_right_margin => plt_set_right_margin + procedure, public :: get_top_margin => plt_get_top_margin + procedure, public :: set_top_margin => plt_set_top_margin + procedure, public :: get_bottom_margin => plt_get_bottom_margin + procedure, public :: set_bottom_margin => plt_set_bottom_margin end type contains @@ -859,5 +871,99 @@ subroutine plt_clear_arrows(this) call this%m_arrows%clear() end subroutine +! ****************************************************************************** +! ADDED: 4/7/2025 - JAC +! ------------------------------------------------------------------------------ + pure function plt_get_left_margin(this) result(x) + !! Gets the left margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_leftMargin + end function + +! ---------- + subroutine plt_set_left_margin(this, x) + !! Sets the left margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_leftMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_right_margin(this) result(x) + !! Gets the right margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_rightMargin + end function + +! ---------- + subroutine plt_set_right_margin(this, x) + !! Sets the right margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_rightMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_top_margin(this) result(x) + !! Gets the top margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_topMargin + end function + +! ---------- + subroutine plt_set_top_margin(this, x) + !! Sets the top margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_topMargin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function plt_get_bottom_margin(this) result(x) + !! Gets the bottom margin of the plot. + class(plot), intent(in) :: this + !! The plot object. + real(real32) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + x = this%m_bottomMargin + end function + +! ---------- + subroutine plt_set_bottom_margin(this, x) + !! Sets the bottom margin of the plot. If the value is negative, the + !! default margin is used. + class(plot), intent(inout) :: this + !! The plot object. + real(real32), intent(in) :: x + !! The margin, in percent of screen. A negative value indicates the + !! default margin is used. + this%m_bottomMargin = x + end subroutine + ! ------------------------------------------------------------------------------ end module \ No newline at end of file diff --git a/src/fplot_plot_2d.f90 b/src/fplot_plot_2d.f90 index 62769ea..56e9410 100644 --- a/src/fplot_plot_2d.f90 +++ b/src/fplot_plot_2d.f90 @@ -130,6 +130,7 @@ function p2d_get_cmd(this) result(x) ! Local Variables type(string_builder) :: str integer(int32) :: i, n + real(real32) :: lmargin, rmargin, tmargin, bmargin class(plot_data), pointer :: ptr class(plot_axis), pointer :: axis, xAxis, yAxis type(legend), pointer :: leg @@ -156,6 +157,32 @@ function p2d_get_cmd(this) result(x) call str%append('"') end if + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if + ! Axes call str%append(new_line('a')) xAxis => this%get_x_axis() diff --git a/src/fplot_plot_3d.f90 b/src/fplot_plot_3d.f90 index 5fe21c4..22aa7b7 100644 --- a/src/fplot_plot_3d.f90 +++ b/src/fplot_plot_3d.f90 @@ -144,6 +144,7 @@ function p3d_get_cmd(this) result(x) ! Local Variables type(string_builder) :: str integer(int32) :: i, n + real(real64) :: lmargin, rmargin, tmargin, bmargin class(plot_data), pointer :: ptr class(plot_axis), pointer :: xAxis, yAxis, zAxis type(legend), pointer :: leg @@ -170,6 +171,32 @@ function p3d_get_cmd(this) result(x) call str%append('"') end if + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if + ! Axes call str%append(new_line('a')) xAxis => this%get_x_axis() diff --git a/src/fplot_plot_axis.f90 b/src/fplot_plot_axis.f90 index a25142a..3e4397d 100644 --- a/src/fplot_plot_axis.f90 +++ b/src/fplot_plot_axis.f90 @@ -15,25 +15,57 @@ module fplot_plot_axis public :: z_axis type, abstract, extends(plot_object) :: plot_axis - private - logical :: m_hasTitle = .false. + !! Defines a plot axis object. + logical, private :: m_hasTitle = .false. !! Has a title? - character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_title = "" + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_title = "" !! Axis title. - logical :: m_autoscale = .true. + logical, private :: m_autoscale = .true. !! Autoscale? - real(real64), dimension(2) :: m_limits = [0.0d0, 1.0d0] + real(real64), private, dimension(2) :: m_limits = [0.0d0, 1.0d0] !! Display limits. - logical :: m_logScale = .false. + logical, private :: m_logScale = .false. !! Log scaled? - logical :: m_zeroAxis = .false. + logical, private:: m_zeroAxis = .false. !! Has a zero axis? - real(real32) :: m_axisWidth = 1.0 + real(real32), private :: m_axisWidth = 1.0 !! The width, in pixels, of the zero-axis line. - logical :: m_defaultTicLabels = .true. + logical, private :: m_defaultTicLabels = .true. !! Use default tic label format? - character(len = PLOTDATA_MAX_NAME_LENGTH) :: m_ticLabelFmt = "%g" + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_ticLabelFmt = "%g" !! The tic lablel format. + logical, private :: m_showTicLabels = .true. + !! Show tic labels? + integer(int32), private :: m_ticXOffset = 0 + !! The tic label x-offset, in characters. + integer(int32), private :: m_ticYOffset = 0 + !! The tic label y-offset, in characters. + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: & + m_ticLabelAlignment = GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! The tic label alignment. + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + logical, private :: m_offsetTics = .false. + !! Offset tics? + real(real32), private :: m_ticLabelAngle = 0.0 + !! The tic label angle, in degrees. + character(len = PLOTDATA_MAX_NAME_LENGTH), private :: m_ticRotationOrigin = & + GNUPLOT_ROTATION_ORIGIN_CENTER + !! The tic label rotation origin. + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + integer(int32), private :: m_titleXOffset = 0 + !! The axis title x offset, in characters. + integer(int32), private :: m_titleYOffset = 0 + !! The axis title y offset, in characters. contains procedure, public :: get_title => pa_get_title procedure, public :: set_title => pa_set_title @@ -56,6 +88,28 @@ module fplot_plot_axis pa_set_use_dft_tic_lbl_fmt procedure, public :: get_tic_label_format => pa_get_tic_label_fmt procedure, public :: set_tic_label_format => pa_set_tic_label_fmt + procedure, public :: get_show_tic_labels => pa_get_show_tic_labels + procedure, public :: set_show_tic_labels => pa_set_show_tic_labels + procedure, public :: get_tic_label_x_offset => pa_get_tic_x_offset + procedure, public :: set_tic_label_x_offset => pa_set_tic_x_offset + procedure, public :: get_tic_label_y_offset => pa_get_tic_y_offset + procedure, public :: set_tic_label_y_offset => pa_set_tic_y_offset + procedure, public :: get_tic_label_angle => pa_get_tic_label_angle + procedure, public :: set_tic_label_angle => pa_set_tic_label_angle + procedure, public :: get_tic_label_rotation_origin => & + pa_get_tic_rotation_origin + procedure, public :: set_tic_label_rotation_origin => & + pa_set_tic_rotation_origin + procedure, public :: get_tic_label_alignment => & + pa_get_tic_label_alignment + procedure, public :: set_tic_label_alignment => & + pa_set_tic_label_alignment + procedure, public :: get_offset_tics => pa_get_offset_tics + procedure, public :: set_offset_tics => pa_set_offset_tics + procedure, public :: get_title_x_offset => pa_get_title_x_offset + procedure, public :: set_title_x_offset => pa_set_title_x_offset + procedure, public :: get_title_y_offset => pa_get_title_y_offset + procedure, public :: set_title_y_offset => pa_set_title_y_offset end type interface @@ -229,6 +283,7 @@ function pa_get_cmd_string(this) result(txt) ! Local Variables type(string_builder) :: str + real(real32) :: angle character(len = :), allocatable :: axis, fmt real(real64) :: lim(2) @@ -248,6 +303,41 @@ function pa_get_cmd_string(this) result(txt) call str%append(new_line('a')) end if + ! Show Tic Labels? + if (this%get_show_tic_labels()) then + call str%append("set ") + else + call str%append("unset ") + end if + call str%append(axis) + call str%append("tics") + call str%append(new_line('a')) + + ! Tic Label Offsets + if (this%get_show_tic_labels() .and. this%get_offset_tics()) then + call str%append("set ") + call str%append(axis) + call str%append("tics ") + call str%append(this%get_tic_label_alignment()) + call str%append(" offset ") + call str%append(to_string(this%get_tic_label_x_offset())) + call str%append(",") + call str%append(to_string(this%get_tic_label_y_offset())) + call str%append(new_line('a')) + end if + + ! Tic Label Rotation + angle = this%get_tic_label_angle() + if (this%get_show_tic_labels() .and. angle /= 0.0) then + call str%append("set ") + call str%append(axis) + call str%append("tics rotate by ") + call str%append(to_string(angle)) + call str%append(" ") + call str%append(this%get_tic_label_rotation_origin()) + call str%append(new_line('a')) + end if + ! Axis Limits if (this%get_autoscale()) then call str%append("set ") @@ -266,18 +356,30 @@ function pa_get_cmd_string(this) result(txt) ! Titles call str%append(new_line('a')) if (this%is_title_defined()) then + ! Title call str%append("set ") call str%append(axis) call str%append("label ") call str%append('"') call str%append(this%get_title()) call str%append('"') + + ! Offsets + if (this%get_title_x_offset() /= 0 .or. & + this%get_title_y_offset() /= 0) & + then + call str%append(" offset ") + call str%append(to_string(this%get_title_x_offset())) + call str%append(",") + call str%append(to_string(this%get_title_y_offset())) + end if else call str%append("set ") call str%append(axis) call str%append("label ") call str%append('""') end if + call str%append(new_line('a')) ! Scaling call str%append(new_line('a')) @@ -393,6 +495,222 @@ subroutine pa_set_tic_label_fmt(this, x) this%m_ticLabelFmt = x end subroutine +! ------------------------------------------------------------------------------ + pure function pa_get_show_tic_labels(this) result(x) + !! Gets a value determining if tic labels should be shown. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true to show tic labels; else, set to false. + x = this%m_showTicLabels + end function + +! -------------------- + subroutine pa_set_show_tic_labels(this, x) + !! Sets a value determining if tic labels should be shown. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true to show tic labels; else, set to false. + this%m_showTicLabels = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_x_offset(this) result(x) + !! Gets the tic label x-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The tic label x-offset, in characters. + x = this%m_ticXOffset + end function + +! -------------------- + subroutine pa_set_tic_x_offset(this, x) + !! Sets the tic label x-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The tic label x-offset, in characters. + this%m_ticXOffset = x + call this%set_offset_tics(.true.) + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_y_offset(this) result(x) + !! Gets the tic label y-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The tic label y-offset, in characters. + x = this%m_ticYOffset + end function + +! -------------------- + subroutine pa_set_tic_y_offset(this, x) + !! Sets the tic label y-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The tic label y-offset, in characters. + this%m_ticYOffset = x + call this%set_offset_tics(.true.) + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_label_angle(this) result(x) + !! Gets the tic label angle, in degrees. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + real(real32) :: x + !! The tic label angle, in degrees. + x = this%m_ticLabelAngle + end function + +! -------------------- + subroutine pa_set_tic_label_angle(this, x) + !! Sets the tic label angle, in degrees. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + real(real32), intent(in) :: x + !! The tic label angle, in degrees. + this%m_ticLabelAngle = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_rotation_origin(this) result(x) + !! Gets the tic label rotation origin. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: x + !! The tic label rotation origin. The tic label rotation origin + !! must be one of the following: + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + integer(int32) :: n + n = len_trim(this%m_ticRotationOrigin) + allocate(character(len = n) :: x) + x = trim(this%m_ticRotationOrigin) + end function + +! -------------------- + subroutine pa_set_tic_rotation_origin(this, x) + !! Sets the tic label rotation origin. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + character(len = *), intent(in) :: x + !! The tic label rotation origin. The tic label rotation origin + !! must be one of the following: + !! + !! - GNUPLOT_ROTATION_ORIGIN_RIGHT + !! + !! - GNUPLOT_ROTATION_ORIGIN_LEFT + !! + !! - GNUPLOT_ROTATION_ORIGIN_CENTER + this%m_ticRotationOrigin = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_tic_label_alignment(this) result(x) + !! Gets the tic label alignment. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + character(len = :), allocatable :: x + !! The tic label alignment. The tic label alignment must be one of + !! the following: + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + integer(int32) :: n + n = len_trim(this%m_ticLabelAlignment) + allocate(character(len = n) :: x) + x = trim(this%m_ticLabelAlignment) + end function + +! -------------------- + subroutine pa_set_tic_label_alignment(this, x) + !! Sets the tic label alignment. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + character(len = *), intent(in) :: x + !! The tic label alignment. The tic label alignment must be one of + !! the following: + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_LEFT + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_CENTER + !! + !! - GNUPLOT_HORIZONTAL_ALIGN_RIGHT + this%m_ticLabelAlignment = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_offset_tics(this) result(x) + !! Gets a value determining if the tics should be offset. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + logical :: x + !! Returns true to offset the tics; else, set to false. + x = this%m_offsetTics + end function + +! -------------------- + subroutine pa_set_offset_tics(this, x) + !! Sets a value determining if the tics should be offset. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + logical, intent(in) :: x + !! Set to true to offset the tics; else, set to false. + this%m_offsetTics = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_title_x_offset(this) result(x) + !! Gets the axis title x-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The axis title x-offset, in characters. + x = this%m_titleXOffset + end function + +! -------------------- + subroutine pa_set_title_x_offset(this, x) + !! Sets the axis title x-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The axis title x-offset, in characters. + this%m_titleXOffset = x + end subroutine + +! ------------------------------------------------------------------------------ + pure function pa_get_title_y_offset(this) result(x) + !! Gets the axis title y-offset, in characters. + class(plot_axis), intent(in) :: this + !! The plot_axis object. + integer(int32) :: x + !! The axis title y-offset, in characters. + x = this%m_titleYOffset + end function + +! -------------------- + subroutine pa_set_title_y_offset(this, x) + !! Sets the axis title y-offset, in characters. + class(plot_axis), intent(inout) :: this + !! The plot_axis object. + integer(int32), intent(in) :: x + !! The axis title y-offset, in characters. + this%m_titleYOffset = x + end subroutine + ! ****************************************************************************** ! X_AXIS MEMBERS ! ------------------------------------------------------------------------------ diff --git a/src/fplot_plot_bar.f90 b/src/fplot_plot_bar.f90 index a479311..551b14d 100644 --- a/src/fplot_plot_bar.f90 +++ b/src/fplot_plot_bar.f90 @@ -10,7 +10,7 @@ module fplot_plot_bar type, extends(plot_2d) :: plot_bar !! Defines a 2D plot tailored towards bar plotting. - real(real32), private :: m_barWidth = 0.75d0 + real(real32), private :: m_barWidth = 1.0d0 !! A relative scaling of the width of a single bar. The value !! must be between 0 and 1 with 1 being full width. contains diff --git a/src/fplot_plot_data_histogram.f90 b/src/fplot_plot_data_histogram.f90 index b87c58d..adea5bf 100644 --- a/src/fplot_plot_data_histogram.f90 +++ b/src/fplot_plot_data_histogram.f90 @@ -2,30 +2,45 @@ module fplot_plot_data_histogram use iso_fortran_env - use fplot_plot_data_bar + use fplot_plot_data use fplot_errors use ferror use strings + use fplot_colors + use fplot_errors implicit none private public :: plot_data_histogram - type, extends(plot_data_bar) :: plot_data_histogram + type, extends(plot_data_colored) :: plot_data_histogram !! A container for plotting data in the form of a histogram. - integer(int32), private :: m_binCount = 10 + integer(int32), private :: m_binCount = 20 !! The number of bins. - character(len = :), private, allocatable :: m_numberFmt - !! The numerical label format string. + real(real64), private :: m_minX + !! The minimum data value. + real(real64), private :: m_maxX + !! The maximum data value. + real(real64), private, allocatable, dimension(:,:) :: m_data + !! Column 1 is the center of each bin and column 2 is the number + !! of items in each bin. + logical, private :: m_filled = .true. + !! Determines if each bar is filled. + logical, private :: m_useY2 = .false. + !! Draw against the secondary y axis? contains procedure, public :: get_bin_count => pdh_get_bin_count procedure, public :: set_bin_count => pdh_set_bin_count - procedure, public :: bin_data => pdh_bin_data - procedure, public :: get_extreme_values => pdh_get_extremes - procedure, public :: get_number_format => pdh_get_num_fmt - procedure, public :: set_number_format => pdh_set_num_fmt - procedure, public :: set_data_1 => pdh_set_data_1 - procedure, public :: set_data_2 => pdh_set_data_2 - procedure, public :: set_data_3 => pdh_set_data_3 + procedure, public :: get_minimum_value => pdh_get_min_x + procedure, public :: get_maximum_value => pdh_get_max_x + procedure, public :: define_data => pdh_define_data + procedure, public :: get_command_string => pdh_get_cmd + procedure, public :: get_data_string => pdh_get_data_cmd + procedure, public :: get_axes_string => pdh_get_axes_cmd + procedure, public :: get_is_filled => pdh_get_is_filled + procedure, public :: set_is_filled => pdh_set_is_filled + procedure, public :: get_draw_against_y2 => pdh_get_use_y2 + procedure, public :: set_draw_against_y2 => pdh_set_use_y2 + procedure, public :: get => pdh_get_bin_data end type contains @@ -51,20 +66,38 @@ subroutine pdh_set_bin_count(this, x) end subroutine ! ------------------------------------------------------------------------------ -function pdh_bin_data(this, x, err) result(bx) - !! Bins the supplied data set. +pure function pdh_get_min_x(this) result(x) + !! Gets the minimum data value. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + real(real64) :: x + !! The minimum data value. + x = this%m_minX +end function + +! ------------------------------------------------------------------------------ +pure function pdh_get_max_x(this) result(x) + !! Gets the maximum data value. class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. + real(real64) :: x + !! The maximum data value. + x = this%m_maxX +end function + +! ------------------------------------------------------------------------------ +subroutine pdh_define_data(this, x, err) + !! Defines the data set to plot. + class(plot_data_histogram), intent(inout) :: this + !! The plot_data_histogram object. real(real64), intent(in), dimension(:) :: x - !! The data set to bin. + !! The data set to plot. class(errors), intent(inout), optional, target :: err !! An error handling object. - real(real64), allocatable, dimension(:,:) :: bx - !! The binned data. ! Local Variables + integer(int32) :: i, j, n, nbins, flag real(real64) :: maxX, minX, width, val - integer(int32) :: i, j, flag, n, nbins real(real64), allocatable, dimension(:,:) :: ranges class(errors), pointer :: errmgr type(errors), target :: deferr @@ -76,21 +109,23 @@ function pdh_bin_data(this, x, err) result(bx) errmgr => deferr end if n = size(x) - nbins = this%get_bin_count() + nbins = min(n, this%get_bin_count()) ! protects against the case where nbins > n however unlikely ! Get the max and min of the entire data set maxX = maxval(x) minX = minval(x) width = (maxX - minX) / (nbins - 1.0) + this%m_minX = minX + this%m_maxX = maxX ! Allocate space for the output - allocate(bx(nbins, 2), stat = flag) + if (allocated(this%m_data)) deallocate(this%m_data) + allocate(this%m_data(nbins, 2), stat = flag, source = 0.0d0) if (flag == 0) allocate(ranges(nbins, 2), stat = flag) if (flag /= 0) then - call report_memory_error(errmgr, "pdh_bin_data", flag) + call report_memory_error(errmgr, "pdh_define_data", flag) return end if - bx = 0.0d0 ! Define each range ranges(1,:) = [minX, minX + width] @@ -104,180 +139,168 @@ function pdh_bin_data(this, x, err) result(bx) val = x(i) do j = 1, nbins if ((val >= ranges(j,1)) .and. (val <= ranges(j,2))) then - bx(j,1) = bx(j,1) + 1.0d0 ! Counter + this%m_data(j,1) = this%m_data(j,1) + 1.0d0 ! Counter exit ! Exit the inner do loop end if end do end do - ! Now compute the center of each bin - store in column 2 of bx - bx(:,2) = 0.5d0 * (ranges(:,1) + ranges(:,2)) -end function + ! Now compute the center of each bin - store in column 2 of this%m_data + this%m_data(:,2) = 0.5d0 * (ranges(:,1) + ranges(:,2)) +end subroutine ! ------------------------------------------------------------------------------ -pure function pdh_get_extremes(this) result(x) - !! Returns the extreme values in the data set. +function pdh_get_cmd(this) result(rst) + !! Gets the GNUPLOT command string for this object. class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. - real(real64), dimension(2) :: x - !! A two-element array containing the minimum and maximum values, in - !! that order. + character(len = :), allocatable :: rst + !! The command string. ! Local Variables - integer(int32) :: i, j, nrows, ncols - real(real64) :: maxX, minX, val - logical :: check - - ! Initialization - nrows = this%get_count() - ncols = this%get_bar_per_label_count() - check = .true. + type(string_builder) :: str + integer(int32) :: n, ncols + type(color) :: clr ! Process - do j = 1, ncols - do i = 1, nrows - val = this%get(i, j) - if (check) then - maxX = val - minX = val - check = .false. - else - if (val > maxX) maxX = val - if (val < minX) minX = val - end if - end do - end do + call str%append(' "-" ') + call str%append(" with boxes ") - ! End - x = [minX, maxX] -end function + ! Color + clr = this%get_line_color() + call str%append(' lc rgb "#') + call str%append(clr%to_hex_string()) + call str%append('"') -! ------------------------------------------------------------------------------ -subroutine pdh_set_data_1(this, x, err) - !! Defines the data set. - class(plot_data_histogram), intent(inout) :: this - !! The plot_data_histogram object. - real(real64), intent(in), dimension(:) :: x - !! The data set. - class(errors), intent(inout), optional, target :: err - !! An error handling object. - - ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err + ! Filled + if (this%get_is_filled()) then + call str%append(" fill solid ") else - errmgr => deferr + call str%append(" fill empty ") end if - ! Bin the data - bx = this%bin_data(x, errmgr) - if (errmgr%has_error_occurred()) return + ! Define the axes structure + call str%append(" ") + call str%append(this%get_axes_string()) - ! Call the base routine to store the data - use the average values to - ! establish labels for the x-axis - call this%plot_data_bar%set_data_3(bx(:,2), bx(:,1), & - this%get_number_format(), errmgr) -end subroutine + ! End + rst = char(str%to_string()) +end function ! ------------------------------------------------------------------------------ -subroutine pdh_set_data_2(this, labels, x, err) - !! Defines the data set with associated axis labels. - class(plot_data_histogram), intent(inout) :: this +function pdh_get_data_cmd(this) result(rst) + !! Gets the GNUPLOT command string defining the data for this object. + class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. - class(string), intent(in), dimension(:) :: labels - !! The axis labels. - real(real64), intent(in), dimension(:) :: x - !! The data set. - class(errors), intent(inout), optional, target :: err - !! An error handling object. + character(len = :), allocatable :: rst + !! The command string. ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - + type(string_builder) :: str + integer(int32) :: i, nbars, cnt + real(real64) :: val + character :: delimiter, nl + ! Initialization - if (present(err)) then - errmgr => err - else - errmgr => deferr - end if + delimiter = achar(9) + nl = new_line(nl) + nbars = size(this%m_data, 1) - ! Ensure the labels array is the same size as the number of bins - if (size(labels) /= this%get_bin_count()) then - call report_array_size_mismatch_error(errmgr, "pdh_set_data_2", & - "labels", this%get_bin_count(), size(labels)) - return - end if + ! Process + do i = 1, nbars + call this%get(i, val, cnt) + call str%append(to_string(val)) + call str%append(delimiter) + call str%append(to_string(cnt)) + call str%append(nl) + end do - ! Call the base routine to store the data - call this%plot_data_bar%set_data_2(labels, bx(:,1), errmgr) -end subroutine + ! End + rst = char(str%to_string()) +end function ! ------------------------------------------------------------------------------ -subroutine pdh_set_data_3(this, labels, x, fmt, err) - !! Defines the data set with associated axis labels with a specific format. - class(plot_data_histogram), intent(inout) :: this +function pdh_get_axes_cmd(this) result(rst) + !! Gets the GNUPLOT command string defining which axes the data is to be + !! plotted against. + class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. - real(real64), intent(in), dimension(:) :: labels - !! The axis labels. - real(real64), intent(in), dimension(:) :: x - !! The data set. - character(len = *), intent(in), optional :: fmt - !! The format string for the labels (e.g. '(I0)', etc.). - class(errors), intent(inout), optional, target :: err - !! An error handling object. + character(len = :), allocatable :: rst + !! The command string. - ! Local Variables - real(real64), allocatable, dimension(:,:) :: bx - class(errors), pointer :: errmgr - type(errors), target :: deferr - - ! Initialization - if (present(err)) then - errmgr => err + ! Define which axes the data is to be plotted against + if (this%get_draw_against_y2()) then + rst = "axes x1y2" else - errmgr => deferr + rst = "axes x1y1" end if +end function - ! Ensure the labels array is the same size as the number of bins - if (size(labels) /= this%get_bin_count()) then - call report_array_size_mismatch_error(errmgr, "pdh_set_data_3", & - "labels", this%get_bin_count(), size(labels)) - return - end if +! ------------------------------------------------------------------------------ +pure function pdh_get_is_filled(this) result(rst) + !! Gets a value determining if each box is filled. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + logical :: rst + !! Returns true if the boxes are filled; else, false for an empty box. + rst = this%m_filled +end function - ! Call the base routine to store the data - call this%plot_data_bar%set_data_3(labels, bx(:,1), fmt, errmgr) +! -------------------- +subroutine pdh_set_is_filled(this, x) + !! Sets a value determining if each box is filled. + 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. + this%m_filled = x end subroutine ! ------------------------------------------------------------------------------ -pure function pdh_get_num_fmt(this) result(x) - !! Gets the numerical format string used for the labels. +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. class(plot_data_histogram), intent(in) :: this !! The plot_data_histogram object. - character(len = :), allocatable :: x - !! The format string. - if (allocated(this%m_numberFmt)) then - x = this%m_numberFmt - else - x = "(F6.2)" - end if + logical :: rst + !! Returns true if the data is to be plotted against the secondary y + !! axis; else, false for the primary y axis. + rst = this%m_useY2 end function -! ------------------------------------------------------------------------------ -subroutine pdh_set_num_fmt(this, x) - !! Sets the numerical format string used for the labels. +! -------------------- +subroutine pdh_set_use_y2(this, x) + !! Sets a value determining if the data is to be plotted against the + !! secondary y axis. class(plot_data_histogram), intent(inout) :: this !! The plot_data_histogram object. - character(len = *), intent(in) :: x - !! The format string (e.g. "(F6.2)"). - this%m_numberFmt = x + 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. + this%m_useY2 = x +end subroutine + +! ------------------------------------------------------------------------------ +subroutine pdh_get_bin_data(this, i, x, cnt) + !! Gets the requested binned data. + class(plot_data_histogram), intent(in) :: this + !! The plot_data_histogram object. + integer(int32), intent(in) :: i + !! The bin number to get. + real(real64), intent(out) :: x + !! The center of the bin. + integer(int32), intent(out) :: cnt + !! The number of items in the bin. + + ! Process + if (.not.allocated(this%m_data)) then + cnt = 0 + x = 0.0d0 + return + end if + x = this%m_data(i,2) + cnt = floor(this%m_data(i,1)) end subroutine ! ------------------------------------------------------------------------------ diff --git a/src/fplot_plot_polar.f90 b/src/fplot_plot_polar.f90 index 47b3ebd..ce171d3 100644 --- a/src/fplot_plot_polar.f90 +++ b/src/fplot_plot_polar.f90 @@ -109,6 +109,7 @@ function plr_get_cmd(this) result(x) integer(int32) :: i, n type(string_builder) :: str type(legend), pointer :: leg + real(real64) :: lmargin, rmargin, tmargin, bmargin real(real64) :: lim(2) ! class(plot_label), pointer :: lbl class(plot_data), pointer :: ptr @@ -119,6 +120,32 @@ function plr_get_cmd(this) result(x) ! Call the base routine call str%append(this%plot%get_command_string()) + ! Margin + lmargin = this%get_left_margin() + rmargin = this%get_right_margin() + tmargin = this%get_top_margin() + bmargin = this%get_bottom_margin() + if (lmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set lmargin at screen ") + call str%append(to_string(lmargin)) + end if + if (rmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set rmargin at screen ") + call str%append(to_string(rmargin)) + end if + if (tmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set tmargin at screen ") + call str%append(to_string(tmargin)) + end if + if (bmargin >= 0.0) then + call str%append(new_line('a')) + call str%append("set bmargin at screen ") + call str%append(to_string(bmargin)) + end if + ! Polar-Specific Settings call str%append(new_line('a')) call str%append("unset border") diff --git a/src/fplot_stats_plots.f90 b/src/fplot_stats_plots.f90 new file mode 100644 index 0000000..6e5871a --- /dev/null +++ b/src/fplot_stats_plots.f90 @@ -0,0 +1,357 @@ +module fplot_stats_plots + use iso_fortran_env + use fplot_plot_object + use fplot_plot + use fplot_plot_data_2d + use fplot_plot_data_histogram + use fplot_plot_2d + use fplot_multiplot + use fplot_terminal + use fplot_constants + use fplot_errors + use fplot_colors + use fplot_plot_axis + use collections + use strings + use ferror + implicit none + private + public :: correlation_plot + + type, extends(plot_object) :: correlation_plot + !! Defines a multiplot arrangement designed to illustrate correlation + !! between data sets. + type(multiplot), private :: m_plt + !! The multiplot object. + contains + procedure, public :: get_command_string => cp_get_command + procedure, public :: initialize => cp_init + procedure, public :: get_row_count => cp_get_rows + procedure, public :: get_column_count => cp_get_cols + procedure, public :: get_plot_count => cp_get_count + procedure, public :: draw => cp_draw + procedure, public :: save_file => cp_save + procedure, public :: get => cp_get + procedure, public :: get_terminal => cp_get_term + procedure, public :: get_font_name => cp_get_font + procedure, public :: set_font_name => cp_set_font + procedure, public :: get_font_size => cp_get_font_size + procedure, public :: set_font_size => cp_set_font_size + end type + +contains +! ------------------------------------------------------------------------------ + function cp_get_command(this) result(x) + !! Gets the GNUPLOT commands for this object. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + character(len = :), allocatable :: x + !! The command string. + end function + +! ------------------------------------------------------------------------------ + subroutine cp_init(this, x, labels, term, width, height, err) + !! Initializes the correlation_plot object. + class(correlation_plot), intent(inout) :: this + !! The correlation_plot object. + real(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(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(int32), intent(in), optional :: width + !! Optionally, the width of the plot window. + integer(int32), intent(in), optional :: height + !! Optionally, the height of the plot window. + class(errors), intent(inout), optional, target :: err + !! An error handling object. + + ! Local Variables + integer(int32) :: i, j, k, t, n, flag + real(real64) :: m, b + real(real64), allocatable, dimension(:) :: mdl + class(errors), pointer :: errmgr + type(errors), target :: deferr + type(plot_2d), allocatable, dimension(:) :: plts + type(plot_data_2d) :: pdata, mdata + type(plot_data_histogram) :: hdata + class(plot_axis), pointer :: xAxis, yAxis + + ! Initialization + if (present(err)) then + errmgr => err + else + errmgr => deferr + end if + n = size(x, 2) + call this%m_plt%initialize(n, n, term = term, width = width, & + height = height, err = errmgr) + if (errmgr%has_error_occurred()) return + allocate(plts(n * n), stat = flag) + if (flag /= 0) then + call report_memory_error(errmgr, "cp_init", flag) + return + end if + call this%m_plt%set_font_size(11) ! use a small font size + + ! Input Checking + if (present(labels)) then + if (size(labels) /= n) then + call report_array_size_mismatch_error(errmgr, "cp_init", & + "labels", n, size(labels)) + return + end if + end if + + ! Create plots + k = 0 + call pdata%set_draw_line(.false.) + call pdata%set_draw_markers(.true.) + call pdata%set_marker_style(MARKER_FILLED_CIRCLE) + call pdata%set_marker_scaling(0.5) + call mdata%set_line_width(2.0) + call mdata%set_line_color(CLR_BLACK) + if (errmgr%has_error_occurred()) return + do j = 1, n + do i = 1, n + k = k + 1 + call plts(k)%initialize(err = errmgr) + if (errmgr%has_error_occurred()) return + if (i == j) then + ! Plot a histogram of the data + call hdata%define_data(x(:,i), err = errmgr) + if (errmgr%has_error_occurred()) return + call plts(k)%push(hdata) + else + ! Plot a scatter plot + call pdata%define_data(x(:,j), x(:,i), err = errmgr) + if (errmgr%has_error_occurred()) return + call plts(k)%push(pdata) + + ! Fit a line to the data + call compute_linear_fit(x(:,j), x(:,i), m, b) + mdl = m * x(:,j) + b + + ! Plot the fitted line + call mdata%define_data(x(:,j), mdl, err = err) + if (errmgr%has_error_occurred()) return + call plts(k)%push(mdata) + end if + + ! Deal with axis labels + if (j == 1) then + ! Display y axis labels for these plots + yAxis => plts(k)%get_y_axis() + if (present(labels)) then + call yAxis%set_title(char(labels(i))) + else + call yAxis%set_title(char("x_{" // to_string(i) // "}")) + end if + end if + + ! Get an x-axis object for the plot + xAxis => plts(k)%get_x_axis() + + ! Define axis labels + if (i == n) then + ! Display x axis labels for these plots + if (present(labels)) then + call xAxis%set_title(char(labels(j))) + else + call xAxis%set_title(char("x_{" // to_string(j) // "}")) + end if + end if + + ! Rotate histogram tic labels + call xAxis%set_tic_label_angle(45.0) + call xAxis%set_tic_label_rotation_origin(GNUPLOT_ROTATION_ORIGIN_RIGHT) + + ! Store the plot - the collection makes a copy of the plot and + ! manages it's lifetime + call this%m_plt%set(i, j, plts(k)) + end do + end do + end subroutine + +! ------------------------------------------------------------------------------ + pure function cp_get_rows(this) result(x) + !! Gets the number of rows of plots. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32) :: x + !! The row count. + + x = this%m_plt%get_row_count() + end function + +! -------------------- + pure function cp_get_cols(this) result(x) + !! Gets the number of columns of plots. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32) :: x + !! The column count. + + x = this%m_plt%get_column_count() + end function + +! -------------------- + pure function cp_get_count(this) result(x) + !! Gets the total number of plots. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32) :: x + !! The plot count. + + x = this%m_plt%get_plot_count() + end function + +! ------------------------------------------------------------------------------ + subroutine cp_draw(this, persist, err) + !! Launches GNUPLOT and draws the correlation_plot per the current + !! state of the command list. + 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. + + call this%m_plt%draw(persist, err) + end subroutine + +! ------------------------------------------------------------------------------ + subroutine cp_save(this, fname, err) + !! Saves a GNUPLOT command file. + 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. + + call this%m_plt%save_file(fname, err) + end subroutine + +! ------------------------------------------------------------------------------ + function cp_get(this, i, j) result(x) + !! Gets the requested plot object. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32), intent(in) :: i + !! The row index of the plot to retrieve. + integer(int32), intent(in) :: j + !! The column index of the plot to retrieve. + class(plot), pointer :: x + !! A pointer to the plot object. + + x => this%m_plt%get(i, j) + end function + +! ------------------------------------------------------------------------------ + function cp_get_term(this) result(x) + !! Gets the GNUPLOT terminal object. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + class(terminal), pointer :: x + !! A pointer to the terminal object. + x => this%m_plt%get_terminal() + end function + +! ------------------------------------------------------------------------------ + function cp_get_font(this) result(x) + !! Gets the name of the font used for plot text. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + character(len = :), allocatable :: x + !! The font name. + x = this%m_plt%get_font_name() + end function + +! -------------------- + subroutine cp_set_font(this, x) + !! Sets the name of the font used for plot text. + class(correlation_plot), intent(inout) :: this + !! The correlation_plot object. + character(len = *), intent(in) :: x + !! The font name. + call this%m_plt%set_font_name(x) + end subroutine + +! ------------------------------------------------------------------------------ + function cp_get_font_size(this) result(x) + !! Gets the size of the font used by the plot. + class(correlation_plot), intent(in) :: this + !! The correlation_plot object. + integer(int32) :: x + !! The font size. + x = this%m_plt%get_font_size() + end function + +! -------------------- + subroutine cp_set_font_size(this, x) + !! Sets the size of the font used by the plot. + class(correlation_plot), intent(inout) :: this + !! The correlation_plot object. + integer(int32), intent(in) :: x + !! The font size. + call this%m_plt%set_font_size(x) + end subroutine + +! ****************************************************************************** +! PRIVATE HELPER ROUTINES +! ------------------------------------------------------------------------------ +subroutine compute_linear_fit(x, y, m, b) + !! Computes the coefficients of a linear equation (y = m * x + b) using a + !! least-squares approach. + real(real64), intent(in), dimension(:) :: x + !! The x-coordinate data. + real(real64), intent(in), dimension(:) :: y + !! The y-coordinate data. + real(real64), intent(out) :: m + !! The slope term. + real(real64), intent(out) :: b + !! The intercept term. + + ! Local Variables + integer(int32) :: i, n + real(real64) :: sumX, sumY, sumX2, sumY2, sumXY + + ! Initialization + n = size(x) + sumX = 0.0d0 + sumY = 0.0d0 + sumX2 = 0.0d0 + sumY2 = 0.0d0 + sumXY = 0.0d0 + + ! Process + do i = 1, n + sumX = sumX + x(i) + sumY = sumY + y(i) + sumXY = sumXY + x(i) * y(i) + sumX2 = sumX2 + (x(i))**2 + sumY2 = sumY2 + (y(i))**2 + end do + m = (n * sumXY - sumX * sumY) / (n * sumX2 - sumX**2) + b = (sumY * sumX2 - sumX * sumXY) / (n * sumX2 - sumX**2) +end subroutine + +! ------------------------------------------------------------------------------ +end module \ No newline at end of file
      - character(len=*), + integer(kind=int32), intent(in) ::txtx -

      The title.

      +

      The axis title y-offset, in characters.