Xmgrace For Mac

broken image


  1. Xmgrace For Mac Os
  2. Xmgrace For Mac Reviews
  3. Xmgrace For Mac Free
  4. Xmgrace For Mac Software

Edward Vigmondevigmon@tulane.edu

Install Fonts for Matplotlib (Helvetica) Download a font converter (no need to install, unzip and launch the GUI): Convert Mac fonts.dfont to.ttf (with GUI, select 'Source Fonts'): Place font files.ttf in Matplotlib data dir (with GUI, select 'Destination Folder', then 'Convert'): Remove fontList.cache to force update. Download Xmgrace Cygwin Download For Mac. Admin 9/18/2018. Install Cygwin for your user only, unless you plan on everyone.

for Grace-5.1.4
  • Native Grace for Windows, Linux and Mac OS X based on Qt. This comes with the original xmgrace and is a necessity for my work. It also runs under VMS, OS/2, and Windows. This will give you a slide show demonstrating some nice features of Grace. Installation make install. There are a lot of tools you can use to graph your data.
  • This is the command xmgrace that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator. Run in Ubuntu Run in Fedora Run in Widows Sim Run in MACOS Sim.

These tutorials assumes that you are a new user to Grace but are somewhatfamiliar with a windowing system. They are designed to show you some of thebasic operation of Grace as well as a few of its less intuitive features. Pleasefeel free to go beyond the bounds of the actions described herein and explorethe possibilities of using Grace. After all, you will be the one who benefits.

The purpose of these tutorials are to give brief examples to show you thebasics of how to do something. Essentials and some of the more esoteric featuresof Grace will be demonstrated to give the user an idea of the capabilitiesof this program. It is not possible to show everything that Grace is capableof doing. That knowledge only comes with use and experimentation. I recommendthat you do the tutorial and then by playing around with things, you will beginto understand them. Finally, when you get stuck, read the user guide to helpyou.

In referring to what item to select, the tutorial will use something ofthe form snaf:/foo/bar/bell which means that on the snaf popup, select fromthe foo menu the submenu bar and from the bar menu, the entry bell. The popupmain is the large one with the graph that pops up when you run xmgrace. Ifthere is a space in the menu item, it will be replaced by an underscore. So, if the menu item was actually 'Bell jar' instead of bell in the last example,it would be snaf:/foo/bar/Bell_jar.

Things that are to be typed in will be presented in a typewriter font,eg, type y = 3*sin(x).

Some of examples require you to input a data file or graph. In such instances,there should be a file in the tutorial directory named data.N or N.agr whereN is the tutorial number. For example, when doing tutorial 7.1.3, you shouldlook for a file 7.1.3.agr. It is assumed that each major tutorial section startswith a clean graph.

Some of the following examples require that system commands be run. Thecommands may be different on your machine or require a slightly different syntax.In this tutorial, an attempt will be made to use the most commonly availableUNIX commands. This tutorial was prepared on a Linux machine with kernel 2.0.32.

A couple of points should be made about the GUI before we begin to makelife easier.

  1. It is often possible to select more than one item from a list at a time(some lists may prevent it when it makes no sense.). Clicking on a list entrywithout any keyboard modifier pressed will deselect all other entries and selectonly that one. Depressing shift while clicking an entry selects all entriesfrom a previously selected entry to the currently selected one. Finally, depressingcontrol allows one to individually toggle the selection of an entry.
  2. There are often two buttons on a pop up: Apply and Accept. Changes arenot registered until either of these buttons is pressed. The difference betweenthem is that Accept also closes the window.

Even though I do my best to keep this up to date with the latest release,I cannot guarantee it. Think of this a perpetual work in progress. Therefore,if something is wrong, you can notify me and I'll fix it but keep in mind thatI am doing it in my spare time for no money.

The object of this tutorial is to do the most basic function of Grace:read in some data into a graph and then label the graph. Along the way, a fewof the basic Grace commands and widgets will be introduced.

Mac

Start by bringing up the set reading widget Main:Data/Import/ASCII. Selectthe file 2.1.dat (both double clicking and hitting return work). You shouldsee a black curve drawn on a graph.

Now we would like to add some more sets to the graph, but this time thedata file will be in a slightly different format. Looking at the file '2.1.dat'(with the program of your choice), you can see that its several columns ofnumbers. One way to interpret this file is the first column gives the x-valuesand the rest of the columns are y-values. From Grace, again open the 'Read Sets'widget. This time, check the 'NXY' button. Now select the file '2.1.dat'. At thispoint you will have several differently coloured curves.

You should now have 2 copies of the first set since you've read the filetwice. It would be nice to eliminate one copy. This is most easily accomplishedby bringing up a popup which lists all the sets. Selecting Main:Edit/Data_sets..bring up the Data set props popup. It lists all the sets and for the selectedset, its type and a few statistics. To eliminate a set, select it and thenpress the right mouse button. A menu should appear from which you can selectkill. You'll note that there is a kill and kill data. The former totally eliminateseverything associated with a set while the latter eliminates the data but keepsthe settings for it so that if new data is read into the set, it will havethe same properties like colouring and line width, etc. Kill set 0 for now.

We would now like style the sets. Practically all aspects of the curvesare configurable including colour, line thickness, symbols, drop lines, fills,etc. These operations are available under the 'Set appearance' widget which isinvoked by selecting Main:Plot/Set appearance.. or by double clicking nearthe target set within the graph frame.

When the widget comes up, there will be a list of the sets with their number(eg. G0.S1 refers to set 1 in graph 0). Later operations will require you toknow the number. Like the data sets pop up, clicking on mouse button 3 in theset list will bring up the menu of set operations.

Colouring all sets differently

The simplest way to colour all sets differently is from Set_Appearance:Data/Allcolors. First select the sets which you wish to recolour and then select Set_Appearance:Data/Allcolors. Do this now to your graph.

Customizing each set

When a set in the list is highlighted, the widgets change to reflect thesettings. Practically all aspects are configurable. Experiment by changingthe line colours and widths, placing a symbol at each data point, not connectingdata points and fill the space between the x-axis and the curve. Don't forgetto try out what is available under the other tabs besides Main. To see theeffect of a change, you have to hit the 'Apply' button. N.B.: Things are drawnin numerical order so if there is overlap, the highest numbered item will beon top. This applies to graphs and sets within each graph.

Aspects of the axes are controlled by the axes popup which is called fromMain:Plot/Axis properties or by double clicking the graph frame. All aspectsof the axes can be changed like the title, the font, colour, whether or notto draw grid lines, or user defined tick marks and labels. There are many settingsand the best thing to do is to experiment to see what each setting does.

