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

Defines a two-dimensional vector-field plot data set. More...

Inheritance diagram for fplot_core::vector_field_plot_data:
fplot_core::plot_data_colored fplot_core::plot_data fplot_core::plot_object

Public Member Functions

procedure, public get_data_string vfpd_get_data_cmd
 Gets the GNUPLOT command string containing the actual data to plot.
 
procedure, public get_command_string vfpd_get_cmd
 Gets the GNUPLOT command string to represent this vector_field_plot_data object.
 
procedure, public define_data vfpd_define_data
 Defines the data set.
 
procedure, public get_arrow_size vfpd_get_arrow_size
 Gets the scaling factor used to determine the arrow size.
 
procedure, public set_arrow_size vfpd_set_arrow_size
 Sets the scaling factor used to determine the arrow size.
 
procedure, public get_fill_arrow vfpd_get_fill_arrow
 Gets a value determining if the arrow heads should be filled.
 
procedure, public set_fill_arrow vfpd_set_fill_arrow
 Sets a value determining if the arrow heads should be filled.
 
procedure, public get_use_data_dependent_colors vfpd_get_use_data_dependent_colors
 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.
 
- Public Member Functions inherited from fplot_core::plot_data_colored
procedure, public get_line_color pdc_get_line_color
 Gets the line color.
 
procedure, public set_line_color pdc_set_line_color
 Sets the line color.
 
- Public Member Functions inherited from fplot_core::plot_data
procedure, public get_name pd_get_name
 Gets the name to associate with this data set.
 
procedure, public set_name pd_set_name
 Sets the name to associate with this data set.
 

Public Attributes

real(real64) m_arrowsize = 1.0d0
 The vector size (scaling factor).
 
logical m_filledheads = .false.
 Fill the arrow heads?
 
- Public Attributes inherited from fplot_core::plot_data_colored
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.
 

Private Attributes

real(real64), dimension(:,:,:), allocatable 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.
 

Detailed Description

Defines a two-dimensional vector-field plot data set.

Definition at line 7212 of file fplot_core.f90.

Member Function/Subroutine Documentation

◆ define_data()

procedure, public fplot_core::vector_field_plot_data::define_data

Defines the data set.

Syntax
subroutine define_data(class(vector_field_plot_data) this, real(real64) x(:,:), real(real64) y(:,:), real(real64) dx(:,:), real(real64) dy(:,:), real(real64) c(:,:), class(errors) err)
Parameters
[in,out]thisThe vector_field_plot_data object.
[in]xAn M-by-N matrix containing the x-locations of each arrow's origin.
[in]yAn M-by-N matrix containing the y-locations of each arrow's origin.
[in]dxAn M-by-N matrix containing the x-direction of each arrow.
[in]dyAn M-by-N matrix containing the y-direction of each arrow.
[in]cAn optional M-by-N matrix containing information on how to color the arrows. The colors are determined by the active colormap.
[in,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.
  • PLOT_ARRAY_SIZE_MISMATCH_ERROR: Occurs if the input matrices are not the same size.

Definition at line 7267 of file fplot_core.f90.

◆ get_arrow_size()

procedure, public fplot_core::vector_field_plot_data::get_arrow_size

Gets the scaling factor used to determine the arrow size.

Syntax
real(real64) get_arrow_size(class(vector_field_plot_data) this)
Parameters
[in]thisThe vector_field_plot_data object.
Returns
The scaling factor.

Definition at line 7277 of file fplot_core.f90.

◆ get_command_string()

procedure, public fplot_core::vector_field_plot_data::get_command_string
virtual

Gets the GNUPLOT command string to represent this vector_field_plot_data object.

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

Implements fplot_core::plot_object.

Definition at line 7244 of file fplot_core.f90.

◆ get_data_string()

procedure, public fplot_core::vector_field_plot_data::get_data_string
virtual

Gets the GNUPLOT command string containing the actual data to plot.

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

Implements fplot_core::plot_data.

Definition at line 7233 of file fplot_core.f90.

◆ get_fill_arrow()

procedure, public fplot_core::vector_field_plot_data::get_fill_arrow

Gets a value determining if the arrow heads should be filled.

Syntax
logical get_fill_arrow(class(vector_field_plot_data) this)
Parameters
[in]thisThe vector_field_plot_data object.
Returns
True if the arrow heads should be filled; else, false.

Definition at line 7297 of file fplot_core.f90.

◆ get_use_data_dependent_colors()

procedure, public fplot_core::vector_field_plot_data::get_use_data_dependent_colors

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.

Syntax
logical get_use_data_dependent_colors(class(vector_field_plot_data) this)
Parameters
[in]thisThe vector_field_plot_data object. return Returns true if data-dependent coloring is being used; else, false.

Definition at line 7320 of file fplot_core.f90.

◆ set_arrow_size()

procedure, public fplot_core::vector_field_plot_data::set_arrow_size

Sets the scaling factor used to determine the arrow size.

Syntax
subroutine set_arrow_size(class(vector_field_plot_data) this, real(real64) x)
Parameters
[in,out]thisThe vector_field_plot_data object.
[in]xThe scaling factor.

Definition at line 7287 of file fplot_core.f90.

◆ set_fill_arrow()

procedure, public fplot_core::vector_field_plot_data::set_fill_arrow

Sets a value determining if the arrow heads should be filled.

Syntax
subroutine set_fill_arrow(class(vector_field_plot_data) this, logical x)
Parameters
[in,out]thisThe vector_field_plot_data object.
[in]xTrue if the arrow heads should be filled; else, false.

Definition at line 7307 of file fplot_core.f90.

Member Data Documentation

◆ m_arrowsize

real(real64) fplot_core::vector_field_plot_data::m_arrowsize = 1.0d0

The vector size (scaling factor).

Definition at line 7219 of file fplot_core.f90.

◆ m_data

real(real64), dimension(:,:,:), allocatable fplot_core::vector_field_plot_data::m_data
private

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.

Definition at line 7217 of file fplot_core.f90.

◆ m_filledheads

logical fplot_core::vector_field_plot_data::m_filledheads = .false.

Fill the arrow heads?

Definition at line 7221 of file fplot_core.f90.


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