plotext-plus 1.0.4__tar.gz → 1.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/.gitignore +3 -3
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/PKG-INFO +3 -4
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/README.md +2 -3
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/environments.md +2 -2
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/image.md +2 -2
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/mcp-server.md +40 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/examples/interactive_demo.py +3 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/pyproject.toml +1 -1
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_dict.py +1 -1
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_themes.py +1 -1
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/LICENSE +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/api.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/aspect.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/bar.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/basic.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/chart_classes.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/datetime.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/decorator.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/notes.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/settings.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/special.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/subplots.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/themes.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/utilities.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/docs/video.md +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/examples/advanced_features.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/examples/basic_plots.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/examples/chart_classes_demo.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/examples/theme_showcase_demo.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/__init__.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/__main__.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_api.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_build.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_core.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_date.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_default.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_doc.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_doc_utils.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_figure.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_global.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_matrix.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_monitor.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_output.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_shtab.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/_utility.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/api.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/charts.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/core.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/mcp_cli.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/mcp_server.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/plotext_cli.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/plotting.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/themes.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/utilities.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/src/plotext_plus/utils.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/tests/__init__.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/tests/test_chart_classes.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/tests/test_image_video.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/tests/test_integration.py +0 -0
- {plotext_plus-1.0.4 → plotext_plus-1.0.7}/tests/test_new_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plotext_plus
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.7
|
|
4
4
|
Summary: Modern terminal plotting library with enhanced visual features, themes, and AI integration
|
|
5
5
|
Project-URL: Homepage, https://github.com/ccmitchellusa/plotext_plus
|
|
6
6
|
Project-URL: Repository, https://github.com/ccmitchellusa/plotext_plus.git
|
|
@@ -42,12 +42,11 @@ Description-Content-Type: text/markdown
|
|
|
42
42
|
# 📊 Plotext+ - Modern Terminal Plotting
|
|
43
43
|
|
|
44
44
|
[](https://badge.fury.io/py/plotext_plus)
|
|
45
|
-
[](https://github.com/ccmitchellusa/plotext_plus/stargazers)
|
|
46
45
|
[](https://pepy.tech/project/plotext_plus)
|
|
47
46
|
[](https://github.com/ccmitchellusa/plotext_plus/issues)
|
|
48
47
|
[](https://github.com/ccmitchellusa/plotext_plus/pulls)
|
|
49
48
|
|
|
50
|
-

|
|
51
50
|
|
|
52
51
|
**Plotext+ plots directly in your terminal** with stunning visuals, modern APIs, and professional styling. Plotext+ is a redesigned version of the original [plotext](https://github.com/piccolomo/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](https://github.com/chrishayuk/mcp-cli) by Chris Hay.
|
|
53
52
|
|
|
@@ -65,7 +64,7 @@ Description-Content-Type: text/markdown
|
|
|
65
64
|
|
|
66
65
|
⚡ **Zero Dependencies**: No required dependencies (optional packages for multimedia and AI integration)
|
|
67
66
|
|
|
68
|
-

|
|
69
68
|
|
|
70
69
|
## 🚀 Quick Start
|
|
71
70
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# 📊 Plotext+ - Modern Terminal Plotting
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/py/plotext_plus)
|
|
4
|
-
[](https://github.com/ccmitchellusa/plotext_plus/stargazers)
|
|
5
4
|
[](https://pepy.tech/project/plotext_plus)
|
|
6
5
|
[](https://github.com/ccmitchellusa/plotext_plus/issues)
|
|
7
6
|
[](https://github.com/ccmitchellusa/plotext_plus/pulls)
|
|
8
7
|
|
|
9
|
-

|
|
10
9
|
|
|
11
10
|
**Plotext+ plots directly in your terminal** with stunning visuals, modern APIs, and professional styling. Plotext+ is a redesigned version of the original [plotext](https://github.com/piccolomo/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](https://github.com/chrishayuk/mcp-cli) by Chris Hay.
|
|
12
11
|
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
|
|
25
24
|
⚡ **Zero Dependencies**: No required dependencies (optional packages for multimedia and AI integration)
|
|
26
25
|
|
|
27
|
-

|
|
28
27
|
|
|
29
28
|
## 🚀 Quick Start
|
|
30
29
|
|
|
@@ -36,7 +36,7 @@ plx.from_matplotlib(fig)
|
|
|
36
36
|
plx.show()
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-

|
|
40
40
|
|
|
41
41
|
These feature is under development: please report any bug or development idea.
|
|
42
42
|
|
|
@@ -131,7 +131,7 @@ Integration with the package `tkinter`, where a test image is downloaded in the
|
|
|
131
131
|
```python
|
|
132
132
|
import tkinter as tk
|
|
133
133
|
import plotext_plus as plt
|
|
134
|
-
from
|
|
134
|
+
from plotext_plus._utility import to_rgb, uncolorize
|
|
135
135
|
import tkinter.font as tkfont
|
|
136
136
|
|
|
137
137
|
image_path = 'cat.jpg'
|
|
@@ -23,7 +23,7 @@ To plot an image use the `image_plot(path)` function.
|
|
|
23
23
|
|
|
24
24
|
- To save the result **in colors**, as an `html` page, use the function `plt.savefig()`, described [here](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/utilities.md#useful-functions).
|
|
25
25
|
|
|
26
|
-
In this example, a [test image](https://raw.githubusercontent.com/ccmitchellusa/
|
|
26
|
+
In this example, a [test image](https://raw.githubusercontent.com/ccmitchellusa/plotext_plus/refs/heads/main/data/hist.png) is downloaded in the home folder, visualized and finally removed:
|
|
27
27
|
|
|
28
28
|
```python
|
|
29
29
|
import plotext_plus as plt
|
|
@@ -41,7 +41,7 @@ or directly on terminal:
|
|
|
41
41
|
python3 -c "import plotext_plus as plt; path = 'cat.jpg'; plt.download(plt.test_image_url, path); plt.image_plot(path); plt.title('A very Cute Cat'); plt.show(); plt.delete_file(path)"
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-

|
|
45
45
|
|
|
46
46
|
More documentation can be accessed with `doc.image_plot()`.
|
|
47
47
|
|
|
@@ -30,12 +30,19 @@ pip install plotext_plus[mcp]
|
|
|
30
30
|
|
|
31
31
|
# Install all optional features
|
|
32
32
|
uv add plotext_plus[image,video,mcp]
|
|
33
|
+
|
|
34
|
+
# Install as UV tool for easy access
|
|
35
|
+
uv tool install plotext_plus
|
|
33
36
|
```
|
|
34
37
|
|
|
35
38
|
## Usage
|
|
36
39
|
|
|
37
40
|
### Starting the Server
|
|
38
41
|
|
|
42
|
+
#### Method 1: Direct Installation (Recommended)
|
|
43
|
+
|
|
44
|
+
If you've installed plotext_plus as a UV tool or globally:
|
|
45
|
+
|
|
39
46
|
```bash
|
|
40
47
|
# Start the MCP server
|
|
41
48
|
plotext-mcp
|
|
@@ -47,6 +54,23 @@ plotext-mcp --info
|
|
|
47
54
|
plotext-mcp --version
|
|
48
55
|
```
|
|
49
56
|
|
|
57
|
+
#### Method 2: Using uvx (Alternative)
|
|
58
|
+
|
|
59
|
+
If you encounter issues with direct installation, use UV tool installation:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Install plotext_plus as a UV tool
|
|
63
|
+
uv tool install plotext_plus
|
|
64
|
+
|
|
65
|
+
# Then run the MCP server directly
|
|
66
|
+
plotext-mcp
|
|
67
|
+
|
|
68
|
+
# Or use UV run for one-time execution
|
|
69
|
+
uv run plotext-mcp --info
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Note**: The uvx command `uvx --from plotext_plus plotext-mcp` doesn't work correctly because uvx tries to run the main plotext script with plotext-mcp as an argument. Use the methods above instead.
|
|
73
|
+
|
|
50
74
|
### Server Information
|
|
51
75
|
|
|
52
76
|
The `--info` command displays:
|
|
@@ -437,6 +461,22 @@ To use the plotext_plus MCP server with mcp-cli--an awesome terminal-based MCP h
|
|
|
437
461
|
}
|
|
438
462
|
```
|
|
439
463
|
|
|
464
|
+
### Alternative Configuration Using UV
|
|
465
|
+
|
|
466
|
+
If you prefer to use UV directly:
|
|
467
|
+
|
|
468
|
+
```json
|
|
469
|
+
{
|
|
470
|
+
"mcpServers": {
|
|
471
|
+
"plotext-plus": {
|
|
472
|
+
"command": "uv",
|
|
473
|
+
"args": ["run", "plotext-mcp"],
|
|
474
|
+
"env": {}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
```
|
|
479
|
+
|
|
440
480
|
## Using plotext_plus with mcp-cli for Charting
|
|
441
481
|
|
|
442
482
|
The plotext_plus MCP server provides seamless integration with mcp-cli, enabling powerful terminal-based data visualization workflows. Here's how to set up and use it effectively:
|
|
@@ -164,6 +164,9 @@ def demo_four_panel_dashboard(use_full_height=False):
|
|
|
164
164
|
# Clear any existing plot data to avoid conflicts
|
|
165
165
|
core_plt.clear_figure()
|
|
166
166
|
|
|
167
|
+
# Apply solarized theme
|
|
168
|
+
core_plt.theme('solarized_dark')
|
|
169
|
+
|
|
167
170
|
# Create 2x2 subplot grid
|
|
168
171
|
core_plt.subplots(2, 2)
|
|
169
172
|
# Calculate dynamic dimensions based on current terminal
|
|
@@ -191,7 +191,7 @@ themes['dracula'] = [(40, 42, 54), (248, 248, 242), (139, 233, 253), 'bold', seq
|
|
|
191
191
|
# Solarized Dark - popular dark theme with muted colors
|
|
192
192
|
sequence = [(42, 161, 152), (133, 153, 0), (181, 137, 0), (203, 75, 22), (211, 54, 130)] # base0, green, yellow, orange, magenta
|
|
193
193
|
sequence += [el for el in color_sequence if el not in sequence]
|
|
194
|
-
themes['solarized_dark'] = [(0, 43, 54), (
|
|
194
|
+
themes['solarized_dark'] = [(0, 43, 54), (5, 5, 5), (147, 161, 161), no_color, sequence]
|
|
195
195
|
|
|
196
196
|
# Solarized Light - light version of solarized
|
|
197
197
|
sequence = [(42, 161, 152), (133, 153, 0), (181, 137, 0), (203, 75, 22), (211, 54, 130)] # same colors as dark
|
|
@@ -140,7 +140,7 @@ def create_chuk_term_themes():
|
|
|
140
140
|
sequence = [rgb_colors['sol_cyan'], rgb_colors['sol_green'], rgb_colors['sol_yellow'],
|
|
141
141
|
rgb_colors['sol_blue'], rgb_colors['sol_magenta'], rgb_colors['sol_red']]
|
|
142
142
|
sequence += [el for el in color_sequence if el not in sequence]
|
|
143
|
-
themes['solarized_dark'] = [rgb_colors['sol_base03'],
|
|
143
|
+
themes['solarized_dark'] = [rgb_colors['sol_base03'], (5, 5, 5),
|
|
144
144
|
rgb_colors['sol_base1'], no_color, sequence]
|
|
145
145
|
|
|
146
146
|
# Solarized Light
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|