For now, let's start by labelling the axes. Suppose these curves representthe number of tasks a processor runs as the function of the number of users.To make it more interesting, assume we are doing this in Quebec. That meanswe want to plot 'Nombre de tâches vs. nombre d'usagers'. Note the importanceof having the accent over the a in tâches or we would end up plotting the numberof stains which is entirely another case. Bring up the Axes pop up, selectthe Y axis, and click in the space to enter the label string of the axis label.Start typing Nombre de t. At this point we need to enter a accented letter,so we bring up the font tool by pressing Control-E. You will now see what wehave typed in the Cstring widget. Move the cursor to where you want to placethe accented letter and click on the letter. It should now appear in the string.You can either finish the string here or hit accept and keep editing. Labelthe x axis as well. This font tool is available wherever text needs to be entered.

All the attributes regarding the axis labels like size, colour, font, positionare changeable.

Our next exercise will be to title the graph so other. Operation pertainingto this are found in the 'Graph appearance' widget which we open by selectingMain:Plot/Graph appearance or by double clicking just above the graph frame.

We can now fill in the title of the graph and by clicking on the 'Titles'tab, the font and size and colour can be chosen. The Viewport box under the'Main' tab defines the 4 corners of the graph frame. You can type them in oruse the mouse to move them by first double clicking on them.

Other things which can be controlled in this widget are the frame drawnaround the graph, whether or not the graph background is coloured and the legends.Legends will be dealt with a little later.

Since we have several lines in our graph, it makes sense that we labelthem with a legend so that other people can figure out what they mean. Thefirst thing to do is to give each set a label. This is done by entering a legendstring for each set in the Set appearance popup. Now, from the Main form inthe Graph appearance popup, click on 'Display legend' to see the legend box.The location and appearance of the box is controlled by clicking on the 'Leg.box' tab. The appearance and spacing of the legend entries is controlled bythe 'Legends' tab. For simplicity, label the sets alphabetically and then playwith the appearance, etc. to get something you like.

Specifying the placement of the graph by entering the coordinates can bepainful, especially the fine tuning. To alleviate this problem, a graphicalmethod is also available, although not readily apparent. After a legend appears,it may be dragged to a new location. To do this, press Ctrl-L with your mouseon the main canvas. You should see the arrow cursor turn into a hand. If thisdoesn't work, double click on the main canvas (to get its attention) and thenpress Ctrl-L. Click on the legend and drag it. To cancel the legend drag mode(as with all other modes), click on mouse button 3.

I got bored so I took the data files and produced my own, albeit ugly,graph. See if you can copy mygraph.png

A block of data is a table of number which are interpreted as columns ofnumbers. How sets are created from the columns depends on the information youwant to extract from the file.

We first need to read in a block of data. We do this from Main:Data/Import/ASCII.Select the file '3.dat' and Load as 'Block data'. If the read was successful, awindow should pop up asking you to create a set from the block data. At thetop it will list how many columns of data were read.

First we choose the type of set we would like. For now we'll stick withxy.

Next we choose which column of data contains the x-ordinate. If there isno column, we can select 'index' which will use the index into the column asthe x ordinate starting from one.

The values Y1 through Y4 are used for selecting error bars as may be neededby other set types.

The last thing to specify is the graph into which to load the set if wehave more than 1 set.

Finally, hitting accept will create the set.

If you close this window, it can reopened by bringing up a set list (eg.Main:Edit/Data_sets) and then selecting Create_new/From_block_data from themenu brought up by right clicking on the set list.

Try creating a new set of type XYdY. This is an XY curve with error bars.Try X, Y, and Y1(the error) from different columns.

Besides reading in data files, Grace has an extensive scripting languagewith a large number of math functions built in, These function include thebasic add, multiply, square root, etc, and also the cephes library of higherorder math functions like Bessel functions and the gamma function. Hence, functionsin Grace are basically unlimited. See the user guide for more details. In addition,users can dynamically add libraries to Grace with any desired function. Aswell, points may be added manually to a set by the use of editors. To begin,choose Main:Edit/Data sets. To create a set, press mouse button 3 (the rightmostone for right handed people) anywhere within the data set list (which may beempty) and select Create new. A menu with 4 different ways of creating newsets will be presented. We'll go through them one by one.

The load and evaluate window will pop up when this is selected.

  1. The first step is to set up the parameter mesh which will determine therange and sampling of the variable $t. Most often, $t will simplybe the abscissa.
  2. Next, choose the type of set you would like to produce.
  3. Using the syntax of the command language, an expression for x is enteredwhich uses $t as the independent variable. This can be an extremelycomplicated function.
  4. Likewise, an expression for y is entered and for any other expressionsthat may be needed. Fields after y are labelled y1, y2, y3 and y4. For example,if the set type xydxdy is chosen, y1 will hold dx and y2 will hold dy and itwill be necessary to enter expressions for them.
  5. Pressing apply or accept will perform the calculations and create the newset. You may have to autoscale to see the new set.

Below are a few samples:

  1. To plot one cycle of a sine wave: Load: Set X, Start load at: 0, Stop loadat: 2*pi, Length: 100, X=$t, Y=sin($t)
  2. A unit circle by parameterization: Start at:0, Stop at: 2*pi, Length: 100,X=cos($t), Y=sin($t)

If your system has the Xbae widget set, this choice brings up a spreadsheetlike editor to allow one to enter the points of the set by hand. Initially,it just has the point ( 0, 0 ). Clicking on add will insert a copy of the currentlyselected row immediately below the selected row. Clicking delete will deletethe row which contains the cursor. This method is best suited to examiningor modifying existing sets or creating very small sets. The sets gets updatedafter one hits enter or leaves the cell.

If your system doesn't have the Xbae widget set or you want the power ofyour favourite external editor, a text editor of your choice may be used toenter data. The editor is selected by the GRACE_EDITOR environment variable.If the set is new, it will contain only the point (0,0). During editing, noother operations are possible. After the editor is closed, the set will beupdated.

This creates a new set from a block of data which has been read in. Seesection 3.

Grace supports a large number of command line options which allow the userto control the appearance and placement of graphs. This can be very usefulif you want to use it to quickly print something without going through theGUI, use it within a script to automatically generate graphs, or have a plotcome up already configured which can be much quicker than going through theGUI menus.

Invoking Grace with the command 'grbatch'from the command line will causeGrace to start, produce a plot, send it to the printer (unless a file is specified)and then exit. In its simplest form, to produce a plot of the file a.agr, type

gracebat a.agr

If gracebat is unavailable on your system, the hardcopy option to xmgracewill do the same thing. Assuming the hardcopy device is a postscript printer,one could also type

xmgrace -hdevice PostScript -hardcopy a.agr

