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

A plot object defining a 2D plot. More...

Inheritance diagram for fplot_core::plot_2d:
fplot_core::plot fplot_core::plot_object fplot_core::plot_bar

Public Member Functions

final p2d_clean_up p2d_clean_up
 Cleans up resources held by the plot_2d object.
 
procedure, public initialize p2d_init
 Initializes the plot_2d object.
 
procedure, public get_command_string p2d_get_cmd
 Gets the GNUPLOT command string to represent this plot_2d object.
 
procedure, public get_x_axis p2d_get_x_axis
 Gets the x-axis object.
 
procedure, public get_y_axis p2d_get_y_axis
 Gets the y-axis object.
 
procedure, public get_y2_axis p2d_get_y2_axis
 Gets the secondary y-axis object.
 
procedure, public get_use_y2_axis p2d_get_use_y2
 Gets a flag determining if the secondary y-axis should be displayed.
 
procedure, public set_use_y2_axis p2d_set_use_y2
 Sets a flag determining if the secondary y-axis should be displayed.
 
procedure, public get_square_axes p2d_get_square_axes
 Gets a logical flag determining if the axes size should be squared off.
 
procedure, public set_square_axes p2d_set_square_axes
 Sets a logical flag determining if the axes size should be squared off.
 
- Public Member Functions inherited from fplot_core::plot
procedure, public free_resources plt_clean_up
 Cleans up resources held by the plot object. Inheriting classes are expected to call this routine to free internally held resources.
 
procedure, public initialize plt_init
 Initializes the plot object.
 
procedure, public get_title plt_get_title
 Gets the plot's title.
 
procedure, public set_title plt_set_title
 Sets the plot's title.
 
procedure, public is_title_defined plt_has_title
 Gets a value determining if a title has been defined for the plot object.
 
procedure, public get_legend plt_get_legend
 Gets the plot's legend object.
 
procedure, public get_count plt_get_count
 Gets the number of stored plot_data objects.
 
procedure, public push plt_push_data
 Pushes a plot_data object onto the stack.
 
procedure, public pop plt_pop_data
 Pops the last plot_data object from the stack.
 
procedure, public clear_all plt_clear_all
 Removes all plot_data objects from the plot.
 
procedure, public get plt_get
 Gets a pointer to the requested plot_data object.
 
procedure, public set plt_set
 Sets the requested plot_data object into the plot.
 
procedure, public get_terminal plt_get_term
 Gets the GNUPLOT terminal object.
 
procedure, public get_show_gridlines plt_get_show_grid
 Gets a flag determining if the grid lines should be shown.
 
procedure, public set_show_gridlines plt_set_show_grid
 Sets a flag determining if the grid lines should be shown.
 
procedure, public draw plt_draw
 Launches GNUPLOT and draws the plot per the current state of the command list.
 
procedure, public save_file plt_save
 Saves a GNUPLOT command file.
 
procedure, public get_font_name plt_get_font
 Gets the name of the font used for plot text.
 
procedure, public set_font_name plt_set_font
 Sets the name of the font used for plot text.
 
procedure, public get_font_size plt_get_font_size
 Gets the size of the font used by the plot.
 
procedure, public set_font_size plt_set_font_size
 Sets the size of the font used by the plot.
 
procedure, public get_tics_inward plt_get_tics_in
 Gets a value determining if the axis tic marks should point inwards.
 
procedure, public set_tics_inward plt_set_tics_in
 Sets a value determining if the axis tic marks should point inwards.
 
procedure, public get_draw_border plt_get_draw_border
 Gets a value determining if the border should be drawn.
 
procedure, public set_draw_border plt_set_draw_border
 Sets a value determining if the border should be drawn.
 
procedure, public push_label plt_push_label
 Adds a label to the plot.
 
procedure, public pop_label plt_pop_label
 Removes the last label from the plot.
 
procedure, public get_label plt_get_label
 Gets the requested plot_label from the plot.
 
