PS_WRITE - Simple PostScript Plots
PS_WRITE is a small, simple package, containing a few subroutines
that allow the user to create a PostScript file describing a single
plot of one or more lines.
The program PLOT_TO_PS
uses PS_WRITE and allows the interactive creation of simple plots.
-
Reference:
-
Henry McGilton and Mary Campione,
PostScript by Example,
Addison-Wesley,
ISBN: 0-201-63228-4
Files you may copy include:
Sample PostScript files you may copy include:
-
ps_write_prb01.ps, sample output #1.
-
ps_write_prb02.ps, sample output #2.
-
ps_write_prb03.ps, sample output #3.
-
ps_write_prb04.ps, sample output #4.
-
ps_write_prb05.ps, sample output #5.
-
ps_write_prb06.ps, sample output #6.
-
ps_write_prb07.ps, sample output #7.
-
ps_write_prb08.ps, sample output #8.
-
ps_write_prb09.eps, sample
output #9.
-
ps_write_prb11.eps, sample
output #11.
-
ps_write_prb12.eps, sample
output #12, plots 1000 points.
The list of routines includes:
-
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.
-
I_SWAP swaps two integer values.
-
PI returns the value of pi.
-
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 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.
-
R_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.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
Return to the graphics software page.
Last revised on 22 February 2002.