Environment Variables¶
GR and GKS can be configured using a number of environment variables. The following table lists these environment variables and their effects. For information on how to set an environment variable, see the sections below.
Variable |
Description |
---|---|
|
Path to the GR installation directory Example: |
|
Path to the GR library directory Example: |
|
Path to the GKS fonts directory Example: |
|
Path to the file GKS should write its output to Example: |
|
File descriptor GKS should write its output to Example: |
|
Default workstation type Example: See also: Workstation Types |
|
Input encoding used for GKS functions Example: See also: Encoding Support |
|
Only draw when |
|
Use the gsplugin for BMP output instead of the cairoplugin See also: File Formats |
|
Use the gsplugin for JPEG output instead of the cairoplugin See also: File Formats |
|
Use the aggplugin for JPEG output instead of the cairoplugin See also: File Formats |
|
Use the gsplugin for PNG output instead of the cairoplugin See also: File Formats |
|
Use the aggplugin for PNG output instead of the cairoplugin See also: File Formats |
|
Use the gsplugin for Tiff output instead of the cairoplugin See also: File Formats |
|
Use the cairoplugin for rendering in the qtplugin and gksqt See also: Integrations |
|
Use the aggplugin for rendering in the qtplugin and gksqt See also: Integrations |
|
Do not write a full TeX document, instead write only definitions and TikZ picture |
|
Render images using filled rectangles to workaround a problem with Apple’s Preview app, which generally uses bilinear interpolation when rendering images, resulting in blurred output, e.g. when displaying heatmaps |
|
Resolution and framerate when using the videoplugin Example: See also: Configuring Video Output Options |
|
Prevent automated resizing in gksqt |
|
Qt version to use in the qtplugin Example: |
|
Do not set an exit handler |
|
Do not add a page suffix to the file name when writing more
than once to a file which does not natively support pagination.
|
|
The default method for resampling image data in raster based
workstation types. Can be
nearest , linear or lanczos .Example: |
|
Skip runtime version checks in the gr Python package |
Setting Environment Variables on macOS or Linux¶
To set an environment variable in a shell on macOS or Linux, you can use:
export VARIABLE_NAME=value
Alternatively, for running a single command with the variable set, you can also use:
VARIABLE_NAME=value command
Setting Environment Variables on Windows¶
To set an environment variable in cmd.exe on Windows, you can use:
set VARIABLE_NAME=value
Setting Environment Variables in Programs¶
Many programming languages offer ways to set environment variables as well:
import os
os.environ["VARIABLE_NAME"] = "value"
#include <stdlib.h>
/* ... */
setenv("VARIABLE_NAME", "value", 1);
ENV["VARIABLE_NAME"] = "value"