https://github.com/halidodat/graph-c
Graphing tool written in c
https://github.com/halidodat/graph-c
c cli graph tool
Last synced: about 1 year ago
JSON representation
Graphing tool written in c
- Host: GitHub
- URL: https://github.com/halidodat/graph-c
- Owner: HalidOdat
- License: mit
- Created: 2020-10-12T12:04:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-12T13:24:43.000Z (over 5 years ago)
- Last Synced: 2025-02-11T12:45:25.973Z (over 1 year ago)
- Topics: c, cli, graph, tool
- Language: C
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graph-c
A graphing tool written in C.
## Build
It requires c99 and link with `math` lib.
```bash
gcc graph.c -lm -o graph
```
## Usage
Currently the only way to change the function is to change the source codes `f` function.
There are also some command line options available:
```
$ graph --help
Usage: ./graph [OPTIONS]
OPTIONS:
--no-color - Print graph without color.
--scale or -s - Scale/zoom the graph.
--height or -h - The height of the graph.
--wigth or -w - The width of the graph.
--intercept-char or -i - The intercept char on the graph, default is '@'
--help or -? - Prints this usage text.
```
## Examples
Function `f(x) = x`:

Function `f(x) = x * x`:

Function `f(x) = sin(x)`:

Function `f(x) = tan(x)`:

## TODO
- The ability to change functions dynamically. (This requires lexer, parser, ast and executor).
- The ability to change the colors of both coords and function.
- ...