Here we won't speak about really mighty features like defining own rules or object types; they are described elsewhere. Instead we'll start with tiny, easy to use tools of fine-tuning.

You can tune many aspects of polymake behavior by changing values of numerous variables which are dedicated for keeping user-visible settings. These variables can be grouped by their purpose into the following categories:

  1. General appearance steering, like verbosity levels for various kinds of events, shell input history size or editor, as well as global lookup paths for extensions and user scripts. These variables are defined in the packages Polymake::User and Polymake::User::Verbose.

  1. Customizing visualization tasks, for example, adjusting font sizes, styles or colors. The allowed values are in general highly specific to the graphic processors, however, for colors you can everywhere use symbolic names recognized on your system. Such variables usually have some decent default values defined in the rule files.

  1. Configurable locations and options for running third-party software. Usually they are set automatically by an automatic configuration routine executed during the first use of the corresponding rule file. Sometimes the automatics can fail because of, for example, a non-standard installation, then you have the possibility to aid it with manual input.

Variables with non-default and automatically configured values are persisted in your personal settings file ~/.polymake/settings. It's not recommended to edit this file manually, because corrupting it might make polymake unable to start altogether. Instead, please use appropriate polymake shell commands:

set_custom $name=value;
set_custom @name=(value, ...);
set_custom %name=(key => value, ...);
set_custom $name{key}=value;

set a new persistent value of a scalar, an array, a hash map, or a single value therein

reset_custom $name;
reset_custom @name;
reset_custom %name;
reset_custom $name{key};

restore the default value

local $name=value; etc.

change the value temporarily for the duration of the current shell input evaluation

reconfigure "rulefile";

re-run the configuration routine in the specified rulefile where you'll be able to revise and edit calculated values

An overview of all available custom variables can be obtained by executing help "custom"; or using TAB completion for set_custom command.

Configuring applications

There are two custom variables related to applications. The list @start_applications contains names of all applications to be loaded at the very beginning of the interactive session (although the process of loading applications is totally transparent to you, having loaded your favorites in advance avoids annoying delays during the session). The variable $default_application names the application to be made current at the beginning of the session. Until you change this, it will be polytope for its undisputed merits as the oldest and most prominent application in polymake.

Preferences are lists of choice of different tools capable of performing the same task. When polymake can't make a choice based on objective criteria, it consults the preference lists and takes the tool listed as first. For example, there are several ways to visualize a 3-d polytope: jreality, threejs, povray, etc. Another example is the convex hull computation for which up to five different algorithms (depending on the coordinate type) come into consideration. The sensible choice between them can't be made based on some quantitative estimates; instead, your intuition and, sometimes, personal taste must take over the leadership.

Preference lists are persisted in your personal settings file ~/.polymake/settings alongside with the custom variables. They can be manipulated using the following polymake shell commands:

prefer "label";

Declare some tool to be the preferred one for any tasks it may perform. For example, saying prefer "jreality"; instructs polymake to call jReality to display any kind of 2-d, 3-d, and 4-d drawings related to polytopes, as well as graphs visualized with spring embedding model. You can specify your wishes more precisely, though: saying prefer "graphviz.graph"; makes the neato program from the graphviz package the default tool for visualizing graphs, letting jReality be responsible for all the rest.

prefer "*.task label1, label2 ...";

Establish a specific order of preferred tools for special task. For example, a command prefer "*.convex_hull cdd, lrs, beneath_beyond"; directs polymake to always try the cdd convex hull computation first; if it fails, the lrs algorithm will be applied; if both fail, then beneath_beyond, and as the last resort anything else without specific order.

reset_preference "label";

Restore the preference lists containing the specified label to the pristine state, as it appears in the rule files. It accepts a tool name or a wildcard expression as its argument and restores the effect of any matching prefer command encountered in the rule files. The most radical form reset_preference "*"; forgets any preferences you've ever changed and restores the “factory settings”.

prefer_now "labels";

Does the same as prefer, but restores the previous setting as soon as the current input is completely evaluated. No persistent changes are made. This command can be seen as the local modification of prefer (standard perl does not allow to apply local to anything but variable assignments).


Display all active preference lists in the current application. If you want to find out all tools involved into the preference mechanics, including inactive ones, use the TAB completion in prefer command or browse the help system starting at the topic '/preferences' .

Remark: the location of the personal setting file can be changed from its default value ~/.polymake by setting an environment variable POLYMAKE_USER_DIR=/other/location, or overridden temporarily just for one session with a command-line option --config-path.

  • user_guide/howto/shell_custom.txt
  • Last modified: 2021/01/12 14:34
  • by