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

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

Inheritance diagram for fplot_core::plot_data_2d:
fplot_core::scatter_plot_data fplot_core::plot_data_colored fplot_core::plot_data fplot_core::plot_object

Public Member Functions

procedure, public get_axes_string pd2d_get_axes_cmd
 Gets the GNUPLOT command string defining which axes the data is to be plotted against.
 
procedure, public get_data_string pd2d_get_data_cmd
 Gets the GNUPLOT command string containing the actual data to plot.
 
procedure, public get_count pd2d_get_data_count
 Gets the number of data points.
 
procedure, public get_x pd2d_get_x_data
 Gets the requested X data point.
 
procedure, public set_x pd2d_set_x_data
 Sets the requested X data point.
 
procedure, public get_y pd2d_get_y_data
 Gets the requested Y data point.
 
procedure, public set_y pd2d_set_y_data
 Sets the requested Y data point.
 
procedure, public get_draw_against_y2 pd2d_get_draw_against_y2
 Gets a value determining if the data should be plotted against the secondary y-axis.
 
procedure, public set_draw_against_y2 pd2d_set_draw_against_y2
 Sets a value determining if the data should be plotted against the secondary y-axis.
 
generic, public define_data pd2d_set_data_1
 Defines the data set.
 
generic, public define_data pd2d_set_data_2
 Defines the data set.
 
procedure pd2d_set_data_1 pd2d_set_data_1
 
procedure pd2d_set_data_2 pd2d_set_data_2
 
procedure, public get_x_data pd2d_get_x_array
 Gets the stored X data array.
 
procedure, public get_y_data pd2d_get_y_array
 Gets the stored Y data array.
 
procedure, public get_color_data pd2d_get_c_array
 Gets the stored color scaling data array.
 
procedure, public get_point_size_data pd2d_get_ps_array
 Gets the stored point size data array.
 
- Public Member Functions inherited from fplot_core::scatter_plot_data
procedure, public get_command_string spd_get_cmd
 Gets the GNUPLOT command string to represent this scatter_plot_data object.
 
procedure, public get_line_width spd_get_line_width
 Gets the width of the line, in pixels.
 
procedure, public set_line_width spd_set_line_width
 Sets the width of the line, in pixels.
 
procedure, public get_line_style spd_get_line_style
 Gets the line style.
 
procedure, public set_line_style spd_set_line_style
 Sets the line style.
 
procedure, public get_draw_line spd_get_draw_line
 Gets a value determining if a line should be drawn.
 
procedure, public set_draw_line spd_set_draw_line
 Sets a value determining if a line should be drawn.
 
procedure, public get_draw_markers spd_get_draw_markers
 Gets a value determining if data point markers should be drawn.
 
procedure, public set_draw_markers spd_set_draw_markers
 Sets a value determining if data point markers should be drawn.
 
procedure, public get_marker_style spd_get_marker_style
 Gets the marker style.
 
procedure, public set_marker_style spd_set_marker_style
 Sets the marker style.
 
procedure, public get_marker_scaling spd_get_marker_scaling
 Gets the marker scaling.
 
procedure, public set_marker_scaling spd_set_marker_scaling
 Sets the marker scaling.
 
procedure, public get_marker_frequency spd_get_marker_frequency
 Gets the marker frequency.
 
procedure, public set_marker_frequency spd_set_marker_frequency
 Sets the marker frequency.
 
procedure, public get_simplify_data spd_get_simplify_data
 Gets a value determining if the stored data should be simplified (reduced) before passing to GNUPLOT.
 
procedure, public set_simplify_data spd_set_simplify_data
 Sets a value determining if the stored data should be simplified (reduced) before passing to GNUPLOT.
 
procedure, public get_simplification_factor spd_get_simplify_factor
 Gets a factor used to establish the simplification tolerance.
 
procedure, public set_simplification_factor spd_set_simplify_factor
 Sets a factor used to establish the simplification tolerance. The tolerance is established by multplying this factor by the range of the dependent variable data.
 
procedure, public get_use_data_dependent_colors spd_get_data_dependent_colors
 Gets a value determing if data-dependent colors should be used.
 
procedure, public set_use_data_dependent_colors spd_set_data_dependent_colors
 Sets a value determing if data dependent colors should be used.
 
procedure, public get_fill_curve spd_get_filled
 Gets a logical value determining if a filled curve should be drawn.
 
procedure, public set_fill_curve spd_set_filled
 Sets a logical value determining if a filled curve should be drawn.
 
