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

A plot object defining a 3D surface plot. More...

Inheritance diagram for fplot_core::surface_plot:
fplot_core::plot_3d fplot_core::plot fplot_core::plot_object

Public Member Functions

procedure, public initialize surf_init
 Cleans up resources held by the surface_plot object.
 
procedure, public get_show_hidden surf_get_show_hidden
 Gets a value indicating if hidden lines should be shown.
 
procedure, public set_show_hidden surf_set_show_hidden
 Sets a value indicating if hidden lines should be shown.
 
procedure, public get_command_string surf_get_cmd
 Gets the GNUPLOT command string to represent this plot_3d object.
 
procedure, public get_allow_smoothing surf_get_smooth
 Gets a value determining if the plotted surfaces should be smoothed.
 
procedure, public set_allow_smoothing surf_set_smooth
 Sets a value determining if the plotted surfaces should be smoothed.
 
procedure, public get_show_contours surf_get_show_contours
 Gets a value determining if a contour plot should be drawn in conjunction with the surface plot.
 
procedure, public set_show_contours surf_set_show_contours
 Sets a value determining if a contour plot should be drawn in conjunction with the surface plot.
 
procedure, public get_use_lighting surf_get_use_lighting
 Gets a value indicating if lighting, beyond the ambient light source, is to be used.
 
procedure, public set_use_lighting surf_set_use_lighting
 Sets a value indicating if lighting, beyond the ambient light source, is to be used.
 
procedure, public get_light_intensity surf_get_light_intensity
 Gets the ratio of the strength of the light source relative to the ambient light.
 
procedure, public set_light_intensity surf_set_light_intensity
 Sets the ratio of the strength of the light source relative to the ambient light.
 
procedure, public get_specular_intensity surf_get_specular_intensity
 Gets the ratio of the strength of the specular light source relative to the ambient light.
 
procedure, public set_specular_intensity surf_set_specular_intensity
 Sets the ratio of the strength of the specular light source relative to the ambient light.
 
procedure, public get_transparency surf_get_transparency
 Gets a factor defining the transparency of plotted surfaces.
 
procedure, public set_transparency surf_set_transparency
 Sets a factor defining the transparency of plotted surfaces.
 
- Public Member Functions inherited from fplot_core::plot_3d
final p3d_clean_up p3d_clean_up
 Cleans up resources held by the plot_3d object.
 
procedure, public initialize p3d_init
 Initializes the plot_3d object.
 
procedure, public get_x_axis p3d_get_x_axis
 Gets the x-axis object.
 
procedure, public get_y_axis p3d_get_y_axis
 Gets the y-axis object.
 
procedure, public get_z_axis p3d_get_z_axis
 Gets the z-axis object.
 
procedure, public get_elevation p3d_get_elevation
 Gets the plot elevation angle.
 
procedure, public set_elevation p3d_set_elevation
 Sets the plot elevation angle.
 
procedure, public get_azimuth p3d_get_azimuth
 Gets the plot azimuth angle.
 
procedure, public set_azimuth p3d_set_azimuth
 Sets the plot azimuth angle.
 
procedure, public get_z_intersect_xy p3d_get_z_axis_intersect
 Gets a value determining if the z-axis should intersect the x-y plane.
 
procedure, public set_z_intersect_xy p3d_set_z_axis_intersect
 Sets a value determining if the z-axis should intersect the x-y plane.
 
procedure, public get_use_map_view p3d_get_use_map_view
 Gets a value determining if the view should be set to a 2D map view. If true, the azimuth and elevation terms are ignored.
 
procedure, public set_use_map_view p3d_set_use_map_view
 Sets a value determining if the view should be set to a 2D map view. If true, the azimuth and elevation terms are ignored.
 
procedure, public get_coordinate_system p3d_get_csys
 Gets a value determining the coordinate system.
 
procedure, public set_coordinate_system p3d_set_csys
 Sets a value determining the coordinate system.
 
- 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

logical m_smooth = .true.
 The colormap.
 
logical m_contour = .false.
 Show a contour plot as well as the surface plot?
 
logical m_uselighting = .false.
 Use lighting?
 
real(real32) m_lightintensity = 0.5
 Lighting intensity (0 - 1) - default is 0.5.
 
real(real32) m_specular = 0.5
 Specular highlight intensity (0 - 1)
 
