-- The fastest way to get familiar with this package is to follow the steps in the tutorial (sections I). -- If you are reading this documentation on line, you might want to use the Tioga Levels commands to see different levels of texts. -- This documentation is not in its final form yet. It only provides a brief description of the most essential functionalities of the Graph program. Graph registers a command, "Graph", in the CommandTool to display graphs, examine their details, edit them, store them, and print them. Cedar Thyme has been modified to make use of this package for the convenience of post-processing all data generated by each simulation. DF file: [Cherry]Cedar6.0>Top>Graph.df A. Command syntax: Graph {files} where {files} := one or more instances of [switches] {filePattern}, where switches are optional (see A.1. below), and filePattern may contain "wild" characters (see A.2. below). If you specify more than one graph files in the command line, the first graph will be shown on the color monitor, and the rest of the graph viewers will be created initially in iconic state, to be opened later when you like. This package understands graph files with data written in binary format by this package. It also understands graphics data written in human readable texts. See **. For backward compatibility, plot files generated by the graphics package previously written for Thyme can also be processed. A.1. Switches: The meaningful switches are: -h or -H => (Highest version only. Default true) Only the highest version of graph files whose names match the filepattern are opened. -a or, -A => (All versions. Default false) All versions of graph files that agree with the filepattern are opened. -# => (The max number of graph files to open is #. Default 12) Sets the limit of the number of graphs to be opened at a time to #, where # is a number. A switch affects all files opened thereafter until overridden by a different switch. Illegal switches are ignored. A.2. Examples: graph cmos*.graph* Plots all files with names matching the pattern "cmos*.graph*". For each file that has more than one versions, only the latest version is opened unless the a switch is used. (See example below.) The program is clever enough to exclude files whose names end with ".press". graph foo.graph -a cmos*.graph0 Plots the latest version of foo.graph; then plots all versions of files with names matching "cmos*.graph0" B. Menus on the Graph viewer: There are ten menu buttons on each graph viewer, namely, Color, Curson, Background, Get, Merge, Store, List, InterPress, Clear/Refresh, and Controller. One may click these menus and invoke the associated commands with any mouse button. Most of these menus, when clicked, will pop up a menu listing the options available to the user. B.1. Color - Sets the screen display mode and the color map. Options: my colors, graph default colors, my colors _ graph default, cedar default colors, black and white There are two screen display mode supported, namely, the color mode, and the black-and-white mode. The first four options are in color mode, while the last one is in black and white mode, in which lines of different colors are represented by different dot-dash patterns. B.1.1. my colors: This option is useful when you are running more than one programs that fiddle with the color map. This command will resume the right colors for this tool, if other tools have altered the color map. B.1.2. graph default colors: Display colors according to your default colors. (If you have not customized your default colors, the default default colors will be used. The way to cutomize the default colors is described in D.4. below.) This option affects the display only, i.e., the current colors setting will still be used when graphs are saved or printed. (See next option.) B.1.3. my colors _ graph default: This tool keeps a record of the current color setting, which may be set manually by the control panel (see **) or automatically by reading the specification in a graph file. This command replaces the current color setting with your default setting. Note that this affects not only the display, but also affects the colors used for printing or saving the graph. B.1.4. cedar default colors: Use cedar default color map for display. Like B.1.2., this affects display only. B.1.5. black and white: In the black-and-white mode, curves are drawn in black and white, using different line patterns (dots, dashes, ... , etc.), so that we can still distinguish curves easily when the graph is printed through a black and white printer. If other tools have altered the color map, you may not see black and white in this mode. In this case, just click the color menu again choosing any of the first three options should put it back in shape -- this won't work if you have altered color # 0 (reserved for white) and/or color # 15 (reserved for black). B.2. Cursor - Sets the color of the cursor on color monitor. Two options are available: black, or white. The cursor's color on the color monitor may be black or white. When you click at this menu, a pop-up menu will show up for you to choose its color. B.3. Background - Sets the background color of the graph. Options: white, gray, dark gray, and black. There are four colors available for the background, namely, white, gray, dark gray, and black. When you click at this menu, a pop-up menu will show up for you to choose the background color easily. B.4. Get - Gets another graph, replacing the current one. The current graph on the graph viewer will be replaced by the new one, whose file name is the current selection. This is similar to the Get menu in a tioga viewer. The file may be a graph file (generated by this package), a plot file (generated by the graphics package previously used by Cedar Thyme), or a text file (written by human in a simple format, see **). B.5. Merge - Gets another graph, merging into the current one. Merge another graph (file name is the current selection) into the current graph. The file may be a graph file (generated by this package), a plot file (generated by the graphics package previously used by Cedar Thyme), or a list file (written by human in a simple format, see **). B.6. Store - Stores the graph into a file. Similar to the store menu command in a tioga viewer, this command stores the plotting information of the graph currently displayed on the Graph viewer into a file, whose name is the current selection. Note that graph files are created with keep = 10. B.7. List - List the variables and their values in a tioga viewer. Using the current selection as the name, this command creates a tioga viewer, and list the variables of the graph, and the x and y values of the variables into this tioga viewer. The format is quite simple, see **. This list file can be processed by the Graph program too. B.8. Interpress - Makes a interpress master for the graph. Options: color, or black-and-white. When this menu is clic+ed, a pop-up menu will show up for you to select one of the two drawing mode: color or black and white. In the color mode, curves are drawn alternately in twelve colors, which may be customized by the user if he wants. (see D.4. below.) In the black-and-white mode, curves are drawn in black and white, using different line patterns (dots, dashes, ... , etc.), so that we can still distinguish curves easily when the graph is printed through a black and white printer. The name of the interpress file created is simply replacing the "extension" part of the current graph file name with "ip". Note that if there is already an interpress file with the same name, it will be overwritten. D.9. Clear/Refresh - clears and/or repaint the graph. Options: rebresh, cle`r/refresh, remove all curves. When this menu is clicked, a pop-up menu will show up for you to select one of the three options above. The first option, refresh, simply repa nts the graph without clearing the display. This is useful when some curves or texts have been erased from the display, erasing part of the curves or texts that still exist. This action is not made automatic whenever something is erased, because refreshing the whole picture may often take a while when the graph is complicated. The next option, clear/refresh, serves the same purpose, except that the whole screen will be cleared first before the graph is redrawn. This is useful in case the graph gets dirty for some reason. The third option just removes all the curves from the graph, but the axes, labels, and any texts still remain. D.10. Controller - shows up the controller Each graph can create a controller for the ease of examining and editing the graph. If the controller viewer has not been created, this menu will create it; if it already exists, then the it will be moved to the top of its column. C. How to Get Hardcopies Following are examples of the ways to get hardcopies of the graph in black and white through, say, Stinger; or in color through the color Versatec plotter. See InterpressToolsDoc.tioga for more details. A. Black and white Suppose the black and white printer you are going to use is Stinger. First make a PD file for it. Suppose you have an IP file named "Foo.ip", and if you want the PD file to be named "FooBW.pd", then the following command will do it for you. Note that the last argument is "raven384". InterpressToPD FooBW.pd _ Foo.ip raven384 To print it, just type the following in the CommandTool Print -h stinger FooBW.pd If you had chosen the black and white mode when the interpress master was generated, you would see the curves plotted in different line patterns (e.g., dots, dashes, etc.); but if you had chosen the color mode, then different curves would be drawn in gray patterns -- which usually makes it difficult to distinguish one line from another. B. Color Suppose the color printer of interest is the color Versatec plotter. We can use the "InterpressToPD" command to make a PD file for it from the ip file. Note that the last argument is "colorVersatec". To get a multi-color graph, you should have created the ip file with the color drawing mode. InterpressToPD FooColor.pd _ Foo.ip colorVersatec Then Chat with Sleepy. If the PD file has been stored on Cherry as [Cherry]Cedar6.0>Documentation>FooColor.pd, then send the PD file to Sleepy by issuing the following command on Sleepy in Chat. >>print [Cherry]Cedar6.0>Documentation>FooColor.pd See [indigo]Documentation>PeachDoc.tioga for more information. D. User Profile Entries (all optional) D.1. Graph.Column: {color | left | right} (default: color.) Specifies the column in which the graph viewer(s) will be created. D.2. Graph.CreateOption: {CloseOtherViewers | SwapBottomViewer | Iconic} (default: CloseOtherViewers.) This entry specifies how the graph viewers will be created. If "CloseOtherViewers" is the option, all viewers in the same column will be closed when the graph viewer is created in that column. If you choose the "SwapBottomViewer" option, the new viewer will replace the bottom viewer in the column. If there is no viewer in this column, then the new viewer will occupy the whole column. If Iconic is your option, then the new viewer will be created in its iconic state. D.3. Graph.Background: {White | Gray | DarkGray | black} (default: White.) D.4. Graph.ColorN: r, g, b -- where N may be any number in [1..12], and r, g, b are any real number in [0..1]. If you don't specify your own colors, the default ones are: Graph.Color1: 1, 0, 0.8 -- purple red Graph.Color2: 0.4, 0, 1 -- purple Graph.Color3: 0, 0, 1 -- blue Graph.Color4: 0, 0.56, 1 -- greenish blue Graph.Color5: 0, 1, 1 -- green blue Graph.Color6: 0, 1, 0 -- green Graph.Color7: 0.52, 1, 0 -- yellow green Graph.Color8: 1, 1, 0 -- yellow Graph.Color9: 1, 0.6, 0 -- orange yellow Graph.Color10: 1, 0.42, 0 -- yellowish orange Graph.Color11: 1, 0.25, 0 -- orange Graph.Color12: 1, 0, 0 -- red In fact you may also alter the following colors (at your own risk) by specifying rgb values for the following colors differently. Note that they are used by the Graph program to display in black and white mode, and to display the background. Graph.Color0: 1, 1, 1 -- white Graph.Color13: 0.5, 0.5, 0.5 -- gray Graph.Color14: 0.17, 0.17, 0.17 -- dark gray Graph.Color15: 0, 0, 0 -- black E. User Profile Entries for ColorDisplay (also optional) ColorDisplay.Side: left -- or right, if you like. This is the side of your color monitor w.r.t. the black and white one. ColorDisplay.BitsPerPoint: 8 -- or 4, but 8 is recommended. ColorDisplay.Type: 640x480 -- or 1024x768, depending on your monitor. If interested, read [Cedar]Documentation>ColorDisplayDoc.tioga for more information about ColorDisplay. F. Basic components of a graph F.1. Divisions - (x or y) F.2. Bounds - (x or y) F.3. Carets - (primary, secondary, or text) F.3.1. Primary caret F.3.2. Secondary caret F.3.3. Text caret F.3.4. Slope between primary and secondary carets F.3.5. Blinking of carets (for display only) F.4. Targets - (x or y) F.4.1. width F.4.2. color F.4.3. value F.5. Grids - (x or y) F.6. Colors - F.6.1. color index F.6.2. red F.6.3. green F.6.4. blue F.7. Fonts - F.7.1. font index F.7.2. family F.7.3. bold F.7.4. italic F.7.5. size of screen font F.7.6. scale of press font F.8. Texts F.8.1. text id F.8.2. rope F.8.3. place F.8.4. justification (x or y) F.8.5. color F.8.6. font F.8.7. rotation F.9. Curves F.9.1. curve id F.9.2. name F.9.3. comment F.9.4. color F.9.5. width F.9.6. mark F.9.7. group G. Keyboard commands on the Graph viewer C-red: select Curve. C-blue: remove selected Curve. T-red: select Text. T-yellow: move selected Text. T-blue: erase selected Text. T-#-red: rotate text by #*10 degrees c.c.w, where # is in [0..9]. T-#-blue: rotate text by #*10 degrees c.w, where # is in [0..9]. ctrl-C: show detailed specification of selected Curve on spec panel. ctrl-T: show detailed specification of selected Text on panel. B: switch auto Bounds. D: switch auto Divisions. V-X or X-V: switch X target Value bar. V-Y or Y-V: switch Y target Value bar. G-X or X-G: switch X Grids. G-Y or Y-G: switch Y Grids. H-red: jump left. (primary caret jumps Horizontally to the left to another curve.) H-blue: jump right. (primary caret jumps Horizontally to the right to another curve.) V-red: jump up. (primary caret jumps Vertically up to another curve.) V-blue: jump down. (primary caret jumps Vertically down to another curve.) S-red: Slide primary caret on selected curve. S-H-red: jump left on Same curve. (primary caret jumps Horizontally to the left on the same curve.) S-H-blue: jump left on Same curve. (primary caret jumps Horizontally to the right on the same curve.) #-red: jump left # steps. (# in [1..9]) (Primary caret jumps # steps to the left on the same curve. Where # may be 1, 2, ... , up to 9. Each data point on the curve is a step.) #-blue: jump right # steps. (# in [1..9]) (Primary caret jumps # steps to the right on the same curve. Where # may be 1, 2, ... , up to 9. Each data point on the curve is a step.) 1-2 or 2-1: move secondary caret to primary. ctrl-1: turn on/off primary caret ctrl-2: turn on/off secondary caret ctrl-3: turn on/off text caret shift-1: turn on/off primary caret's blinking shift-2: turn on/off secondary caret's blinking shift-3: turn on/off text caret's blinking R: Refresh without clearing R-C or C-R: Clear then Refresh shift-C: remove all curves Z-red: Zoom in. (if a zoom box has been defined.) Z-(drag)yellow: define Zoom box. Z-blue: Zoom out. red: select graph viewer and move primary caret to cursor's place. yellow: select graph viewer. H. The Controller A Controller viewer has three lines of menus, below which may be a spec panel, a values panel, or a table of texts and curves. H.1. The menus There are three lines of menus, and the third line may appear or disappear by clicking the Levels menu on the first line. H.1.1. The first line of menus: Chart, Spec, Values, Table, and Levels. H.1.1.1. Chart: If the graph viewer doesn't exist, clicking at it will create one; if it already exists, clicking this menu will move it to top of column. H.1.1.2. Spec: Noop if the spec panel is already shown below the menus; if it is not displayed yet, clicking this menu will make the spec panel show up, replacing whatever below the menus. H.1.1.3. Values: Similar to Spec menu, this will show up the values panel. H.1.1.4. Table: Similar to Spec menu, this will show up the table of texts and curves. H.1.1.5. Levels: Similar to the Levels menu on a tioga viewer. H.1.2. The second line of menus: AutoDiv, AutoBounds, Xhair1, Xhair2, Slope, TextCaret, TargetX, TargetY, GridX, GridY. These menu buttons are all switches. Clicking with red button at any of them will turn it on; clicking with blue means turning it off; and clicking with yellow button will pop up an option menu listing the two choices for you to choose. In addition, for Xhair1, Xhair2, and TextCaret menus, if the left or right shift key is pressed down when you click at the menu, it will start or stop the blinking action of the respective carets. H.1.2.1. AutoDiv: automatically choosing the number of divisions on the axes. H.1.2.2. AutoBounds: automatically setting the x and y bounds for the axes. H.1.2.3. Xhair1: If shift is not pressed, turn on (or turn off) the primary caret. If shift is pressed, start to blink the primary caret, or stop it from blinking. H.1.2.4. Xhair2: Similar to H.1.2.3., but for the secondary caret. H.1.2.5. Slope: showing the slope between primary and secondary carets on the spec panel. H.1.2.6. TextCaret: Similar to H.1.2.3., but for the text caret. H.1.2.7. TargetX: turn on (or off) the x target value bar. H.1.2.8. TargetY: turn on (or off) the y target value bar. H.1.2.9. GridX: turn on (or off) the vertical grids. H.1.2.8. GridY: turn on (or off) the horizontal grids. H.1.3. The third line of menus: FirstLevelOnly, MoreLevels, FewerLevels, AllLevels. Similar to the tioga menus, to control the level of table entries displayed on the table of texts and curves. H.2. The spec panel The spec panel has many entries to show or update details of the graph. Each entry starts with a bold faced "entry" button, followed by some "fields" buttons, describing certain specifications for the graph, such as divisions, bounds. In general, clicking any of these entry buttons with red will display the current graph specification associated with that entry. One can alter its fields values and click the entry button with control-red to set new values for the specifications. If one clicks an entry button with yellow mouse button, a popup menus will show up giving you a list of the choices available for that particular entry. There are one more funtionality for the Text and Curve entries on the spec panel. If you click the entry button with blue button, the text (or curve) identified by the id in its id: field will be removed from display. If you click with red, it will be displayed on the graph. Fields with bounding box are boolean switches. If the display style of a boolean switch is white on black, it means true; and black on white means false. Integer fields such as the id field of Text have the functionality that the field values may be incremented (or decremented) by clicking with shift-red (or shift-blue) mouse button. Following are a list of the entries on the spec panel. H.2.1. Divisions H.2.2. Bounds H.2.3. Carets H.2.4. Targets H.2.5. Grids H.2.6. Color(index: ) - shows or sets the indexed color. The color index of a curve may be any number in the [1..12] range. Although the color index may be any number in the [0..15] range, it's better not to change colors of index outside the [1..12] range. This is because color(0), color(13), color(14), and color(15) are used by the Graph program for white, gray, dark gray, and black. H.2.7. Font(index: ) - shows or sets the indexed font. H.2.8. Text(id: ) - H.2.8.1. Displaying a text. Specify the id of the text in the id: field, and click the entry button with the red mouse button, the specifications (e.g., its content, location, justification, color, font, ... , etc.) of the text will be displayed in the fields following the entry button. If the program finds no text with the specified id, a message will be sent to the message viewer. H.2.8.2. Changing a text. One can alter any of the fields in this entry and click the entry button with control-red to change a text, whose id is what's indicated in the id: field. H.2.8.3. Adding a text If you do the same as above with an id in the id: field such that the program can't find any text of the same id, a new text will be generated and displayed on the graph. The id field will often be changed to 1 plus the last text id used so far. H.2.8.4. Removing a text A text may be removed from the graph, if you specify its id in the id: field of this entry, and click the entry button with the blue button. H.2.9. Curve(id: ) - One can display, update, add, or remove a curve with the same method as described above for texts. H.3. The values panel H.3.1. Math operations With buttons on this control panel, one can perform quite a few math operations on the selected curve or on all curves on the graph, or resume their original values. Just specify the operand by clicking at the right operand box and click at any of the math functions on the panel. If it is a binary operation, the argument field should also be specified; if it is a triangular function, you have the option to choose degrees or radians for the angle. Clicking the Resume button will reset the curve (or curves) to their original values when they were first created. H.3.2. The x-y values of a curve Clicking the curve button with red, the x-y values of the curve whose id is specified in the id field will be displayed on the panel. Clicking with control-red can update its values. Clicking with yellow button will popup a menu listing these two options for you to choose. Whenever the curve button is clicked, a check mark will be put in the box in front of it, and the check mark in front of the Cross-section button will be removed. There is no other special purpose for this box. H.3.3. The cross-section Clicking the Cross-section button with the red mouse button will show the crosssection of all the curves at the particular x specified in the x field. Clicking with yellow will pop up a menu listing this option for you to confirm. Whenever the Cross-section button is clicked, a check mark will be put in the box in front of it, and the check mark in front of the curve button will be removed. There is no other special purpose for this box. H.4. The table of texts and curves If you want to see a table listing all the texts and curves in the program's memory, whether they are currently displayed on the graph viewer or not, just click the Table menu on the Controller. H.4.1. Displaying/removing a text. If you click at any text listed on the table with the red mouse button, the text will be displayed on the graph; if you click at it with the blue button, it will be erased from the graph. H.4.2. Displaying/removing a curve. In the same way as described above for texts, you can easily display or erase a curve. H.4.3. The Levels menus If there are only two lines of menus on the controller, you may click the Levels menu on the first line of menus, and the third line of menus will show up. (You can remove the third line of menus by clicking the Levels menu again.) Just like the levels menu of a tioga viewer, you can change the levels of the table being displayed. This is particularly useful to review the simulation data generated by Thyme for a large circuit, which may have several different levels of subcircuits. I. Tutorial It is hoped that using this tutorial you can master the commands without too much effort. You could keep this file open and follow the following steps. I.1. [The Graph command] Issue the following commands in the CommandTool: % BringOver -p /Cherry/Thyme/Cedar6.0/Top/Graph.df -- you know what this does. % Graph Simple.list -- a command to plot data in the file, Simple.list. You should see a graph viewer created on the color monitor from data in the file Simple.list. Open Simple.list and see what's in there. Fine point: The graph viewer would be created on the left (or right) column if you had an entry in the user profile saying: Graph.Column: left (or right, instead of color). I.2. [The Color menu] Follow these simple steps below to try with the Color menu. 1.2.1. Click the Color menu, and select the "black and white" entry in the pop-up menu. -- the graph should become black and white. 1.2.2. Click the Color menu again, and select the "my colors" entry. -- the graph should resume its original colors. 1.2.3. Now click the same menu and select the "cedar default colors" entry. -- the whole screen may turn into some kind of grayish color. 1.2.4. Then click the same menu and select the "my colors" entry. -- the graph should resume its original colors. This menu is also useful when you are running more than one programs that fiddle the color map. The maps used by these programs might not agree with each other. You can resume the desired colors for your graph by this menu. This is why the first entry in the pop up menu is labeled "my colors", instead of "current colors". I.3. [The Cursor and Background menus] Try all options with the Cursor and Background menus and see what effects each command listed on the pop-up menus have. I.4. [The List menu] Select the text "Foo" (don't include the double quotes) and click the List menu. A pop up menu should show up asking you to confirm listing the data of the curves into Foo.list. Confirm it by moving the cursor into the only white entry in the pop up menu and click. You will see a viewer opened up, displaying the contents in the file Foo.list. Are the names and numbers the same as those in Simple.list? I.5. [The Get menu] Select the text "Waves" (don't include the double quotes) and click the Get menu. A pop up menu should show up asking you to confirm replacing the graph with "[]<>...>Waves.graph". Now confirm it by moving the cursor into the only white entry in the pop up menu. This menu is similar to the Get menu on a tioga viewer. You will see a different graph displayed in the graph viewer, and the caption of the viewer is changed, indicating where the data came from. I.6. [The Merge menu] Select the text "Simple.list" (don't include the double quotes) and click the Merge menu. Confirm by clicking in the entry showing "[]<>...>Simple.list". This is different from the previous Get menu in that the previous graph remains, and new graph is merged together with the old. The name of the viewer should remain as []<>...>Waves.graph. I.7. [The Store menu] Now select "Foo" and click the Store menu. Then do a "ls" command in your command tool, to see if a file called "Foo.graph" has been created. This file should contain all plotting information currently displayed on the graph viewer, which can be verified by the following exercise. Type the following in the CommandTool % graph foo.graph You should see the same graph plotted in another graph viewer. I.8. [The Controller menu] Destroy the new viewer created by the exercise in I.5., keeping the old one. Lets try some other interesting things with the graph controller. Click the controller menu on the graph viewer, and you will see the controller's viewer created. There should be two lines of menus on top. Below the menus is a "spec" control panel with some bold-face entry buttons, and some fields following each entries. Now destroy the graph viewer. I.9. [The Chart, Spec, Values, Table, and Levels menus] Play around with the five menus on the first line, namely, Chart, Spec, Values, Table, and Levels. Click at each of them a couple of times and see what the effects are. When Chart is clicked, the graph viewer should be created for you, if it has been destroyed. Otherwise it will show up as the top viewer in its column. When Spec, Values, or Table is clicked, the spec panel, the values panel, or the table of texts and curves should show up below the menus, replacing the others. The Levels menu and the third line of menus associated with it are the same as those on a tioga viewer. I.10. [The Spec panel] Now lets take a look at the spec panel. Click the Spec menu, if the spec panel has disappeared. There are nine entries on the spec, with leading texts in bold face called entry buttons. Each entry has some fields. The boolean fields are enclosed by bounding boxes. If the color of the text in the box is white on black background, it means that the field value is TRUE; if it is black on white, it means FALSE. The last four entry buttons are a little different from the other five in that, they all have a parameter enclosed by parentheses. The parameter is either an index or an id. It is necessary for these four entries to have a parameter, because there may be quite a few items associated with them. For example, there may be many texts in a graph. I.11. [Changing the spec] - control-red click at entry buttons. As an example, lets play with the auto-divisions feature. Click the Auto field in the Divisions: entry so that it becomes black on white, meaning FALSE; and set the x values in the Divisions: entry to 6. With the control key pressed down, red-click the entry button (Divisions:). You will see the number of x divisions on the graph becomes six, as we just specified. In general, clicking any of the bold-faced entry button in the spec panel with control-red, will change the values of the associated specification (e.g., the divisions in the example above) according to the values specified on the panel. As you can alter the field values at any time, they may not be the same as the current values in the program's memory until you click the entry button with control-red. I.12. [Adding text or curve] You can add new text (or curve) by control-red clicking at the Text (or Curve) entry, if the id: parameter has not been used by any texts (or curves) in the program's memory. As an exercise, set the id: parameter of the Text entry to 3, and set the other fields as follows: name: XEROX place x: 0 x-justification: left y: 1.1 y-justification: center color: 3 font: 10 rotation: 0 Check if you have made the right changes as listed above. Now control-red click the Text button. You shall see the XEROX logo close to the upper left corner of the graph. Note that the location of a text is not represented in the same way as all the other things in the graph. It is taking the lower-left corner of the bounding axes as the origin, the width and height of the bounding box as the unit length for x and y. One of the reason to choose this representation for texts' locations is to make sure that texts won't go away when user changes the bounds for x and y. I.13. [Showing the spec] - red click at entry buttons To see what the values are in the program's memory for each entry, just red-click the entry button. As an exercise, set the id: parameter of the Curve entry to 9, and red-click the Curve entry. It will show the specification for curve named "Third Y". I.14. [Removing text or curve] The text or curve on the graph may be removed from it, if set its id in the id: field, and blue-click the entry button. As an exercise, blue click the Curve entry button. What if you red-click at it again? If the text (or curve) with the specified id has been in the program's memory, but not plotted on the graph, this command will plot it out. I.15. [Integer fields and enumerated fields] You should have learned by intuition how to set the "enumerated" field such as the justification fields for a text. There is a different "enumerated" field on the spec panel, namely, the mark: field for a curve. Probably by intuition, you will know how to red or blue click at it to change its value. You don't have to learn this, but if you want some convenience with the integer fields ... You can increment (or decrement) an integer field's value (such as an index or an id) by shift-red (or shift-blue) clicking at them. Now try this: if you have red-clicked the curve entry with id = 9, it should be showing the spec for the curve named "Third Y". Shift-red clicking its color: field to show 12, and click with red or blue at the the mark: field so that it shows dollor. Then control-red click the Curve entry button. What do you get? I.16. [Toggle menus on controller] The second line of menus on the controller are software toggles. In general, red-clicking any of them turns on the associated feature, while blue-clicking turns it off. As an exercise, red or blue click the AutoDiv menu a couple of times, and observe the changes on the graph viewer as well as the spec panel. As another exercise, click the GridX or GridY menus with red or blue button. I.17. [The Clear/Refresh menu] After doing the exercises in I.14. you might have noticed that the curves on the display are broken. You can refresh the display by the Clear/Refresh menu. If you click at it, a pop up menu will show up listing three options. Select the first option, and observe what it does to the graph. The second option will do the same thing after clearing the viewer first. It is provided just in case the graph gets dirty for some reason. What will the third option do? To see if you are correct, just try it. I.18. [The table of texts and curves] You might have removed all the curves, I guess. But any way, lets go ahead with other interesting things to try. There are plenty of ways to get your curves back. Click the Table menu on the controller. Do you see a list of all the texts and curves that have been displayed so far? Red-click the text "Wave # 1" and see what will happen. What do you think it may happen if you blue-click at it again? You're probably right. How about clicking at the texts? Isn't it fun? I.19. [The Values panel] Use the "skills" you just learned, to display all the texts and curves back on the graph. Then click the Values menu in the first line of menus on the controller. There are two areas on the values panel separated by a thin line. We will talk about the math operations in the first area later. There are two bold-faced buttons in the second area, namely, curve and cross-section. Red and control-red works on the curve button in a way similar to clicking at entry buttons on the spec panel. As an exercise, set its id to 7 and red-click at the curve button. It should show the (x, y) pairs for curve numbered 7. A carriage return is inserted every four pairs. And a comment is inserted there to tell us which pair the last one on that line is. Now lets change the y value of the second pair from 2.0 to 2.5, and click at the curve button with control-red. What does it do to this curve on the graph? Oh well. At this time the cross-section buttons only takes the red-click command. The result is obvious, so lets skip it. I.20. [The keyboard commands on the graph viewer] There are quite a few commands on the graph viewer. Here is an introduction to some of them. A. selecting a graph It's easy to get a graph viewer's attention (grab the input focus such that any keys typed won't show up else where in other viewers), just click at the graph with red or yellow. Clciking with red will also show up a cross hair, called primary caret. Now try it. B. selecting a curve With the key for letter c (for curve) pressed down, red-click at one of the waves. You don't have to move the cursor right on the curve, the caret should jump to the closest curve it finds. Many curve related commands are operated with the c key pressed down. C. remove the selected curve What do you think the key should be? Yes, press the c key and click the blue button. D. selecting a text What should be the key? Well, pressing the t key (for text) and red-click inside a text should select it. (Note that the legend [or the labels for the ticks on axes] are properties of curves [or bounds], and hence are not treated as normal selectable text.) Now try to select the text "XEROX". A "text caret" will show up (or move to the text) when it is selected. The text caret for "XEROX" should be at the center of its left, because it was left and center justified by you in step **. E. moving selected text Now with t held down, yellow click at any place you like on the graph. The selected text should be moved there. The following is a somewhat "advanced" command, to rotate the selected text: With the t key and any of the "number key" (1..9) pressed down, click red or blue. The text should be rotated counter clock wise (or clock wise if blue if clicked) for n*10 degrees, where n is the number the "number key" represents. F. removing selected text I believe by now you probably already know how to do it. (Yes. t-blue.) G. switches The following are some of the keys to turn some of the features on (and off). Try some of them. b: auto-bounds d: auto-divisions ctrl-1, ctrl-2: turns the primary or secondary carets on (or off). shift-1, shift-2: starts or stops the primary or secondary caret's blinking. .... H. moving primary caret on curves You can move the primary caret to any place on the graph by simple red clicking. In addition, there are some commands for you to move it on curves. For example, if you press the s key (for same curve or slide), and move the mouse, the primary caret will try to follow the cursor along the selected curve. Holding the h (or v) key down and click, the primary caret will jump horizontally (or vertically) to another curve. Clicking with red, it will move left (or up); clicking with blue, it will move right (or down). If h (for horizontal) and s (for same curve) keys are held down when red (or blue) button is clicked, the primary caret will jump to left (or right) to another point on the same curve. J. for a complete list of the commands on a graph viewer, see **. I.21. [Math operations] Now lets try some math operations on the curves. Click the Values menu on the controller, if the values panel has disappeared. Make sure that the operand field shows "selected y" in white on black. Select one of the sinusoidal curves, and click abs. (The ABS function.) Now click at Resume. Put 2.5 in the argument field, and click at +. I.22. [Hardcopy] Now that you have a beautiful graph, how can you print it? There are two options for you to choose, if you click the Interpress menu on the graph viewer, namely, color or black-and-white. If you choose color, then it's better to print the interpress master through a color printer, otherwise you may not be able to distinguish curves easily. Lets make a hardcopy through the black and white printer, RockNRoll. Select "Foo" (excluding the double quotes), and click the Interpress menu. Choose black-and-white in the pop up menu, and confirm making the interpress file Foo.ip. When you see a message saying it's done, type the following in the CommandTool: % InterpressToPD Foo.pd _ Foo.ip raven384 % print -h rocknroll foo.pd Wait a few minutes and go to RockNRoll to pick up the hardcopy of the graph. I.23. [Programming interface] -- skip this part if you don't plan to produce graphs programmably. Issue the following command in the CommandTool: % Waves If you want to see how simple this graph is created by some simple procedure calls, take a look at the file WavesImpl.mesa. It uses only some of the procedures in the interface called GraphOps. The procedures in GraphOps should be sufficient for most cases, as far as drawing curves and texts is concerned. If you are really ambitious, take a look at GraphPrivate, or even every module of the Graph package. I.24. [Text input] Open Simple.list. Do you find it very simple? Just list the names of variables, and a table of the x and y values, you can make what ever graph you like. You can use the Get or Merge menus on a graph viewer to plot the data out; or you can use the Graph command in the CommandTool. Of course you can change the graph and add new things in it once you get it plotted using what you have learned so far about the graph viewer and its controller. I.25. [For more information] You have practiced some of the features this package provides. If you read some other sections in this document, you can easily become an expert on producing graphs. Have fun! 1. Please feel free to direct any comments to me. Although over three hundred run-time bugs have been identified and removed so far, I am sure there are still some remaining. Please let me know if you have any problems with this program. 2. Please be prepared that some features may be enhanced, altered (or even removed if necessary). If you stay on ThymeUsers^.pa, you will be informed of any changes made in the future. ²File: GraphDoc.tioga Copyright (C) 1984 by Xerox Corporation. All rights reserved. Last Edited by: Sweetsun Chen, November 21, 1985 10:09:46 pm PST curves selection and removal texts selection, removal, translation and rotation show details on control panel switches moving primary caret to other curve moving primary caret on the same curve other commands relating carets refresh/clear zooming commands select graph viewer ÊјJšœ™Jšœ>™>šœ™Icode™0—J˜JšÏbi˜iJ˜Jšœƒ˜ƒJ˜˜J˜Jšœ‹˜J˜Jšœ&˜-J˜Jšœ˜˜šœ ˜ Jšœ²˜²šœÏiœ¾˜áJšœžœ¤žœ\˜£——J˜Jš œ˜˜J˜šœ1˜1J˜U—˜+J˜G—˜?J˜X—J˜J˜TJ˜J˜J˜—š œ˜J˜šœ˜J˜JšÏc?˜?JšŸƒ˜ƒJšŸL˜L—J˜šœ˜J˜JšŸj˜j——J˜—šœ˜Jšœ:Ðboœ œ  œ œ œ œ œ  œ  œ  œ¸˜ÏJ˜š Ïoœ/˜Jšœežœ%žœOžœ4˜š—J˜š œ ˜*Jšœü˜ü—J˜š œ9˜BJšœ“˜“—J˜šœ+˜:Jšœ‹žœžœ˜¤Jšœï˜ïJšœÙ˜Ù—J˜šœ œ#˜5J˜4Jšœ“˜“—J˜šœ œ˜*J˜ç——J˜š˜JšœË˜Ìšœ˜šœTÏkœ#¢œ*¢œx˜ŸJšœ*˜*—šœ8˜8Jšœ˜—J˜Ó—šœ ˜ šœy¢œ­˜¨Jšœ2˜2—Jšœ˜šœ¢œj¢œC˜¹JšœÏf9˜:—JšœF˜F——J˜š&˜&J˜šœ*˜;J˜C—J˜šœO˜fJšœÂ˜ÂJšœÃ˜ÃJ˜S—J˜Jšœ5˜JJ˜šœ]˜nJšœ<˜<šœ#Ÿ œŸ œŸœŸœŸ œŸœŸœŸ œŸœŸœŸ œŸ˜öJšœó˜ó˜Jšœ Ÿ˜(Jšœ Ÿ˜'Jšœ Ÿ ˜,Jšœ Ÿ˜(————J˜šœ ˜8J˜JšœŸ`˜JšœŸ˜<šœŸ*œ˜GJ˜Jšœv˜v——J˜š˜J˜J˜J˜J˜J˜˜+J˜J˜J˜J˜1J˜,—J˜˜J˜ J˜ J˜ —J˜J˜J˜˜ J˜J˜ J˜ J˜ —J˜˜ J˜J˜ J˜ J˜ J˜J˜—J˜˜ J˜J˜ J˜ J˜J˜ J˜ J˜—J˜˜ J˜J˜ J˜J˜ J˜ J˜ J˜ ——J˜š(˜(J˜™JšœÐbiœ˜Jšœ¤œ˜—J˜™2J˜J˜J˜J˜AJ˜@—J˜™Jšœ0¤œ˜DJšœ0¤œ ˜>—J˜™Jšœ¤œ˜Jšœ¤œ ˜J˜Jšœ¤œ¤œ ˜&Jšœ¤œ¤œ ˜&J˜Jšœ¤œ¤œ˜Jšœ¤œ¤œ˜—J˜™#˜Jšœ¤œ*˜@—˜Jšœ¤œ+˜A—J˜˜Jšœ¤œ˜5—˜Jšœ¤œ!˜7——J˜™&Jšœ¤œ%˜-šœ¤œ ˜!Jšœ¤œ+˜A—šœ¤œ ˜"Jšœ¤œ,˜B—J˜˜'J˜Š—˜)J˜‹——J˜™J˜,J˜J˜!J˜#J˜J˜J˜-J˜/J˜*—J˜™ Jšœ¤œ˜Jšœ ¤œ ¤œ˜J˜—J˜™Jšœ¤œ)˜1Jšœ¤œ˜ Jšœ¤œ˜—J˜™J˜BJ˜——J˜š˜J˜J˜~J˜˜J˜J˜yJ˜J˜K˜J˜šJ˜J˜¼J˜J˜JJ˜J˜VJ˜J˜>J˜—˜{J˜J˜³J˜J˜MJ˜J˜KJ˜˜RJ˜P—J˜J˜BJ˜J˜YJ˜J˜@J˜J˜:J˜J˜:J˜J˜4J˜J˜6—J˜˜WJ˜J˜m——J˜˜J˜J˜GJ˜J˜¢J˜J˜’J˜J˜•J˜J˜šJ˜J˜µJ˜J˜6J˜J˜J˜J˜ J˜J˜ J˜J˜J˜J˜ J˜˜8J˜J˜Í—J˜J˜6J˜˜J˜J˜˜J˜æ—J˜˜J˜J˜š—J˜J˜˜J˜öJ˜—J˜˜J˜Œ——J˜˜J˜J˜b——J˜˜J˜˜J˜J˜¥J˜J˜J˜J˜r—J˜˜ J˜J˜è—J˜˜J˜J˜¼——J˜˜"J˜J˜ÂJ˜˜"J˜J˜»—J˜˜#J˜J˜V—J˜J˜˜J˜èJ˜J˜ÿ———J˜š ˜ J˜J˜˜J˜šœžœ ˜J˜Jšœ0˜0Jšœ4ŸœŸ3˜—J˜Jšœˆ˜ˆ˜JšÏs­˜­——J˜šœžœ˜J˜Jšœ0žœ˜;J˜šœžœA˜WJš¥,˜,—J˜šœŸœŸ œ˜DJš¥/˜/—J˜šœK˜KJš¥=˜=—J™šœA˜AJš¥/˜/J™—˜áJ˜Jš¥c˜c——J˜šœžœž œ˜&J˜Jšœžœž œK˜y—J˜šœžœ˜J˜JšœFžœÎ˜˜—J˜šœžœ˜J˜JšœHžœø¥Œ˜Ï—J˜šœžœ˜J˜JšœNžœmžœZ¥<˜Ù—J˜šœžœ˜J˜Jšœžœ÷˜›J˜Jšœ%˜%˜J˜—J˜Jš¥>˜>—J˜šœž œ˜J˜Jšœ²˜²—J˜š œžœžœžœžœžœ˜7Jš œ<žœžœžœžœžœH˜ªJ˜JšœžœT¥:˜˜Jšœžœžœžœ…˜ Jšœžœ]˜g—J˜šœžœ˜J˜Jšœ3žœ»¢œ$¢œÞ˜ý—J˜šœ:˜?J˜Jšœ“¢œÛ˜óJ˜J˜——J˜šœ˜J˜J˜’˜J˜ J˜IJ˜$J˜—šœ¨˜¨J˜Jš¥—˜———J˜šœ0˜5J˜Jšœý˜ý—J˜šœ˜J˜J˜Ï˜Jš¥‹˜‹——J˜šœ(˜-J˜J˜¯J˜ZJ˜„J˜J˜½—J˜šœ˜"J˜J˜©J˜J˜Û—J˜šœžœžœ˜J˜Jšœœƒ˜¤J˜J˜_J˜-J˜J˜G—J˜šœ ˜%J˜J˜¤J˜J˜ˆJ˜J˜/—J˜šœ˜J˜J˜£J˜JšœÁœ œ˜ÙJ˜Jšœ!œœÅ˜ïJ˜JšœQœP˜¦J˜Jšœ œS˜q—J˜šœ,˜1J˜J˜]J˜˜J˜J˜ˆJ˜—˜J˜Jšœ¤œž˜¾˜Jš¥F˜F—J˜—˜J˜J˜TJ˜—˜J˜Jšœ7¤œµ˜íJ˜—˜J˜J˜pJ˜˜LJ˜J˜é—J˜—˜J˜J˜HJ˜—˜ J˜J˜`J˜Jšœ¤œ˜Jšœ¤œ˜J˜BJ˜LJ˜J˜—˜!J˜Jšœ¿¤œ ¤œd˜²J˜JšœE¤œ¤œ}˜ÔJ˜Jšœ ¤œ¤œ–˜¸J˜—J˜A—J˜šœ˜J˜J˜0J˜•Jšœ/œ¢œ ˜GJ˜Jšœ œ˜J˜Jšœ,œ˜.—J˜šœ ˜J˜J˜:Jšœ:ž œ×˜›J˜Jšœ€ž œ²˜¼J˜GJšœM˜M—J˜šœŸC˜aJ˜Jšœ/˜/J˜J˜˜´J˜Jš¥d˜d——J˜šœ ˜J˜J˜œJ˜J˜¡—J˜šœ˜J˜Jšœ¦˜¦——J˜Jš ˜ J˜˜ J˜ñJ˜»——…—¡Ø²[