fortrandoc
The GraphWindow encapsulates the object interface to ElVis. Application programs can send data to ElVis using the GraphWindow object.
The GraphWindow object defines the routines and data for defining a grid of graphs. Each cell of the grid contains one graph. A graph contains one or more datasets that are drawn in the plot area.
When a GraphWindow is displayed in ElVis it is drawn in a frame within the desktop window.
The geometric coordinates of a graph are specified between 0. - 1. horizontally and vertically. The origin, 0., 0., is at the lower left corner of the graph. The upper right corner of the graph is 1., 1. The layout of a graph is shown on the ElVis Programming Interface page.
In the Fortran API to ElVis the subroutine names start with ef_ . The API allocates memory to store the GraphWindow before sending it to be displayed. Memory is allocated when the create routines are called (ef_graphwindowcreate, ef_graphcreate, ef_fxdatasetcreate). The memory can be freed when it is no longer needed.
An application uses the API to build up the complete description of a GraphWindow and then send it to the ElVis display program. A typical sequence of calls is:
include "elvis.h" status = ef_initialize() status = ef_register('rplot', username, hostname, 'NSTX-02', 0) status = ef_graphwindowcreate('NSTX', 3, 2) status = ef_graphcreate('Temperature', E_NO_INDEX) status = ef_graphwindowaddgraph('NSTX', 'Temperature', 0, 0) status = ef_fxdatasetcreate('Exp 1', nPoints, x, fx) status = ef_graphaddfxdataset('Temperature', 'Exp 1') status = ef_graphsetxlabel('Temperature', 'X Axis Label') status = ef_graphsetylabel('Temperature', 'Y Axis Label') status = ef_graphsettitle('Temperature', 'Title of Graph') status = ef_graphwindowdisplay('NSTX') status = ef_end()This creates a GraphWindow with 3 rows and 2 columns. Then a graph is created and put in the leftmost column of the top row. A dataset is created and added to the graph. Then the parameters for the axes are set and a title is specified. Now that the GraphWindow is fully defined the last call is made to send the GraphWindow from the application to ElVis where it will be displayed. The upper left cell will contain the graph. The other 5 cells will be empty, but graphs can be added to them later.
The ELVIS_SERVER environment variable needs to be used as well. The variable is in the form "output1;output2;output3;output4" where each output is a type of output for the library. An output can be a hostname (i.e., comp1.pppl.gov), an IP, stdout (for standard out), stdout (for standard error), localhost (for the hostname of the local machine), a filename (must begin with a '.' or '/', i.e., "/u/efeibush/elvis_out.eml"), or filegen (an automatically generated filename using the application name, your username, and the process ID). Also, ELVIS_PORT can be used to set a port other than the default one (7654).
Field Summary | |
---|---|
int |
E_DATASET_NOT_FOUND
The Dataset could not be found. |
int |
E_DRAW_FAIL
The GraphWindow could not be drawn by ElVis display program. |
int |
E_DRAW_SUCCESS
The GraphWindow was drawn in ElVis display program. |
int |
E_FAIL
Parameters could not be set. |
int |
E_FALSE
|
int |
E_GRAPH_NOT_FOUND
The Graph could not be found. |
int |
E_GRAPH_WINDOW_NOT_FOUND
The GraphWindow could not be found. |
int |
E_LINEAR
The axis increments linearly. |
int |
E_LOG
The axis increments logarithmically. |
int |
E_NO_INDEX
The datasets in the graph are not indexed. |
int |
E_PRINT_FAIL
The graph could not be printed by ElVis display program. |
int |
E_PRINT_SUCCESS
The graph was printed by the ElVis display program. |
int |
E_SEND_FAIL
The GraphWindow could not be sent to ElVis display program. |
int |
E_SUCCESS
Parameters were set successfully. |
int |
E_TABLE_NOT_FOUND
Table was not found |
int |
E_TIME_INDEX
The datasets in the graph are indexed in time. |
int |
E_TRUE
|
int |
E_VALUE_INDEX
The datasets in the graph are indexed by a value. |
Fortran Subroutine Summary | |
---|---|
int |
ef_closewindows( port)
Close all the GraphWindows. |
int |
ef_columncreate( colName, ncells, cells)
NEW: Create a column. |
int |
ef_columnsetbackgroundcolor( columnName, color)
UPDATE: Set the background color for a column's cells. |
int |
ef_columnsetfontcolor( columnName, color)
NEW: Set the font color for a column's cells. |
int |
ef_columnsetfontname( columnName, fontName)
NEW: Set the font name or type for the cells in the column. |
int |
ef_columnsetfontsize( columnName, fontSize)
NEW: Set the font size (point value). |
int |
ef_columnsetfontstyle( columnName, fontStyle)
NEW: Set the font style (Bold, Italic, Bold Italic. |
int |
ef_columnsetheader( columnName, header)
NEW: Set the text of the header of a column. |
int |
ef_columsetrowlabels( columnName, rowLabels)
NEW: Set a column to display it's data as labels for their rows |
int |
ef_end()
Terminate the API to ElVis. |
int |
ef_free()
Free memory allocated for ElVis. |
int |
ef_fxdatasetcreate( datasetName, npoints, x, fx)
Create an f(x) dataset. |
int |
ef_fxtdatasetcreate( datasetName,npoints,x,fx,index)
Create an f(x,i) dataset that is indexed. |
int |
ef_fxtdatasetdisplay( windowName, graphName, datasetName)
Display an additional f(x,t) dataset that is indexed in time. |
int |
ef_fxycreate( xyname, nx, ny, fxy, xcoordinates, ycoordinates)
Create a 2-dimensional dataset. |
int |
ef_fxysetcontour( xyname,ncontours,contours)
Specify the contours to calculate and draw. |
int |
ef_graphaddfxdataset( graphName, datasetName)
Add a dataset to the graph (by name). |
int |
ef_graphaddfxdatasetid( graphName,id)
Add an indexed dataset to the graph (by ID). |
int |
ef_graphaddfxy( graphname, xyname)
Add a 2-dimensional dataset to a graph. |
int |
ef_graphaddlabel( graphName,label,location,font,style,size,color)
Add a label to the graph. |
int |
ef_graphcreate( graphName, type)
Create a graph. |
int |
ef_graphsetindexlabel( graphName, label)
Specify the text of the Index label. |
int |
ef_graphsetlegend( graphName, location)
Position the legend. |
int |
ef_graphsetplotarea( graphName,location,width,height)
Specify the plot area for the graph. |
int |
ef_graphsettitle( graphName,title,shortName)
REVISED: Specify the title of the graph. |
int |
ef_graphsetxaxis( graphName,loglin)
NEW: Specify log/linear for the X axis. |
int |
ef_graphsetxgrid( graphName,grid)
NEW: Specify grid lines for the X axis. |
int |
ef_graphsetxlabel( graphName, label)
Specify the label for the X axis. |
int |
ef_graphsetxrange( graphName, xmin, xmax)
NEW: Specify range for the X axis. |
int |
ef_graphsetyaxis( graphName,loglin)
NEW: Specify log/linear for the Y axis. |
int |
ef_graphsetygrid( graphName,grid)
NEW: Specify grid lines for the Y axis. |
int |
ef_graphsetylabel( graphName, label)
Specify the label for the Y axis. |
int |
ef_graphsetyrange( graphName, ymin, ymax)
NEW: Specify range for the Y axis. |
int |
ef_graphshowlegend( graphName, show)
Draw or hide the legend. |
int |
ef_graphwindowaddgraph( windowName,graphName,row,column)
Add a graph to a GraphWindow. |
int |
ef_graphwindowaddsurface( windowName, surfaceName, row, column)
Add a surface to a GraphWindow. |
int |
ef_graphwindowaddtable( windowName,tableName,row,column)
NEW: Add a table to a GraphWindow. |
int |
ef_graphwindowappendgraph( windowName,graphName,growth)
Append a graph to a GraphWindow -- NOT IMPLEMENTED --. |
int |
ef_graphwindowcreate( windowName, rows, columns)
Create a GraphWindow. |
int |
ef_graphwindowdisplay( windowName, port)
Send the GraphWindow data to ElVis and display it. |
int |
ef_graphwindowprint( windowName,row,column,fileName,port)
Print a graph that is displayed in ElVis. |
int |
ef_initialize()
Initialize the API to ElVis. |
int |
ef_register( source, user, host, identifier, collector)
Register the application with the ElVis server. |
int |
ef_sendfile( filename)
NEW: Send an EML file to an ElVis server |
int |
ef_showlines( datasetName, show)
Control the display of lines between data points. |
int |
ef_showmarkers( datasetName, showInterval)
Control the display of data point markers. |
int |
ef_surfacecreate( surfaceName,graphName)
Create a surface from a graph containing an indexed dataset. |
int |
ef_surfacesettitle( surfaceName, title)
Specify the title of the surface. |
int |
ef_surfacesetview( surfaceName, atx, aty, atz, fromx, fromy, fromz,
twist)
SPEC: Specify the view of a surface. |
int |
ef_surfacesetxaxis( surfaceName, x)
SPEC: Specify the X axis of a surface. |
int |
ef_surfacesetyaxis( surfaceName, y)
SPEC: Specify the Y axis of a surface. |
int |
ef_surfacesetzaxis( surfaceName, z)
SPEC: Specify the Z axis of a surface. |
int |
ef_surfacexaxisrange( surfaceName, xmin, xmax)
SPEC: Specify the range of the X axis for a surface. |
int |
ef_surfaceyaxisrange( surfaceName, ymin, ymax)
SPEC: Specify the range of the Y axis for a surface. |
int |
ef_surfacezaxisrange( surfaceName, zmin, zmax)
SPEC: Specify the range of the Z axis for a surface. |
int |
ef_tableaddcolumn( tableName, columnName)
NEW: Specify the entries in a column of a table. |
int |
ef_tableaddtoptext( tableName, text, font, style, fontsize, fontcolor, bgcolor)
NEW: Set the toptext of a table. |
int |
ef_tablecreate( tableName)
NEW: Create a table. |
int |
ef_tablesetbottomtext( tableName, text, font, style, fontsize, fontcolor, bgcolor)
NEW: Set the bottomtext of a table. |
Field Detail |
---|
Returned by: ef_fxcreate, ef_fxshowlines, ef_fxshowmarkers, ef_graphaddfxdataset
Returned by: ef_graphwindowdisplay.
Returned by: ef_graphwindowdisplay.
Returned by: ef_graphwindowprint.
Returned by: ef_graphwindowprint.
Returned by: many.
Returned by: ef_graphaddfxdataset, ef_graphaddlabel, ef_graphsetindexlabel, ef_graphsetplotarea, ef_graphsettitle, ef_graphsetxaxis, ef_graphsetyaxis.
Returned by: ef_graphwindowaddgraph, ef_graphwindowappendgraph, ef_graphwindowdisplay.
Returned by: ef_graphwindowdisplay.
Returned by: many.
Fortran Subroutine Detail |
---|
integer function ef_initialize()
The environment variable ELVISHOST must be set to specify the computer running the ElVis display program.
integer function ef_register( source,user,host,identifier,collector)
character*(*) source
- The name of the application.character*(*) user
- The user running the application.character*(*) host
- The hostname of the computer running the application.character*(*) identifier
- An aspect of the run for identifying it to potential display clients.integer collector
- Set to 0 means each graph will be displayed in a new window. Set to 1 means graphs are appended to the same window so they can be scrolled. Collecting the graphs in one window improves the display performance in ElVis.integer function ef_end()
integer function ef_closewindows( port)
integer port
- The port number of the display client after it connects to the server.integer function ef_graphwindowcreate( windowName,rows,columns)
character*(*) windowName
- The name of the GraphWindow.integer rows
- The number of rows in the GraphWindow.integer columns
- The number of columns in the GraphWindow.integer function ef_graphwindowdisplay( windowName, port)
character*(*) windowName
- The name of the GraphWindow.integer port
- The port number of the display client after it connects to the server.integer function ef_graphwindowprint( windowName, row, column, fileName, port)
The graph is scaled to fit an 8.5" x 11" sheet of paper. If the graph's width is greater than its height then the graph is printed in landscape format. Otherwise the graph is printed in portrait layout.
character*(*) windowName
- The name of the GraphWindow.integer row
- The row containing the graph to be printed. The top row is row 0.integer column
- The column containing the graph to be printed. The leftmost column is column 0.integer port
- The port number of the display client after it connects to the server.integer function ef_graphwindowaddgraph( windowName, graphName, row, column)
character*(*) windowName
- The name of the GraphWindow.character*(*) graphName
- The name of the graph.integer row
- The graph is inserted in this row.integer column
- The graph is inserted in this column.integer function ef_graphwindowaddsurface( windowName, surfaceName, row, column)
character*(*) windowName
- The name of the GraphWindow.character*(*) surfaceName
- The name of the surface.integer row
- The graph is inserted in this row.integer column
- The graph is inserted in this column.integer function ef_graphwindowappendgraph( windowName, graphName, growth)
character*(*) windowName
- The name of the GraphWindow.character*(*) graphName
- The name of the graph.integer growth
- If all cells contain a graph then: if E_TRUE then add a new row to the GraphWindow for this graph; if E_FALSE then delete the first graph, shift all graphs back by 1 cell, and insert this graph in the last cell.integer function ef_free()
integer function ef_graphcreate( graphName,type)
character*(*)graphName
- The name of the graph.integer type
- The type of datasets that will be added to the graph: E_NO_INDEX, E_TIME_INDEX, or E_VALUE_INDEX.integer function ef_graphsettitle( graphName, title, shortName)
character*(*) graphName
- The name of the graph.character*(*) title
- The title of the graph.character*(*) shortname
- Short name displayed on small graphs. Title is displayed if this argument is empty.integer function ef_graphsetxlabel( graphName,label)
character*(*) graphName
- The name of the graph.character*(*) label
- The text for the axis label.integer function ef_graphsetylabel( graphName,label)
character*(*) graphName
- The name of the graph.character*(*) label
- The text for the axis label.integer function ef_graphsetxaxis( graphName, loglin)
character*(*) graphName
- The name of the graph.integer loglin
- E_LINEAR (default) or E_LOGARITHMIC.integer function ef_graphsetyaxis( graphName, loglin)
character*(*) graphName
- The name of the graph.integer loglin
- E_LINEAR (default) or E_LOGARITHMIC.integer function ef_graphsetxrange( graphName,xmin,xmax)
character*(*) graphName
- The name of the graph.real*8 xmin
- The low end of the X axis.real*8 xmax
- The high end of the X axis.integer function ef_graphsetyrange( graphName,ymin,ymax)
character*(*) graphName
- The name of the graph.real*8 ymin
- The low end of the Y axis.real*8 ymax
- The high end of the Y axis.integer function ef_graphsetxgrid( graphName, grid)
character*(*) graphName
- The name of the graph.integer grid
- E_FALSE (default) or E_TRUE.integer function ef_graphsetygrid( graphName, grid)
character*(*) graphName
- The name of the graph.integer grid
- E_FALSE (default) or E_TRUE.integer function ef_graphsetindexlabel( graphName, label)
character*(*) graphName
- The name of the graph.character*(*) label
- The text for the index label.integer function ef_graphaddlabel( graphName, label, location, font, style, size, color)
character*(*) graphName
- The name of the graph.character*(*) label
- The text of the label.real*8 location(2)
- A 2 element array containing the x and y coordinates of the lower left corner of the label.character*(*) font
- Specify the name of the font as a character string: Serif, SansSerif, Monospaced, Symbol, Dialog, or DialogInput.character*(*) style
- Specify the style of the font as a character string: Plain, Bold, Italic, or Bold_Italic.real*8 size
- The size of the font is specified in 0. - 1. coordinates.character*(*) color
- The color for drawing the label. A string with the same color representation as ef_columnsetfontcolor().integer function ef_graphsetplotarea( graphName, location, width, height)
character*(*) graphName
- The name of the graph.real*8 location(2)
- The coordinate location of the lower left corner of the plot area.real*8 width
- The width, 0. - 1., of the plot area.real*8 height
- The height, 0. - 1., of the plot area.integer function ef_graphsetlegend( graphName,location)
character*(*) graphName
- The name of the graph.real*8 location
- The coordinate location of the upper left corner of the legend.integer function ef_graphshowlegend( graphName, show)
character*(*) graphName
- The name of the graph.integer show
- E_TRUE (default if this routine is not called) or E_FALSE.integer function ef_graphaddfxdataset( graphName,datasetName)
character*(*) graphName
- The name of the graph.character*(*) datasetName
- The name of the dataset.integer function ef_graphaddfxdatasetid( graphName, id)
character*(*) graphName
- The name of the graph.integer id
- The ID number of the dataset.integer function ef_fxdatasetcreate( datasetName, npoints, x, fx)
character*(*) datasetName
- The name of the dataset.integer npoints
- The number of points in the dataset.real*8 x(npoints)
- The x values of the points.real*8 fx(npoints)
- The f(x) values of the points.integer function ef_showmarkers( datasetName,showInterval)
character*(*) datasetName
- The name of the dataset.integer showInterval
- 0 = do not draw markers (default). 1 = draw marker at every point. Values greater than 1 = number of points to skip before drawing next marker.integer function ef_showlines( datasetName, show)
character*(*) datasetName
- The name of the dataset.integer show
- E_TRUE: draw a line between data point (default). E_FALSE: do not draw a line between data points.integer function ef_fxtdatasetcreate( datasetName, npoints, x, fx, index)
character*(*) datasetName
- The name of the dataset.integer npoints
- The number of points in the dataset.real*8 x(npoints)
- The x values of the points.real*8 fx(npoints)
- The f(x) values of the points.real*8 index
- The index value of the dataset.integer function ef_fxtdatasetdisplay( windowName,graphName,datasetName)
character*(*) windowName
- The name of the GraphWindow containing the graph.character*(*) graphName
- The name of the graph containing the Fxt datasets.character*(*) datasetName
- The name of the new dataset to display.integer function ef_surfacecreate( surfaceName, graphName)
character*(*) surfaceName
- The name of the surface being created.character*(*) graphName
- The name of the graph containing an indexed dataset or time indexed dataset.integer function ef_surfacesettitle( surfaceName, title)
character*(*) surfaceName
- The name of the surface.character*(*) title
- The title of the graph.integer function ef_surfacesetxaxis( surfaceName, x)
character*(*) surfaceName
- The name of the surface.integer x
- E_LINEAR (default) or E_LOGARITHMIC.integer function ef_surfacesetyaxis( surfaceName, y)
character*(*) surfaceName
- The name of the surface.integer y
- E_LINEAR (default) or E_LOGARITHMIC.integer function ef_surfacesetzaxis( surfaceName, z)
character*(*) surfaceName
- The name of the surface.integer z
- E_LINEAR (default) or E_LOGARITHMIC.integer function ef_surfacexaxisrange( surfaceName,xmin,xmax)
character*(*) surfaceName
- The name of the surface.real*8 xmin
- the low end of the X axis.real*8 xmax
- the high end of the X axis.integer function ef_surfaceyaxisrange( surfaceName,ymin,ymax)
character*(*) surfaceName
- The name of the surface.real*8 ymin
- the low end of the Y axis.real*8 ymax
- the high end of the Y axis.integer function ef_surfacezaxisrange( surfaceName,zmin,zmax)
character*(*) surfaceName
- The name of the surface.real*8 zmin
- the low end of the Z axis.real*8 zmax
- the high end of Z axis.integer function ef_surfacesetview( surfaceName,atx,aty,atz,fromx,fromy,fromz, twist)
character*(*) surfaceName
- The name of the surface.real*8 atx
- X value of look at point.real*8 aty
- Y value of look at point.real*8 atz
- Z value of look at point.real*8 fromx
- X value of look from point.real*8 fromy
- Y value of look from point.real*8 fromz
- Z value of look from point.real*8 twist
- counterclockwise rotation around view vector in radians.integer function ef_fxycreate( xyname, nx, ny, fxy, xcoordinates, ycoordinates)
character*(*) xyname
- The name of the 2-D dataset.integer nx
- The number of columns in the grid.integer ny
- The number of rows in the grid.real*8 fxy(nx,ny)
- The array of data values.real*8 xcoordinates(nx)
- The coordinate corresponding to each column in the grid. These values will be used for determining the numerical values of the X axis.real*8 ycoordinates(ny)
- The coordinate corresponding to each row in the grid. These values will be used for determining the numerical values of the Y axis.integer function ef_fxysetcontour( xyname, ncontours, contours)
character*(*) name
- The name of the 2-D dataset.integer ncontours
- The number of contours to draw.real*8 contours(ncontours)
- The contour values to be drawn.integer function ef_graphaddfxy( graphname,xyname)
character*(*) graphname
- The name of the graph that will contain the 2-D dataset.character*(*) xyname
- The name of the 2-D dataset to add to the graph.integer function ef_tablecreate( tableName)
character*(*)tableName
- The name of the table.integer function ef_tableaddcolumn( tableName,columnName)
character*(*) tableName
- The name of the table.character*(*) columnName
- The name of the column to be added.integer function ef_sendfile( filename)
character*(*) filename
- The name of the file to be sent.integer function ef_columncreate( colName, ncells, cells)
character*(*) colName
- The name of the column.integer ncells
- The number of data units in cells.character*(*) colName
- A string array containing the data in the column.integer function ef_graphwindowaddtable( windowName, tableName, row, column)
character*(*) windowName
- The name of the GraphWindow.character*(*) tableName
- The name of the table to be added.integer row
- The row to add the table in.integer column
- The column to add the table in.integer function ef_columsetrowlabels( columnName,rowLabels)
character*(*) columnName
- The name of the column.integer rowLabels
- E_TRUE or E_FALSE, whether the column should be a row label column (default false).integer function ef_columnsetbackgroundcolor( columnName, color)
character*(*) columnName
- The name of the column.character*(*) color
- A color specifier in the forms "rgb: r g b", where r, g, and b are floating-point numbers from 0.0 to 1.0 or "name: color" where color is the name of one of the standard Java colors.integer function ef_columnsetfontcolor( columnName, color)
character*(*) columnName
- The name of the column.character*(*) color
- A color specifier in the forms "rgb: r g b", where r, g, and b are floating-point numbers from 0.0 to 1.0 or "name: color" where color is the name of one of the following colors: black, blue, cyan, dark gray, gray, green, light gray, magenta, orange, pink, red, white, or yellow.integer function ef_tableaddtoptext( tableName, text, font, style, fontsize, fontcolor, bgcolor)
character*(*) tableName
- The name of the table.character*(*) text
- The text to be added.character*(*) font
- The font name or type (Monospaced, SansSerif, etc.) for the text, blank for default.character*(*) style
- The style for the text (Bold, Italic, Plain, or Bold Italic).integer fontsize
- The point value for the font size, blank for default.character*(*) fontcolor
- The font color in the style as seen in ef_columnsetfontcolor, blank for default.character*(*) color
- The background color in the style as seen in ef_columnsetfontcolor, blank for default.integer function ef_tablesetbottomtext( tableName, text, font, style, fontsize, fontcolor, bgcolor)
character*(*) tableName
- The name of the table.character*(*) text
- The text to be added.character*(*) font
- The font name or type (Monospaced, SansSerif, etc.) for the text, blank for default.character*(*) style
- The style for the text (Bold, Italic, Plain, or Bold Italic).integer fontsize
- The point value for the font size, blank for default.character*(*) fontcolor
- The font color in the style as seen in ef_columnsetfontcolor, blank for default.character*(*) color
- The background color in the style as seen in ef_columnsetfontcolor, blank for default.integer function ef_columnsetheader( columnName, header)
character*(*) columnName
- The name of the column.character*(*) header
- The text to be put in the header. This is the Column's name by default.integer function ef_columnsetfontname( columnName,fontName)
character*(*) columName
- The name of the column.character*(*) fontName
- The font name or type (Monspaced, Serif, SansSerif, Symbol, Dialog, DialogInput)integer function ef_columnsetfontstyle( columnName, fontStyle)
character*(*) columnName
- The name of the column.character*(*) fontStyle
- The style of the font of the column's cells to be set. Can be Bold, Italic, Bold Italic, or Plain(default).integer function ef_columnsetfontsize( columnName,fontSize)
character*(*) columnName
- The name of the column.integer fontSize
- The size of the column's cell's font to be set. Can be any standard point value.