Xmgrace For Mac Os

Often, one wishes to plot several graphs with each graph having differentcharacteristics. This is easily accomplished from the command line. Optionsspecified on the command line are parsed in order and stay in effect untiloverridden by specifying them again.

  1. The first step in plotting multiple graphs is usually telling Grace howmany graphs we have and how to arrange them. The interpreter command 'arrange'will do this. For example, if we want 4 graphs arranged in a simple 2x2 table,we specify -pexec 'arrange ( 2, 2, .1, .1,.1,ON,ON,ON)'The exact meaning ofall the options is explained in the reference manual.
  2. Specify any global options.
  3. Specify for each graph, the data to plot and any options. Options shouldbe specified in the following order:
    1. '-graph g' where g is the graph number starting at 0. This says to applyall following options to this graph.
    2. Set any autoscaling options. Autoscaling is performed when the file isread; ergo, the autoscaling must be specified BEFORE the file is read. Remember,this setting is persistent.
    3. Set the set type. This is also a persistent setting.
    4. Specify the graph type and the input file.
    5. If reading in block data, create the sets with the '-bxy' option.
    6. Specify any world scaling. It is important to do this AFTER sets are read(unless autoscaling is off) as the graph gets rescaled when data is read in.
    7. Specify anything else

An example

Let's try an example. We will assume 5 plots, the first 4 of which areto be stacked vertically, and the fifth inset into the fourth. We wish to plotthe files a.dat, b.dat, c.dat and d.dat with the inset graph being a magnifiedportion of d.dat. Assume a.dat contains multiple columns of data, b.dat isa block of data from which we wish to make a curve from columns 2 and 4 withthe error given by column 3, c.dat is to be represented as a bar graph, andfor the inset graph, we wish to graph to region (0,0) to (1,1). This can beaccomplished by

gracebat -pexec 'arrange (4,1,.1,.1,.1,ON,ON,ON)' -nxy a.dat -graph 1 -blockb.dat -settype xydy -bxy 2:4:3 -graph 2 -settype bar c.dat -graph 3 -settypexy d.dat -graph 4 d.dat -world 0 0 1 1 -viewport .15 .3 .8 .88

Note that the graph numbers start at 0 and that 0 is the default so itdoes not have to be specified for the first graph.

Undoubtedly, you will reach a point where you want to do something forwhich no command line option exists. (We have been doing this with the arrangecommand.) This is where Grace's parameter file language is vital. The option'-pexec' will execute the next argument as if it had read it from a parameterfile or excuted on the command line. If you want to do something more complicatedthan one command, you can use several pexec's or put the commands in a fileand run the file with the '-batch' option.

Pexec example

To read in the files foo.dat and bar.dat and scale foo.dat in Y by 1000,the simplest way is

xmgrace foo.dat bar.dat -pexec 's0.y = s0.y * 1000'

Batch example

To do the same as the previous example but also label the axes and recolourthe curves, make a file called 'bfile' with the Grace commands

and then run xmgrace with

xmgrace foo.dat bar.dat -batch bfile

This tutorial will explain some of Grace's curve fitting abilities. Gracecan perform two types of fittings. The first type is regression or linear fittingwhere optimization is done on a linear equation or an equation which can beexpressed in a linear form. This includes fitting polynomials and certain formsof equations. The other type of fitting is nonlinear and allows for arbitraryuser supplied functions.

Let's take a curve and see how each type of fitting works. To begin, createa curve of the function y = sqrt(x) + exp(x)/3 -1 over the range 0 to 3 with100 points.

Choosing Main:Data/Transformations/Regression will pop up the Regressionwindow.

  1. Select the set you just created
  2. Select the type of fit. For now, pick Linear.
  3. We will load the fitted value for now.
  4. Press the accept button to see the results of the fit. A window will popup which will give you the results of the fit including the final expression.You might have to scroll back a bit to see it.
  5. See how high of a polynomial is needed to get an acceptable fit and tryfitting other types of functions. Note that for the non-polynomial fits, Aand B are the fitting parameters of the equation.
  6. Now, we are not limited to computing our fitted curve at the points ofthe original function. Suppose these data are quarterly sales and we wish topredict our next quarter. Choose the type of fit which you found to work best.Instead of loading fitted values, Load: Function. Now the bottom of the widgetwill become active. We wish to extrapolate over the next quarter, so we wouldlike to start at 0 and end at 4 and choose 100 points. Press accept to seethe extrapolation.

We pop up the widget by selecting Main:Data/Transformations/Non-linearcurve fitting. You may want to kill all the sets except the original functionand the extrapolated function at this point.

  1. Begin by selecting the set to optimize, the original function.
  2. Next, we write a function of the form we wish to fit. The unknown parametersare labelled a0.a9. You must start with a0 and work your way up. In this case,since you know the form of the equation already, so try: y = a0*sqrt(x) + a1*exp(x)+ a2.
  3. Next we must specify that we have three parameters to fit which are a0,a1 and a2 and the tolerance of the solution.
  4. You must specify initial values for the parameters and put any bounds onthem if necessary. Depending on the function you are optimizing, differentinitial conditions may lead to drastically different optima.
  5. The solution process is iterative and you must click on a button to runa certain number of iterations. You should see the parameters change and acurve created with these parameters. In this example, the exact solution isreached within 5 steps. More parameters and more difficult functions may requiremore steps in which case you may choose to run 20 or 100 or more steps. Thenewly created optimized curve should converge with an increasing number ofsteps.
  6. As in linear curve fitting, you can choose to load the fit function atthe points of the original curve, over an arbitrary range or load the errorat each point. For comparison, load the fitted curve over the range (3,4) byselecting Nonlinear:Options/Load/Function and filling in the bottom of thewidget. How does the true answer compare to your previous extrapolation?
  7. Fitting arbitrary curves can be a tricky business. Initial conditions arevery important. If you don't get a good fit, you may have to experiment a lotwith the initial parameters values.
  8. Finally, note that the fitted curve does not get added until the acceptbutton is pressed. This allows you to 'fool around' until you get a good fitwithout creating a lot of garbage sets.

Simple Geometrical

You can rotate sets around an arbitrary axis perpendicular to the canvas(e.g. the Z-axis). Also it is possible to scale sets and translate them.

Mathematical operations between sets

It is possible to perform operations between sets. With many operations,however, it is required that the 2 sets have the identical abscissa, i.e.,the x values of both sets are the exact same. This is necessary since mostoperations are performed on a point by point basis. Eg. multiplying 2 setsis done by multiplying the Y values of the 2 sets together to produce a newY value. About the only operations that don't do this are filtering and convolution.Fortunately, Grace has a function to help out when the abscissas differ. Itis called interpolation which interpolates a set over the domain of anotherset to produce a new curve.

