How to Create a Function Library

Create a function library for mathematical expressions and functions that you regularly use. You can even export lists of functions from your library to share with other DataGraph users.

View the function library under DataGraph > Settings.

Note that by default, the function library is empty. This is a place for you to store a list of expressions or other built-in functions you use frequently. For a list of functions included in DataGraph see the Function Reference.

Function Library Demo

This version of the function library was added in DataGraph 5.0. Watch the following video to see a demonstration. This was part of a longer webinar on DataGraph 5.0 edits related to functions. The link will bring you to 20:18 New Function Library.

Add Functions

By default, the function library will be empty. Functions can be added from the Preferences panel (DataGraph > Settings).

Click the Function button. This adds a line where the function name is set to ‘f’ and the function is set to ‘x’.

Enter the name of your function and the expression as shown.

You can also add from a column, variable, function, or fit command, after entering a function in either of these. For example, here a function has been entered into the Fit command.

Clicking the gear menu to the right of the Function form entry box to show the entries in the Function library. Here the only entry is the function we added above called, Gaussian.

Select Add to Library to add ‘a/(1+exp(-(x-x0)/b))’.

Now when you create a new Fit command, the expression for this function will be listed when you click the same gear menu. To give the function a name, open the Preferences panel.

Access the Library

Use the library to automatically enter a function into an Expression column or Expression variable. The library is also available from the Fit command and Function command.

For example, on the Expression variable, click the gear menu to the right of the column name entry box. The first item is the Function library. Hover your cursor over a named function and a pop-up will reveal the function to the right of the name.

If you select a function that contains variables that are not defined, the column will show the missing variables.

Remove Function

To remove a function from the library, open the Preferences panel (DataGraph > Settings). Find the function you want to remove. Select that line and hit the Delete key.


Use the Group button in the Preferences Panel to add a group. Click to the left of the group name to open the group. Click and drag functions up and down to move in and out of a group.

Double-click the name to edit.


The function lists can be exported into a file called *.dgfunctions. This file can then be shared with other users and imported into their function library.

Click the gear menu in the top right corner and select Export Selection ...

Use the Finder to name the file. The same gear menu is used to import lists of functions.

On This Page