Skip to main content

Modern terminal plotting library with enhanced visual features, themes, and AI integration

Project description

๐Ÿ“Š Plotext+ - Modern Terminal Plotting

PyPi Downloads GitHubIssues GitTutorial

logo

Plotext+ plots directly in your terminal with stunning visuals, modern APIs, and professional styling. Plotext+ is a redesigned version of the original plotext library by Savino Piccolomo. New features include an updated API with object oriented features, an MCP server to make the project easily usable with AI & LLM scenarios, new themes and integration with chuk-term to make sure it works in the awesome mcp-cli by Chris Hay.

โœจ Key Features

๐ŸŽฏ Multiple Plot Types: scatter, line, bar, histogram, candlestick, heatmap, confusion matrix, pie, doughnut and more

๐ŸŽจ Rich Visuals: Banner mode, themes, colored text, automatic terminal width detection

๐Ÿ“Š Advanced Features: Subplots, datetime plots, image/GIF display, video streaming (including YouTube)

๐Ÿ”ง Modern APIs: Clean public API, object-oriented charts, quick functions, 100% backward compatible

๐Ÿค– AI Integration: MCP server for direct AI client access (Claude, etc.)

โšก Zero Dependencies: No required dependencies (optional packages for multimedia and AI integration)

subplots

๐Ÿš€ Quick Start

Installation

# Modern Python package management
uv add plotext_plus

# Traditional installation
pip install plotext_plus

# With optional dependencies
pip install plotext_plus[image,video]      # Multimedia support
pip install plotext_plus[mcp]              # AI integration (MCP server)
pip install plotext_plus[image,video,mcp]  # All features

Basic Usage

import plotext_plus as plt

# Simple scatter plot
plt.scatter([1, 2, 3, 4], [1, 4, 9, 16])
plt.title("My First Plot")
plt.show()

Enhanced Visual Styling โœจ

import plotext_plus as plt

# Enable beautiful banner mode
plt.banner_mode(True, "๐Ÿ“Š Data Analysis Dashboard")

# Apply professional themes
plt.theme('professional')

# Create styled plot
plt.plot([1, 2, 3, 4], [1, 4, 2, 3], label="Data Series")
plt.title("Enhanced Line Plot")
plt.xlabel("Time")
plt.ylabel("Values")
plt.show()

Modern Chart Classes ๐ŸŽฏ

import plotext_plus as plt

# Object-oriented chart creation with method chaining
chart = (plt.ScatterChart([1, 2, 3, 4], [1, 4, 9, 16])
         .title("Scientific Analysis")
         .xlabel("X Variable")
         .ylabel("Y Variable")
         .color('blue')
         .show())

# Quick one-liner plots
plt.quick_scatter(x_data, y_data, title="Quick Analysis")

Public API ๐Ÿ”ง

import plotext_plus as plt

# Access organized functionality
plt.plotting.bar(categories, values)      # Main plotting functions
plt.themes.apply_theme('dark_mode')       # Theme management  
plt.utilities.log_success("Plot ready!")  # Helper utilities

AI Integration ๐Ÿค–

# Install with MCP (Model Context Protocol) support  
pip install plotext_plus[mcp]

# Start the MCP server for AI clients like Claude
plotext-mcp

Use with Claude Desktop: Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "plotext-plus": {
      "command": "plotext-mcp",
      "args": [],
      "env": {}
    }
  }
}

Now AI clients can create plots directly:

"Create a scatter plot showing x=[1,2,3,4,5] vs y=[1,4,9,16,25] with title 'Quadratic Function'"

๐Ÿ—๏ธ Architecture & API

Public API Structure

# ๐ŸŽฏ Main Modules (Public API - no underscores)
plotext_plus.plotting    # Core plotting functions
plotext_plus.charts      # Object-oriented chart classes  
plotext_plus.themes      # Theme and styling system
plotext_plus.utilities   # Helper functions and tools

# ๐Ÿ“ Internal Modules (Private - with underscores)
plotext_plus._core       # Internal implementation
plotext_plus._api        # Internal API details
plotext_plus._themes     # Theme internals
# ... other internal modules

Project Structure