Let us now add the cosine of a set to the sine of another set to createa new curve. However, we will complicate this example by having different domainswith different sampling:

  1. Read in 7.1.2.agr
  2. Note how the abscissa are different. We begin by using interpolate to producea third set which is the second set sampled at the x values of the first. Callup the Interpolate popup from Main:Data/Transformations/Interpolation/splines ..
  3. Select S1 as the source set but don't specify a destination set. A setwill automatically be made. Use the Strict, linear method, Sampling:Abscissasof another set and use S0 as the Sampling set. Pressing Apply should producea curve which is S1 interpolated at the points of S0. Note that the new curveonly exists over the portion of the x axis common to both curves.
  4. We still have a problem since set 2 is sampled the same as set 0 but hasa smaller domain. We can perform the computation only over the common regionso we now interpolate on set 0 at points from set 2 to produce set 3. Now set2 and set 3 have the exact same abscissas.
  5. Call up the command interpreter from Main:Window/Commands ..
  6. We need to create a set to hold the result, S4. We can either make a copy(using Main:Edit/Set_operations..) of S2 which will be guaranteed to havethe proper size to hold out result or we can use type a command: s4 lengths2.length
  7. We have to break up the computation into an x part and a y part. In thisinstance, we simply wish to keep the same x values. The final result will beput into set 4, so we issue the command: s4.x = s2.x
  8. Now we can perform the math between our interpolated copies of sets 0 and1: s4.y = cos(s3.y) + sin(s2.y).
  9. So where is the new set? It's there but it's hidden. Since we already havethe command window open, we can unhide the set by typing: S4 on. For the GUIminded (no offense intended), bring up a set list with the set operations menu(eg. Main:Edit/Data_sets or Main:Plot/Set_appearance),select set 4 and unhide it by selecting show from the operation menu (mouse button 3).

N.B. If the abscissas of the original curves had been the same, we couldhave started at step 5. If the sampling had been the same we could have skippedstep 4.

Feature extraction

Feature extraction is a way of creating one curve from a family of curves.It generates one data point from each curve by measuring a characteristic ofthe curve. For example, one might have a series of curves which plot the gnatpopulation as a function of time. Each curve is produced by varying some condition,like the number of gnus in the environment. Using feature extraction, one coulduse this family of curves to produce a new curve of the peak number of gnatsas a function of gnus or the time of the peak number of gnats as a functionof the number of gnus. This is most often useful with more than one graph.

  1. Read in graph 7.1.3.agr
  2. Bring up the feature extraction form by clicking onMain:Data/Transformations/Feature_extraction.
  3. Select Results to graph 1.
  4. Select the feature you are interested in. Choose Y maximum.
  5. Select what will determine the x value of the data point. The value ofthe characteristic determines the Y value. The X value can be determined bythe set number. The x or y values of a specified set can also be used to producethe abscissa. Finally, the legend entry of the curve itself can be used toproduce the x value. In this case, the legend entry must be specified as asingle number. Choose index for now.
  6. Press accept, click on graph 1 and then click on the autoscale button tosee your results.
  7. Choose another feature, like frequency, this time and get X values fromthe legend. Make sure that graph 0 has the focus when you hit accept.

Often we only wish to examine part of a data set or perform transformationsonly on a portion of one. Restrictions allow us to define a region of the graphon which to perform operations.

Defining a region

There are several ways a region may be defined. It may be defined by astraight line (left of, right of, above, below), by a polygon (inside or outside),or by a range ( in x, out of x, in y, out of y). Call the define region popupfrom Main:Edit/Regions/Define. Choose which one of the regions you would liketo define, and press the define button.

Line type

Define the ends of the line by clicking with mouse button1.

Polygon type

From the define region popup, choose a polygon type andthen the define button. Use mouse button 1 to pick the vertices of the polygonand then mouse button 3 when you are done.

Range type

From the define region popup, choose a range type and thenpick 2 points which define the range.

Using regions

Regions may be only be used to restrict an expression evaluation. Bringup the evaluateExpressions popup (Main:Data/Transformations/Evaluate_expression).Choose the source and destination sets and specify the formula to apply tothe region of interest. Not specifying an expression is equivalent to the identitytransformation. Choose the region you wish to use. By checking negate, thecomplement of the specified region is used.

Click on Apply to perform the operation. The resultant set will be theexpression evaluated only on points contained in the specified region. Thus,if no expression was specified, the effect is to produce a new set of onlythose 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 theintermediary step of pacing the output in a file. Instead, the executing programputs the data in one end of the pipe, and Grace reads it from the other endof the pipe.

Xmgrace For Mac Reviews

On certain popups, e.g. Main:Data/Import/ASCII, the option to read froma file or pipe can be specified. If a pipe is chosen, the command in the selectionwidget will be run and the stdout will be captured and treated as though itwas data which was read from a file.

A named pipe is a special case of the pipe previously described. In theprevious case, after the program has finished execution and the output hadbeen read, the pipe was destroyed. A named pipe is a static structure withthe property that multiple processes can write to and/or read from it. Thepurpose of using a named pipe with Grace is to start up a Grace window andthen control Grace by sending commands and data through a named pipe. Thisis very powerful and lets you do practically anything you can do directly fromthe GUI. To use this feature, try the following:

Xmgrace for mac free

Start by bringing up the set reading widget Main:Data/Import/ASCII. Selectthe file 2.1.dat (both double clicking and hitting return work). You shouldsee a black curve drawn on a graph.

Now we would like to add some more sets to the graph, but this time thedata file will be in a slightly different format. Looking at the file '2.1.dat'(with the program of your choice), you can see that its several columns ofnumbers. One way to interpret this file is the first column gives the x-valuesand the rest of the columns are y-values. From Grace, again open the 'Read Sets'widget. This time, check the 'NXY' button. Now select the file '2.1.dat'. At thispoint you will have several differently coloured curves.

You should now have 2 copies of the first set since you've read the filetwice. It would be nice to eliminate one copy. This is most easily accomplishedby bringing up a popup which lists all the sets. Selecting Main:Edit/Data_sets..bring up the Data set props popup. It lists all the sets and for the selectedset, its type and a few statistics. To eliminate a set, select it and thenpress the right mouse button. A menu should appear from which you can selectkill. You'll note that there is a kill and kill data. The former totally eliminateseverything associated with a set while the latter eliminates the data but keepsthe settings for it so that if new data is read into the set, it will havethe same properties like colouring and line width, etc. Kill set 0 for now.

