Modern terminal plotting library with enhanced visual features, themes, and AI integration
Project description
๐ Plotext+ - Modern Terminal Plotting
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)
๐ 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
- ๐ Basic Plots - Scatter, line, and fundamental plotting
- ๐ Bar Charts - Bar plots, histograms, and variations
- ๐ DateTime Plots - Time series and candlestick charts
- ๐ฌ Special Plots - Heatmaps, confusion matrices, error bars
- ๐จ Decorator Plots - Text, lines, and shape overlays
๐ผ๏ธ Multimedia & Advanced
- ๐ผ๏ธ Image Plotting - Display images and GIFs in terminal
- ๐ฌ Video Streaming - Play videos and YouTube content
- ๐ Subplots - Multiple plots and complex layouts
โ๏ธ Configuration & Styling
- ๐จ Themes - Built-in themes and customization
- โ๏ธ Settings - Plot configuration and options
- ๐ Aspect - Size, scaling, and layout control
- ๐ง Chart Classes - Object-oriented API reference
๐ ๏ธ Tools & Integration
- ๐ง Utilities - Helper functions and command-line tools
- ๐ค MCP Server - AI integration via Model Context Protocol
- ๐ Environments - IDE and platform compatibility
- ๐๏ธ API Structure - Clean public API organization
- ๐ Notes - Installation, tips, and troubleshooting
๐ Getting Started Guides
- ๐ Introduction - First steps with Plotext
- ๐ฆ Installation - Setup and dependencies
- ๐ฏ Quick Examples - Jump right in with code samples
- ๐จ Theming Guide - Make your plots beautiful
- ๐ง 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()
๐ ๏ธ Development & Build System
Plotext+ includes a comprehensive build system with modern tooling. See Build Documentation for complete setup, testing, publishing, and deployment instructions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plotext_plus-1.0.10.tar.gz.
File metadata
- Download URL: plotext_plus-1.0.10.tar.gz
- Upload date:
- Size: 177.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07448d816fe68ec24de258309968924f078b5501b310937f6091d15ec08c3b67
|
|
| MD5 |
a35ef9df4e41360d9abc252fc18b8045
|
|
| BLAKE2b-256 |
1c1d73ff059b23cb7dc7d6dab945f247dd300a3a0b6fa69d994925f55a42d958
|
File details
Details for the file plotext_plus-1.0.10-py3-none-any.whl.
File metadata
- Download URL: plotext_plus-1.0.10-py3-none-any.whl
- Upload date:
- Size: 119.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3f367898c8db8e42de7068ec39a96ec154b18944d6725cb647a5977fac01212
|
|
| MD5 |
62702ae379c936f4e5fa8c57399c9c8e
|
|
| BLAKE2b-256 |
c75518deccc9826d129ff210991e396835b9a374054731918ddc78b83fab5042
|