![]() |
Gnuplot is a portable, free, command-driven, interactive function, and data plotting program for Linux, OS/2, MS Windows, OSX, VMS, and many other platforms. Although copyrighted, the source code is freely available. It was initially developed to enable researchers and students to interactively visualize mathematical functions and data, but it has since expanded to cover a wide range of non-interactive purposes, including web scripting. Third-party programs like Octave also use it as a plotting engine. Numerous plot types are supported by Gnuplot in both 2D and 3D. It can draw utilizing a variety of associated text as well as lines, points, boxes, contours, vector fields, and surfaces. Additionally, it supports a number of specialty plot kinds. Gnuplot provides output in a variety of file formats like eps, emf, fig, jpeg, LaTeX, pdf, png, postscript, etc. Installation:
![]()
Multiplot Command in GnuplotWhen Gnuplot is in the multiplot mode, which is initiated with the command “set multiplot,” multiple plots are displayed on the same page or window. On some terminals, the entire page is drawn when the command “unset multiplot” is used before Gnuplot returns to its default single-plot mode and shows the plot. For other terminals, every different plot command updates the display, either by simply adding the new plot to the one that already exists or by completely redoing the display while also adding the new plot. Syntax:
In some cases, no plot is displayed until the command unset multiplot is given. This command causes the entire page to be drawn and then returns the Gnuplot to its normal single-plot mode.
Example 1: Plotting of a few curves using the multiplot command.
Explanation:
Output: ![]()
Example 2: Plotting of a few trigonometric curves using the multiplot command.
Explanation: “set multiplot layout 1,2 columns ” means 1 row including 2 plots. Output: ![]()
|
Reffered: https://www.geeksforgeeks.org
Engineering Mathematics |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 18 |