9. Generating Graphs

This chapter describes the QUANTA Graph Plotting Utility that provides tools and capabilities for displaying and manipulating data in graphic form. Read this chapter if you are running applications where you want use graphs.

Each application with graphic capabilities opens a graph plotting window to display graph data compiled by the application. In the graph plotting window, you have a number of operations and tools available to manipulate the appearance of the graph and to interact with the application's program requests.

Alternatively, when you select XY Graphs from the File menu, you have access to the Graph Editor. Although this application does not create graphic data, it allows you to select graph files that have previously been created by other applications, load the files for display, edit the appearance of the graphs, and save the changes. A base set of tools is provided using a menu bar and pulldown menus in a plot window. This set of tools is what makes up the Graph Editor.

When the Graph Plotting utility is invoked by an application other than the Graph Editor, only a subset of the functions are available. A number of items in the pulldown menus are dimmed to prevent changing application data. If you want to do more editing, save the graph using Save As... in the File menu, then open it again in the Graph Editor by selecting XY Graphs also in the File menu.


Using Objects Specific to Graph Plotting

The graph plotting interface includes the following objects:

In QUANTA the window is created when an application invokes the Graph Plotting Utility or when you request the Graph Editor.


Using Graph Plotting Menus

File, Edit, and Display menus are displayed on the menu bar regardless of the access point to the Graph Plotting Utility.

The File menu is made up of selections that provide access to graph data in files and allow storage of graph data in different formats. Table 45 lists and briefly describes the menu selections.

Table 45 . Graph File Menu 
Selection
Description

Open

Opens a list of existing graph (filename.graph) files that can be selected, loaded, and displayed. If a graph is currently displayed, the system will provide the user with a chance to save the current environment to a graph file.

Close

Removes the currently displayed graphs from the graph plotting environment. If the displayed graphs have been changed since they were loaded, the Save Changes First dialog box is displayed.

Save

Writes the currently displayed graphs to a file. The filename used will be the last specified filename. If there is none, the Save As function is invoked to prompt the user for a filename. The .graph extension is automatically added to the filename. The displayed graphs remain active and displayed.

Save As...

Writes the currently displayed graphs to a new file. The standard file access dialog box is displayed to allow specification of the filename. The .graph extension is automatically added to the filename. The displayed graphs remain active and displayed.

Revert

Rereads the graph file. All changes made since the file was last read are removed. A confirmation dialog box will be displayed before the action is performed.

Import

Allows you to select a file with a foreign format to be loaded and displayed. A number of file formats are supported: x y format (.plt), CHARMm Energy file format (.ENE), and user-specified column format.

Export

Allows creation of files that can be output to printers that accept PostScript format. Three file formats are supported: image PostScript (.ps), inverted image PostScript (.ps) and x,y format (.plt).

Quit

Terminates graph plotting. The plot window is removed from the screen. If graphs are displayed and have been changed since they were loaded, the Save Changes First dialog box is displayed.

The Edit menu consists of functions that allow you to change and add objects displayed in the plot window. Objects to be edited must be selected before an Edit selection is applied. If no object is selected, a new object will be added automatically to the graph.

To select an object or a specific location in a graph, move the mouse so the cursor is over the object or location, and click the left mouse button. To select a text string, position the cursor at the lower-left corner of the text string.

Selections are displayed as follows:

Table 46 lists and briefly describes the menu selections.

Table 46 . Graph Edit Menu 
Selection
Description

Title...

Modifies selected titles or adds a new title if no title is selected.

Border...

Modifies selected borders or adds a new border if no border is selected.

Data Set...

Modifies the appearance of selected data sets. If no data set is selected, you are prompted in the message line to select one. When selection is complete, one of four dialog boxes (depending on the dataset type) is displayed.

Text...

Modifies selected annotation text or adds a new text object if no object is selected.

Symbol...

Modifies selected annotation symbol or adds a new symbol object if no object is selected.

