Last Updated on September 10, 2022 by shibatau
I. What will you learn?
III is added.
Let me show you how to show simple a plot in Python in the terminal. We’ll use Ptpython and Plotext for that.
It reads at https://github.com/prompt-toolkit/ptpython.
Ptpython is an advanced Python REPL. It should work on all Python versions from 2.6 up to 3.9 and work cross platform (Linux, BSD, OS X and Windows).
Note: this version of ptpython requires at least Python 3.6. Install ptpython 2.0.5 for older Python versions.
Open a virtual environment or create a new environment and activate it. In my case I use anaconda on Mac and here is the command:
conda activate MYENVIRONMENT
Open ptpython with the command:
I have created histograms with the following sample data:
Refer to https://github.com/piccolomo/plotext