FindGnuplot

Finds the Gnuplot command-line graphing utility for generating two- and three-dimensional plots (gnuplot):

find_package(Gnuplot [<version>] [...])

Result Variables

This module defines the following variables:

Gnuplot_FOUND

Boolean indicating whether (the requested version of) Gnuplot has been found. For backward compatibility, the GNUPLOT_FOUND variable is also set to the same value.

Gnuplot_VERSION

Added in version 4.2.

The version of Gnuplot found.

Note

Version detection is available only for Gnuplot 4 and later. Earlier versions did not provide version output.

Cache Variables

The following cache variables may also be set:

GNUPLOT_EXECUTABLE

Absolute path to the gnuplot executable.

Deprecated Variables

The following variables are provided for backward compatibility:

GNUPLOT_VERSION_STRING

Deprecated since version 4.2: Superseded by the Gnuplot_VERSION.

The version of Gnuplot found.

Examples

Finding Gnuplot and executing it in a process:

find_package(Gnuplot)
if(Gnuplot_FOUND)
  execute_process(COMMAND ${GNUPLOT_EXECUTABLE} --help)
endif()