GraphImage
Author: Jim Wen
Date Created: 27 April 1989
Basic Operations:
Related Constructors:
Also See:
AMS Classifications:
Keywords:
References:
Description: TwoDimensionalGraph creates virtual two dimensional graphs
(to be displayed on TwoDimensionalViewports).
graphImage : () -> %
graphImage() returns an empty graph with 0 point lists
of the domain \spadtype{GraphImage}. A graph image contains
the graph data component of a two dimensional viewport.
sendGraphImage : % -> Void
sendGraphImage(gi) takes the given graph, \spad{gi} of the
domain \spadtype{GraphImage}, and sends it's data to the
viewport manager where it waits to be included in a two-dimensional
viewport window. \spad{gi} cannot be an empty graph.
makeGraphImage : (L L P) -> %
makeGraphImage(llp) returns a graph of the domain
\spadtype{GraphImage} which is composed of the points and
lines from the list of lists of points, \spad{llp}, with
default point size and default point and line colours.
makeGraphImage : (L L P, L PAL, L PAL, L PI) -> %
makeGraphImage(llp, lpal1, lpal2, lp) returns a graph of the
domain \spadtype{GraphImage} which is composed of the points
and lines from the list of lists of points, \spad{llp}, whose
point colors are indicated by the list of palette colors,
\spad{lpal1}, and whose lines are colored according to the list
of palette colors, \spad{lpal2}. The paramater lp is a list of
integers which denote the size of the data points.
makeGraphImage : (L L P, L PAL, L PAL, L PI, L DROP) -> %
makeGraphImage(llp, lpal1, lpal2, lp, lopt) returns a graph of
the domain \spadtype{GraphImage} which is composed of the
points and lines from the list of lists of points, \spad{llp},
whose point colors are indicated by the list of palette colors,
\spad{lpal1}, and whose lines are colored according to the list
of palette colors, \spad{lpal2}. The paramater lp is a list of
integers which denote the size of the data points, and \spad{lopt}
is the list of draw command options.
pointLists : % -> L L P
pointLists(gi) returns the list of lists of points which compose
the given graph, \spad{gi}, of the domain \spadtype{GraphImage}.
key : % -> I
key(gi) returns the process ID of the given graph, \spad{gi},
of the domain \spadtype{GraphImage}.
ranges : % -> RANGEF
ranges(gi) returns the list of ranges of the point components from
the indicated graph, \spad{gi}, of the domain \spadtype{GraphImage}.
ranges : (%, RANGEF) -> RANGEF
ranges(gi, lr) modifies the list of ranges for the given graph,
\spad{gi} of the domain \spadtype{GraphImage}, to be that of the
list of range segments, \spad{lr}, and returns the new range list
for \spad{gi}.
units : % -> UNITF
units(gi) returns the list of unit increments for the x and y
axes of the indicated graph, \spad{gi}, of the domain
\spadtype{GraphImage}.
units : (%, UNITF) -> UNITF
units(gi, lu) modifies the list of unit increments for the x and y
axes of the given graph, \spad{gi} of the domain
\spadtype{GraphImage}, to be that of the list of unit increments,
\spad{lu}, and returns the new list of units for \spad{gi}.
component : (%, L P, PAL, PAL, PI) -> Void
component(gi, lp, pal1, pal2, p) sets the components of the
graph, \spad{gi} of the domain \spadtype{GraphImage}, to the
values given. The point list for \spad{gi} is set to the list
\spad{lp}, the color of the points in \spad{lp} is set to
the palette color \spad{pal1}, the color of the lines which
connect the points \spad{lp} is set to the palette color
\spad{pal2}, and the size of the points in \spad{lp} is given
by the integer p.
component : (%, P) -> Void
component(gi, pt) modifies the graph \spad{gi} of the domain
\spadtype{GraphImage} to contain one point component, \spad{pt}
whose point color, line color and point size are determined by
the default functions \spadfun{pointColorDefault},
\spadfun{lineColorDefault}, and \spadfun{pointSizeDefault}.
component : (%, P, PAL, PAL, PI) -> Void
component(gi, pt, pal1, pal2, ps) modifies the graph \spad{gi} of
the domain \spadtype{GraphImage} to contain one point component,
\spad{pt} whose point color is set to the palette color \spad{pal1},
line color is set to the palette color \spad{pal2}, and point
size is set to the positive integer \spad{ps}.
appendPoint : (%, P) -> Void
appendPoint(gi, pt) appends the point \spad{pt} to the end
of the list of points component for the graph, \spad{gi}, which is
of the domain \spadtype{GraphImage}.
point : (%, P, PAL) -> Void
point(gi, pt, pal) modifies the graph \spad{gi} of the domain
\spadtype{GraphImage} to contain one point component, \spad{pt}
whose point color is set to be the palette color \spad{pal}, and
whose line color and point size are determined by the default
functions \spadfun{lineColorDefault} and \spadfun{pointSizeDefault}.
coerce : L L P -> %
coerce(llp) creates and returns a graph of the domain
\spadtype{GraphImage} which is composed of the list of list
of points given by \spad{llp}, and whose point colors, line colors
and point sizes are determined by the default functions
\spadfun{pointColorDefault}, \spadfun{lineColorDefault}, and
\spadfun{pointSizeDefault}. The graph data is then sent to the
viewport manager where it waits to be included in a two-dimensional
viewport window.
coerce : % -> E
coerce(gi) returns the indicated graph, \spad{gi}, of domain
\spadtype{GraphImage} as output of the domain \spadtype{OutputForm}.
putColorInfo : (L L P, L PAL) -> L L P
putColorInfo(llp, lpal) takes a list of list of points, \spad{llp},
and returns the points with their hue and shade components
set according to the list of palette colors, \spad{lpal}.
TwoDimensionalViewport
Author: Jim Wen
Date Created: 28 April 1989
Basic Operations:
Related Constructors:
Also See:
AMS Classifications:
Keywords:
References:
Description: TwoDimensionalViewport creates viewports to display graphs.
getPickedPoints : % -> L POINT
getPickedPoints(x)
returns a list of small floats for the points the
user interactively picked on the viewport
for full integration into the system, some design
issues need to be addressed: e.g. how to go through
the GraphImage interface, how to default to graphs, etc.
viewport2D : () -> %
viewport2D() returns an undefined two-dimensional viewport
of the domain \spadtype{TwoDimensionalViewport} whose
contents are empty.
makeViewport2D : % -> %
makeViewport2D(v) takes the given two-dimensional viewport,
v, of the domain \spadtype{TwoDimensionalViewport} and
displays a viewport window on the screen which contains
the contents of v.
options : % -> L DROP
options(v) takes the given two-dimensional viewport, v, of the
domain \spadtype{TwoDimensionalViewport} and returns a list
containing the draw options from the domain \spadtype{DrawOption}
for v.
options : (%, L DROP) -> %
options(v, lopt) takes the given two-dimensional viewport, v,
of the domain \spadtype{TwoDimensionalViewport} and returns
v with it's draw options modified to be those which are indicated
in the given list, \spad{lopt} of domain \spadtype{DrawOption}.
makeViewport2D : (G, L DROP) -> %
makeViewport2D(gi, lopt) creates and displays a viewport window
of the domain \spadtype{TwoDimensionalViewport} whose graph
field is assigned to be the given graph, \spad{gi}, of domain
\spadtype{GraphImage}, and whose options field is set to be
the list of options, \spad{lopt} of domain \spadtype{DrawOption}.
graphState : (%, PI, SF, SF, SF, SF, I, I, I, I, PAL, I, PAL, I) -> Void
graphState(v, num, sX, sY, dX, dY, pts, lns, box, axes, axesC, un, unC, cP)
sets the state of the characteristics for the graph indicated
by \spad{num} in the given two-dimensional viewport v, of domain
\spadtype{TwoDimensionalViewport}, to the values given as
parameters. The scaling of the graph in the x and y component
directions is set to be \spad{sX} and \spad{sY}; the window
translation in the x and y component directions is set to be
\spad{dX} and \spad{dY}; The graph points, lines, bounding box,
axes, or units will be shown in the viewport if their given
parameters \spad{pts}, \spad{lns}, \spad{box}, \spad{axes} or
\spad{un} are set to be \spad{1}, but will not be shown if they
are set to \spad{0}. The color of the axes and the color of the
units are indicated by the palette colors \spad{axesC} and
\spad{unC} respectively. To display the control panel when
the viewport window is displayed, set \spad{cP} to \spad{1},
otherwise set it to \spad{0}.
graphStates : % -> V GS
graphStates(v) returns and shows a listing of a record containing
the current state of the characteristics of each of the ten graph
records in the given two-dimensional viewport, v, which is of
domain \spadtype{TwoDimensionalViewport}.
graphs : % -> V GU
graphs(v) returns a vector, or list, which is a union of all
the graphs, of the domain \spadtype{GraphImage}, which are
allocated for the two-dimensional viewport, v, of domain
\spadtype{TwoDimensionalViewport}. Those graphs which have
no data are labeled "undefined", otherwise their contents
are shown.
title : (%, STR) -> Void
title(v, s) changes the title which is shown in the two-dimensional
viewport window, v of domain \spadtype{TwoDimensionalViewport}.
putGraph : (%, G, PI) -> Void
putGraph(v, gi, n) sets the graph field indicated by n, of the
indicated two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, to be the graph, \spad{gi}
of domain \spadtype{GraphImage}. The contents of viewport, v,
will contain \spad{gi} when the function \spadfun{makeViewport2D}
is called to create the an updated viewport v.
getGraph : (%, PI) -> G
getGraph(v, n) returns the graph which is of the domain
\spadtype{GraphImage} which is located in graph field n
of the given two-dimensional viewport, v, which is of the
domain \spadtype{TwoDimensionalViewport}.
axes : (%, PI, STR) -> Void
axes(v, n, s) displays the axes of the graph in field n of
the given two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, if s is "on", or does
not display the axes if s is "off".
axes : (%, PI, PAL) -> Void
axes(v, n, c) displays the axes of the graph in field n of
the given two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, with the axes color set to
the given palette color c.
units : (%, PI, STR) -> Void
units(v, n, s) displays the units of the graph in field n of
the given two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, if s is "on", or does
not display the units if s is "off".
units : (%, PI, PAL) -> Void
units(v, n, c) displays the units of the graph in field n of
the given two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, with the units color set to
the given palette color c.
points : (%, PI, STR) -> Void
points(v, n, s) displays the points of the graph in field n of
the given two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, if s is "on", or does
not display the points if s is "off".
region : (%, PI, STR) -> Void
region(v, n, s) displays the bounding box of the graph in
field n of the given two-dimensional viewport, v, which is
of domain \spadtype{TwoDimensionalViewport}, if s is "on",
or does not display the bounding box if s is "off".
connect : (%, PI, STR) -> Void
connect(v, n, s) displays the lines connecting the graph
points in field n of the given two-dimensional viewport, v,
which is of domain \spadtype{TwoDimensionalViewport}, if s
is "on", or does not display the lines if s is "off".
controlPanel : (%, STR) -> Void
controlPanel(v, s) displays the control panel of the given
two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, if s is "on", or hides
the control panel if s is "off".
close : % -> Void
close(v) closes the viewport window of the given
two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, and terminates the
corresponding process ID.
dimensions : (%, NNI, NNI, PI, PI) -> Void
dimensions(v, x, y, width, height) sets the position of the
upper left-hand corner of the two-dimensional viewport, v,
which is of domain \spadtype{TwoDimensionalViewport}, to
the window coordinate x, y, and sets the dimensions of the
window to that of \spad{width}, \spad{height}. The new
dimensions are not displayed until the function
\spadfun{makeViewport2D} is executed again for v.
scale : (%, PI, F, F) -> Void
scale(v, n, sx, sy) displays the graph in field n of the given
two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, scaled by the factor \spad{sx}
in the x-coordinate direction and by the factor \spad{sy} in
the y-coordinate direction.
translate : (%, PI, F, F) -> Void
translate(v, n, dx, dy) displays the graph in field n of the given
two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, translated by \spad{dx} in
the x-coordinate direction from the center of the viewport, and
by \spad{dy} in the y-coordinate direction from the center.
Setting \spad{dx} and \spad{dy} to \spad{0} places the center
of the graph at the center of the viewport.
show : (%, PI, STR) -> Void
show(v, n, s) displays the graph in field n of the given
two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, if s is "on", or does not
display the graph if s is "off".
move : (%, NNI, NNI) -> Void
move(v, x, y) displays the two-dimensional viewport, v, which
is of domain \spadtype{TwoDimensionalViewport}, with the upper
left-hand corner of the viewport window at the screen
coordinate position x, y.
update : (%, G, PI) -> Void
update(v, gr, n) drops the graph \spad{gr} in slot \spad{n}
of viewport \spad{v}. The graph gr must have been
transmitted already and acquired an integer key.
resize : (%, PI, PI) -> Void
resize(v, w, h) displays the two-dimensional viewport, v, which
is of domain \spadtype{TwoDimensionalViewport}, with a width
of w and a height of h, keeping the upper left-hand corner
position unchanged.
write : (%, STR) -> STR
write(v, s) takes the given two-dimensional viewport, v, which
is of domain \spadtype{TwoDimensionalViewport}, and creates
a directory indicated by s, which contains the graph data
files for v.
write : (%, STR, STR) -> STR
write(v, s, f) takes the given two-dimensional viewport, v, which
is of domain \spadtype{TwoDimensionalViewport}, and creates
a directory indicated by s, which contains the graph data
files for v and an optional file type f.
write : (%, STR, L STR) -> STR
write(v, s, lf) takes the given two-dimensional viewport, v, which
is of domain \spadtype{TwoDimensionalViewport}, and creates
a directory indicated by s, which contains the graph data
files for v and the optional file types indicated by the list lf.
reset : % -> Void
reset(v) sets the current state of the graph characteristics
of the given two-dimensional viewport, v, which is of domain
\spadtype{TwoDimensionalViewport}, back to their initial settings.
key : % -> I
key(v) returns the process ID number of the given two-dimensional
viewport, v, which is of domain \spadtype{TwoDimensionalViewport}.
coerce : % -> E
coerce(v) returns the given two-dimensional viewport, v, which
is of domain \spadtype{TwoDimensionalViewport} as output of
the domain \spadtype{OutputForm}.
setFrontend2D : FET -> FET
Sets the frontend according to the values in the FET table.
getFrontend2D : () -> FET
Gets the FET table of the current frontend.
makeFrontend2D : (%, FET) -> Void
Makes the frontend according to the values in the FET table.