We would now like style the sets. Practically all aspects of the curvesare configurable including colour, line thickness, symbols, drop lines, fills,etc. These operations are available under the 'Set appearance' widget which isinvoked by selecting Main:Plot/Set appearance.. or by double clicking nearthe target set within the graph frame.

When the widget comes up, there will be a list of the sets with their number(eg. G0.S1 refers to set 1 in graph 0). Later operations will require you toknow the number. Like the data sets pop up, clicking on mouse button 3 in theset list will bring up the menu of set operations.

Colouring all sets differently

The simplest way to colour all sets differently is from Set_Appearance:Data/Allcolors. First select the sets which you wish to recolour and then select Set_Appearance:Data/Allcolors. Do this now to your graph.

Customizing each set

When a set in the list is highlighted, the widgets change to reflect thesettings. Practically all aspects are configurable. Experiment by changingthe line colours and widths, placing a symbol at each data point, not connectingdata points and fill the space between the x-axis and the curve. Don't forgetto try out what is available under the other tabs besides Main. To see theeffect of a change, you have to hit the 'Apply' button. N.B.: Things are drawnin numerical order so if there is overlap, the highest numbered item will beon top. This applies to graphs and sets within each graph.

Aspects of the axes are controlled by the axes popup which is called fromMain:Plot/Axis properties or by double clicking the graph frame. All aspectsof the axes can be changed like the title, the font, colour, whether or notto draw grid lines, or user defined tick marks and labels. There are many settingsand the best thing to do is to experiment to see what each setting does.

For now, let's start by labelling the axes. Suppose these curves representthe number of tasks a processor runs as the function of the number of users.To make it more interesting, assume we are doing this in Quebec. That meanswe want to plot 'Nombre de tâches vs. nombre d'usagers'. Note the importanceof having the accent over the a in tâches or we would end up plotting the numberof stains which is entirely another case. Bring up the Axes pop up, selectthe Y axis, and click in the space to enter the label string of the axis label.Start typing Nombre de t. At this point we need to enter a accented letter,so we bring up the font tool by pressing Control-E. You will now see what wehave typed in the Cstring widget. Move the cursor to where you want to placethe accented letter and click on the letter. It should now appear in the string.You can either finish the string here or hit accept and keep editing. Labelthe x axis as well. This font tool is available wherever text needs to be entered.

All the attributes regarding the axis labels like size, colour, font, positionare changeable.

Our next exercise will be to title the graph so other. Operation pertainingto this are found in the 'Graph appearance' widget which we open by selectingMain:Plot/Graph appearance or by double clicking just above the graph frame.

We can now fill in the title of the graph and by clicking on the 'Titles'tab, the font and size and colour can be chosen. The Viewport box under the'Main' tab defines the 4 corners of the graph frame. You can type them in oruse the mouse to move them by first double clicking on them.

Other things which can be controlled in this widget are the frame drawnaround the graph, whether or not the graph background is coloured and the legends.Legends will be dealt with a little later.

Since we have several lines in our graph, it makes sense that we labelthem with a legend so that other people can figure out what they mean. Thefirst thing to do is to give each set a label. This is done by entering a legendstring for each set in the Set appearance popup. Now, from the Main form inthe Graph appearance popup, click on 'Display legend' to see the legend box.The location and appearance of the box is controlled by clicking on the 'Leg.box' tab. The appearance and spacing of the legend entries is controlled bythe 'Legends' tab. For simplicity, label the sets alphabetically and then playwith the appearance, etc. to get something you like.

Specifying the placement of the graph by entering the coordinates can bepainful, especially the fine tuning. To alleviate this problem, a graphicalmethod is also available, although not readily apparent. After a legend appears,it may be dragged to a new location. To do this, press Ctrl-L with your mouseon the main canvas. You should see the arrow cursor turn into a hand. If thisdoesn't work, double click on the main canvas (to get its attention) and thenpress Ctrl-L. Click on the legend and drag it. To cancel the legend drag mode(as with all other modes), click on mouse button 3.

I got bored so I took the data files and produced my own, albeit ugly,graph. See if you can copy mygraph.png

A block of data is a table of number which are interpreted as columns ofnumbers. How sets are created from the columns depends on the information youwant to extract from the file.

We first need to read in a block of data. We do this from Main:Data/Import/ASCII.Select the file '3.dat' and Load as 'Block data'. If the read was successful, awindow should pop up asking you to create a set from the block data. At thetop it will list how many columns of data were read.

First we choose the type of set we would like. For now we'll stick withxy.

Next we choose which column of data contains the x-ordinate. If there isno column, we can select 'index' which will use the index into the column asthe x ordinate starting from one.

The values Y1 through Y4 are used for selecting error bars as may be neededby other set types.

The last thing to specify is the graph into which to load the set if wehave more than 1 set.

Finally, hitting accept will create the set.

If you close this window, it can reopened by bringing up a set list (eg.Main:Edit/Data_sets) and then selecting Create_new/From_block_data from themenu brought up by right clicking on the set list.

Try creating a new set of type XYdY. This is an XY curve with error bars.Try X, Y, and Y1(the error) from different columns.

Besides reading in data files, Grace has an extensive scripting languagewith a large number of math functions built in, These function include thebasic add, multiply, square root, etc, and also the cephes library of higherorder math functions like Bessel functions and the gamma function. Hence, functionsin Grace are basically unlimited. See the user guide for more details. In addition,users can dynamically add libraries to Grace with any desired function. Aswell, points may be added manually to a set by the use of editors. To begin,choose Main:Edit/Data sets. To create a set, press mouse button 3 (the rightmostone for right handed people) anywhere within the data set list (which may beempty) and select Create new. A menu with 4 different ways of creating newsets will be presented. We'll go through them one by one.

The load and evaluate window will pop up when this is selected.

  1. The first step is to set up the parameter mesh which will determine therange and sampling of the variable $t. Most often, $t will simplybe the abscissa.
  2. Next, choose the type of set you would like to produce.
  3. Using the syntax of the command language, an expression for x is enteredwhich uses $t as the independent variable. This can be an extremelycomplicated function.
  4. Likewise, an expression for y is entered and for any other expressionsthat may be needed. Fields after y are labelled y1, y2, y3 and y4. For example,if the set type xydxdy is chosen, y1 will hold dx and y2 will hold dy and itwill be necessary to enter expressions for them.
  5. Pressing apply or accept will perform the calculations and create the newset. You may have to autoscale to see the new set.

Below are a few samples:

  1. To plot one cycle of a sine wave: Load: Set X, Start load at: 0, Stop loadat: 2*pi, Length: 100, X=$t, Y=sin($t)
  2. A unit circle by parameterization: Start at:0, Stop at: 2*pi, Length: 100,X=cos($t), Y=sin($t)

