top of page

Sirr Royalty Essenti Group

Public·57 members

How to Create Stunning Graphs with Xmgrace on Your Mac


If you are looking for a powerful and versatile tool to make 2D plots of numerical data, you may want to try Xmgrace. Xmgrace is a descendant of ACE/gr, also known as Xmgr, which was originally written by Paul Turner in 1991. Since 1996, it has been developed by a team of volunteers led by Evgeny Stambulchik at the Weizmann Institute of Science in Israel. The name stands for "GRaphing, Advanced Computation and Exploration of data" or "Grace Revamps ACE/gr".

Xmgrace For Mac

Xmgrace has many features that make it suitable for scientific and engineering applications, such as:

  • WYSIWYG design with a convenient point-and-click graphical user interface

  • Precise control of graph features and true publication quality

  • Instant plot refresh and export options to various formats, such as (E)PS, PDF, MIF, SVG, PNG, PNM, and JPEG

  • Unlimited number of graphs and curves with customizable colors, styles, symbols, fill patterns, and text annotations

  • Linear and nonlinear least-squares fitting to arbitrarily complex user-defined functions, with or without constraints

  • Calculation and display of residuals, histograms, splines, interpolation, smoothing, FFT, integration, differentiation, convolution, correlation, covariation, etc.

  • Built-in programming language with variables, arrays, functions, operators, flow control, declarations, etc.

  • Interaction with other applications via pipes or hot links

  • Dynamic module loading to extend the functionality with C/Fortran/... code

  • User-defined fonts, colors, encodings, etc.

In this article, I will show you how to install and use Xmgrace on your Mac computer. I will also share some tips and tricks to help you create beautiful and informative graphs with Xmgrace.


To install Xmgrace on your Mac computer, you have two options: using Homebrew or downloading a binary package.

Using Homebrew

Homebrew is a popular package manager for Mac that allows you to easily install various software from the command line. If you don't have Homebrew installed on your Mac yet, you can follow the instructions on to install it.

Once you have Homebrew installed, you can install Xmgrace by typing the following command in your terminal:

brew install grace

This will download and install Xmgrace and its dependencies on your Mac. You can check the installation by typing:

xmgrace --version

This should display the version number of Xmgrace that you have installed.

Downloading a binary package

If you prefer not to use Homebrew or encounter any problems with it, you can also download a binary package of Xmgrace for Mac from There are two versions available: GraceGTK and QtGrace. Both are forks of the original Grace project that use different graphical toolkits (GTK+ and Qt) for the user interface. They also have some additional features and bug fixes compared to the original Grace.

To download GraceGTK or QtGrace for Mac, go to the links provided on the website and choose the version that suits your Mac OS. You will get a .dmg file that you can open and drag the Xmgrace application to your Applications folder. You can then launch Xmgrace from your Applications folder or from the Spotlight search.


Once you have installed Xmgrace on your Mac, you can start using it to plot your data. There are two ways to do this: using the graphical user interface or using the scripting language.

Using the graphical user interface

The graphical user interface of Xmgrace consists of several windows and menus that allow you to create and modify your graphs. The main window is the Drawing Area, where you can see your graphs and interact with them. The other windows are the Parameter Panel, where you can adjust various settings and options for your graphs, the Console Window, where you can see messages and errors from Xmgrace, and the Data Browser, where you can manage your data sets and files.

To plot data from a file, you can use the File menu and select Open or Import. You can also drag and drop a file onto the Drawing Area. Xmgrace supports various file formats, such as ASCII, binary, HDF5, netCDF, etc. You can also plot data from an expression by using the Data menu and selecting Formula Entry. You can enter a mathematical expression using variables, functions, operators, etc., and Xmgrace will evaluate it and plot it.

To customize the appearance of your graphs, you can use the Plot menu and select Set Appearance. This will open a dialog box where you can change various aspects of your graphs, such as titles, labels, axes, legends, colors, styles, symbols, etc. You can also use the mouse to drag and resize the graph elements or double-click on them to edit them. You can also use keyboard shortcuts to perform common actions, such as zooming, panning, autoscaling, etc.

To export your graphs, you can use the File menu and select Print or Save As. You can choose from various output formats, such as (E)PS, PDF, MIF, SVG, PNG, PNM, and JPEG. You can also specify the resolution, orientation, size, font embedding, etc., of your output file.