How To Install libgnuplot-iostream-doc on Ubuntu 18.04

In this tutorial we learn how to install libgnuplot-iostream-doc on Ubuntu 18.04. libgnuplot-iostream-doc is C++ programming interface for gnuplot. Docs and examples

Introduction

In this tutorial we learn how to install libgnuplot-iostream-doc on Ubuntu 18.04.

What is libgnuplot-iostream-doc

libgnuplot-iostream-doc is:

This interface allows gnuplot to be controlled from C++ and is designed to be the lowest hanging fruit. In other words, if you know how gnuplot works it should only take 30 seconds to learn this library. Basically it is just an iostream pipe to gnuplot with some extra functions for pushing data arrays and getting mouse clicks. Data sources include STL containers (eg. vector or map) and one or two dimensional Blitz++ arrays (of scalars or TinyVectors). Support for other data sources should be easy to add.

Basically there are two functions defined: send() sends arrays of data values (it is overloaded to do the right thing based upon what type of variable you pass) and getMouse() gets the position of a mouse click. Everything else is accomplished by sending commands manually to gnuplot via the iostream

There are three methods to install libgnuplot-iostream-doc on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libgnuplot-iostream-doc Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libgnuplot-iostream-doc using apt-get by running the following command:

sudo apt-get -y install libgnuplot-iostream-doc

Install libgnuplot-iostream-doc Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libgnuplot-iostream-doc using apt by running the following command:

sudo apt -y install libgnuplot-iostream-doc

Install libgnuplot-iostream-doc Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libgnuplot-iostream-doc using aptitude by running the following command:

sudo aptitude -y install libgnuplot-iostream-doc

How To Uninstall libgnuplot-iostream-doc on Ubuntu 18.04

To uninstall only the libgnuplot-iostream-doc package we can use the following command:

sudo apt-get remove libgnuplot-iostream-doc

Uninstall libgnuplot-iostream-doc And Its Dependencies

To uninstall libgnuplot-iostream-doc and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libgnuplot-iostream-doc

Remove libgnuplot-iostream-doc Configurations and Data

To remove libgnuplot-iostream-doc configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libgnuplot-iostream-doc

Remove libgnuplot-iostream-doc configuration, data, and all of its dependencies

We can use the following command to remove libgnuplot-iostream-doc configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libgnuplot-iostream-doc

References

Summary

In this tutorial we learn how to install libgnuplot-iostream-doc package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.