procedure, public get_use_variable_size_points spd_get_use_var_point_size
 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.
 
procedure, public set_use_variable_size_points spd_set_use_var_point_size
 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.
 
- 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

logical m_usey2 = .false.
 Draw against the secondary y axis?
 
- Public Attributes inherited from fplot_core::scatter_plot_data
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_X
 Marker type.
 
real(real32) m_markersize = 1.0
 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?
 
- 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 N-by-2 matrix containing the x and y data points.
 

Detailed Description

Defines a two-dimensional plot data set.

Definition at line 4033 of file fplot_core.f90.

Member Function/Subroutine Documentation

◆ define_data() [1/2]

generic, public fplot_core::plot_data_2d::define_data

Defines the data set.

Overload 1
Syntax
subroutine define_data(class(plot_data_2d) this, real(real64) x(:), real(real64) y(:), optional class(errors) err)
Parameters
[in,out]thisThe plot_data_2d object.
[in]xAn N-element array containing the x coordinate data.
[in]yAn N-element array containing the y coordinate data.
[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 x and y are not the same size.
Overload 2
Syntax
subroutine define_data(class(plot_data_2d) this, real(real64) y(:), optional class(errors) err)
Parameters
[in,out]thisThe plot_data_2d object.
[in]yAn N-element array containing the y-coordinate data. This data will be plotted against its own index.
[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.
Overload 3
Syntax
subroutine define_data(class(plot_data_2d) this, real(real64) x(:), real(real64) y(:), optional real(real64) c(:), optional real(real64) ps(:), optional class(errors) err)
Parameters
[in,out]thisThe plot_data_2d object.
[in]xAn N-element array containing the x coordinate data.
[in]yAn N-element array containing the y coordinate data.
[in]cAn N-element array defining how color should vary with the current colormap for each value.
[in]psAn N-element array defining the size of each data point.
[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 x and y are not the same size.

Definition at line 4199 of file fplot_core.f90.

◆ define_data() [2/2]

generic, public fplot_core::plot_data_2d::define_data

Defines the data set.

Overload 1
Syntax
subroutine define_data(class(plot_data_2d) this, real(real64) x(:), real(real64) y(:), optional class(errors) err)
Parameters
[in,out]thisThe plot_data_2d object.
[in]xAn N-element array containing the x coordinate data.
[in]yAn N-element array containing the y coordinate data.
[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 x and y are not the same size.
Overload 2
Syntax
subroutine define_data(class(plot_data_2d) this, real(real64) y(:), optional class(errors) err)
Parameters
[in,out]thisThe plot_data_2d object.
[in]yAn N-element array containing the y-coordinate data. This data will be plotted against its own index.
[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.
Overload 3
Syntax
subroutine define_data(class(plot_data_2d) this, real(real64) x(:), real(real64) y(:), optional real(real64) c(:), optional real(real64) ps(:), optional class(errors) err)
Parameters
[in,out]thisThe plot_data_2d object.
[in]xAn N-element array containing the x coordinate data.
[in]yAn N-element array containing the y coordinate data.
[in]cAn N-element array defining how color should vary with the current colormap for each value.
[in]psAn N-element array defining the size of each data point.
[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 x and y are not the same size.

Definition at line 4199 of file fplot_core.f90.

◆ get_axes_string()

procedure, public fplot_core::plot_data_2d::get_axes_string
virtual

Gets the GNUPLOT command string defining which axes the data is to be plotted against.

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

Implements fplot_core::scatter_plot_data.

Definition at line 4050 of file fplot_core.f90.

◆ get_color_data()

procedure, public fplot_core::plot_data_2d::get_color_data

Gets the stored color scaling data array.

Syntax
real(real64)(:) function get_color_data(class(plot_data_2d) this)
Parameters
[in]thisThe plot_data_2d object.
Returns
A copy of the stored data array.

Definition at line 4232 of file fplot_core.f90.

◆ get_count()

procedure, public fplot_core::plot_data_2d::get_count
virtual

Gets the number of data points.

Syntax
pure integer(int32) get_count(class(plot_data_2d) this)
Parameters
[in]thisThe plot_data_2d object.
Returns
The number of data points.

Implements fplot_core::scatter_plot_data.

Definition at line 4071 of file fplot_core.f90.

◆ get_data_string()

procedure, public fplot_core::plot_data_2d::get_data_string
virtual

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

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

Implements fplot_core::plot_data.

Definition at line 4061 of file fplot_core.f90.

◆ get_draw_against_y2()

procedure, public fplot_core::plot_data_2d::get_draw_against_y2

Gets a value determining if the data should be plotted against the secondary y-axis.

Syntax
pure logical function get_draw_against_y2(class(plot_data_2d) this)
Parameters
[in]thisThe plot_data_2d object.
Returns
Returns true if the data should be plotted against the secondary y-axis; else, false to plot against the primary y-axis.

Definition at line 4127 of file fplot_core.f90.

◆ get_point_size_data()

procedure, public fplot_core::plot_data_2d::get_point_size_data

Gets the stored point size data array.

Syntax
real(real64)(:) function get_point_size_data(class(plot_data_2d) this)
Parameters
[in]thisThe plot_data_2d object.
Returns
A copy of the stored data array.

Definition at line 4242 of file fplot_core.f90.

◆ get_x()

procedure, public fplot_core::plot_data_2d::get_x
virtual

Gets the requested X data point.

Syntax
pure real(real64) get_x(class(plot_data_2d) this, integer(int32) index)
Parameters
[in]thisThe plot_data_2d object.
[in]indexThe index of the data point to retrieve.
Returns
The requested data point.

Implements fplot_core::scatter_plot_data.

Definition at line 4082 of file fplot_core.f90.

◆ get_x_data()

procedure, public fplot_core::plot_data_2d::get_x_data

Gets the stored X data array.

Syntax
real(real64)(:) function get_x_data(class(plot_data_2d) this)
Parameters
[in]thisThe plot_data_2d object.
Returns
A copy of the stored data array.

Definition at line 4212 of file fplot_core.f90.

◆ get_y()

procedure, public fplot_core::plot_data_2d::get_y
virtual

Gets the requested Y data point.

Syntax
pure real(real64) get_y(class(plot_data_2d) this, integer(int32) index)
Parameters
[in]thisThe plot_data_2d object.
[in]indexThe index of the data point to retrieve.
Returns
The requested data point.

Implements fplot_core::scatter_plot_data.

Definition at line 4104 of file fplot_core.f90.

◆ get_y_data()

procedure, public fplot_core::plot_data_2d::get_y_data

Gets the stored Y data array.

Syntax
real(real64)(:) function get_y_data(class(plot_data_2d) this)
Parameters
[in]thisThe plot_data_2d object.
Returns
A copy of the stored data array.

Definition at line 4222 of file fplot_core.f90.

◆ pd2d_set_data_1()

procedure fplot_core::plot_data_2d::pd2d_set_data_1

Definition at line 4200 of file fplot_core.f90.

◆ pd2d_set_data_2()

procedure fplot_core::plot_data_2d::pd2d_set_data_2

Definition at line 4201 of file fplot_core.f90.

◆ set_draw_against_y2()

procedure, public fplot_core::plot_data_2d::set_draw_against_y2

Sets a value determining if the data should be plotted against the secondary y-axis.

Syntax
subroutine set_draw_against_y2(class(plot_data_2d) this, logical x)
Parameters
[in,out]thisThe plot_data_2d object.
[in]xSet to true if the data should be plotted against the secondary y-axis; else, false to plot against the primary y-axis.

Definition at line 4139 of file fplot_core.f90.

◆ set_x()

procedure, public fplot_core::plot_data_2d::set_x
virtual

Sets the requested X data point.

Syntax
subroutine set_x(class(plot_data_2d) this, integer(int32) index, real(real64) x)
Parameters
[in,out]thisThe plot_data_2d object.
[in]indexThe index of the data point to replace.
[in]xThe data point.

Implements fplot_core::scatter_plot_data.

Definition at line 4093 of file fplot_core.f90.

◆ set_y()

procedure, public fplot_core::plot_data_2d::set_y
virtual

Sets the requested Y data point.

Syntax
subroutine set_y(class(plot_data_2d) this, integer(int32) index, real(real64) x)
Parameters
[in,out]thisThe plot_data_2d object.
[in]indexThe index of the data point to replace.
[in]xThe data point.

Implements fplot_core::scatter_plot_data.

Definition at line 4115 of file fplot_core.f90.

Member Data Documentation

◆ m_data

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

An N-by-2 matrix containing the x and y data points.

Definition at line 4036 of file fplot_core.f90.

◆ m_usey2

logical fplot_core::plot_data_2d::m_usey2 = .false.

Draw against the secondary y axis?

Definition at line 4038 of file fplot_core.f90.


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