Axes...

Modifies the color and visibility of selected axes or adds a new axis if none is selected. If you are adding a new axis object, entering OK in the initial dialog box causes each of the axis legs, the axis tic marks, and the axis tic labels dialog boxes to be displayed.

Axes Legs...

Modifies the legs and labels of the x and y axes. If no axis is selected, you are prompted to select an axis object. When selection is complete, a dialog box is displayed. When this dialog box is approved, a similar dialog box for the y axis is displayed. The only difference between the x and y axis dialog box is the reference to the legs. For the y axis these would be `leg at left', `leg at right', and `both legs'.

Axis Tic Marks...

Modifies tic marks of the x axis and y axis.

Axis Tic Labels

Modifies the tic labels of the x and y axes. If no axis is selected, you are prompted to select one. When selection is complete, a dialog box is displayed. When this dialog box is approved, a similar dialog box for the other axis is displayed. The only difference between the x and y axis dialog boxes is the reference to the legs. for the y axis these would be leg at left, leg at right, and both legs.

Delete Object

Removes selected objects from the display.

The Display menu consists of selections that manipulate the display of objects and viewing of graphs. Table 47 lists and briefly describes the menu selections

Table 47 . Graph Display Menu 
Selection
Description

Display All

Makes all invisible objects visible.

Display Handles

Toggles on and off the display of text strings that identify the plot window, graphs, and legends. When the display is turned on, the text string that identifies the plot window is displayed in the upper-left corner of the window. The text string that identifies each graph is displayed in the lower left corner of each graph's view. The text string that identifies each legend is displayed in the lower-left corner of each legend's view.

Echo Location

Toggles on and off the display of the cursor location. When echo is turned on and the cursor is within a graph area, the X and Y location is displayed in the plot window's message line.

Select Cursor Type...

Displays a dialog box with choices for the appearance of the cursor.

Zoom In

Extends the current graph to expand a small range of the data (80% of what is viewed) into the graph's viewing area. You are prompted for the center of the zoom area. Clicking the left mouse button on a location in a graph view causes the view to be centered around the selected location.

Zoom Out

Extends the current graph to include a larger range of the data around a selected location in the graph's viewing area. You are prompted for the center of the zoom area. Clicking the left mouse button on a location in a graph view causes the view to be centered around the selected location and decreased in range.

Zoom Window

Prompts the user to select two points within a graph's viewing area to define the rectangular range of data to be viewed within that area. The two points are selected by holding down the left mouse button over the first location, sliding the mouse to the second location, and releasing the button. When the second point is selected, the viewing area is updated to display the new range.

Reset View

Resets the graph to display the original data.

Depending on the point of access to the Graph Plotting utility, an additional menu may be accessed from the menu bar. This menu consists of tools for manipulating the display of specific types of graphs. For example, if you are plotting data from a dynamics calculation on a trace plot, the additional menu will be the Trace Tools menu. The tools in this menu are specific for adjusting data display for a trace plot.

For a number of examples and exercises that use the Graph Plotting utility, see Chapter 6, Creating 2D Plots. Other sections of Chapter 6 also contain examples and exercises that use this utility.


Summary

The QUANTA Graph Plotting utility provides tools and capabilities for displaying and manipulating data in graphic form. Each application with graphic capabilities opens a plotting window to graphically display data compiled by the application. In the graph plotting window, a number of operations and tools are available to manipulate the appearance of the graph and to interact with the application's program requests.

When you select XY Graphs from the File menu, you have access to the Graph Editor and the full range of utility capabilities. When the Graph Plotting utility is invoked by an application other than the Graph Editor, only a subset of the functions are available.

File, Edit, and Display menus are displayed on the menu bar regardless of the access point to the Graph Plotting utility. Depending on the point of access to the Graph Plotting utility, an additional menu may be accessed from the menu bar. This menu consists of tools for manipulating the display of specific types of graphs.


© 2006 Accelrys Software Inc.