If your system has the Xbae widget set, this choice brings up a spreadsheetlike editor to allow one to enter the points of the set by hand. Initially,it just has the point ( 0, 0 ). Clicking on add will insert a copy of the currentlyselected row immediately below the selected row. Clicking delete will deletethe row which contains the cursor. This method is best suited to examiningor modifying existing sets or creating very small sets. The sets gets updatedafter one hits enter or leaves the cell.

If your system doesn't have the Xbae widget set or you want the power ofyour favourite external editor, a text editor of your choice may be used toenter data. The editor is selected by the GRACE_EDITOR environment variable.If the set is new, it will contain only the point (0,0). During editing, noother operations are possible. After the editor is closed, the set will beupdated.

This creates a new set from a block of data which has been read in. Seesection 3.

Grace supports a large number of command line options which allow the userto control the appearance and placement of graphs. This can be very usefulif you want to use it to quickly print something without going through theGUI, use it within a script to automatically generate graphs, or have a plotcome up already configured which can be much quicker than going through theGUI menus.

Invoking Grace with the command 'grbatch'from the command line will causeGrace to start, produce a plot, send it to the printer (unless a file is specified)and then exit. In its simplest form, to produce a plot of the file a.agr, type

gracebat a.agr

If gracebat is unavailable on your system, the hardcopy option to xmgracewill do the same thing. Assuming the hardcopy device is a postscript printer,one could also type

xmgrace -hdevice PostScript -hardcopy a.agr

Xmgrace For Mac Os

Often, one wishes to plot several graphs with each graph having differentcharacteristics. This is easily accomplished from the command line. Optionsspecified on the command line are parsed in order and stay in effect untiloverridden by specifying them again.

  1. The first step in plotting multiple graphs is usually telling Grace howmany graphs we have and how to arrange them. The interpreter command 'arrange'will do this. For example, if we want 4 graphs arranged in a simple 2x2 table,we specify -pexec 'arrange ( 2, 2, .1, .1,.1,ON,ON,ON)'The exact meaning ofall the options is explained in the reference manual.
  2. Specify any global options.
  3. Specify for each graph, the data to plot and any options. Options shouldbe specified in the following order:
    1. '-graph g' where g is the graph number starting at 0. This says to applyall following options to this graph.
    2. Set any autoscaling options. Autoscaling is performed when the file isread; ergo, the autoscaling must be specified BEFORE the file is read. Remember,this setting is persistent.
    3. Set the set type. This is also a persistent setting.
    4. Specify the graph type and the input file.
    5. If reading in block data, create the sets with the '-bxy' option.
    6. Specify any world scaling. It is important to do this AFTER sets are read(unless autoscaling is off) as the graph gets rescaled when data is read in.
    7. Specify anything else

An example

Let's try an example. We will assume 5 plots, the first 4 of which areto be stacked vertically, and the fifth inset into the fourth. We wish to plotthe files a.dat, b.dat, c.dat and d.dat with the inset graph being a magnifiedportion of d.dat. Assume a.dat contains multiple columns of data, b.dat isa block of data from which we wish to make a curve from columns 2 and 4 withthe error given by column 3, c.dat is to be represented as a bar graph, andfor the inset graph, we wish to graph to region (0,0) to (1,1). This can beaccomplished by

gracebat -pexec 'arrange (4,1,.1,.1,.1,ON,ON,ON)' -nxy a.dat -graph 1 -blockb.dat -settype xydy -bxy 2:4:3 -graph 2 -settype bar c.dat -graph 3 -settypexy d.dat -graph 4 d.dat -world 0 0 1 1 -viewport .15 .3 .8 .88

Note that the graph numbers start at 0 and that 0 is the default so itdoes not have to be specified for the first graph.

Undoubtedly, you will reach a point where you want to do something forwhich no command line option exists. (We have been doing this with the arrangecommand.) This is where Grace's parameter file language is vital. The option'-pexec' will execute the next argument as if it had read it from a parameterfile or excuted on the command line. If you want to do something more complicatedthan one command, you can use several pexec's or put the commands in a fileand run the file with the '-batch' option.

Pexec example

To read in the files foo.dat and bar.dat and scale foo.dat in Y by 1000,the simplest way is

xmgrace foo.dat bar.dat -pexec 's0.y = s0.y * 1000'

Batch example

To do the same as the previous example but also label the axes and recolourthe curves, make a file called 'bfile' with the Grace commands

and then run xmgrace with

xmgrace foo.dat bar.dat -batch bfile

This tutorial will explain some of Grace's curve fitting abilities. Gracecan perform two types of fittings. The first type is regression or linear fittingwhere optimization is done on a linear equation or an equation which can beexpressed in a linear form. This includes fitting polynomials and certain formsof equations. The other type of fitting is nonlinear and allows for arbitraryuser supplied functions.

Let's take a curve and see how each type of fitting works. To begin, createa curve of the function y = sqrt(x) + exp(x)/3 -1 over the range 0 to 3 with100 points.

Choosing Main:Data/Transformations/Regression will pop up the Regressionwindow.

  1. Select the set you just created
  2. Select the type of fit. For now, pick Linear.
  3. We will load the fitted value for now.
  4. Press the accept button to see the results of the fit. A window will popup which will give you the results of the fit including the final expression.You might have to scroll back a bit to see it.
  5. See how high of a polynomial is needed to get an acceptable fit and tryfitting other types of functions. Note that for the non-polynomial fits, Aand B are the fitting parameters of the equation.
  6. Now, we are not limited to computing our fitted curve at the points ofthe original function. Suppose these data are quarterly sales and we wish topredict our next quarter. Choose the type of fit which you found to work best.Instead of loading fitted values, Load: Function. Now the bottom of the widgetwill become active. We wish to extrapolate over the next quarter, so we wouldlike to start at 0 and end at 4 and choose 100 points. Press accept to seethe extrapolation.

