-
Book Overview & Buying
-
Table Of Contents
Hands-On Machine Learning with C++ - Second Edition
By :
After clustering, we plot the results with the plotcpp library, which is a thin wrapper around the gnuplot command-line utility. With this library, we can draw points on a scatter plot or draw lines. The initial step to start plotting with this library is creating an object of the Plot class. Then, we must specify the output destination of the drawing. We can set the destination with the Plot::SetTerminal() method, which takes a string with a destination point abbreviation. For example, we can use the qt string value to show the operating system (OS) window with our drawing or we can use a string with a picture file extension to save a drawing to a file, as in the code sample that follows. We can also configure the title of the drawing, the axis labels, and some other parameters with the Plot class methods. However, it does not cover all possible configurations available for gnuplot. In cases where we need some unique options, we can use the Plot::gnuplotCommand...