plotext_plus/
โ”œโ”€โ”€ src/plotext_plus/              # Modern src-layout
โ”‚   โ”œโ”€โ”€ plotting.py           # ๐ŸŽฏ Main plotting functions (PUBLIC)
โ”‚   โ”œโ”€โ”€ charts.py             # ๐ŸŽฏ Chart classes (PUBLIC)
โ”‚   โ”œโ”€โ”€ themes.py             # ๐ŸŽฏ Theme system (PUBLIC)
โ”‚   โ”œโ”€โ”€ utilities.py          # ๐ŸŽฏ Utilities (PUBLIC)
โ”‚   โ””โ”€โ”€ _*.py                 # ๐Ÿ”’ Internal modules (PRIVATE)
โ”œโ”€โ”€ examples/                 # Interactive demos
โ”‚   โ”œโ”€โ”€ interactive_demo.py   # Full interactive showcase
โ”‚   โ””โ”€โ”€ theme_showcase_demo.py # Theme comparison tool
โ”œโ”€โ”€ tests/                    # Test suites
โ”œโ”€โ”€ docs/                     # Comprehensive documentation
โ””โ”€โ”€ pyproject.toml            # Modern packaging

๐ŸŽจ Enhanced Features

๐ŸŽญ Visual Enhancements

  • Professional Banners: Automatic width detection and border styling
  • Advanced Theming: Multiple built-in themes with chuk-term integration
  • Smart Layouts: Charts automatically resize to fit terminal dimensions
  • Rich Colors: 24-bit color support with automatic fallbacks

๐Ÿš€ Developer Experience

  • Clean API: Public modules clearly separated from internals
  • Method Chaining: Fluent interface for complex plot creation
  • Quick Functions: One-liner plots for rapid prototyping
  • Type Safety: Better IDE support and autocomplete
  • Zero Breaking Changes: 100% backward compatibility guaranteed

๐Ÿงช Try It Now

# Install and run interactive demo
pip install plotext_plus
python -c "
import plotext_plus as plt
plt.banner_mode(True, '๐ŸŽจ Plotext Plus Demo')
plt.scatter([1,2,3,4], [1,4,2,3], color='blue')
plt.title('Welcome to Plotext Plus!')
plt.show()
"

# Run comprehensive demos
git clone https://github.com/ccmitchellusa/plotext_plus.git
cd plotext_plus
python examples/interactive_demo.py      # Full interactive showcase  
python examples/theme_showcase_demo.py   # Theme comparison

๐Ÿ“š Complete Documentation

๐ŸŽฏ Core Plotting

๐Ÿ–ผ๏ธ Multimedia & Advanced

โš™๏ธ Configuration & Styling

๐Ÿ› ๏ธ Tools & Integration

๐Ÿš€ Getting Started Guides

  1. ๐Ÿ‘‹ Introduction - First steps with Plotext
  2. ๐Ÿ“ฆ Installation - Setup and dependencies
  3. ๐ŸŽฏ Quick Examples - Jump right in with code samples
  4. ๐ŸŽจ Theming Guide - Make your plots beautiful
  5. ๐Ÿ”ง Modern API Guide - Use the clean public interface

๐Ÿ’ก Migration & Compatibility

For Existing Users: All your current code works unchanged! The new features are purely additive.

For New Users: Take advantage of the modern APIs and enhanced styling while learning the fundamentals.

# โœ… Your existing code still works
import plotext_plus as plt
plt.plot([1,2,3], [1,4,2])
plt.show()

# ๐Ÿ†• Enhanced with new features  
plt.banner_mode(True, "๐Ÿ“Š My Analysis")
plt.theme('professional')
plt.plot([1,2,3], [1,4,2])
plt.show()

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

plotext_plus-1.0.8.tar.gz (166.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plotext_plus-1.0.8-py3-none-any.whl (110.2 kB view details)

Uploaded Python 3

File details

Details for the file plotext_plus-1.0.8.tar.gz.

File metadata

  • Download URL: plotext_plus-1.0.8.tar.gz
  • Upload date:
  • Size: 166.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for plotext_plus-1.0.8.tar.gz
Algorithm Hash digest
SHA256 3f507bba515ec9244781a93d531d85010baf665d0019ba6e375c9eb02303fc9e
MD5 a366ace9d91a7532c173be581a2a8b11
BLAKE2b-256 391328f3caacad5c639f1fef092487cae232a9d3f19ae3a1ef4e3b03c2eec50c

See more details on using hashes here.

File details

Details for the file plotext_plus-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: plotext_plus-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 110.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for plotext_plus-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e24a6e121fdd6378cc6b2800bef1325b0f41ed503d293def8e234940fc9a9e39
MD5 e05a19c23bfd4c51dcc4de0f71b02d32
BLAKE2b-256 be8172bda8d7f635fbcf836cadf30d8ef64cdf7dff19bab7f21b1f1506d0ef91

See more details on using hashes here.

Supported by

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