real(real32) m_transparency = 1.0
 Defines the translucency value. Must exist on (0, 1].
 
- Public Attributes inherited from fplot_core::plot_3d
type(y_axis), pointer m_yaxis => null()
 The y-axis.
 
type(z_axis), pointer m_zaxis => null()
 The z-axis.
 
real(real64) m_elevation = 60.0d0
 The elevation angle.
 
real(real64) m_azimuth = 30.0d0
 The azimuth.
 
logical m_zintersect = .true.
 Z-axis intersect X-Y plane?
 
logical m_setmap = .false.
 Set map projection.
 
integer(int32) m_csys = COORDINATES_CARTESIAN
 Plot coordinate system.
 
- 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

logical m_showhidden = .false.
 Show hidden lines.
 

Detailed Description

A plot object defining a 3D surface plot.

Definition at line 5323 of file fplot_core.f90.

Member Function/Subroutine Documentation

◆ get_allow_smoothing()

procedure, public fplot_core::surface_plot::get_allow_smoothing

Gets a value determining if the plotted surfaces should be smoothed.

Syntax
pure logical function get_allow_smoothing(class(surface_plot) this)
Parameters
[in]thisThe surface_plot object.
Returns
Returns true if the surface should be smoothed; else, false.

Definition at line 5413 of file fplot_core.f90.

◆ get_command_string()

procedure, public fplot_core::surface_plot::get_command_string
virtual

Gets the GNUPLOT command string to represent this plot_3d object.

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

Reimplemented from fplot_core::plot_3d.

Definition at line 5402 of file fplot_core.f90.

◆ get_light_intensity()

procedure, public fplot_core::surface_plot::get_light_intensity

Gets the ratio of the strength of the light source relative to the ambient light.

Syntax
pure real(real32) function get_light_intensity(class(surface_plot) this)
Parameters
[in]thisThe surface_plot object.
Returns
The light intensity ratio.

Definition at line 5481 of file fplot_core.f90.

◆ get_show_contours()

procedure, public fplot_core::surface_plot::get_show_contours

Gets a value determining if a contour plot should be drawn in conjunction with the surface plot.

Syntax
pure logical function get_show_contours(class(surface_plot) this)
Parameters
[in]thisThe surface_plot object.
Returns
Returns true if the contour plot should be drawn; else, false to only draw the surface.

Definition at line 5436 of file fplot_core.f90.

◆ get_show_hidden()

procedure, public fplot_core::surface_plot::get_show_hidden

Gets a value indicating if hidden lines should be shown.

Syntax
pure logical function get_show_hidden(class(surface_plot) this)
Parameters
[in]thisThe surface_plot object.
Returns
Returns true if hidden lines should be shown; else, false.

Definition at line 5381 of file fplot_core.f90.

◆ get_specular_intensity()

procedure, public fplot_core::surface_plot::get_specular_intensity

Gets the ratio of the strength of the specular light source relative to the ambient light.

Syntax
pure real(real32) function get_specular_intensity(class(surface_plot) this)
Parameters
[in]thisThe surface_plot object.
Returns
The specular light intensity ratio.

Definition at line 5504 of file fplot_core.f90.

◆ get_transparency()

procedure, public fplot_core::surface_plot::get_transparency

Gets a factor defining the transparency of plotted surfaces.

Syntax
pure real(real32) function get_transparency(class(surface_plot) this)
Parameters
[in]thisThe surface_plot object.
Returns
A value existing on the set (0 1] defining the level of transparency. A value of 1 indicates a fully opaque surface.

Definition at line 5528 of file fplot_core.f90.

◆ get_use_lighting()

procedure, public fplot_core::surface_plot::get_use_lighting

Gets a value indicating if lighting, beyond the ambient light source, is to be used.

Syntax
pure logical function get_use_lighting(class(surface_plot) this)
Parameters
[in]thisThe surface_plot object.
Returns
True if lighting should be used; else, false.

Definition at line 5459 of file fplot_core.f90.

◆ initialize()

procedure, public fplot_core::surface_plot::initialize

Cleans up resources held by the surface_plot object.

Parameters
[in,out]thisThe surface_plot object.

Initializes the surface_plot object.

Syntax
subroutine initialize(class(surface_plot) this, optional integer(int32) term, optional class(errors) err)
Parameters
[in]thisThe surface_plot 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 5371 of file fplot_core.f90.

