Aug-11-2021, 07:53 AM
how to plot graph without using any lib
coding help!!!
|
Aug-11-2021, 07:53 AM
how to plot graph without using any lib
Why don't you want to use a library? There's no point reinventing the wheel, when good wheels exist.
Aug-11-2021, 08:05 AM
You could perhaps give us details about the graph that you want to plot, your device and operating system and what you mean by not using any library.
Aug-11-2021, 08:23 AM
without lib means without using graph library like matplotlib
Aug-11-2021, 08:32 AM
If you can import tkinter with python, you could draw the graph in a tkinter canvas.
Aug-11-2021, 09:12 AM
Hello,
It is so much harder to plot graphs without using libraries such as matplotlib, why don't you want to use it? while dad_has_cigs == True: happiness = True if dad_has_cigs == False: print("Dad come home!") happiness = not happiness break
Aug-11-2021, 07:03 PM
You did not say what kind of graph, let me guess (always a bad idea) that you want a scatter plot.
Scale the data Choose a monospace font "Plot" stars at the data points by printing them
Aug-12-2021, 08:55 PM
I understand you probably cannot install libs, because of the firewall and so on...
But there are some other 'ways' to install the libs...
Aug-12-2021, 09:11 PM
(This post was last modified: Aug-12-2021, 09:11 PM by deanhystad.)
Bar charts are probably the easiest to do:
data = { 'Bread':11, 'Butter':16, 'Beans':5, 'Barley':2 } for category, value in data.items(): print(f'{category:<10}:', '*'*value) Anything else is much harder using ascii.You could write a fairly simple line plotter using tkinter canvas and lines. |
|