Difference between revisions of "Graph"

From Notes_Wiki
(Created page with "=graph= graph utility gets installed when one installs '<tt>plotutils</tt>' package. Graph can be used to draw various types of graphs that one may need. It is highly configu...")
 
m
Line 1: Line 1:
<yambe:breadcrumb self="Graph">Image processing tools|Image processing tools</yambe:breadcrumb>
=graph=
=graph=


Line 33: Line 34:
*'<tt>--input-format a</tt>' is used to indicate ASCII input format with two floating point values per line
*'<tt>--input-format a</tt>' is used to indicate ASCII input format with two floating point values per line
*'<tt>--line-mode 1</tt>' allows choosing solid line in case we do not use -C. With -C line-mode allows selection of both line-mode and line-color
*'<tt>--line-mode 1</tt>' allows choosing solid line in case we do not use -C. With -C line-mode allows selection of both line-mode and line-color
<yambe:breadcrumb self="Graph">Image processing tools|Image processing tools</yambe:breadcrumb>

Revision as of 10:52, 9 September 2018

<yambe:breadcrumb self="Graph">Image processing tools|Image processing tools</yambe:breadcrumb>

graph

graph utility gets installed when one installs 'plotutils' package. Graph can be used to draw various types of graphs that one may need. It is highly configurable and supports many different output formats. Information on how to use grapht can be obtained using 'info graph' or 'graph --help' options.

Sample input file for graph

1 1
2 2
3 30
4 4
5 5
6 60
7 7
8 8
9 90
10 10

Sample commands for drawing graph

graph -C --output-format X --x-label "X_label" --y-label "Y_label" \
    --input-format a --line-mode 1 <file1.txt>
graph -C --output-format svg --x-label "X_label" --y-label "Y_label" \
    --input-format a --line-mode 1 <file1.txt> > <file1>.svg
graph -C --output-format png --x-label "X_label" --y-label "Y_label" \
    --input-format a --line-mode 1 <file1.txt> > <file1>.png

where

  • '-C or --toggle-use-color' is for color
  • '--output-format' is used for specifying output format. Many formats including png, svg, fig, tex, etc. are supported
  • '--x-label' is to provide label for X axis
  • '--y-label' is used to provide label for Y axis
  • '--input-format a' is used to indicate ASCII input format with two floating point values per line
  • '--line-mode 1' allows choosing solid line in case we do not use -C. With -C line-mode allows selection of both line-mode and line-color


<yambe:breadcrumb self="Graph">Image processing tools|Image processing tools</yambe:breadcrumb>