fplot 1.7.1
A Fortran library providing a convenient interface for plotting with Gnuplot.
Loading...
Searching...
No Matches
fplot_core::plot_axis Type Referenceabstract

Describes a single plot axis. More...

Inheritance diagram for fplot_core::plot_axis:
fplot_core::plot_object fplot_core::x_axis fplot_core::y2_axis fplot_core::y_axis fplot_core::z_axis

Public Member Functions

procedure, public get_title pa_get_title
 Gets the axis' title.
 
procedure, public set_title pa_set_title
 Sets the axis' title.
 
procedure, public is_title_defined pa_has_title
 Gets a value determining if a title has been defined for the plot_axis object.
 
procedure, public get_autoscale pa_get_autoscale
 Gets a logical value determining if the axis should be automatically scaled to fit the data.
 
procedure, public set_autoscale pa_set_autoscale
 Sets a logical value determining if the axis should be automatically scaled to fit the data.
 
procedure, public get_limits pa_get_axis_limits
 Gets the axis display limits, assuming autoscaling is not active for this axis.
 
procedure, public set_limits pa_set_axis_limits
 Sets the axis display limits, assuming autoscaling is not active for this axis.
 
procedure, public get_is_log_scaled pa_get_log_scale
 Gets a logical value defining if the axis should be log scaled.
 
procedure, public set_is_log_scaled pa_set_log_scale
 Sets a logical value defining if the axis should be log scaled.
 
procedure, public get_command_string pa_get_cmd_string
 Returns the appropriate GNUPLOT command string to define the plot_axis properties.
 
procedure, public get_zero_axis pa_get_zero_axis
 Gets a value determining if the axis should be drawn through zero of opposing axes.
 
procedure, public set_zero_axis pa_set_zero_axis
 Sets a value determining if the axis should be drawn through zero of opposing axes.
 
procedure, public get_zero_axis_line_width pa_get_zero_axis_width
 Gets the width of the line used to represent the zero axis line, if active.
 
procedure, public set_zero_axis_line_width pa_set_zero_axis_width
 Sets the width of the line used to represent the zero axis line, if active.
 
procedure(pa_get_string_result), deferred, public get_id_string pa_get_string_result
 Gets a string identifying the axis as: x, y, z, y2, etc.
 
procedure, public get_use_default_tic_label_format pa_get_use_dft_tic_lbl_fmt
 Gets a value determining if the default tic label format will be used.
 
procedure, public set_use_default_tic_label_format pa_set_use_dft_tic_lbl_fmt
 Sets a value determining if the default tic label format will be used.
 
procedure, public get_tic_label_format pa_get_tic_label_fmt
 Gets the tic label format. The format string can be any format string accepted by the C command 'printf.'.
 
procedure, public set_tic_label_format pa_set_tic_label_fmt
 Sets the tic label format. The format string can be any format string accepted by the C command 'printf.'.
 

Public Attributes