◆ set_allow_smoothing()

procedure, public fplot_core::surface_plot::set_allow_smoothing

Sets a value determining if the plotted surfaces should be smoothed.

Syntax
subroutine set_allow_smoothing(class(surface_plot) this, logical x)
Parameters
[in,out]thisThe surface_plot object.
[in]xSet to true if the surface should be smoothed; else, false.

Definition at line 5424 of file fplot_core.f90.

◆ set_light_intensity()

procedure, public fplot_core::surface_plot::set_light_intensity

Sets the ratio of the strength of the light source relative to the ambient light.

Syntax
subroutine set_light_intensity(class(surface_plot) this, real(real32) x)
Parameters
[in,out]thisThe surface_plot object.
[in]xThe light intensity ratio. The value must exist in the set [0, 1]; else, it will be clipped to lie within the range.

Definition at line 5493 of file fplot_core.f90.

◆ set_show_contours()

procedure, public fplot_core::surface_plot::set_show_contours

Sets a value determining if a contour plot should be drawn in conjunction with the surface plot.

Syntax
subroutine set_show_contours(class(surface_plot) this, logical x)
Parameters
[in,out]thisThe surface_plot object.
[in]xSet to true if the contour plot should be drawn; else, false to only draw the surface.

Definition at line 5448 of file fplot_core.f90.

◆ set_show_hidden()

procedure, public fplot_core::surface_plot::set_show_hidden

Sets a value indicating if hidden lines should be shown.

Syntax
subroutine set_show_hidden(class(surface_plot) this, logical x)
Parameters
[in,out]thisThe surface_plot object.
[in]xSet to true if hidden lines should be shown; else, false.

Definition at line 5391 of file fplot_core.f90.

◆ set_specular_intensity()

procedure, public fplot_core::surface_plot::set_specular_intensity

Sets the ratio of the strength of the specular light source relative to the ambient light.

Syntax
subroutine set_specular_intensity(class(surface_plot) this, real(real32) x)
Parameters
[in,out]thisThe surface_plot object.
[in]xThe specular light intensity ratio. The value must exist in the set [0, 1]; else, it will be clipped to lie within the range.

Definition at line 5517 of file fplot_core.f90.

◆ set_transparency()

procedure, public fplot_core::surface_plot::set_transparency

Sets a factor defining the transparency of plotted surfaces.

Syntax
subroutine set_transparency(class(surface_plot) this, real(real32) x)
Parameters
[in,out]thisThe surface_plot object.
[in]xA 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].

Definition at line 5541 of file fplot_core.f90.

◆ set_use_lighting()

procedure, public fplot_core::surface_plot::set_use_lighting

Sets a value indicating if lighting, beyond the ambient light source, is to be used.

Syntax
subroutine set_use_lighting(class(surface_plot) this, logical x)
Parameters
[in,out]thisThe surface_plot object.
[in]xTrue if lighting should be used; else, false.

Definition at line 5470 of file fplot_core.f90.

Member Data Documentation

◆ m_contour

logical fplot_core::surface_plot::m_contour = .false.

Show a contour plot as well as the surface plot?

Definition at line 5332 of file fplot_core.f90.

◆ m_lightintensity

real(real32) fplot_core::surface_plot::m_lightintensity = 0.5

Lighting intensity (0 - 1) - default is 0.5.

Definition at line 5338 of file fplot_core.f90.

◆ m_showhidden

logical fplot_core::surface_plot::m_showhidden = .false.
private

Show hidden lines.

Definition at line 5326 of file fplot_core.f90.

◆ m_smooth

logical fplot_core::surface_plot::m_smooth = .true.

The colormap.

Smooth the surface?

Definition at line 5330 of file fplot_core.f90.

◆ m_specular

real(real32) fplot_core::surface_plot::m_specular = 0.5

Specular highlight intensity (0 - 1)

Definition at line 5340 of file fplot_core.f90.

◆ m_transparency

real(real32) fplot_core::surface_plot::m_transparency = 1.0

Defines the translucency value. Must exist on (0, 1].

Definition at line 5342 of file fplot_core.f90.

◆ m_uselighting

logical fplot_core::surface_plot::m_uselighting = .false.

Use lighting?

Definition at line 5336 of file fplot_core.f90.


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