Skip to main content

Create text-based graphs

Project description

tplot

tplot is a Python module for creating text-based graphs. Useful for visualizing data to the terminal or log files.

Features

  • Scatter, line, horizontal/vertical bar, and image plotting
  • Supports numerical and categorical data
  • Legend
  • Automatic detection of unicode support with ascii fallback
  • Colors using ANSI escape characters (Windows supported)
  • Few dependencies
  • Lightweight

Installation

tplot is available on PyPi:

pip install tplot

Basic usage

import tplot
fig = tplot.Figure()
fig.scatter([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
fig.show()

Prints:

10┤                                                                            •
  │                                                                             
  │                                                                    •        
  │                                                                             
 8┤                                                             •               
  │                                                                             
  │                                                     •                       
  │                                                                             
 6┤                                              •                              
  │                                                                             
  │                                      •                                      
  │                                                                             
 4┤                              •                                              
  │                                                                             
  │                       •                                                     
  │                                                                             
 2┤               •                                                             
  │                                                                             
  │        •                                                                    
  │                                                                             
 0┤•                                                                            
   ┬───────┬──────┬───────┬──────┬───────┬───────┬──────┬───────┬──────┬───────┬
   0       1      2       3      4       5       6      7       8      9      10

Documentation

Full API reference is available on readthedocs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tplot-0.1.0.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

tplot-0.1.0-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page