character(len=plotdata_max_name_lengthm_title = ""
 The 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.
 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_lengthm_ticlabelfmt = "%g"
 The tic label format.
 

Private Attributes

logical m_hastitle = .false.
 Has a title.
 

Detailed Description

Describes a single plot axis.

Definition at line 1783 of file fplot_core.f90.

Member Function/Subroutine Documentation

◆ get_autoscale()

procedure, public fplot_core::plot_axis::get_autoscale

Gets a logical value determining if the axis should be automatically scaled to fit the data.

Syntax
pure logical function get_autoscale(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
Returns true if the axis should be automatically scaled; else, false.

Definition at line 1850 of file fplot_core.f90.

◆ get_command_string()

procedure, public fplot_core::plot_axis::get_command_string
virtual

Returns the appropriate GNUPLOT command string to define the plot_axis properties.

Syntax
character(len = :) function, allocatable get_command_string(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
The GNUPLOT command string.

Implements fplot_core::plot_object.

Definition at line 1920 of file fplot_core.f90.

◆ get_id_string()

procedure(pa_get_string_result), deferred, public fplot_core::plot_axis::get_id_string
pure virtual

Gets a string identifying the axis as: x, y, z, y2, etc.

Implemented in fplot_core::x_axis, fplot_core::y2_axis, fplot_core::y_axis, and fplot_core::z_axis.

Definition at line 1966 of file fplot_core.f90.

◆ get_is_log_scaled()

procedure, public fplot_core::plot_axis::get_is_log_scaled

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

Syntax
pure logical function get_is_log_scaled(class(plot_axis) this)
Parameters
[in,out]thisThe plot_axis object.
Returns
Returns true if log scaling is applied to the axis; else, false.

Definition at line 1897 of file fplot_core.f90.

◆ get_limits()

procedure, public fplot_core::plot_axis::get_limits

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

Syntax
pure real(real64) function, dimension(2) get_limits(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
A two-element array containing the limits as follows: [lower, upper].

Definition at line 1874 of file fplot_core.f90.

◆ get_tic_label_format()

procedure, public fplot_core::plot_axis::get_tic_label_format

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

Syntax
allocatable character(len = :) function get_tic_label_format(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
The tic label format string.

Definition at line 2004 of file fplot_core.f90.

◆ get_title()

procedure, public fplot_core::plot_axis::get_title

Gets the axis' title.

Syntax
character(len = :) function, allocatable get_title(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
The title.

Definition at line 1814 of file fplot_core.f90.

◆ get_use_default_tic_label_format()

procedure, public fplot_core::plot_axis::get_use_default_tic_label_format

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

Syntax
pure logical function get_use_default_tic_label_format(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
Returns true if the default tic label format will be used; else, false.

Definition at line 1979 of file fplot_core.f90.

◆ get_zero_axis()

procedure, public fplot_core::plot_axis::get_zero_axis

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

Syntax
pure logical function get_zero_axis(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
Returns true to draw as a zero axis; else, set to false.

Definition at line 1931 of file fplot_core.f90.

◆ get_zero_axis_line_width()

procedure, public fplot_core::plot_axis::get_zero_axis_line_width

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

Syntax
pure real(real32) function get_zero_axis_line_width(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
The width of the line, in pixels.

Definition at line 1953 of file fplot_core.f90.

◆ is_title_defined()

procedure, public fplot_core::plot_axis::is_title_defined

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

Syntax
pure logical function is_title_defined(class(plot_axis) this)
Parameters
[in]thisThe plot_axis object.
Returns
Returns true if a title has been defined for this axis; else, returns false.

Definition at line 1838 of file fplot_core.f90.

◆ set_autoscale()

procedure, public fplot_core::plot_axis::set_autoscale

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

Syntax
subroutine set_autoscale(class(plot_axis) this, logical x)
Parameters
[in,out]thisThe plot_axis object.
[in]xSet to true if the axis should be automatically scaled; else, false.

Definition at line 1862 of file fplot_core.f90.

◆ set_is_log_scaled()

procedure, public fplot_core::plot_axis::set_is_log_scaled

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

Syntax
subroutine set_is_log_scaled(class(plot_axis) this, logical x)
Parameters
[in,out]thisThe plot_axis object.
[in]xSet to true if log scaling is applied to the axis; else, false.

Definition at line 1909 of file fplot_core.f90.

◆ set_limits()

procedure, public fplot_core::plot_axis::set_limits

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

Syntax
subroutine set_limits(class(plot_axis) this, real(real64) lower, real(real64) upper)
Parameters
[in,out]thisThe plot_axis object.
[in]lowerThe lower display limit.
[in]upperThe upper display limit.

Definition at line 1886 of file fplot_core.f90.

◆ set_tic_label_format()

procedure, public fplot_core::plot_axis::set_tic_label_format

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

Syntax
subroutine set_tic_label_format(class(plot_axis) this, character(len = *) x)
Parameters
[in,out]thisThe plot_axis object.
[in]xThe tic label format string.

Definition at line 2015 of file fplot_core.f90.

◆ set_title()

procedure, public fplot_core::plot_axis::set_title

Sets the axis' title.

Syntax
subroutine set_title(class(plot_axis) this, character(len = *) txt)
Parameters
[in,out]thisThe plot_axis object.
[in]txtThe axis title. The number of characters must be less than or equal to PLOTDATA_MAX_NAME_LENGTH; else, the text string is truncated.

Definition at line 1826 of file fplot_core.f90.

◆ set_use_default_tic_label_format()

procedure, public fplot_core::plot_axis::set_use_default_tic_label_format

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

Syntax
subroutine set_use_default_tic_label_format(class(plot_axis) this, logical x)
Parameters
[in,out]thisThe plot_axis object.
[in]xSet to true if the default tic label format will be used; else, false.

Definition at line 1992 of file fplot_core.f90.

◆ set_zero_axis()

procedure, public fplot_core::plot_axis::set_zero_axis

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

Syntax
subroutine set_zero_axis(class(plot_axis) this, logical x)
Parameters
[in,out]thisThe plot_axis object.
[in]xSet to true to draw as a zero axis; else, set to false.

Definition at line 1942 of file fplot_core.f90.

◆ set_zero_axis_line_width()

procedure, public fplot_core::plot_axis::set_zero_axis_line_width

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

Syntax
subroutine set_zero_axis_line_width(class(plot_axis) this, real(real32) x)
Parameters
[in,out]thisThe plot_axis object.
[in]xThe width of the line, in pixels.

Definition at line 1964 of file fplot_core.f90.

Member Data Documentation

◆ m_autoscale

logical fplot_core::plot_axis::m_autoscale = .true.

Autoscale?

Definition at line 1790 of file fplot_core.f90.

◆ m_axiswidth

real(real32) fplot_core::plot_axis::m_axiswidth = 1.0

The width, in pixels, of the zero axis line.

Definition at line 1798 of file fplot_core.f90.

◆ m_defaultticlabels

logical fplot_core::plot_axis::m_defaultticlabels = .true.

Use default tic label format?

Definition at line 1801 of file fplot_core.f90.

◆ m_hastitle

logical fplot_core::plot_axis::m_hastitle = .false.
private

Has a title.

Definition at line 1786 of file fplot_core.f90.

◆ m_limits

real(real64), dimension(2) fplot_core::plot_axis::m_limits = [0.0d0, 1.0d0]

Display limits.

Definition at line 1792 of file fplot_core.f90.

◆ m_logscale

logical fplot_core::plot_axis::m_logscale = .false.

Log scaled?

Definition at line 1794 of file fplot_core.f90.

◆ m_ticlabelfmt

character(len = plotdata_max_name_length) fplot_core::plot_axis::m_ticlabelfmt = "%g"

The tic label format.

Definition at line 1803 of file fplot_core.f90.

◆ m_title

character(len = plotdata_max_name_length) fplot_core::plot_axis::m_title = ""

The axis title.

Definition at line 1788 of file fplot_core.f90.

◆ m_zeroaxis

logical fplot_core::plot_axis::m_zeroaxis = .false.

Zero axis?

Definition at line 1796 of file fplot_core.f90.


The documentation for this type was generated from the following file: