Click on Apply to perform the operation. The resultant set will be the expression evaluated only on points contained in the specified region. Thus, if no expression was specified, the effect is to produce a new set of only those points contained in the region. Conversely, to delete points in a region, leave the expression empty, and negate the region selection.
Pipes are a way of capturing the output of a running process without the intermediary step of pacing the output in a file. Instead, the executing program puts the data in one end of the pipe, and Grace reads it from the other end of the pipe.
On certain popups, e.g. Main:Data/Import/ASCII, the option to read from a file or pipe can be specified. If a pipe is chosen, the command in the selection widget will be run and the stdout will be captured and treated as though it was data which was read from a file.
A named pipe is a special case of the pipe previously described. In the previous case, after the program has finished execution and the output had been read, the pipe was destroyed. A named pipe is a static structure with the property that multiple processes can write to and/or read from it. The purpose of using a named pipe with Grace is to start up a Grace window and then control Grace by sending commands and data through a named pipe. This is very powerful and lets you do practically anything you can do directly from the GUI. To use this feature, try the following:
mkfifo pvc. If
you do a directory listing, you should see the file pvc.xmgrace -npipepvc&. Grace is now monitoring the pipe for any data which might be sent
to it. It will interpret things as though they were entered using the command
interpreter. echo "read \"8.2.dat\"" > pvc. (The back slashes
are needed to escape the quotation marks so that Grace really received the
command :read "8.2.dat".) This just told Grace to read the file data. Now we
would like to autoscale. We could simply click on the button but the point
is to use a named pipe. This time we type echo autoscale > pvc followed
by echo redraw > pvc. Your graph should now have autoscaled and redrawn.
Exit Grace with echo exit > pvc. You should also clean up by removing pvc.When multiple graphs are present, a graph is selected by clicking inside the graph frame. In cases where graph frames overlap, clicking will cycle among the overlapping graphs.
It might be annoying if one is trying to work in a region of overlapping graphs. If will not be possible to double click on something because the each click will be interpreted as a single click and you will only end up changing the graph focus. In such an instance, turning off the graph selection by clicking might be desirable. Choose Main:Edit/Preferences and then set Misc:Graph_focus to "As set". This means one must explicitly set the focus. Simply bring up a graph list (eg. Main:Edit/Overlay_graphs is but one), select the graph you want to work on and then, using the menu under mouse button 3, choose "Focus to".
Placing a large number of regularly spaced graphs is easily done with Main:Edit/Arrange_graphs. This will automatically calculate the layout:
Note that only graphs which are selected are taken into consideration. So, if you wish to reorganize your existing graphs, make sure they are selected or new ones may be created.
Arranging individual graphs may either be done (1) exactly, by specifying the viewport coordinates from Main:Plot/Graph_appearance or using the previously explained Arrange graphs popup, or (2) roughly, by double clicking a graph focus marker and then moving it.
Overlaying one graph onto another is useful for creating a graph with two different x axes and/or y axes. For example, you may wish to have a graph which on the x axis has the month of the year. There could be 2 curves on it, one using the left y axis which is number of gnus sold and one using the right y-axis which is the number of gnats exported on a logarithmic scale. Likewise, if one is plotting spectral data, one could have one x axis in Hz and another one in wavelength. Let's proceed with an example:data
Hot links are a way of of updating a set without having to delete it first and then reread it. The Hot Links window is opened available under Main:Data/Hot links.
The simplest hot link is to a file containing just one set. To make a hot link to a single set, we must first select the set we want to get updated and then specify the file. We may also link to a pipe in which case we must specify it is a pipe to which we are linking. A command may also be entered which will be run every time the hot link is updated. A common command might be autoscale which will make sure that the entire set can be seen if it changes size. It's possible you may want to execute more commands than one. One could, for example, have a set that is a function of 2 sets that needs to be recomputed if either set is updated. If this is the case, put your commands in a file and then use the "READ BATCH" command.
Pressing the Link button will now create the link and if the update button is pressed, the set will be updated with the current contents of the file you linked and the contents of the Command widget will be executed.
For a simple example, read in the set 10.1.dat and set up the hot link. Now, run the command shiftdata.sh and update the hotlink. You should have seen the peak in the graph shift. Try repeating this a couple of more times.
Sometimes a data file may contain multiple columns of data and we would like to be able to link to all or some of those columns. To specify this, select as many sets as there are xy columns of data in the file. The "x y1 y2" format is assumed. Choose the file the data and link. Now in the link list, the links will show the file name with an appended colon and number. The number tells what column of data the link refers to. Any unwanted columns may be selected and unlinked at this point. When the update button is selected, all sets in the graph will be updated.
Instead of having to keep the Hot links window open all the time, the update action is bound to alt-u. If you find that alt-u has no effect, try double clicking inside the graph you want to update and close the window that pops up. This will "alert" the canvas to process future hot key strokes.