plotext-plus 1.0.9__tar.gz → 1.0.11__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.9 → plotext_plus-1.0.11}/PKG-INFO +32 -27
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/README.md +29 -25
- plotext_plus-1.0.11/docs/build.md +160 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/mcp-server.md +5 -5
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/notes.md +2 -2
- plotext_plus-1.0.11/examples/advanced_features.py +175 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/examples/basic_plots.py +59 -45
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/examples/chart_classes_demo.py +115 -94
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/examples/interactive_demo.py +462 -329
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/examples/theme_showcase_demo.py +152 -106
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/pyproject.toml +13 -2
- plotext_plus-1.0.11/src/plotext_plus/__init__.py +36 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/__main__.py +1 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/_api.py +632 -371
- plotext_plus-1.0.11/src/plotext_plus/_build.py +886 -0
- plotext_plus-1.0.11/src/plotext_plus/_core.py +1047 -0
- plotext_plus-1.0.11/src/plotext_plus/_date.py +78 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/_default.py +35 -28
- plotext_plus-1.0.11/src/plotext_plus/_dict.py +914 -0
- plotext_plus-1.0.11/src/plotext_plus/_doc.py +1278 -0
- plotext_plus-1.0.11/src/plotext_plus/_doc_utils.py +325 -0
- plotext_plus-1.0.11/src/plotext_plus/_figure.py +1483 -0
- plotext_plus-1.0.11/src/plotext_plus/_global.py +468 -0
- plotext_plus-1.0.11/src/plotext_plus/_matrix.py +325 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/_monitor.py +1036 -489
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/_output.py +29 -23
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/_shtab.py +2 -0
- plotext_plus-1.0.11/src/plotext_plus/_themes.py +460 -0
- plotext_plus-1.0.11/src/plotext_plus/_utility.py +1121 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/api.py +418 -332
- plotext_plus-1.0.11/src/plotext_plus/charts.py +65 -0
- plotext_plus-1.0.11/src/plotext_plus/core.py +974 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/mcp_cli.py +15 -13
- plotext_plus-1.0.11/src/plotext_plus/mcp_server.py +1487 -0
- plotext_plus-1.0.11/src/plotext_plus/plotext_cli.py +521 -0
- plotext_plus-1.0.11/src/plotext_plus/plotting.py +108 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/src/plotext_plus/themes.py +10 -13
- plotext_plus-1.0.11/src/plotext_plus/utilities.py +52 -0
- plotext_plus-1.0.11/src/plotext_plus/utils.py +470 -0
- plotext_plus-1.0.11/tests/__init__.py +1 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_aspect_ratio.py +16 -13
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_chart_classes.py +108 -63
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_doughnut_simple.py +80 -53
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_final_pie.py +25 -18
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_image_video.py +50 -42
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_integration.py +21 -16
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_legend_colors.py +19 -16
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_new_api.py +82 -64
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_pie_chart.py +11 -8
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_pie_fill.py +20 -17
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_pie_gaps.py +25 -20
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/tests/test_pie_slices.py +17 -9
- plotext_plus-1.0.9/examples/advanced_features.py +0 -153
- plotext_plus-1.0.9/src/plotext_plus/__init__.py +0 -31
- plotext_plus-1.0.9/src/plotext_plus/_build.py +0 -270
- plotext_plus-1.0.9/src/plotext_plus/_core.py +0 -602
- plotext_plus-1.0.9/src/plotext_plus/_date.py +0 -60
- plotext_plus-1.0.9/src/plotext_plus/_dict.py +0 -210
- plotext_plus-1.0.9/src/plotext_plus/_doc.py +0 -707
- plotext_plus-1.0.9/src/plotext_plus/_doc_utils.py +0 -291
- plotext_plus-1.0.9/src/plotext_plus/_figure.py +0 -491
- plotext_plus-1.0.9/src/plotext_plus/_global.py +0 -370
- plotext_plus-1.0.9/src/plotext_plus/_matrix.py +0 -171
- plotext_plus-1.0.9/src/plotext_plus/_themes.py +0 -344
- plotext_plus-1.0.9/src/plotext_plus/_utility.py +0 -853
- plotext_plus-1.0.9/src/plotext_plus/charts.py +0 -42
- plotext_plus-1.0.9/src/plotext_plus/core.py +0 -581
- plotext_plus-1.0.9/src/plotext_plus/mcp_server.py +0 -1006
- plotext_plus-1.0.9/src/plotext_plus/plotext_cli.py +0 -382
- plotext_plus-1.0.9/src/plotext_plus/plotting.py +0 -92
- plotext_plus-1.0.9/src/plotext_plus/utilities.py +0 -52
- plotext_plus-1.0.9/src/plotext_plus/utils.py +0 -370
- plotext_plus-1.0.9/tests/__init__.py +0 -1
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/.gitignore +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/LICENSE +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/api.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/aspect.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/bar.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/basic.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/chart_classes.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/datetime.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/decorator.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/environments.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/image.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/settings.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/special.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/subplots.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/themes.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/utilities.md +0 -0
- {plotext_plus-1.0.9 → plotext_plus-1.0.11}/docs/video.md +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.11
|
|
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
|
|
@@ -23,6 +23,7 @@ Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
|
23
23
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
24
|
Classifier: Topic :: Terminals
|
|
25
25
|
Requires-Python: >=3.11
|
|
26
|
+
Requires-Dist: chuk-mcp-server>=0.3.5
|
|
26
27
|
Requires-Dist: chuk-term>=0.1.0
|
|
27
28
|
Requires-Dist: shtab>=1.7.2
|
|
28
29
|
Provides-Extra: completion
|
|
@@ -30,7 +31,7 @@ Requires-Dist: shtab; extra == 'completion'
|
|
|
30
31
|
Provides-Extra: image
|
|
31
32
|
Requires-Dist: pillow>=8.4; extra == 'image'
|
|
32
33
|
Provides-Extra: mcp
|
|
33
|
-
Requires-Dist: chuk-mcp-server>=0.
|
|
34
|
+
Requires-Dist: chuk-mcp-server>=0.3.5; extra == 'mcp'
|
|
34
35
|
Provides-Extra: video
|
|
35
36
|
Requires-Dist: ffpyplayer>=4.3.5; extra == 'video'
|
|
36
37
|
Requires-Dist: opencv-python>=4.5.5; extra == 'video'
|
|
@@ -52,15 +53,15 @@ Description-Content-Type: text/markdown
|
|
|
52
53
|
|
|
53
54
|
## ✨ Key Features
|
|
54
55
|
|
|
55
|
-
🎯 **Multiple Plot Types**: [scatter](docs/basic.md#scatter-plot), [line](docs/basic.md#line-plot), [bar](docs/bar.md), [histogram](docs/bar.md#histogram-plot), [candlestick](docs/datetime.md#candlestick-plot), [heatmap](docs/special.md), [confusion matrix](docs/special.md#confusion-matrix), [pie](docs/basic.md#pie-plot), [doughnut](docs/basic.md#doughnut-charts) and more
|
|
56
|
+
🎯 **Multiple Plot Types**: [scatter](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#scatter-plot), [line](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#line-plot), [bar](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/bar.md), [histogram](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/bar.md#histogram-plot), [candlestick](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/datetime.md#candlestick-plot), [heatmap](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/special.md), [confusion matrix](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/special.md#confusion-matrix), [pie](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#pie-plot), [doughnut](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#doughnut-charts) and more
|
|
56
57
|
|
|
57
|
-
🎨 **Rich Visuals**: [Banner mode](docs/chart_classes.md), [themes](docs/themes.md), [colored text](docs/utilities.md#colored-text), automatic terminal width detection
|
|
58
|
+
🎨 **Rich Visuals**: [Banner mode](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/chart_classes.md), [themes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/themes.md), [colored text](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/utilities.md#colored-text), automatic terminal width detection
|
|
58
59
|
|
|
59
|
-
📊 **Advanced Features**: [Subplots](docs/subplots.md), [datetime plots](docs/datetime.md), [image/GIF display](docs/image.md), [video streaming](docs/video.md) (including YouTube)
|
|
60
|
+
📊 **Advanced Features**: [Subplots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/subplots.md), [datetime plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/datetime.md), [image/GIF display](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/image.md), [video streaming](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/video.md) (including YouTube)
|
|
60
61
|
|
|
61
62
|
🔧 **Modern APIs**: Clean public API, object-oriented charts, quick functions, 100% backward compatible
|
|
62
63
|
|
|
63
|
-
🤖 **AI Integration**: [MCP server](docs/mcp-server.md) for direct AI client access (Claude, etc.)
|
|
64
|
+
🤖 **AI Integration**: [MCP server](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/mcp-server.md) for direct AI client access (Claude, etc.)
|
|
64
65
|
|
|
65
66
|
⚡ **Zero Dependencies**: No required dependencies (optional packages for multimedia and AI integration)
|
|
66
67
|
|
|
@@ -248,40 +249,40 @@ python examples/theme_showcase_demo.py # Theme comparison
|
|
|
248
249
|
|
|
249
250
|
### 🎯 **Core Plotting**
|
|
250
251
|
|
|
251
|
-
- **[📊 Basic Plots](docs/basic.md)** - Scatter, line, and fundamental plotting
|
|
252
|
-
- **[📈 Bar Charts](docs/bar.md)** - Bar plots, histograms, and variations
|
|
253
|
-
- **[📅 DateTime Plots](docs/datetime.md)** - Time series and candlestick charts
|
|
254
|
-
- **[🔬 Special Plots](docs/special.md)** - Heatmaps, confusion matrices, error bars
|
|
255
|
-
- **[🎨 Decorator Plots](docs/decorator.md)** - Text, lines, and shape overlays
|
|
252
|
+
- **[📊 Basic Plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md)** - Scatter, line, and fundamental plotting
|
|
253
|
+
- **[📈 Bar Charts](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/bar.md)** - Bar plots, histograms, and variations
|
|
254
|
+
- **[📅 DateTime Plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/datetime.md)** - Time series and candlestick charts
|
|
255
|
+
- **[🔬 Special Plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/special.md)** - Heatmaps, confusion matrices, error bars
|
|
256
|
+
- **[🎨 Decorator Plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/decorator.md)** - Text, lines, and shape overlays
|
|
256
257
|
|
|
257
258
|
### 🖼️ **Multimedia & Advanced**
|
|
258
259
|
|
|
259
|
-
- **[🖼️ Image Plotting](docs/image.md)** - Display images and GIFs in terminal
|
|
260
|
-
- **[🎬 Video Streaming](docs/video.md)** - Play videos and YouTube content
|
|
261
|
-
- **[📐 Subplots](docs/subplots.md)** - Multiple plots and complex layouts
|
|
260
|
+
- **[🖼️ Image Plotting](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/image.md)** - Display images and GIFs in terminal
|
|
261
|
+
- **[🎬 Video Streaming](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/video.md)** - Play videos and YouTube content
|
|
262
|
+
- **[📐 Subplots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/subplots.md)** - Multiple plots and complex layouts
|
|
262
263
|
|
|
263
264
|
### ⚙️ **Configuration & Styling**
|
|
264
265
|
|
|
265
|
-
- **[🎨 Themes](docs/themes.md)** - Built-in themes and customization
|
|
266
|
-
- **[⚙️ Settings](docs/settings.md)** - Plot configuration and options
|
|
267
|
-
- **[📏 Aspect](docs/aspect.md)** - Size, scaling, and layout control
|
|
268
|
-
- **[🔧 Chart Classes](docs/chart_classes.md)** - Object-oriented API reference
|
|
266
|
+
- **[🎨 Themes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/themes.md)** - Built-in themes and customization
|
|
267
|
+
- **[⚙️ Settings](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/settings.md)** - Plot configuration and options
|
|
268
|
+
- **[📏 Aspect](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/aspect.md)** - Size, scaling, and layout control
|
|
269
|
+
- **[🔧 Chart Classes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/chart_classes.md)** - Object-oriented API reference
|
|
269
270
|
|
|
270
271
|
### 🛠️ **Tools & Integration**
|
|
271
272
|
|
|
272
|
-
- **[🔧 Utilities](docs/utilities.md)** - Helper functions and command-line tools
|
|
273
|
-
- **[🤖 MCP Server](docs/mcp-server.md)** - AI integration via Model Context Protocol
|
|
274
|
-
- **[🌐 Environments](docs/environments.md)** - IDE and platform compatibility
|
|
275
|
-
- **[🏗️ API Structure](docs/api.md)** - Clean public API organization
|
|
276
|
-
- **[📝 Notes](docs/notes.md)** - Installation, tips, and troubleshooting
|
|
273
|
+
- **[🔧 Utilities](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/utilities.md)** - Helper functions and command-line tools
|
|
274
|
+
- **[🤖 MCP Server](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/mcp-server.md)** - AI integration via Model Context Protocol
|
|
275
|
+
- **[🌐 Environments](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/environments.md)** - IDE and platform compatibility
|
|
276
|
+
- **[🏗️ API Structure](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/api.md)** - Clean public API organization
|
|
277
|
+
- **[📝 Notes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/notes.md)** - Installation, tips, and troubleshooting
|
|
277
278
|
|
|
278
279
|
### 🚀 **Getting Started Guides**
|
|
279
280
|
|
|
280
|
-
1. **[👋 Introduction](docs/basic.md#introduction)** - First steps with Plotext
|
|
281
|
-
2. **[📦 Installation](docs/notes.md#install)** - Setup and dependencies
|
|
281
|
+
1. **[👋 Introduction](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#introduction)** - First steps with Plotext
|
|
282
|
+
2. **[📦 Installation](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/notes.md#install)** - Setup and dependencies
|
|
282
283
|
3. **[🎯 Quick Examples](#-quick-start)** - Jump right in with code samples
|
|
283
|
-
4. **[🎨 Theming Guide](docs/themes.md)** - Make your plots beautiful
|
|
284
|
-
5. **[🔧 Modern API Guide](docs/api.md)** - Use the clean public interface
|
|
284
|
+
4. **[🎨 Theming Guide](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/themes.md)** - Make your plots beautiful
|
|
285
|
+
5. **[🔧 Modern API Guide](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/api.md)** - Use the clean public interface
|
|
285
286
|
|
|
286
287
|
## 💡 Migration & Compatibility
|
|
287
288
|
|
|
@@ -301,3 +302,7 @@ plt.theme('professional')
|
|
|
301
302
|
plt.plot([1,2,3], [1,4,2])
|
|
302
303
|
plt.show()
|
|
303
304
|
```
|
|
305
|
+
|
|
306
|
+
## 🛠️ Development & Build System
|
|
307
|
+
|
|
308
|
+
Plotext+ includes a comprehensive build system with modern tooling. See **[Build Documentation](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/build.md)** for complete setup, testing, publishing, and deployment instructions.
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
|
|
12
12
|
## ✨ Key Features
|
|
13
13
|
|
|
14
|
-
🎯 **Multiple Plot Types**: [scatter](docs/basic.md#scatter-plot), [line](docs/basic.md#line-plot), [bar](docs/bar.md), [histogram](docs/bar.md#histogram-plot), [candlestick](docs/datetime.md#candlestick-plot), [heatmap](docs/special.md), [confusion matrix](docs/special.md#confusion-matrix), [pie](docs/basic.md#pie-plot), [doughnut](docs/basic.md#doughnut-charts) and more
|
|
14
|
+
🎯 **Multiple Plot Types**: [scatter](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#scatter-plot), [line](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#line-plot), [bar](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/bar.md), [histogram](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/bar.md#histogram-plot), [candlestick](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/datetime.md#candlestick-plot), [heatmap](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/special.md), [confusion matrix](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/special.md#confusion-matrix), [pie](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#pie-plot), [doughnut](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#doughnut-charts) and more
|
|
15
15
|
|
|
16
|
-
🎨 **Rich Visuals**: [Banner mode](docs/chart_classes.md), [themes](docs/themes.md), [colored text](docs/utilities.md#colored-text), automatic terminal width detection
|
|
16
|
+
🎨 **Rich Visuals**: [Banner mode](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/chart_classes.md), [themes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/themes.md), [colored text](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/utilities.md#colored-text), automatic terminal width detection
|
|
17
17
|
|
|
18
|
-
📊 **Advanced Features**: [Subplots](docs/subplots.md), [datetime plots](docs/datetime.md), [image/GIF display](docs/image.md), [video streaming](docs/video.md) (including YouTube)
|
|
18
|
+
📊 **Advanced Features**: [Subplots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/subplots.md), [datetime plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/datetime.md), [image/GIF display](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/image.md), [video streaming](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/video.md) (including YouTube)
|
|
19
19
|
|
|
20
20
|
🔧 **Modern APIs**: Clean public API, object-oriented charts, quick functions, 100% backward compatible
|
|
21
21
|
|
|
22
|
-
🤖 **AI Integration**: [MCP server](docs/mcp-server.md) for direct AI client access (Claude, etc.)
|
|
22
|
+
🤖 **AI Integration**: [MCP server](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/mcp-server.md) for direct AI client access (Claude, etc.)
|
|
23
23
|
|
|
24
24
|
⚡ **Zero Dependencies**: No required dependencies (optional packages for multimedia and AI integration)
|
|
25
25
|
|
|
@@ -207,40 +207,40 @@ python examples/theme_showcase_demo.py # Theme comparison
|
|
|
207
207
|
|
|
208
208
|
### 🎯 **Core Plotting**
|
|
209
209
|
|
|
210
|
-
- **[📊 Basic Plots](docs/basic.md)** - Scatter, line, and fundamental plotting
|
|
211
|
-
- **[📈 Bar Charts](docs/bar.md)** - Bar plots, histograms, and variations
|
|
212
|
-
- **[📅 DateTime Plots](docs/datetime.md)** - Time series and candlestick charts
|
|
213
|
-
- **[🔬 Special Plots](docs/special.md)** - Heatmaps, confusion matrices, error bars
|
|
214
|
-
- **[🎨 Decorator Plots](docs/decorator.md)** - Text, lines, and shape overlays
|
|
210
|
+
- **[📊 Basic Plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md)** - Scatter, line, and fundamental plotting
|
|
211
|
+
- **[📈 Bar Charts](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/bar.md)** - Bar plots, histograms, and variations
|
|
212
|
+
- **[📅 DateTime Plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/datetime.md)** - Time series and candlestick charts
|
|
213
|
+
- **[🔬 Special Plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/special.md)** - Heatmaps, confusion matrices, error bars
|
|
214
|
+
- **[🎨 Decorator Plots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/decorator.md)** - Text, lines, and shape overlays
|
|
215
215
|
|
|
216
216
|
### 🖼️ **Multimedia & Advanced**
|
|
217
217
|
|
|
218
|
-
- **[🖼️ Image Plotting](docs/image.md)** - Display images and GIFs in terminal
|
|
219
|
-
- **[🎬 Video Streaming](docs/video.md)** - Play videos and YouTube content
|
|
220
|
-
- **[📐 Subplots](docs/subplots.md)** - Multiple plots and complex layouts
|
|
218
|
+
- **[🖼️ Image Plotting](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/image.md)** - Display images and GIFs in terminal
|
|
219
|
+
- **[🎬 Video Streaming](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/video.md)** - Play videos and YouTube content
|
|
220
|
+
- **[📐 Subplots](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/subplots.md)** - Multiple plots and complex layouts
|
|
221
221
|
|
|
222
222
|
### ⚙️ **Configuration & Styling**
|
|
223
223
|
|
|
224
|
-
- **[🎨 Themes](docs/themes.md)** - Built-in themes and customization
|
|
225
|
-
- **[⚙️ Settings](docs/settings.md)** - Plot configuration and options
|
|
226
|
-
- **[📏 Aspect](docs/aspect.md)** - Size, scaling, and layout control
|
|
227
|
-
- **[🔧 Chart Classes](docs/chart_classes.md)** - Object-oriented API reference
|
|
224
|
+
- **[🎨 Themes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/themes.md)** - Built-in themes and customization
|
|
225
|
+
- **[⚙️ Settings](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/settings.md)** - Plot configuration and options
|
|
226
|
+
- **[📏 Aspect](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/aspect.md)** - Size, scaling, and layout control
|
|
227
|
+
- **[🔧 Chart Classes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/chart_classes.md)** - Object-oriented API reference
|
|
228
228
|
|
|
229
229
|
### 🛠️ **Tools & Integration**
|
|
230
230
|
|
|
231
|
-
- **[🔧 Utilities](docs/utilities.md)** - Helper functions and command-line tools
|
|
232
|
-
- **[🤖 MCP Server](docs/mcp-server.md)** - AI integration via Model Context Protocol
|
|
233
|
-
- **[🌐 Environments](docs/environments.md)** - IDE and platform compatibility
|
|
234
|
-
- **[🏗️ API Structure](docs/api.md)** - Clean public API organization
|
|
235
|
-
- **[📝 Notes](docs/notes.md)** - Installation, tips, and troubleshooting
|
|
231
|
+
- **[🔧 Utilities](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/utilities.md)** - Helper functions and command-line tools
|
|
232
|
+
- **[🤖 MCP Server](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/mcp-server.md)** - AI integration via Model Context Protocol
|
|
233
|
+
- **[🌐 Environments](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/environments.md)** - IDE and platform compatibility
|
|
234
|
+
- **[🏗️ API Structure](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/api.md)** - Clean public API organization
|
|
235
|
+
- **[📝 Notes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/notes.md)** - Installation, tips, and troubleshooting
|
|
236
236
|
|
|
237
237
|
### 🚀 **Getting Started Guides**
|
|
238
238
|
|
|
239
|
-
1. **[👋 Introduction](docs/basic.md#introduction)** - First steps with Plotext
|
|
240
|
-
2. **[📦 Installation](docs/notes.md#install)** - Setup and dependencies
|
|
239
|
+
1. **[👋 Introduction](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/basic.md#introduction)** - First steps with Plotext
|
|
240
|
+
2. **[📦 Installation](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/notes.md#install)** - Setup and dependencies
|
|
241
241
|
3. **[🎯 Quick Examples](#-quick-start)** - Jump right in with code samples
|
|
242
|
-
4. **[🎨 Theming Guide](docs/themes.md)** - Make your plots beautiful
|
|
243
|
-
5. **[🔧 Modern API Guide](docs/api.md)** - Use the clean public interface
|
|
242
|
+
4. **[🎨 Theming Guide](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/themes.md)** - Make your plots beautiful
|
|
243
|
+
5. **[🔧 Modern API Guide](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/api.md)** - Use the clean public interface
|
|
244
244
|
|
|
245
245
|
## 💡 Migration & Compatibility
|
|
246
246
|
|
|
@@ -260,3 +260,7 @@ plt.theme('professional')
|
|
|
260
260
|
plt.plot([1,2,3], [1,4,2])
|
|
261
261
|
plt.show()
|
|
262
262
|
```
|
|
263
|
+
|
|
264
|
+
## 🛠️ Development & Build System
|
|
265
|
+
|
|
266
|
+
Plotext+ includes a comprehensive build system with modern tooling. See **[Build Documentation](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/build.md)** for complete setup, testing, publishing, and deployment instructions.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# 🛠️ Development & Build System
|
|
2
|
+
|
|
3
|
+
Plotext+ includes a comprehensive build system with modern tooling for development, testing, and deployment.
|
|
4
|
+
|
|
5
|
+
## Quick Development Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Clone and setup
|
|
9
|
+
git clone https://github.com/ccmitchellusa/plotext_plus.git
|
|
10
|
+
cd plotext_plus
|
|
11
|
+
|
|
12
|
+
# Development environment setup
|
|
13
|
+
make dev # Install all dependencies + format + test
|
|
14
|
+
make setup # Alternative: setup development environment
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Build Commands
|
|
18
|
+
|
|
19
|
+
### **🌱 Environment & Installation**
|
|
20
|
+
```bash
|
|
21
|
+
make install # Install basic dependencies
|
|
22
|
+
make install-dev # Install with development tools
|
|
23
|
+
make install-mcp # Install with MCP server support
|
|
24
|
+
make install-all # Install with all optional dependencies
|
|
25
|
+
make update # Update all dependencies
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### **🧪 Testing & Quality**
|
|
29
|
+
```bash
|
|
30
|
+
make test # Run tests with coverage
|
|
31
|
+
make test-fast # Run tests without coverage
|
|
32
|
+
make test-mcp # Test MCP server functionality
|
|
33
|
+
make coverage # Generate coverage reports
|
|
34
|
+
|
|
35
|
+
# Code quality
|
|
36
|
+
make lint # Run full linting suite (ruff + black + isort + mypy)
|
|
37
|
+
make lint-check # Check linting without fixing
|
|
38
|
+
make format # Format code (black + isort)
|
|
39
|
+
make ruff # Ruff linting and formatting
|
|
40
|
+
make black # Black code formatting
|
|
41
|
+
make isort # Import sorting
|
|
42
|
+
make mypy # Type checking
|
|
43
|
+
make bandit # Security analysis
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### **📦 Building & Publishing**
|
|
47
|
+
```bash
|
|
48
|
+
make build # Build Python package
|
|
49
|
+
make publish # Build and publish to PyPI (with twine)
|
|
50
|
+
make publish-test # Publish to TestPyPI
|
|
51
|
+
make clean # Clean build artifacts
|
|
52
|
+
|
|
53
|
+
# Version management
|
|
54
|
+
make bump-patch # Bump patch version (1.0.0 → 1.0.1)
|
|
55
|
+
make bump-minor # Bump minor version (1.0.0 → 1.1.0)
|
|
56
|
+
make bump-major # Bump major version (1.0.0 → 2.0.0)
|
|
57
|
+
|
|
58
|
+
# Combined release workflow
|
|
59
|
+
make release-patch # Bump patch + publish
|
|
60
|
+
make release-minor # Bump minor + publish
|
|
61
|
+
make release-major # Bump major + publish
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### **🐋 Container Operations**
|
|
65
|
+
```bash
|
|
66
|
+
# Docker
|
|
67
|
+
make docker-build # Build Docker image
|
|
68
|
+
make docker-up # Start with Docker Compose
|
|
69
|
+
make docker-down # Stop Docker Compose
|
|
70
|
+
make docker-logs # View container logs
|
|
71
|
+
make docker-clean # Clean containers and images
|
|
72
|
+
|
|
73
|
+
# Podman
|
|
74
|
+
make podman-build # Build with Podman
|
|
75
|
+
make podman-run-mcp # Run MCP server container
|
|
76
|
+
make podman-test # Test container health
|
|
77
|
+
make podman-logs # Follow container logs
|
|
78
|
+
make podman-stats # Show resource usage
|
|
79
|
+
make podman-shell # Interactive shell access
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### **☁️ Cloud Deployment**
|
|
83
|
+
```bash
|
|
84
|
+
# IBM Cloud Code Engine
|
|
85
|
+
make ce-push-image # Push to IBM Container Registry
|
|
86
|
+
make ce-deploy # Deploy to Code Engine
|
|
87
|
+
make ce-update # Update existing deployment
|
|
88
|
+
make ce-status # Check deployment status
|
|
89
|
+
make ce-logs # View application logs
|
|
90
|
+
make ce-full-deploy # Complete deployment workflow
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### **🎯 Quick Workflows**
|
|
94
|
+
```bash
|
|
95
|
+
make dev # Development setup (install-all + format + test-fast)
|
|
96
|
+
make check # Quick validation (lint-check + test-fast)
|
|
97
|
+
make all # Full pipeline (format + lint + test + build)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### **▶️ Running & Demo**
|
|
101
|
+
```bash
|
|
102
|
+
make run-mcp # Start MCP server
|
|
103
|
+
make run-demos # Run interactive examples
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### **🔧 Utilities**
|
|
107
|
+
```bash
|
|
108
|
+
make version # Show version information
|
|
109
|
+
make info # Show project information
|
|
110
|
+
make deps # Show dependency tree
|
|
111
|
+
make help # Show all available targets
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Project Structure
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
plotext_plus/
|
|
118
|
+
├── src/plotext_plus/ # 🎯 Main source code
|
|
119
|
+
│ ├── plotting.py # Core plotting functions
|
|
120
|
+
│ ├── charts.py # Chart classes
|
|
121
|
+
│ ├── themes.py # Theme system
|
|
122
|
+
│ ├── utilities.py # Helper functions
|
|
123
|
+
│ ├── mcp_server.py # MCP server (optional)
|
|
124
|
+
│ └── _*.py # 🔒 Private modules
|
|
125
|
+
├── examples/ # Interactive demos
|
|
126
|
+
├── tests/ # Test suites
|
|
127
|
+
├── docs/ # Documentation
|
|
128
|
+
├── .github/workflows/ # CI/CD automation
|
|
129
|
+
├── docker/ # Container files
|
|
130
|
+
└── Makefile # Build system
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Development Workflow
|
|
134
|
+
|
|
135
|
+
1. **Setup**: `make dev`
|
|
136
|
+
2. **Code**: Write your changes
|
|
137
|
+
3. **Quality**: `make check` (lint + test)
|
|
138
|
+
4. **Comprehensive**: `make all` (full pipeline)
|
|
139
|
+
5. **Deploy**: `make release-patch` (version + publish)
|
|
140
|
+
|
|
141
|
+
## CI/CD Integration
|
|
142
|
+
|
|
143
|
+
The project includes comprehensive GitHub Actions workflows:
|
|
144
|
+
|
|
145
|
+
- **🔄 CI**: Automated testing, linting, security scanning
|
|
146
|
+
- **🚀 Release**: Automated publishing to PyPI + container registry
|
|
147
|
+
- **🔒 Security**: Daily security scans, dependency updates
|
|
148
|
+
- **📦 Dependencies**: Weekly automated dependency updates
|
|
149
|
+
|
|
150
|
+
All workflows use modern tooling (uv, ruff, mypy, pytest) for fast, reliable builds.
|
|
151
|
+
|
|
152
|
+
## Quality Standards
|
|
153
|
+
|
|
154
|
+
- **Code Quality**: Ruff + Black + isort for consistent formatting
|
|
155
|
+
- **Type Safety**: MyPy for static type checking
|
|
156
|
+
- **Security**: Bandit for security analysis
|
|
157
|
+
- **Testing**: Pytest with coverage reporting
|
|
158
|
+
- **Documentation**: Comprehensive docs with examples
|
|
159
|
+
|
|
160
|
+
Use `make help` to see all available commands with descriptions.
|
|
@@ -1090,8 +1090,8 @@ Execute a complete visualization workflow:
|
|
|
1090
1090
|
|
|
1091
1091
|
## Related Documentation
|
|
1092
1092
|
|
|
1093
|
-
- [Clean API](
|
|
1094
|
-
- [Themes](themes.md) - Theme system documentation
|
|
1095
|
-
- [Charts](
|
|
1096
|
-
- [Utilities](utilities.md) - Helper functions and utilities
|
|
1097
|
-
- [Examples](
|
|
1093
|
+
- [Clean API](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/api.md) - Understanding the public API structure
|
|
1094
|
+
- [Themes](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/themes.md) - Theme system documentation
|
|
1095
|
+
- [Charts](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/chart_classes.md) - Object-oriented chart classes
|
|
1096
|
+
- [Utilities](https://github.com/ccmitchellusa/plotext_plus/blob/master/docs/utilities.md) - Helper functions and utilities
|
|
1097
|
+
- [Examples](https://github.com/ccmitchellusa/plotext_plus/tree/master/examples) - Usage examples and demos
|
|
@@ -98,7 +98,7 @@ plt.test() # Downloads and displays a test image, then removes it
|
|
|
98
98
|
- add heatmap plot, as requested in issue [Issue 143](https://github.com/ccmitchellusa/plotext_plus/issues/143)
|
|
99
99
|
- add OHLC date time plot, as requested in issue [Issue 149](https://github.com/ccmitchellusa/plotext_plus/issues/149)
|
|
100
100
|
- add network graphs, as requested in issue [Issue 160](https://github.com/ccmitchellusa/plotext_plus/issues/160)
|
|
101
|
-
- integrate `colorize()` in `text()` and `indicator()` or or any string `label` parameter, as requested in issue [Issue 144](https://github.com/ccmitchellusa/plotext_plus/issues/144); possible idea: `colorize()` to output a `
|
|
101
|
+
- integrate `colorize()` in `text()` and `indicator()` or or any string `label` parameter, as requested in issue [Issue 144](https://github.com/ccmitchellusa/plotext_plus/issues/144); possible idea: `colorize()` to output a `MatrixClass()` object
|
|
102
102
|
- allow simple bar plots in matrix of subplots, as requested in issue [Issue 171](https://github.com/ccmitchellusa/plotext_plus/issues/171); this could be possibly extended to allow images also, rendered with fast parameter set to `True`
|
|
103
103
|
- allow user to decide plot legend position and frame
|
|
104
104
|
- allow clickable plots, as requested in issue [Issue 175](https://github.com/ccmitchellusa/plotext_plus/issues/175); this sounds hard!
|
|
@@ -125,7 +125,7 @@ plt.test() # Downloads and displays a test image, then removes it
|
|
|
125
125
|
- add matrix plot side bar, to connect intensity level with actual matrix value
|
|
126
126
|
- high resolution markers available on Windows and other rarer terminals (under request and not sure how)
|
|
127
127
|
- add method to optionally set the sizes of a matrix of subplots giving priority to the subplots closer to bottom right edge, instead of upper left ones (as by default)
|
|
128
|
-
- convert the class `
|
|
128
|
+
- convert the class `MatrixClass()`, the engine running the plots, in C++ and connect it to the Python code (not sure how and would appreciate some help on this)
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
### Internal Conventions
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Advanced Plotext features demonstration.
|
|
4
|
+
Shows banner customization, themes, and complex visualizations.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
|
|
11
|
+
|
|
12
|
+
import math
|
|
13
|
+
import random
|
|
14
|
+
|
|
15
|
+
import plotext_plus as plt
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def custom_banner_example():
|
|
19
|
+
"""Demonstrate custom banner titles and styling"""
|
|
20
|
+
plt.log_info("🎨 Demonstrating custom banners...")
|
|
21
|
+
|
|
22
|
+
x = list(range(25))
|
|
23
|
+
y = [10 + 5 * math.sin(i / 3) + random.randint(-2, 2) for i in x]
|
|
24
|
+
|
|
25
|
+
# Custom themed banner
|
|
26
|
+
(
|
|
27
|
+
plt.Chart(use_banners=True, banner_title="🌊 Signal Processing")
|
|
28
|
+
.line(x, y, color="cyan", label="Noisy Signal")
|
|
29
|
+
.title("Real-time Data Analysis")
|
|
30
|
+
.xlabel("Time Samples")
|
|
31
|
+
.ylabel("Amplitude")
|
|
32
|
+
.show()
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def scientific_visualization():
|
|
37
|
+
"""Scientific data visualization example"""
|
|
38
|
+
plt.log_info("🔬 Creating scientific visualization...")
|
|
39
|
+
|
|
40
|
+
# Generate experimental data
|
|
41
|
+
temperature = list(range(20, 101, 5))
|
|
42
|
+
pressure = [t * 0.8 + random.randint(-5, 5) for t in temperature]
|
|
43
|
+
theoretical = [t * 0.75 for t in temperature]
|
|
44
|
+
|
|
45
|
+
chart = (
|
|
46
|
+
plt.Chart(use_banners=True, banner_title="🧪 Laboratory Results")
|
|
47
|
+
.scatter(temperature, pressure, color="red", label="Experimental")
|
|
48
|
+
.line(temperature, theoretical, color="blue", label="Theoretical")
|
|
49
|
+
.title("Temperature vs Pressure Analysis")
|
|
50
|
+
.xlabel("Temperature (°C)")
|
|
51
|
+
.ylabel("Pressure (kPa)")
|
|
52
|
+
.show()
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def business_dashboard():
|
|
57
|
+
"""Business dashboard example"""
|
|
58
|
+
plt.log_info("📊 Creating business dashboard...")
|
|
59
|
+
|
|
60
|
+
# Revenue data
|
|
61
|
+
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
|
|
62
|
+
revenue = [120, 135, 158, 142, 167, 181]
|
|
63
|
+
target = [150] * len(months)
|
|
64
|
+
|
|
65
|
+
chart = (
|
|
66
|
+
plt.Chart(use_banners=True, banner_title="💼 Revenue Dashboard")
|
|
67
|
+
.bar(months, revenue, color="green")
|
|
68
|
+
.line(list(range(len(months))), target, color="red", label="Target")
|
|
69
|
+
.title("Monthly Revenue Performance")
|
|
70
|
+
.show()
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def mathematical_functions():
|
|
75
|
+
"""Mathematical function plotting"""
|
|
76
|
+
plt.log_info("📐 Plotting mathematical functions...")
|
|
77
|
+
|
|
78
|
+
x = [i / 10 for i in range(-50, 51)]
|
|
79
|
+
sin_values = [math.sin(val) for val in x]
|
|
80
|
+
cos_values = [math.cos(val) for val in x]
|
|
81
|
+
|
|
82
|
+
chart = (
|
|
83
|
+
plt.Chart(use_banners=True, banner_title="📈 Mathematical Functions")
|
|
84
|
+
.line(x, sin_values, color="blue", label="sin(x)")
|
|
85
|
+
.line(x, cos_values, color="red", label="cos(x)")
|
|
86
|
+
.title("Trigonometric Functions")
|
|
87
|
+
.xlabel("x")
|
|
88
|
+
.ylabel("f(x)")
|
|
89
|
+
.show()
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def performance_comparison():
|
|
94
|
+
"""Performance comparison chart"""
|
|
95
|
+
plt.log_info("⚡ Creating performance comparison...")
|
|
96
|
+
|
|
97
|
+
algorithms = ["Algorithm A", "Algorithm B", "Algorithm C", "Algorithm D"]
|
|
98
|
+
execution_times = [2.3, 1.8, 3.1, 1.2]
|
|
99
|
+
memory_usage = [45, 32, 67, 28]
|
|
100
|
+
|
|
101
|
+
# Time comparison
|
|
102
|
+
plt.quick_bar(
|
|
103
|
+
algorithms,
|
|
104
|
+
execution_times,
|
|
105
|
+
title="Execution Time Comparison",
|
|
106
|
+
use_banners=True,
|
|
107
|
+
banner_title="⏱️ Performance Metrics",
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
print("\n" + "-" * 40 + "\n")
|
|
111
|
+
|
|
112
|
+
# Memory comparison
|
|
113
|
+
plt.quick_bar(
|
|
114
|
+
algorithms,
|
|
115
|
+
memory_usage,
|
|
116
|
+
title="Memory Usage Comparison",
|
|
117
|
+
use_banners=True,
|
|
118
|
+
banner_title="💾 Memory Analysis",
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def output_features_demo():
|
|
123
|
+
"""Demonstrate chuk-term output features"""
|
|
124
|
+
plt.log_info("🎯 Demonstrating output features...")
|
|
125
|
+
|
|
126
|
+
# Various output levels
|
|
127
|
+
plt.log_info("📋 Processing data...")
|
|
128
|
+
plt.log_success("✅ Data loaded successfully")
|
|
129
|
+
plt.log_warning("⚠️ Using default parameters")
|
|
130
|
+
plt.log_error("❌ Minor calculation error detected")
|
|
131
|
+
|
|
132
|
+
# Simple visualization with context
|
|
133
|
+
x = list(range(8))
|
|
134
|
+
y = [i**1.5 for i in x]
|
|
135
|
+
|
|
136
|
+
plt.log_info("📊 Generating final visualization...")
|
|
137
|
+
|
|
138
|
+
chart = (
|
|
139
|
+
plt.Chart(use_banners=True, banner_title="🎯 Final Results")
|
|
140
|
+
.scatter(x, y, color="purple", label="Growth Curve")
|
|
141
|
+
.title("Project Completion Analysis")
|
|
142
|
+
.xlabel("Weeks")
|
|
143
|
+
.ylabel("Progress")
|
|
144
|
+
.show()
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
plt.log_success("🎉 Analysis complete!")
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def main():
|
|
151
|
+
"""Run all advanced examples"""
|
|
152
|
+
plt.log_success("🌟 Starting Advanced Plotext Features Demo")
|
|
153
|
+
|
|
154
|
+
custom_banner_example()
|
|
155
|
+
print("\n" + "=" * 60 + "\n")
|
|
156
|
+
|
|
157
|
+
scientific_visualization()
|
|
158
|
+
print("\n" + "=" * 60 + "\n")
|
|
159
|
+
|
|
160
|
+
business_dashboard()
|
|
161
|
+
print("\n" + "=" * 60 + "\n")
|
|
162
|
+
|
|
163
|
+
mathematical_functions()
|
|
164
|
+
print("\n" + "=" * 60 + "\n")
|
|
165
|
+
|
|
166
|
+
performance_comparison()
|
|
167
|
+
print("\n" + "=" * 60 + "\n")
|
|
168
|
+
|
|
169
|
+
output_features_demo()
|
|
170
|
+
|
|
171
|
+
plt.log_success("✨ All advanced examples completed!")
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
if __name__ == "__main__":
|
|
175
|
+
main()
|