Developed by Harsh-singh586 2021
import pygraph
g1 = pygraph.graph(name , x-xis)
g1.adddata(graph_type , lebel, y-axis, background_color)
g1.adddata(graph_type , lebel, y-axis, background_color)
pygraph.show([g1])
Example Single Graph
import pygraph
# Choose One
g1 = pygraph.graph('first', ['firstval', 'secval'])
g1.adddata('bar', 'test', [4, 3], ['yellow', 'green'])
pygraph.show([g1])
Example Muptiple Graph
import pygraph
# Choose One
g1 = pygraph.graph('first', ['firstval', 'secval'])
g1.adddata('bar', 'test', [4, 3], ['yellow', 'green'])
g2 = pygraph.graph('second', ['firstval', 'secval'])
g2.adddata('bar', 'test', [8, 7], ['yellow', 'green'])
pygraph.show([g1, g2])
Example Mixed Graph
import pygraph
# Choose One
g1 = pygraph.graph('first', ['firstval', 'secval'])
g1.adddata('bar', 'test', [4, 3], ['yellow', 'green'])
g1.adddata('line', 'test', [8, 7], ['red', 'blue'])
pygraph.show([g1])
You can see your graph on http://localhost:8080
NOTE:
- No two graph name can be same
- Number of values on y-axis must be same as x-axis
- Graphs Available
- 'bar'
- 'line'
- 'polar'
- 'doughnut'
- 'pie'
Check out: https://github.com/Harsh-singh586/pygraph