procedure, public set_label plt_set_label
 Sets the specified plot_label object.
 
procedure, public get_label_count plt_get_label_count
 Gets the number of plot_label objects belonging to the plot.
 
procedure, public clear_all_labels plt_clear_labels
 Clears all plot_label objects from the plot.
 
procedure, public get_axis_equal plt_get_axis_equal
 Gets a flag determining if the axes should be equally scaled.
 
procedure, public set_axis_equal plt_set_axis_equal
 Sets a flag determining if the axes should be equally scaled.
 
procedure, public get_colormap plt_get_colormap
 Gets a pointer to the colormap object.
 
procedure, public set_colormap plt_set_colormap
 Sets the colormap object.
 
procedure, public get_show_colorbar plt_get_show_colorbar
 Gets a value determining if the colorbar should be shown.
 
procedure, public set_show_colorbar plt_set_show_colorbar
 Sets a value determining if the colorbar should be shown.
 
procedure, public push_arrow plt_push_arrow
 Pushes a new plot_arrow object onto the plot.
 
procedure, public pop_arrow plt_pop_arrow
 Pops a plot_arrow object from the plot.
 
procedure, public get_arrow plt_get_arrow
 Gets a pointer to the requested plot_arrow object.
 
procedure, public set_arrow plt_set_arrow
 Sets a plot_arrow into the plot.
 
procedure, public get_arrow_count plt_get_arrow_count
 Gets the number of plot_arrow objects held by the plot object.
 
procedure, public clear_arrows plt_clear_arrows
 Clears all plot_arrow objects from the plot.
 

Public Attributes

type(y_axis), pointer m_yaxis => null()
 The y-axis.
 
type(y2_axis), pointer m_y2axis => null()
 The secondary y-axis.
 
logical m_usey2 = .false.
 Display the secondary y axis?
 
logical m_set2square = .false.
 Set to square scaling.
 
- Public Attributes inherited from fplot_core::plot
logical m_hastitle = .false.
 Has a title?
 
class(terminal), pointer m_terminal => null()
 The GNUPLOT terminal object to target.
 
type(list) m_data
 A collection of plot_data items to plot.
 
type(legend), pointer m_legend => null()
 The legend.
 
logical m_showgrid = .true.
 Show grid lines?
 
logical m_ticsin = .true.
 Point tic marks in?
 
logical m_drawborder = .true.
 Draw the border?
 
type(list) m_labels
 A collection of plot_label items to draw.
 
integer(int32) m_colorindex = 1
 The color index to use for automatic line coloring for scatter plots.
 
logical m_axisequal = .false.
 Determines if the axes should be scaled proportionally.
 
class(colormap), pointer m_colormap
 The colormap.
 
logical m_showcolorbar = .true.
 Show the colorbar?
 
type(list) m_arrows
 A collection of plot_arrow items to draw.
 

Private Attributes

type(x_axis), pointer m_xaxis => null()
 The x-axis.
 

Detailed Description

A plot object defining a 2D plot.

Definition at line 4838 of file fplot_core.f90.

Constructor & Destructor Documentation

◆ p2d_clean_up()

final fplot_core::plot_2d::p2d_clean_up
final

Cleans up resources held by the plot_2d object.

Syntax
subroutine p2d_clean_up(type(plot_2d) this)
Parameters
[in,out]thisThe plot_2d object.

Definition at line 4859 of file fplot_core.f90.

Member Function/Subroutine Documentation

◆ get_command_string()

procedure, public fplot_core::plot_2d::get_command_string
virtual

Gets the GNUPLOT command string to represent this plot_2d object.

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

Reimplemented from fplot_core::plot.

Reimplemented in fplot_core::plot_bar.

Definition at line 4894 of file fplot_core.f90.

◆ get_square_axes()

procedure, public fplot_core::plot_2d::get_square_axes

Gets a logical flag determining if the axes size should be squared off.

