Chapter 21. The Specialized Fortran 95 API for PLplot

Table of Contents
plcont: Contour plot for Fortran 95
plshade: Shaded plot for Fortran 95
plshades: Continuously shaded plot for Fortran 95
plvect: Vector plot for Fortran 95
plmesh: Plot surface mesh for Fortran 95
plot3d: Plot 3-d surface plot for Fortran 95
plparseopts: parse arguments for Fortran 95
plsesc: Set the escape character for text strings for Fortran 95

The purpose of this Chapter is to document the API for each Fortran 95 function in PLplot that differs substantially (usually in argument lists) from the common API that has already been documented in Chapter 19.

Normally, the common API is wrapped in such a way for Fortran 95 that there is and one-to-one correspondence between each Fortran 95 and C argument with the exception of arguments that indicate array sizes (see Chapter 11 for discussion). However, for certain routines documented in this chapter the Fortran 95 argument lists necessarily differ substantially from the C versions.

This chapter is incomplete and NEEDS DOCUMENTATION.

plcont: Contour plot for Fortran 95

This is an overloaded function with a variety of argument lists:


	interface plcont
	subroutine plcontour_0(z,kx,lx,ky,ly,clevel)
	integer                          :: kx,lx,ky,ly
	real(kind=plflt), dimension(:,:) :: z
	real(kind=plflt), dimension(:)   :: clevel
	end subroutine plcontour_0

	subroutine plcontour_1(z,kx,lx,ky,ly,clevel,xg,yg)
	integer                          :: kx,lx,ky,ly
	real(kind=plflt), dimension(:,:) :: z
	real(kind=plflt), dimension(:)   :: clevel
	real(kind=plflt), dimension(:)   :: xg
	real(kind=plflt), dimension(:)   :: yg
	end subroutine plcontour_1

	subroutine plcontour_2(z,kx,lx,ky,ly,clevel,xg,yg)
	integer                          :: kx,lx,ky,ly
	real(kind=plflt), dimension(:,:) :: z
	real(kind=plflt), dimension(:)   :: clevel
	real(kind=plflt), dimension(:,:) :: xg
	real(kind=plflt), dimension(:,:) :: yg
	end subroutine plcontour_2

	subroutine plcontour_tr(z,kx,lx,ky,ly,clevel,tr)
	integer                          :: kx,lx,ky,ly
	real(kind=plflt), dimension(:,:) :: z
	real(kind=plflt), dimension(:)   :: clevel
	real(kind=plflt), dimension(6)   :: tr
	end subroutine plcontour_tr

	subroutine plcontour_0_all(z,clevel)
	real(kind=plflt), dimension(:,:) :: z
	real(kind=plflt), dimension(:)   :: clevel
	end subroutine plcontour_0_all

	subroutine plcontour_1_all(z,clevel,xg,yg)
	real(kind=plflt), dimension(:,:) :: z
	real(kind=plflt), dimension(:)   :: clevel
	real(kind=plflt), dimension(:)   :: xg
	real(kind=plflt), dimension(:)   :: yg
	end subroutine plcontour_1_all

	subroutine plcontour_2_all(z,clevel,xg,yg)
	real(kind=plflt), dimension(:,:) :: z
	real(kind=plflt), dimension(:)   :: clevel
	real(kind=plflt), dimension(:,:) :: xg
	real(kind=plflt), dimension(:,:) :: yg
	end subroutine plcontour_2_all

	subroutine plcontour_tr_all(z,clevel,tr)
	real(kind=plflt), dimension(:,:) :: z
	real(kind=plflt), dimension(:)   :: clevel
	real(kind=plflt), dimension(6)   :: tr
	end subroutine plcontour_tr_all
	end interface
      

When called from Fortran 95, this overloaded routine has the same effect as when invoked from C. See examples/f95/x??f.f90 for various ways to call plcont from Fortran 95.

The meaning of the various arguments is as follows:

z (real(kind=plflt), dimension(:,:), input)

Matrix containing the values to be plotted.

kx, lx (integer, input)

Range for the first index in the matrix z to consider. If not given, then the whole first index is considered.

clevel (real(kind=plflt), dimension(:), input)

Levels at which the contours are computed and drawn.

kx, lx (integer, input)

Range for the first index in the matrix z to consider. If not given, then the whole first index is considered.

ky, ly (integer, input)

Range for the second index in the matrix z to consider. If not given, then the whole second index is considered.

xg (real(kind=plft), dimension(:) or real(kind=plft), dimension(:,:), input)

The x-coordinates for the grid lines (if one-dimensional) or the x-coordinates of the grid vertices (if two-dimensional). The values in the matrix are plotted at these coordinates. If not given, implicit coordinates are used (equal to the indices in the matrix).

yg (real(kind=plft), dimension(:) or real(kind=plft), dimension(:,:), input)

The y-coordinates for the grid lines (if one-dimensional) or the x-coordinates of the grid vertices (if two-dimensional). The values in the matrix are plotted at these coordinates.

tr (real(kind=plft), dimension(6), input)

The coefficients of an affine transformation:


		x = tr(1) * ix + tr(2) * iy + tr(3)
		y = tr(4) * ix + tr(5) * iy + tr(6)
	      
The indices of the matrix element are used to compute the "actual" coordinates according to the above formulae.