Skip to ContentSkip to Navigation
Society/business Center for Information Technology Research and Innovation Support Virtual Reality and Visualisation

Komplot function plotting (fortran only)

Function plotting, only in fortran

Subroutine functions with one parameter can be visualized by the routines in this section. DLAB, NP, XFROM, XTO, FX are common parameters.

DLAB (string) is a data label

NP is the number of equidistant X-coordinates from XFROM to XTO, the increase per coordinate = (XTO-XFROM)/(NP-1), NP>= 2.

FX is a real function subroutine of one REAL variable, used to compute the Y-coordinates belonging to the NP X-coordinates. Must be declared: EXTERNAL FX


Lines

subroutine F_POLYLINE(DLAB, NP, XFROM, XTO, FX)
Points connected as polyline, NP>=2.
subroutine F_DISJOINT_LINE(DLAB, NP, XFROM, XTO, FX)
Points connected as disjoint line, NP>=2.

Interpolation

subroutine F_CURVE(DLAB, NP, XFROM, XTO, FX)
Points connected by smooth interpolated line, NP>=3.
( subroutine F_SPLINE(DLAB, NP, XFROM, XTO, FX) )
 

Markers

subroutine F_MARKERS(DLAB, NP, XFROM, XTO, FX, ISYM)
Points marked by symbol defined by ISYM

Example

								
      program yxx
c make graph of y = x*x from 0.0 ... 10.0
      EXTERNAL FX
      REAL XFROM, XTO
      XFROM = 0.0
      XTO   = 10.0
      call FRAME (10., XFROM, XTO,8., 0., 0., 'X', 'Y', 'Function')
      call F_CURVE (21, XFROM, XTO, FX, 'y = x*x')
      end

      function FX(x)
      FX = x*x
      end

							
Last modified:02 October 2015 10.22 p.m.