-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplugin_example.py
More file actions
39 lines (30 loc) · 1.11 KB
/
plugin_example.py
File metadata and controls
39 lines (30 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""Example Plottle plugin.
This file demonstrates the Plottle plugin interface. Drop a plugin_*.py file
into the plugins/ directory to have it auto-discovered by the app.
To create a custom plot type:
1. Define a plotting function with the standard Plottle signature:
- Matplotlib: returns (fig, ax, info_dict)
- Plotly: returns (fig, info_dict)
2. Add it to the list returned by get_plot_types().
"""
PLUGIN_NAME = "Example Plugin"
PLUGIN_VERSION = "1.0.0"
PLUGIN_DESCRIPTION = "Demonstrates the Plottle plugin interface (no custom plots added)."
def get_plot_types() -> list[dict]:
"""Return custom plot types provided by this plugin.
Returns
-------
list[dict]
Each dict has keys: name, label, function, description.
Return an empty list if this plugin adds no plot types.
"""
return []
def get_analysis_tools() -> list[dict]:
"""Return custom analysis tools provided by this plugin.
Returns
-------
list[dict]
Each dict has keys: name, label, function, description.
Return an empty list if this plugin adds no analysis tools.
"""
return []