Graph (Unix)
| graph | |
|---|---|
| Original authors | Douglas McIlroy (AT&T Bell Laboratories) |
| Developers | Various open-source and commercial developers |
| Operating system | Unix, Unix-like |
| Platform | Cross-platform |
| Type | Command |
In Unix, graph is a command-line utility used to draw plots from tabular data.
History
The graph utility, written by Douglas McIlroy, was present in the first version of Unix, and every later version, for instance:
Its output is a sequence of commands for the plot utility, which creates plots using ASCII graphics.
This design demonstrates the Unix philosophy: defining the plot (graph) and drawing it (plot) are separate tools, so they can be recombined with other tools. For instance, plot can be substituted with a different utility, that accepts the same plot commands, but creates the plot in a graphics file format, or sends it to a plotter.
Unix v7 also provided device drivers for plotting the results to various graphics devices; [3] this was announced as now standard.[4]
The GNU plotutils package provides a free non-exact reimplementation, available for Linux and many other systems. It can create plots in various graphics formats.
Usage
In its simplest use, the graph utility takes a textfile containing pairs of numbers, indicating the points of a line plot.
It outputs the line plot. Several options can be supplied to modify its behavior.
Example (Unix)
-
Preparing example input and running graph with plot
-
The results
These screenshots demonstrate basic operation on SunOS 5.10, on which graph and plot come preinstalled. The example input is from the first example in the GNU plotutils manual.
Example (GNU plotutils)
-
Preparing example input and running graph in Tektronix mode
-
The results
These screenshots demonstrate the GNU plotutils version of graph when run in an xterm, exploiting xterm's ability to emulate a Tektronix 4010 plotter.
This demo was run on Ubuntu, which makes GNU plotutils available as an optional package; many other Linux distributions and other Unix-like systems do the same.
References
- ^ "graph". Unix v7 manual pages. Bell Labs. 1979. Retrieved Nov 24, 2018.
- ^ "graph". SunOS 5.10 manual pages. Sun Microsystems. 2005. Retrieved Nov 24, 2018.
- ^ Herrmann, Robert B., ed. (2004). Computer programs in Seismology: CALPLOT graphics (PDF). 3.30. p. vi. Retrieved Nov 24, 2018.
- ^ "7th Edition UNIX — Summary" (PDF). Murray Hill, New Jersey 07974: Bell Laboratories. September 6, 1978. p. 1. Archived from the original (PDF) on November 24, 2018. Retrieved Nov 24, 2018.
{{cite news}}: CS1 maint: location (link)
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.