eqn2graph - Linux
Overview
eqn2graph is a powerful tool that converts mathematical equations in a TeX-like syntax into graphical images. It is commonly used to create high-quality graphics for presentations, reports, and research papers.
Syntax
eqn2graph [options] equation [equation ...]
Options/Flags
| Option | Description | Default |
|—|—|—|
| -T <format>
| Output image format (e.g., PNG, PDF, SVG) | PNG |
| -o <file>
| Output filename | stdout |
| -s <size>
| Output size in pixels | 600 |
| -l <label>
| Override equation label | None |
| -b
| Use bold font | False |
| -i
| Invert colors | False |
| -v
| Verbose output | False |
Examples
Simple usage:
eqn2graph 'y = x^2'
Custom output format and size:
eqn2graph -T PDF -s 1200 'y = sin(x)'
Multiple equations with labels:
eqn2graph -l "Equation 1" 'y = x^3' -l "Equation 2" 'y = 2x'
Common Issues
- Blank output: Ensure that the equation syntax is correct.
- Grainy images: Increase the output size using the
-s
option. - Misaligned labels: Specify labels using the
-l
option.
Integration
With LaTeX:
\begin{equation}
y = x^2
\end{equation}
\includegraphics[width=\linewidth]{eqn2graph.png}
With Markdown:
$$y = x^2$$

Related Commands
- tex: Typesetting tool
- pstricks: Extension for drawing in TeX
- gnuplot: Interactive plotting tool