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 -
Added in version 3.3.
Boolean indicating whether (the requested version of) Gnuplot was found.
-
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
gnuplotexecutable.
Deprecated Variables
The following variables are provided for backward compatibility:
-
GNUPLOT_FOUND -
Deprecated since version 4.2: Use
Gnuplot_FOUND, which has the same value.Boolean indicating whether (the requested version of) Gnuplot was found.
-
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()
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/module/FindGnuplot.html