scitex 2.14.0__py3-none-any.whl → 2.15.3__py3-none-any.whl
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.
- scitex/__init__.py +71 -17
- scitex/_env_loader.py +156 -0
- scitex/_mcp_resources/__init__.py +37 -0
- scitex/_mcp_resources/_cheatsheet.py +135 -0
- scitex/_mcp_resources/_figrecipe.py +138 -0
- scitex/_mcp_resources/_formats.py +102 -0
- scitex/_mcp_resources/_modules.py +337 -0
- scitex/_mcp_resources/_session.py +149 -0
- scitex/_mcp_tools/__init__.py +4 -0
- scitex/_mcp_tools/audio.py +66 -0
- scitex/_mcp_tools/diagram.py +11 -95
- scitex/_mcp_tools/introspect.py +210 -0
- scitex/_mcp_tools/plt.py +260 -305
- scitex/_mcp_tools/scholar.py +74 -0
- scitex/_mcp_tools/social.py +27 -0
- scitex/_mcp_tools/template.py +24 -0
- scitex/_mcp_tools/writer.py +17 -210
- scitex/ai/_gen_ai/_PARAMS.py +10 -7
- scitex/ai/classification/reporters/_SingleClassificationReporter.py +45 -1603
- scitex/ai/classification/reporters/_mixins/__init__.py +36 -0
- scitex/ai/classification/reporters/_mixins/_constants.py +67 -0
- scitex/ai/classification/reporters/_mixins/_cv_summary.py +387 -0
- scitex/ai/classification/reporters/_mixins/_feature_importance.py +119 -0
- scitex/ai/classification/reporters/_mixins/_metrics.py +275 -0
- scitex/ai/classification/reporters/_mixins/_plotting.py +179 -0
- scitex/ai/classification/reporters/_mixins/_reports.py +153 -0
- scitex/ai/classification/reporters/_mixins/_storage.py +160 -0
- scitex/ai/classification/timeseries/_TimeSeriesSlidingWindowSplit.py +30 -1550
- scitex/ai/classification/timeseries/_sliding_window_core.py +467 -0
- scitex/ai/classification/timeseries/_sliding_window_plotting.py +369 -0
- scitex/audio/README.md +40 -36
- scitex/audio/__init__.py +129 -61
- scitex/audio/_branding.py +185 -0
- scitex/audio/_mcp/__init__.py +32 -0
- scitex/audio/_mcp/handlers.py +59 -6
- scitex/audio/_mcp/speak_handlers.py +238 -0
- scitex/audio/_relay.py +225 -0
- scitex/audio/_tts.py +18 -10
- scitex/audio/engines/base.py +17 -10
- scitex/audio/engines/elevenlabs_engine.py +7 -2
- scitex/audio/mcp_server.py +228 -75
- scitex/canvas/README.md +1 -1
- scitex/canvas/editor/_dearpygui/__init__.py +25 -0
- scitex/canvas/editor/_dearpygui/_editor.py +147 -0
- scitex/canvas/editor/_dearpygui/_handlers.py +476 -0
- scitex/canvas/editor/_dearpygui/_panels/__init__.py +17 -0
- scitex/canvas/editor/_dearpygui/_panels/_control.py +119 -0
- scitex/canvas/editor/_dearpygui/_panels/_element_controls.py +190 -0
- scitex/canvas/editor/_dearpygui/_panels/_preview.py +43 -0
- scitex/canvas/editor/_dearpygui/_panels/_sections.py +390 -0
- scitex/canvas/editor/_dearpygui/_plotting.py +187 -0
- scitex/canvas/editor/_dearpygui/_rendering.py +504 -0
- scitex/canvas/editor/_dearpygui/_selection.py +295 -0
- scitex/canvas/editor/_dearpygui/_state.py +93 -0
- scitex/canvas/editor/_dearpygui/_utils.py +61 -0
- scitex/canvas/editor/flask_editor/_core/__init__.py +27 -0
- scitex/canvas/editor/flask_editor/_core/_bbox_extraction.py +200 -0
- scitex/canvas/editor/flask_editor/_core/_editor.py +173 -0
- scitex/canvas/editor/flask_editor/_core/_export_helpers.py +353 -0
- scitex/canvas/editor/flask_editor/_core/_routes_basic.py +190 -0
- scitex/canvas/editor/flask_editor/_core/_routes_export.py +332 -0
- scitex/canvas/editor/flask_editor/_core/_routes_panels.py +252 -0
- scitex/canvas/editor/flask_editor/_core/_routes_save.py +218 -0
- scitex/canvas/editor/flask_editor/_core.py +25 -1684
- scitex/canvas/editor/flask_editor/templates/__init__.py +32 -70
- scitex/cli/__init__.py +38 -43
- scitex/cli/audio.py +160 -41
- scitex/cli/capture.py +133 -20
- scitex/cli/introspect.py +488 -0
- scitex/cli/main.py +200 -109
- scitex/cli/mcp.py +60 -34
- scitex/cli/plt.py +414 -0
- scitex/cli/repro.py +15 -8
- scitex/cli/resource.py +15 -8
- scitex/cli/scholar/__init__.py +154 -8
- scitex/cli/scholar/_crossref_scitex.py +296 -0
- scitex/cli/scholar/_fetch.py +25 -3
- scitex/cli/social.py +355 -0
- scitex/cli/stats.py +136 -11
- scitex/cli/template.py +129 -12
- scitex/cli/tex.py +15 -8
- scitex/cli/writer.py +49 -299
- scitex/cloud/__init__.py +41 -2
- scitex/config/README.md +1 -1
- scitex/config/__init__.py +16 -2
- scitex/config/_env_registry.py +256 -0
- scitex/context/__init__.py +22 -0
- scitex/dev/__init__.py +20 -1
- scitex/diagram/__init__.py +42 -19
- scitex/diagram/mcp_server.py +13 -125
- scitex/gen/__init__.py +50 -14
- scitex/gen/_list_packages.py +4 -4
- scitex/introspect/__init__.py +82 -0
- scitex/introspect/_call_graph.py +303 -0
- scitex/introspect/_class_hierarchy.py +163 -0
- scitex/introspect/_core.py +41 -0
- scitex/introspect/_docstring.py +131 -0
- scitex/introspect/_examples.py +113 -0
- scitex/introspect/_imports.py +271 -0
- scitex/{gen/_inspect_module.py → introspect/_list_api.py} +48 -56
- scitex/introspect/_mcp/__init__.py +41 -0
- scitex/introspect/_mcp/handlers.py +233 -0
- scitex/introspect/_members.py +155 -0
- scitex/introspect/_resolve.py +89 -0
- scitex/introspect/_signature.py +131 -0
- scitex/introspect/_source.py +80 -0
- scitex/introspect/_type_hints.py +172 -0
- scitex/io/_save.py +1 -2
- scitex/io/bundle/README.md +1 -1
- scitex/logging/_formatters.py +19 -9
- scitex/mcp_server.py +98 -5
- scitex/os/__init__.py +4 -0
- scitex/{gen → os}/_check_host.py +4 -5
- scitex/plt/__init__.py +245 -550
- scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin/_wrappers.py +5 -10
- scitex/plt/docs/EXTERNAL_PACKAGE_BRANDING.md +149 -0
- scitex/plt/gallery/README.md +1 -1
- scitex/plt/utils/_hitmap/__init__.py +82 -0
- scitex/plt/utils/_hitmap/_artist_extraction.py +343 -0
- scitex/plt/utils/_hitmap/_color_application.py +346 -0
- scitex/plt/utils/_hitmap/_color_conversion.py +121 -0
- scitex/plt/utils/_hitmap/_constants.py +40 -0
- scitex/plt/utils/_hitmap/_hitmap_core.py +334 -0
- scitex/plt/utils/_hitmap/_path_extraction.py +357 -0
- scitex/plt/utils/_hitmap/_query.py +113 -0
- scitex/plt/utils/_hitmap.py +46 -1616
- scitex/plt/utils/_metadata/__init__.py +80 -0
- scitex/plt/utils/_metadata/_artists/__init__.py +25 -0
- scitex/plt/utils/_metadata/_artists/_base.py +195 -0
- scitex/plt/utils/_metadata/_artists/_collections.py +356 -0
- scitex/plt/utils/_metadata/_artists/_extract.py +57 -0
- scitex/plt/utils/_metadata/_artists/_images.py +80 -0
- scitex/plt/utils/_metadata/_artists/_lines.py +261 -0
- scitex/plt/utils/_metadata/_artists/_patches.py +247 -0
- scitex/plt/utils/_metadata/_artists/_text.py +106 -0
- scitex/plt/utils/_metadata/_csv.py +416 -0
- scitex/plt/utils/_metadata/_detect.py +225 -0
- scitex/plt/utils/_metadata/_legend.py +127 -0
- scitex/plt/utils/_metadata/_rounding.py +117 -0
- scitex/plt/utils/_metadata/_verification.py +202 -0
- scitex/schema/README.md +1 -1
- scitex/scholar/__init__.py +8 -0
- scitex/scholar/_mcp/crossref_handlers.py +265 -0
- scitex/scholar/core/Scholar.py +63 -1700
- scitex/scholar/core/_mixins/__init__.py +36 -0
- scitex/scholar/core/_mixins/_enrichers.py +270 -0
- scitex/scholar/core/_mixins/_library_handlers.py +100 -0
- scitex/scholar/core/_mixins/_loaders.py +103 -0
- scitex/scholar/core/_mixins/_pdf_download.py +375 -0
- scitex/scholar/core/_mixins/_pipeline.py +312 -0
- scitex/scholar/core/_mixins/_project_handlers.py +125 -0
- scitex/scholar/core/_mixins/_savers.py +69 -0
- scitex/scholar/core/_mixins/_search.py +103 -0
- scitex/scholar/core/_mixins/_services.py +88 -0
- scitex/scholar/core/_mixins/_url_finding.py +105 -0
- scitex/scholar/crossref_scitex.py +367 -0
- scitex/scholar/docs/EXTERNAL_PACKAGE_BRANDING.md +149 -0
- scitex/scholar/examples/00_run_all.sh +120 -0
- scitex/scholar/jobs/_executors.py +27 -3
- scitex/scholar/pdf_download/ScholarPDFDownloader.py +38 -416
- scitex/scholar/pdf_download/_cli.py +154 -0
- scitex/scholar/pdf_download/strategies/__init__.py +11 -8
- scitex/scholar/pdf_download/strategies/manual_download_fallback.py +80 -3
- scitex/scholar/pipelines/ScholarPipelineBibTeX.py +73 -121
- scitex/scholar/pipelines/ScholarPipelineParallel.py +80 -138
- scitex/scholar/pipelines/ScholarPipelineSingle.py +43 -63
- scitex/scholar/pipelines/_single_steps.py +71 -36
- scitex/scholar/storage/_LibraryManager.py +97 -1695
- scitex/scholar/storage/_mixins/__init__.py +30 -0
- scitex/scholar/storage/_mixins/_bibtex_handlers.py +128 -0
- scitex/scholar/storage/_mixins/_library_operations.py +218 -0
- scitex/scholar/storage/_mixins/_metadata_conversion.py +226 -0
- scitex/scholar/storage/_mixins/_paper_saving.py +456 -0
- scitex/scholar/storage/_mixins/_resolution.py +376 -0
- scitex/scholar/storage/_mixins/_storage_helpers.py +121 -0
- scitex/scholar/storage/_mixins/_symlink_handlers.py +226 -0
- scitex/security/README.md +3 -3
- scitex/session/README.md +1 -1
- scitex/session/__init__.py +26 -7
- scitex/session/_decorator.py +1 -1
- scitex/sh/README.md +1 -1
- scitex/sh/__init__.py +7 -4
- scitex/social/__init__.py +155 -0
- scitex/social/docs/EXTERNAL_PACKAGE_BRANDING.md +149 -0
- scitex/stats/_mcp/_handlers/__init__.py +31 -0
- scitex/stats/_mcp/_handlers/_corrections.py +113 -0
- scitex/stats/_mcp/_handlers/_descriptive.py +78 -0
- scitex/stats/_mcp/_handlers/_effect_size.py +106 -0
- scitex/stats/_mcp/_handlers/_format.py +94 -0
- scitex/stats/_mcp/_handlers/_normality.py +110 -0
- scitex/stats/_mcp/_handlers/_posthoc.py +224 -0
- scitex/stats/_mcp/_handlers/_power.py +247 -0
- scitex/stats/_mcp/_handlers/_recommend.py +102 -0
- scitex/stats/_mcp/_handlers/_run_test.py +279 -0
- scitex/stats/_mcp/_handlers/_stars.py +48 -0
- scitex/stats/_mcp/handlers.py +19 -1171
- scitex/stats/auto/_stat_style.py +175 -0
- scitex/stats/auto/_style_definitions.py +411 -0
- scitex/stats/auto/_styles.py +22 -620
- scitex/stats/descriptive/__init__.py +11 -8
- scitex/stats/descriptive/_ci.py +39 -0
- scitex/stats/power/_power.py +15 -4
- scitex/str/__init__.py +2 -1
- scitex/str/_title_case.py +63 -0
- scitex/template/README.md +1 -1
- scitex/template/__init__.py +25 -10
- scitex/template/_code_templates.py +147 -0
- scitex/template/_mcp/handlers.py +81 -0
- scitex/template/_mcp/tool_schemas.py +55 -0
- scitex/template/_templates/__init__.py +51 -0
- scitex/template/_templates/audio.py +233 -0
- scitex/template/_templates/canvas.py +312 -0
- scitex/template/_templates/capture.py +268 -0
- scitex/template/_templates/config.py +43 -0
- scitex/template/_templates/diagram.py +294 -0
- scitex/template/_templates/io.py +107 -0
- scitex/template/_templates/module.py +53 -0
- scitex/template/_templates/plt.py +202 -0
- scitex/template/_templates/scholar.py +267 -0
- scitex/template/_templates/session.py +130 -0
- scitex/template/_templates/session_minimal.py +43 -0
- scitex/template/_templates/session_plot.py +67 -0
- scitex/template/_templates/session_stats.py +77 -0
- scitex/template/_templates/stats.py +323 -0
- scitex/template/_templates/writer.py +296 -0
- scitex/template/clone_writer_directory.py +5 -5
- scitex/ui/_backends/_email.py +10 -2
- scitex/ui/_backends/_webhook.py +5 -1
- scitex/web/_search_pubmed.py +10 -6
- scitex/writer/README.md +1 -1
- scitex/writer/__init__.py +43 -34
- scitex/writer/_mcp/handlers.py +11 -744
- scitex/writer/_mcp/tool_schemas.py +5 -335
- scitex-2.15.3.dist-info/METADATA +667 -0
- {scitex-2.14.0.dist-info → scitex-2.15.3.dist-info}/RECORD +241 -120
- scitex/canvas/editor/flask_editor/templates/_scripts.py +0 -4933
- scitex/canvas/editor/flask_editor/templates/_styles.py +0 -1658
- scitex/diagram/_compile.py +0 -312
- scitex/diagram/_diagram.py +0 -355
- scitex/diagram/_mcp/__init__.py +0 -4
- scitex/diagram/_mcp/handlers.py +0 -400
- scitex/diagram/_mcp/tool_schemas.py +0 -157
- scitex/diagram/_presets.py +0 -173
- scitex/diagram/_schema.py +0 -182
- scitex/diagram/_split.py +0 -278
- scitex/gen/_ci.py +0 -12
- scitex/gen/_title_case.py +0 -89
- scitex/plt/_mcp/__init__.py +0 -4
- scitex/plt/_mcp/_handlers_annotation.py +0 -102
- scitex/plt/_mcp/_handlers_figure.py +0 -195
- scitex/plt/_mcp/_handlers_plot.py +0 -252
- scitex/plt/_mcp/_handlers_style.py +0 -219
- scitex/plt/_mcp/handlers.py +0 -74
- scitex/plt/_mcp/tool_schemas.py +0 -497
- scitex/plt/mcp_server.py +0 -231
- scitex/scholar/examples/SUGGESTIONS.md +0 -865
- scitex/scholar/examples/dev.py +0 -38
- scitex-2.14.0.dist-info/METADATA +0 -1238
- /scitex/{gen → context}/_detect_environment.py +0 -0
- /scitex/{gen → context}/_get_notebook_path.py +0 -0
- /scitex/{gen/_shell.py → sh/_shell_legacy.py} +0 -0
- {scitex-2.14.0.dist-info → scitex-2.15.3.dist-info}/WHEEL +0 -0
- {scitex-2.14.0.dist-info → scitex-2.15.3.dist-info}/entry_points.txt +0 -0
- {scitex-2.14.0.dist-info → scitex-2.15.3.dist-info}/licenses/LICENSE +0 -0
scitex/plt/_mcp/tool_schemas.py
DELETED
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# Timestamp: 2026-01-08
|
|
3
|
-
# File: src/scitex/plt/_mcp.tool_schemas.py
|
|
4
|
-
# ----------------------------------------
|
|
5
|
-
|
|
6
|
-
"""
|
|
7
|
-
MCP Tool schemas for SciTeX plt module.
|
|
8
|
-
|
|
9
|
-
Defines tools for publication-quality plotting:
|
|
10
|
-
- get_style: Get current style configuration
|
|
11
|
-
- set_style: Set global style overrides
|
|
12
|
-
- list_presets: List available style presets
|
|
13
|
-
- create_figure: Create figure with publication style
|
|
14
|
-
- crop_figure: Auto-crop figure whitespace
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
from __future__ import annotations
|
|
18
|
-
|
|
19
|
-
import mcp.types as types
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def get_tool_schemas() -> list[types.Tool]:
|
|
23
|
-
"""Return list of available MCP tools for plt operations."""
|
|
24
|
-
return [
|
|
25
|
-
# Get current style
|
|
26
|
-
types.Tool(
|
|
27
|
-
name="get_style",
|
|
28
|
-
description="Get current SciTeX publication style configuration with all parameters (axes dimensions, fonts, margins, etc.)",
|
|
29
|
-
inputSchema={
|
|
30
|
-
"type": "object",
|
|
31
|
-
"properties": {},
|
|
32
|
-
"required": [],
|
|
33
|
-
},
|
|
34
|
-
),
|
|
35
|
-
# Set style
|
|
36
|
-
types.Tool(
|
|
37
|
-
name="set_style",
|
|
38
|
-
description="Set global style overrides for publication figures. Parameters like axes_width_mm, margin_left_mm, font sizes, etc.",
|
|
39
|
-
inputSchema={
|
|
40
|
-
"type": "object",
|
|
41
|
-
"properties": {
|
|
42
|
-
"axes_width_mm": {
|
|
43
|
-
"type": "number",
|
|
44
|
-
"description": "Axes width in millimeters (default: 40)",
|
|
45
|
-
},
|
|
46
|
-
"axes_height_mm": {
|
|
47
|
-
"type": "number",
|
|
48
|
-
"description": "Axes height in millimeters (default: 28)",
|
|
49
|
-
},
|
|
50
|
-
"margin_left_mm": {
|
|
51
|
-
"type": "number",
|
|
52
|
-
"description": "Left margin in millimeters (default: 20)",
|
|
53
|
-
},
|
|
54
|
-
"margin_right_mm": {
|
|
55
|
-
"type": "number",
|
|
56
|
-
"description": "Right margin in millimeters (default: 20)",
|
|
57
|
-
},
|
|
58
|
-
"margin_top_mm": {
|
|
59
|
-
"type": "number",
|
|
60
|
-
"description": "Top margin in millimeters (default: 20)",
|
|
61
|
-
},
|
|
62
|
-
"margin_bottom_mm": {
|
|
63
|
-
"type": "number",
|
|
64
|
-
"description": "Bottom margin in millimeters (default: 20)",
|
|
65
|
-
},
|
|
66
|
-
"dpi": {
|
|
67
|
-
"type": "integer",
|
|
68
|
-
"description": "Output resolution in DPI (default: 300)",
|
|
69
|
-
},
|
|
70
|
-
"axis_font_size_pt": {
|
|
71
|
-
"type": "number",
|
|
72
|
-
"description": "Axis label font size in points (default: 7)",
|
|
73
|
-
},
|
|
74
|
-
"tick_font_size_pt": {
|
|
75
|
-
"type": "number",
|
|
76
|
-
"description": "Tick label font size in points (default: 7)",
|
|
77
|
-
},
|
|
78
|
-
"title_font_size_pt": {
|
|
79
|
-
"type": "number",
|
|
80
|
-
"description": "Title font size in points (default: 8)",
|
|
81
|
-
},
|
|
82
|
-
"legend_font_size_pt": {
|
|
83
|
-
"type": "number",
|
|
84
|
-
"description": "Legend font size in points (default: 6)",
|
|
85
|
-
},
|
|
86
|
-
"trace_thickness_mm": {
|
|
87
|
-
"type": "number",
|
|
88
|
-
"description": "Line trace thickness in mm (default: 0.2)",
|
|
89
|
-
},
|
|
90
|
-
"reset": {
|
|
91
|
-
"type": "boolean",
|
|
92
|
-
"description": "If true, reset style to defaults before applying",
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
"required": [],
|
|
96
|
-
},
|
|
97
|
-
),
|
|
98
|
-
# List presets
|
|
99
|
-
types.Tool(
|
|
100
|
-
name="list_presets",
|
|
101
|
-
description="List available publication style presets (e.g., Nature, Science journal styles)",
|
|
102
|
-
inputSchema={
|
|
103
|
-
"type": "object",
|
|
104
|
-
"properties": {},
|
|
105
|
-
"required": [],
|
|
106
|
-
},
|
|
107
|
-
),
|
|
108
|
-
# Crop figure
|
|
109
|
-
types.Tool(
|
|
110
|
-
name="crop_figure",
|
|
111
|
-
description="Auto-crop whitespace from a saved figure image",
|
|
112
|
-
inputSchema={
|
|
113
|
-
"type": "object",
|
|
114
|
-
"properties": {
|
|
115
|
-
"input_path": {
|
|
116
|
-
"type": "string",
|
|
117
|
-
"description": "Path to the input figure image",
|
|
118
|
-
},
|
|
119
|
-
"output_path": {
|
|
120
|
-
"type": "string",
|
|
121
|
-
"description": "Output path (optional, adds '_cropped' suffix if not provided)",
|
|
122
|
-
},
|
|
123
|
-
"margin": {
|
|
124
|
-
"type": "integer",
|
|
125
|
-
"description": "Margin in pixels around content (default: 12, ~1mm at 300 DPI)",
|
|
126
|
-
"default": 12,
|
|
127
|
-
},
|
|
128
|
-
"overwrite": {
|
|
129
|
-
"type": "boolean",
|
|
130
|
-
"description": "Overwrite input file (default: false)",
|
|
131
|
-
"default": False,
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
"required": ["input_path"],
|
|
135
|
-
},
|
|
136
|
-
),
|
|
137
|
-
# Get DPI settings
|
|
138
|
-
types.Tool(
|
|
139
|
-
name="get_dpi_settings",
|
|
140
|
-
description="Get DPI settings for different output contexts (save, display, preview)",
|
|
141
|
-
inputSchema={
|
|
142
|
-
"type": "object",
|
|
143
|
-
"properties": {},
|
|
144
|
-
"required": [],
|
|
145
|
-
},
|
|
146
|
-
),
|
|
147
|
-
# Get color palette
|
|
148
|
-
types.Tool(
|
|
149
|
-
name="get_color_palette",
|
|
150
|
-
description="Get the SciTeX color palette for consistent figure colors",
|
|
151
|
-
inputSchema={
|
|
152
|
-
"type": "object",
|
|
153
|
-
"properties": {
|
|
154
|
-
"format": {
|
|
155
|
-
"type": "string",
|
|
156
|
-
"description": "Color format to return",
|
|
157
|
-
"enum": ["hex", "rgb", "rgba"],
|
|
158
|
-
"default": "hex",
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
"required": [],
|
|
162
|
-
},
|
|
163
|
-
),
|
|
164
|
-
# =================================================================
|
|
165
|
-
# PLOTTING TOOLS - Create publication figures via MCP
|
|
166
|
-
# =================================================================
|
|
167
|
-
# Create multi-panel figure
|
|
168
|
-
types.Tool(
|
|
169
|
-
name="create_figure",
|
|
170
|
-
description="Create a multi-panel figure canvas with SciTeX style. Returns figure_id for subsequent plotting.",
|
|
171
|
-
inputSchema={
|
|
172
|
-
"type": "object",
|
|
173
|
-
"properties": {
|
|
174
|
-
"nrows": {
|
|
175
|
-
"type": "integer",
|
|
176
|
-
"description": "Number of rows (default: 1)",
|
|
177
|
-
"default": 1,
|
|
178
|
-
},
|
|
179
|
-
"ncols": {
|
|
180
|
-
"type": "integer",
|
|
181
|
-
"description": "Number of columns (default: 1)",
|
|
182
|
-
"default": 1,
|
|
183
|
-
},
|
|
184
|
-
"axes_width_mm": {
|
|
185
|
-
"type": "number",
|
|
186
|
-
"description": "Width of each axes in mm (default: 40)",
|
|
187
|
-
"default": 40,
|
|
188
|
-
},
|
|
189
|
-
"axes_height_mm": {
|
|
190
|
-
"type": "number",
|
|
191
|
-
"description": "Height of each axes in mm (default: 28)",
|
|
192
|
-
"default": 28,
|
|
193
|
-
},
|
|
194
|
-
"space_w_mm": {
|
|
195
|
-
"type": "number",
|
|
196
|
-
"description": "Horizontal spacing between panels in mm (default: 8 from style)",
|
|
197
|
-
},
|
|
198
|
-
"space_h_mm": {
|
|
199
|
-
"type": "number",
|
|
200
|
-
"description": "Vertical spacing between panels in mm (default: 10 from style)",
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
"required": [],
|
|
204
|
-
},
|
|
205
|
-
),
|
|
206
|
-
# Bar plot
|
|
207
|
-
types.Tool(
|
|
208
|
-
name="plot_bar",
|
|
209
|
-
description="Create a bar plot on specified panel",
|
|
210
|
-
inputSchema={
|
|
211
|
-
"type": "object",
|
|
212
|
-
"properties": {
|
|
213
|
-
"figure_id": {
|
|
214
|
-
"type": "string",
|
|
215
|
-
"description": "Figure ID from create_figure (uses current if not specified)",
|
|
216
|
-
},
|
|
217
|
-
"panel": {
|
|
218
|
-
"type": "string",
|
|
219
|
-
"description": "Panel index as 'row,col' e.g. '0,0' or panel label e.g. 'A' (default: '0,0')",
|
|
220
|
-
"default": "0,0",
|
|
221
|
-
},
|
|
222
|
-
"x": {
|
|
223
|
-
"type": "array",
|
|
224
|
-
"items": {"type": "string"},
|
|
225
|
-
"description": "X-axis labels/categories",
|
|
226
|
-
},
|
|
227
|
-
"y": {
|
|
228
|
-
"type": "array",
|
|
229
|
-
"items": {"type": "number"},
|
|
230
|
-
"description": "Y-axis values (heights)",
|
|
231
|
-
},
|
|
232
|
-
"yerr": {
|
|
233
|
-
"type": "array",
|
|
234
|
-
"items": {"type": "number"},
|
|
235
|
-
"description": "Error bar values (optional)",
|
|
236
|
-
},
|
|
237
|
-
"colors": {
|
|
238
|
-
"type": "array",
|
|
239
|
-
"items": {"type": "string"},
|
|
240
|
-
"description": "Bar colors (optional, uses palette)",
|
|
241
|
-
},
|
|
242
|
-
"xlabel": {"type": "string", "description": "X-axis label"},
|
|
243
|
-
"ylabel": {"type": "string", "description": "Y-axis label"},
|
|
244
|
-
"title": {"type": "string", "description": "Panel title"},
|
|
245
|
-
},
|
|
246
|
-
"required": ["x", "y"],
|
|
247
|
-
},
|
|
248
|
-
),
|
|
249
|
-
# Scatter plot
|
|
250
|
-
types.Tool(
|
|
251
|
-
name="plot_scatter",
|
|
252
|
-
description="Create a scatter plot on specified panel",
|
|
253
|
-
inputSchema={
|
|
254
|
-
"type": "object",
|
|
255
|
-
"properties": {
|
|
256
|
-
"figure_id": {"type": "string", "description": "Figure ID"},
|
|
257
|
-
"panel": {"type": "string", "default": "0,0"},
|
|
258
|
-
"x": {
|
|
259
|
-
"type": "array",
|
|
260
|
-
"items": {"type": "number"},
|
|
261
|
-
"description": "X values",
|
|
262
|
-
},
|
|
263
|
-
"y": {
|
|
264
|
-
"type": "array",
|
|
265
|
-
"items": {"type": "number"},
|
|
266
|
-
"description": "Y values",
|
|
267
|
-
},
|
|
268
|
-
"color": {"type": "string", "description": "Point color"},
|
|
269
|
-
"size": {"type": "number", "description": "Point size in mm"},
|
|
270
|
-
"alpha": {"type": "number", "description": "Transparency (0-1)"},
|
|
271
|
-
"add_regression": {
|
|
272
|
-
"type": "boolean",
|
|
273
|
-
"description": "Add regression line",
|
|
274
|
-
"default": False,
|
|
275
|
-
},
|
|
276
|
-
"xlabel": {"type": "string"},
|
|
277
|
-
"ylabel": {"type": "string"},
|
|
278
|
-
"title": {"type": "string"},
|
|
279
|
-
},
|
|
280
|
-
"required": ["x", "y"],
|
|
281
|
-
},
|
|
282
|
-
),
|
|
283
|
-
# Line plot
|
|
284
|
-
types.Tool(
|
|
285
|
-
name="plot_line",
|
|
286
|
-
description="Create a line plot on specified panel",
|
|
287
|
-
inputSchema={
|
|
288
|
-
"type": "object",
|
|
289
|
-
"properties": {
|
|
290
|
-
"figure_id": {"type": "string"},
|
|
291
|
-
"panel": {"type": "string", "default": "0,0"},
|
|
292
|
-
"x": {
|
|
293
|
-
"type": "array",
|
|
294
|
-
"items": {"type": "number"},
|
|
295
|
-
"description": "X values",
|
|
296
|
-
},
|
|
297
|
-
"y": {
|
|
298
|
-
"type": "array",
|
|
299
|
-
"items": {"type": "number"},
|
|
300
|
-
"description": "Y values",
|
|
301
|
-
},
|
|
302
|
-
"yerr": {
|
|
303
|
-
"type": "array",
|
|
304
|
-
"items": {"type": "number"},
|
|
305
|
-
"description": "Y error values for shaded region",
|
|
306
|
-
},
|
|
307
|
-
"color": {"type": "string"},
|
|
308
|
-
"label": {"type": "string", "description": "Legend label"},
|
|
309
|
-
"linestyle": {
|
|
310
|
-
"type": "string",
|
|
311
|
-
"enum": ["-", "--", ":", "-."],
|
|
312
|
-
"default": "-",
|
|
313
|
-
},
|
|
314
|
-
"xlabel": {"type": "string"},
|
|
315
|
-
"ylabel": {"type": "string"},
|
|
316
|
-
"title": {"type": "string"},
|
|
317
|
-
},
|
|
318
|
-
"required": ["x", "y"],
|
|
319
|
-
},
|
|
320
|
-
),
|
|
321
|
-
# Box plot
|
|
322
|
-
types.Tool(
|
|
323
|
-
name="plot_box",
|
|
324
|
-
description="Create a box plot on specified panel",
|
|
325
|
-
inputSchema={
|
|
326
|
-
"type": "object",
|
|
327
|
-
"properties": {
|
|
328
|
-
"figure_id": {"type": "string"},
|
|
329
|
-
"panel": {"type": "string", "default": "0,0"},
|
|
330
|
-
"data": {
|
|
331
|
-
"type": "array",
|
|
332
|
-
"items": {"type": "array", "items": {"type": "number"}},
|
|
333
|
-
"description": "List of data arrays, one per group",
|
|
334
|
-
},
|
|
335
|
-
"labels": {
|
|
336
|
-
"type": "array",
|
|
337
|
-
"items": {"type": "string"},
|
|
338
|
-
"description": "Group labels",
|
|
339
|
-
},
|
|
340
|
-
"colors": {
|
|
341
|
-
"type": "array",
|
|
342
|
-
"items": {"type": "string"},
|
|
343
|
-
"description": "Box colors",
|
|
344
|
-
},
|
|
345
|
-
"xlabel": {"type": "string"},
|
|
346
|
-
"ylabel": {"type": "string"},
|
|
347
|
-
"title": {"type": "string"},
|
|
348
|
-
},
|
|
349
|
-
"required": ["data"],
|
|
350
|
-
},
|
|
351
|
-
),
|
|
352
|
-
# Violin plot
|
|
353
|
-
types.Tool(
|
|
354
|
-
name="plot_violin",
|
|
355
|
-
description="Create a violin plot on specified panel",
|
|
356
|
-
inputSchema={
|
|
357
|
-
"type": "object",
|
|
358
|
-
"properties": {
|
|
359
|
-
"figure_id": {"type": "string"},
|
|
360
|
-
"panel": {"type": "string", "default": "0,0"},
|
|
361
|
-
"data": {
|
|
362
|
-
"type": "array",
|
|
363
|
-
"items": {"type": "array", "items": {"type": "number"}},
|
|
364
|
-
"description": "List of data arrays, one per group",
|
|
365
|
-
},
|
|
366
|
-
"labels": {
|
|
367
|
-
"type": "array",
|
|
368
|
-
"items": {"type": "string"},
|
|
369
|
-
},
|
|
370
|
-
"colors": {
|
|
371
|
-
"type": "array",
|
|
372
|
-
"items": {"type": "string"},
|
|
373
|
-
},
|
|
374
|
-
"xlabel": {"type": "string"},
|
|
375
|
-
"ylabel": {"type": "string"},
|
|
376
|
-
"title": {"type": "string"},
|
|
377
|
-
},
|
|
378
|
-
"required": ["data"],
|
|
379
|
-
},
|
|
380
|
-
),
|
|
381
|
-
# Add significance bracket
|
|
382
|
-
types.Tool(
|
|
383
|
-
name="add_significance",
|
|
384
|
-
description="Add significance bracket between two groups",
|
|
385
|
-
inputSchema={
|
|
386
|
-
"type": "object",
|
|
387
|
-
"properties": {
|
|
388
|
-
"figure_id": {"type": "string"},
|
|
389
|
-
"panel": {"type": "string", "default": "0,0"},
|
|
390
|
-
"x1": {
|
|
391
|
-
"type": "number",
|
|
392
|
-
"description": "X position of first group (0-indexed)",
|
|
393
|
-
},
|
|
394
|
-
"x2": {
|
|
395
|
-
"type": "number",
|
|
396
|
-
"description": "X position of second group",
|
|
397
|
-
},
|
|
398
|
-
"y": {
|
|
399
|
-
"type": "number",
|
|
400
|
-
"description": "Y position of bracket base",
|
|
401
|
-
},
|
|
402
|
-
"text": {
|
|
403
|
-
"type": "string",
|
|
404
|
-
"description": "Significance text: '*', '**', '***', 'n.s.', or p-value",
|
|
405
|
-
},
|
|
406
|
-
"height": {
|
|
407
|
-
"type": "number",
|
|
408
|
-
"description": "Bracket height (auto if not specified)",
|
|
409
|
-
},
|
|
410
|
-
},
|
|
411
|
-
"required": ["x1", "x2", "y", "text"],
|
|
412
|
-
},
|
|
413
|
-
),
|
|
414
|
-
# Add panel label
|
|
415
|
-
types.Tool(
|
|
416
|
-
name="add_panel_label",
|
|
417
|
-
description="Add panel label (A, B, C, etc.) to a panel",
|
|
418
|
-
inputSchema={
|
|
419
|
-
"type": "object",
|
|
420
|
-
"properties": {
|
|
421
|
-
"figure_id": {"type": "string"},
|
|
422
|
-
"panel": {"type": "string", "default": "0,0"},
|
|
423
|
-
"label": {
|
|
424
|
-
"type": "string",
|
|
425
|
-
"description": "Label text (e.g., 'A', 'B')",
|
|
426
|
-
},
|
|
427
|
-
"x": {
|
|
428
|
-
"type": "number",
|
|
429
|
-
"description": "X position in axes coordinates (default: -0.15)",
|
|
430
|
-
"default": -0.15,
|
|
431
|
-
},
|
|
432
|
-
"y": {
|
|
433
|
-
"type": "number",
|
|
434
|
-
"description": "Y position in axes coordinates (default: 1.1)",
|
|
435
|
-
"default": 1.1,
|
|
436
|
-
},
|
|
437
|
-
"fontsize": {
|
|
438
|
-
"type": "number",
|
|
439
|
-
"description": "Font size in points (default: 10)",
|
|
440
|
-
"default": 10,
|
|
441
|
-
},
|
|
442
|
-
"fontweight": {
|
|
443
|
-
"type": "string",
|
|
444
|
-
"enum": ["normal", "bold"],
|
|
445
|
-
"default": "bold",
|
|
446
|
-
},
|
|
447
|
-
},
|
|
448
|
-
"required": ["label"],
|
|
449
|
-
},
|
|
450
|
-
),
|
|
451
|
-
# Save figure
|
|
452
|
-
types.Tool(
|
|
453
|
-
name="save_figure",
|
|
454
|
-
description="Save the current figure to file",
|
|
455
|
-
inputSchema={
|
|
456
|
-
"type": "object",
|
|
457
|
-
"properties": {
|
|
458
|
-
"figure_id": {"type": "string"},
|
|
459
|
-
"output_path": {
|
|
460
|
-
"type": "string",
|
|
461
|
-
"description": "Output file path (supports .png, .pdf, .svg)",
|
|
462
|
-
},
|
|
463
|
-
"dpi": {
|
|
464
|
-
"type": "integer",
|
|
465
|
-
"description": "Resolution (default: 300)",
|
|
466
|
-
"default": 300,
|
|
467
|
-
},
|
|
468
|
-
"crop": {
|
|
469
|
-
"type": "boolean",
|
|
470
|
-
"description": "Auto-crop whitespace (default: true)",
|
|
471
|
-
"default": True,
|
|
472
|
-
},
|
|
473
|
-
},
|
|
474
|
-
"required": ["output_path"],
|
|
475
|
-
},
|
|
476
|
-
),
|
|
477
|
-
# Close figure
|
|
478
|
-
types.Tool(
|
|
479
|
-
name="close_figure",
|
|
480
|
-
description="Close a figure and free memory",
|
|
481
|
-
inputSchema={
|
|
482
|
-
"type": "object",
|
|
483
|
-
"properties": {
|
|
484
|
-
"figure_id": {
|
|
485
|
-
"type": "string",
|
|
486
|
-
"description": "Figure ID to close (closes current if not specified)",
|
|
487
|
-
},
|
|
488
|
-
},
|
|
489
|
-
"required": [],
|
|
490
|
-
},
|
|
491
|
-
),
|
|
492
|
-
]
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
__all__ = ["get_tool_schemas"]
|
|
496
|
-
|
|
497
|
-
# EOF
|