We pop up the widget by selecting Main:Data/Transformations/Non-linearcurve fitting. You may want to kill all the sets except the original functionand the extrapolated function at this point.

  1. Begin by selecting the set to optimize, the original function.
  2. Next, we write a function of the form we wish to fit. The unknown parametersare labelled a0.a9. You must start with a0 and work your way up. In this case,since you know the form of the equation already, so try: y = a0*sqrt(x) + a1*exp(x)+ a2.
  3. Next we must specify that we have three parameters to fit which are a0,a1 and a2 and the tolerance of the solution.
  4. You must specify initial values for the parameters and put any bounds onthem if necessary. Depending on the function you are optimizing, differentinitial conditions may lead to drastically different optima.
  5. The solution process is iterative and you must click on a button to runa certain number of iterations. You should see the parameters change and acurve created with these parameters. In this example, the exact solution isreached within 5 steps. More parameters and more difficult functions may requiremore steps in which case you may choose to run 20 or 100 or more steps. Thenewly created optimized curve should converge with an increasing number ofsteps.
  6. As in linear curve fitting, you can choose to load the fit function atthe points of the original curve, over an arbitrary range or load the errorat each point. For comparison, load the fitted curve over the range (3,4) byselecting Nonlinear:Options/Load/Function and filling in the bottom of thewidget. How does the true answer compare to your previous extrapolation?
  7. Fitting arbitrary curves can be a tricky business. Initial conditions arevery important. If you don't get a good fit, you may have to experiment a lotwith the initial parameters values.
  8. Finally, note that the fitted curve does not get added until the acceptbutton is pressed. This allows you to 'fool around' until you get a good fitwithout creating a lot of garbage sets.

Simple Geometrical

You can rotate sets around an arbitrary axis perpendicular to the canvas(e.g. the Z-axis). Also it is possible to scale sets and translate them.

Mathematical operations between sets

It is possible to perform operations between sets. With many operations,however, it is required that the 2 sets have the identical abscissa, i.e.,the x values of both sets are the exact same. This is necessary since mostoperations are performed on a point by point basis. Eg. multiplying 2 setsis done by multiplying the Y values of the 2 sets together to produce a newY value. About the only operations that don't do this are filtering and convolution.Fortunately, Grace has a function to help out when the abscissas differ. Itis called interpolation which interpolates a set over the domain of anotherset to produce a new curve.

Let us now add the cosine of a set to the sine of another set to createa new curve. However, we will complicate this example by having different domainswith different sampling:

  1. Read in 7.1.2.agr
  2. Note how the abscissa are different. We begin by using interpolate to producea third set which is the second set sampled at the x values of the first. Callup the Interpolate popup from Main:Data/Transformations/Interpolation/splines ..
  3. Select S1 as the source set but don't specify a destination set. A setwill automatically be made. Use the Strict, linear method, Sampling:Abscissasof another set and use S0 as the Sampling set. Pressing Apply should producea curve which is S1 interpolated at the points of S0. Note that the new curveonly exists over the portion of the x axis common to both curves.
  4. We still have a problem since set 2 is sampled the same as set 0 but hasa smaller domain. We can perform the computation only over the common regionso we now interpolate on set 0 at points from set 2 to produce set 3. Now set2 and set 3 have the exact same abscissas.
  5. Call up the command interpreter from Main:Window/Commands ..
  6. We need to create a set to hold the result, S4. We can either make a copy(using Main:Edit/Set_operations..) of S2 which will be guaranteed to havethe proper size to hold out result or we can use type a command: s4 lengths2.length
  7. We have to break up the computation into an x part and a y part. In thisinstance, we simply wish to keep the same x values. The final result will beput into set 4, so we issue the command: s4.x = s2.x
  8. Now we can perform the math between our interpolated copies of sets 0 and1: s4.y = cos(s3.y) + sin(s2.y).
  9. So where is the new set? It's there but it's hidden. Since we already havethe command window open, we can unhide the set by typing: S4 on. For the GUIminded (no offense intended), bring up a set list with the set operations menu(eg. Main:Edit/Data_sets or Main:Plot/Set_appearance),select set 4 and unhide it by selecting show from the operation menu (mouse button 3).

N.B. If the abscissas of the original curves had been the same, we couldhave started at step 5. If the sampling had been the same we could have skippedstep 4.

Feature extraction

Feature extraction is a way of creating one curve from a family of curves.It generates one data point from each curve by measuring a characteristic ofthe curve. For example, one might have a series of curves which plot the gnatpopulation as a function of time. Each curve is produced by varying some condition,like the number of gnus in the environment. Using feature extraction, one coulduse this family of curves to produce a new curve of the peak number of gnatsas a function of gnus or the time of the peak number of gnats as a functionof the number of gnus. This is most often useful with more than one graph.

  1. Read in graph 7.1.3.agr
  2. Bring up the feature extraction form by clicking onMain:Data/Transformations/Feature_extraction.
  3. Select Results to graph 1.
  4. Select the feature you are interested in. Choose Y maximum.
  5. Select what will determine the x value of the data point. The value ofthe characteristic determines the Y value. The X value can be determined bythe set number. The x or y values of a specified set can also be used to producethe abscissa. Finally, the legend entry of the curve itself can be used toproduce the x value. In this case, the legend entry must be specified as asingle number. Choose index for now.
  6. Press accept, click on graph 1 and then click on the autoscale button tosee your results.
  7. Choose another feature, like frequency, this time and get X values fromthe legend. Make sure that graph 0 has the focus when you hit accept.

Often we only wish to examine part of a data set or perform transformationsonly on a portion of one. Restrictions allow us to define a region of the graphon which to perform operations.

Defining a region

There are several ways a region may be defined. It may be defined by astraight line (left of, right of, above, below), by a polygon (inside or outside),or by a range ( in x, out of x, in y, out of y). Call the define region popupfrom Main:Edit/Regions/Define. Choose which one of the regions you would liketo define, and press the define button.

Line type

Define the ends of the line by clicking with mouse button1.

Polygon type

From the define region popup, choose a polygon type andthen the define button. Use mouse button 1 to pick the vertices of the polygonand then mouse button 3 when you are done.

Range type

From the define region popup, choose a range type and thenpick 2 points which define the range.

Using regions

Regions may be only be used to restrict an expression evaluation. Bringup the evaluateExpressions popup (Main:Data/Transformations/Evaluate_expression).Choose the source and destination sets and specify the formula to apply tothe region of interest. Not specifying an expression is equivalent to the identitytransformation. Choose the region you wish to use. By checking negate, thecomplement of the specified region is used.

Click on Apply to perform the operation. The resultant set will be theexpression evaluated only on points contained in the specified region. Thus,if no expression was specified, the effect is to produce a new set of onlythose 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 theintermediary step of pacing the output in a file. Instead, the executing programputs the data in one end of the pipe, and Grace reads it from the other endof the pipe.

Xmgrace For Mac Reviews

On certain popups, e.g. Main:Data/Import/ASCII, the option to read froma file or pipe can be specified. If a pipe is chosen, the command in the selectionwidget will be run and the stdout will be captured and treated as though itwas data which was read from a file.