Syntax
logical get_square_axes(class(plot_2d) this)
Parameters
[in]thisThe plot_2d object.
Returns
Returns true if the axes are to be sized to a square; else, false.

Definition at line 4959 of file fplot_core.f90.

◆ get_use_y2_axis()

procedure, public fplot_core::plot_2d::get_use_y2_axis

Gets a flag determining if the secondary y-axis should be displayed.

Syntax
pure logical function get_use_y2_axis(class(plot_2d) this)
Parameters
[in]thisThe plot_2d object.
Returns
Returns true if the axis should be displayed; else, false.

Definition at line 4936 of file fplot_core.f90.

◆ get_x_axis()

procedure, public fplot_core::plot_2d::get_x_axis

Gets the x-axis object.

Syntax
class(plot_axis) function, pointer get_x_axis(class(plot_2d) this)
Parameters
[in]thisThe plot_2d object.
Returns
A pointer to the x-axis object.

Definition at line 4905 of file fplot_core.f90.

◆ get_y2_axis()

procedure, public fplot_core::plot_2d::get_y2_axis

Gets the secondary y-axis object.

Syntax
class(plot_axis) function, pointer get_y2_axis(class(plot_2d) this)
Parameters
[in]thisThe plot_2d object.
Returns
A pointer to the secondary y-axis object.

Definition at line 4925 of file fplot_core.f90.

◆ get_y_axis()

procedure, public fplot_core::plot_2d::get_y_axis

Gets the y-axis object.

Syntax
class(plot_axis) function, pointer get_y_axis(class(plot_2d) this)
Parameters
[in]thisThe plot_2d object.
Returns
A pointer to the y-axis object.

Definition at line 4915 of file fplot_core.f90.

◆ initialize()

procedure, public fplot_core::plot_2d::initialize

Initializes the plot_2d object.

Syntax
subroutine initialize(class(plot_2d) this, optional integer(int32) term, optional class(errors) err)
Parameters
[in]thisThe plot_2d object.
[in]termAn 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
[in]fnameA filename to pass to the terminal in the event the terminal is a file type (e.g. GNUPLOT_TERMINAL_PNG).
[out]errAn optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. Possible errors and warning messages that may be encountered are as follows.
  • PLOT_OUT_OF_MEMORY_ERROR: Occurs if insufficient memory is available.

Definition at line 4883 of file fplot_core.f90.

◆ set_square_axes()

procedure, public fplot_core::plot_2d::set_square_axes

Sets a logical flag determining if the axes size should be squared off.

Syntax
subroutine set_square_axes(class(plot_2d) this, logical x)
Parameters
[in,out]thisThe plot_2d object.
[in]Setto true if the axes are to be sized to a square; else, false.

Definition at line 4971 of file fplot_core.f90.

◆ set_use_y2_axis()

procedure, public fplot_core::plot_2d::set_use_y2_axis

Sets a flag determining if the secondary y-axis should be displayed.

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

Definition at line 4947 of file fplot_core.f90.

Member Data Documentation

◆ m_set2square

logical fplot_core::plot_2d::m_set2square = .false.

Set to square scaling.

Definition at line 4849 of file fplot_core.f90.

◆ m_usey2

logical fplot_core::plot_2d::m_usey2 = .false.

Display the secondary y axis?

Definition at line 4847 of file fplot_core.f90.

◆ m_xaxis

type(x_axis), pointer fplot_core::plot_2d::m_xaxis => null()
private

The x-axis.

Definition at line 4841 of file fplot_core.f90.

◆ m_y2axis

type(y2_axis), pointer fplot_core::plot_2d::m_y2axis => null()

The secondary y-axis.

Definition at line 4845 of file fplot_core.f90.

◆ m_yaxis

type(y_axis), pointer fplot_core::plot_2d::m_yaxis => null()

The y-axis.

Definition at line 4843 of file fplot_core.f90.


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