PS_WRITE
Simple PostScript Plots
PS_WRITE
is a FORTRAN90 library which
makes PostScript plots.
PS_WRITE can create both general
PostScript (PS) files and also the special Encapsulated PostScript files
which are restricted to
containing a single image.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
PS_WRITE is available in
a FORTRAN90 version
Related Data and Programs:
GRF_TO_EPS,
a FORTRAN90 program which
reads a GRF file describing a graph,
and makes a PostScript image of the graph, using routines from
the PS_WRITE library.
PLOT_POINTS,
a FORTRAN90 program which
reads a data file of points, and
makes various plots, using routines from the PS_WRITE library.
PLOT_TO_PS,
a FORTRAN90 program which
uses routines from PS_WRITE,
and allows the interactive creation of simple plots.
VECTOR_PLOT,
a FORTRAN90 program which
uses routines from PS_WRITE,
and creates plots of a vector field.
Reference:

Henry McGilton, Mary Campione,
PostScript by Example,
AddisonWesley,
ISBN: 0201632284
Source Code:
Examples and Tests:
Sample files you may copy include:
PNG versions are available:
List of Routines:

BOX_CLIP_LINE_2D uses a box to clip a line segment in 2D.

CH_CAP capitalizes a single character.

CIRCLE_POINTS returns N equally spaced points on a circle in 2D.

CIRCLE_POINTS_ARC returns N points on a circular arc in 2D.

DEGREES_TO_RADIANS converts an angle from degrees to radians.

ELLIPSE_POINTS returns N points on an ellipse in 2D.

ELLIPSE_POINTS_ARC returns N points on an elliptical arc in 2D.

EPS_FILE_HEAD writes header information to an encapsulated PostScript file.

EPS_FILE_TAIL writes trailer information to an encapsulated PostScript file.

GET_UNIT returns a free FORTRAN unit number.

I4_SWAP swaps two I4's.

POINT_INSIDE_BOX_2D determines if a point is inside a box in 2D.

PS_ARROW draws an arrow from (X1,Y1) to (X2,Y2).

PS_CIRCLE draws a circle.

PS_CIRCLE_ARC draws a circular arc.

PS_CIRCLE_FILL draws a filled circle.

PS_CLIP defines a clipping polygon.

PS_COLOR_FILL_SET sets the fill color.

PS_COLOR_LINE handles the line color.

PS_COLOR_LINE_SET sets the line color.

PS_COMMENT inserts a comment into the PostScript file.

PS_DEFAULT sets the internal settings to their default values

PS_FILE_CLOSE closes a PostScript file.

PS_FILE_HEAD writes header information to a PostScript file.

PS_FILE_OPEN opens a new version of a PostScript file with a given name.

PS_FILE_TAIL writes trailer information to a PostScript file.

PS_FILL_GRAY sets the gray fill for polygons.

PS_FONT_SIZE sets the font size.

PS_GRID_CARTESIAN draws a cartesian grid.

PS_GRID_POLAR draws a polar grid.

PS_GRID_TRIANGULAR draws a simple triangular grid.

PS_LABEL prints a label at the current position.

PS_LABEL_SLANT prints a slanted label at a given position.

PS_LINE draws a line segment from (X1,Y1) to (X2,Y2).

PS_LINE_CLOSED adds the graph of a closed line to a PostScript file.

PS_LINE_OPEN adds the graph of a line to a PostScript file.

PS_LINE_WIDTH sets the line width.

PS_LINETO draws a line from the current point to the given point.

PS_MARK_CIRCLE marks a point with a small open circle.

PS_MARK_CIRCLES marks points with a small open circle.

PS_MARK_DISK marks a point with a small filled disk.

PS_MARK_DISKS marks points with a small filled disk.

PS_MARK_POINT marks a point with a tiny point.

PS_MARKER_SIZE sets the marker size.

PS_MOVETO "moves to" a new point, which becomes the current point.

PS_PAGE_HEAD writes header information on a new page.

PS_PAGE_TAIL writes tail information at the end of a page.

PS_POLYGON_FILL adds a filled polygon to a PostScript file.

PS_LANDSCAPE rotates the page from portrait to landscape.

PS_ROTATE rotates the coordinate system by a given angle.

PS_SECTOR draws a circular sector.

PS_SECTOR_FILL draws a filled circular sector.

PS_SETTING_INT sets, gets, or prints integer internal PS_WRITE parameters.

PS_SETTING_PRINT prints the internal PS_WRITE parameters.

PS_SETTING_REAL sets, gets, or prints real internal PS_WRITE parameters.

PS_SQUARE draws a square.

PS_SQUARE_FILL draws a filled square.

PS_STAR draws an open star of given radius.

PS_STAR_CIRCLE draws open circles at the 10 points on a star of given radius.

PS_STAR_DISK draws filled disks at the 10 points on a star of given radius.

PS_STAR_POINTS returns 10 points on a star of given radius.

PS_TRIANGLE draws an open triangle.

PS_TRIANGLE_FILL draws a filled triangle.

R8_MODP returns the nonnegative remainder of real division.

R8_SWAP swaps two real values.

S_EQI is a case insensitive comparison of two strings for equality.

SECTOR_POINTS returns N equally spaced points on a circle in 2D.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 15 November 2006.