A named pipe is a special case of the pipe previously described. In theprevious case, after the program has finished execution and the output hadbeen read, the pipe was destroyed. A named pipe is a static structure withthe property that multiple processes can write to and/or read from it. Thepurpose of using a named pipe with Grace is to start up a Grace window andthen control Grace by sending commands and data through a named pipe. Thisis very powerful and lets you do practically anything you can do directly fromthe GUI. To use this feature, try the following:

  1. Start a named pipe (you will have to find the command specific to youroperating system. For example, it could be mkfifo or mknod): mkfifo pvc. Ifyou do a directory listing, you should see the file pvc.
  2. Start up Grace in the background using the named pipe option: xmgrace -npipepvc&. Grace is now monitoring the pipe for any data which might be sentto it. It will interpret things as though they were entered using the commandinterpreter.
  3. For a simple test, we will create a simple graph over the pipe. From yourcommand line, type: echo 'read '8.2.dat' > pvc. (The back slashesare needed to escape the quotation marks so that Grace really received thecommand :read '8.2.dat'.) This just told Grace to read the file data. Now wewould like to autoscale. We could simply click on the button but the pointis to use a named pipe. This time we type echoautoscale > pvcfollowedbyecho redraw > pvc. Your graph should now have autoscaled and redrawn.Exit Grace with echoexit > pvc. You should also clean up by removing pvc.
  4. The true power in named pipes lies in driving Grace using another program.The controlling program can open a named pipe for writing, which is treatedas an ordinary file. It can be opened with the fopen() function or whateverother I/O function you prefer. Commands and data are then written to the filewhere they are interpreted by Grace.

Xmgrace For Mac Free

When multiple graphs are present, a graph is selected by clicking insidethe graph frame. In cases where graph frames overlap, clicking will cycle amongthe overlapping graphs.

It might be annoying if one is trying to work in a region of overlappinggraphs. If will not be possible to double click on something because the eachclick will be interpreted as a single click and you will only end up changingthe graph focus. In such an instance, turning off the graph selection by clickingmight be desirable. Choose Main:Edit/Preferences and then setMisc:Graph_focus to 'As set'. This means one must explicitly setthe focus. Simply bring up a graph list (eg. Main:Edit/Overlay_graphsis but one), select the graph you want to work on and then, using the menu undermouse button 3, choose 'Focus to'.

Arranging a tableau of graphs

Placing a large number of regularly spaced graphs is easily done withMain:Edit/Arrange_graphs. This will automatically calculate the layout:

  1. Choose 3 rows and 3 columns and Apply. You should now see 9 graphs. TheOrder button refers to the way the graphs are numbered. The beginning of theline on the diagram of the button shows which graph is numbered 0 and how thenumbers increase, by row or column.
  2. You realize you need horizontal packing, i.e. no horizontal gap betweengraphs. Click on the Pack button beside the Hgap/width input and then Apply.
  3. Suddenly, you realize you only need 6 graphs and not 9. Choose 2 rows andpress Apply. There is a slight problem as graphs 6, 7 an 8 are still visible.This is a feature since you don't want to accidentally kill a graph. You cankill the extra graphs by clicking on the 'Kill extra graphs' check box. Now,any graphs other than the explicitly arranged ones will be automatically killed.
  4. The margins are controlled by the Page Offsets, and the intergraph spacingby the Hgap and Vgap inputs.
  5. Press close to remove the window.
Note that only graphs which are selected are taken into consideration.So, if you wish to reorganize your existing graphs, make sure they are selectedor new ones may be created.

Arranging individual graphs

Arranging individual graphs may either be done (1) exactly, by specifyingthe viewport coordinates from Main:Plot/Graph_appearance orusing 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 twodifferent x axes and/or y axes. Choopulu kalisina subhavela maa tv serial all episodes online. For example, you may wish to have a graph whichon the x axis has the month of the year. There could be 2 curves on it, oneusing the left y axis which is number of gnus sold and one using the righty-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 anotherone in wavelength. Let's proceed with an example:data

  1. Begin by selecting Main:Edit/Overlay graphs to bring up the Overlay widget.
  2. Select the graph numbers with which we would like to deal. In this example,we will overlay graph 1 onto graph 0. At this point, only graph 0 is visible.We cannot see Graph 1 to select since it does not exist at this point. We needto create simply by pressing mouse button 3 in a graph list window and selectingcreate new.
  3. The overlay type is determined by what is common among the overlayed graphs.In our example, the x axis is common so we will select X-axes same, Y-axesdifferent. This is important because we don't want to alter any axes of theOverlay graph which we set the same as the underlay graph. In this example,we don't want to alter the x-axis of graph 1.
  4. We are now ready to label the graph axes and read the data. One thing wemust be careful to do is to always make sure that we are working on the intendedgraph. Seeing as the graphs are overlain, clicking within the frame is ambiguousas to what graph is selected. The rule is that in a region of overlay, clickingwill cycle between the graphs. Hence, if graph 1 is selecting, clicking withinthe frame will toggle to graph 0.
  5. Making sure that graph 0 is active, bring up the Axis properties widget.Now set the y axis title to Gnus.
  6. Select graph 1 as active as set the title as Gnats. Notice how it overlapsthe Gnus. We want to put this on the right side. From the axis label and bartab, select label Properties/Side=Opposite.
  7. Label the x axis to label it. If graph 1 is the current graph, noticedhow it is greyed out because only 1 x axis need be active. Select graph 0 andyou should now be able to alter the axis label.
  8. You are ready to read in data. Just make sure the graph that is activewhen you read in the data (or create your set) is the one in which you intendit to go.

Hot links are a way of of updating a set without having to delete it firstand then reread it. The Hot Links window is opened available under Main:Data/Hotlinks.

The simplest hot link is to a file containing just one set. To make a hotlink to a single set, we must first select the set we want to get updated andthen specify the file. We may also link to a pipe in which case we must specifyit is a pipe to which we are linking. A command may also be entered which willbe run every time the hot link is updated. A common command might be autoscalewhich will make sure that the entire set can be seen if it changes size. It'spossible 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 eitherset is updated. If this is the case, put your commands in a file and then usethe 'READ BATCH' command.

Xmgrace For Mac Software

Pressing the Link button will now create the link and if the update buttonis pressed, the set will be updated with the current contents of the file youlinked 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 seenthe 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 wouldlike to be able to link to all or some of those columns. To specify this, selectas many sets as there are xy columns of data in the file. The 'x y1 y2' formatis assumed. Choose the file the data and link. Now in the link list, the linkswill show the file name with an appended colon and number. The number tellswhat column of data the link refers to. Any unwanted columns may be selectedand unlinked at this point. When the update button is selected, all sets inthe graph will be updated.

Instead of having to keep the Hot links window open all the time, the updateaction is bound to alt-u. If you find that alt-u has no effect, try doubleclicking inside the graph you want to update and close the window that popsup. This will 'alert' the canvas to process future hot key strokes.





broken image