Web API Documentation
Campaign API Key:
scitex-cloud-campaign-20260101-20261231-alpha
🎨 Plot API
Quick Plot (Try in Browser)
Create publication-ready figures by simply opening a URL in your browser. No tools needed — just paste the link in your address bar.
/api/plot/
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
kind
|
string | Required |
Plot type: line, scatter, bar, barh, hist, box, violin, pie, heatmap, step, errorbar, stem
|
x
|
string | Depends | Comma-separated numbers or labels (for line, scatter, bar) |
y
|
string | Depends | Comma-separated numbers (for line, scatter, bar) |
data
|
string | Depends | Comma-separated numbers (for hist, box, violin, pie, heatmap) |
data2..data6
|
string | Optional | Additional groups (for box, violin) |
labels
|
string | Optional | Comma-separated labels (for bar, pie, box, violin) |
yerr
|
string | Optional | Comma-separated Y error bar values (auto-switches to errorbar type) |
nrows, ncols
|
integer | Optional | Matrix dimensions for heatmap (auto-squares if omitted) |
color
|
string | Optional |
Color name (e.g., red, blue) or hex
|
title
|
string | Optional | Plot title |
xlabel
|
string | Optional | X-axis label |
ylabel
|
string | Optional | Y-axis label |
width
|
integer | Optional | Figure width in mm (default: SCITEX style) |
height
|
integer | Optional | Figure height in mm (default: SCITEX style) |
Try It Now
Click these links to see figures in your browser. Live previews rendered by the API:
/api/plot/?kind=line&x=1,2,3,4,5&y=1,4,9,16,25&title=Quadratic&xlabel=x&ylabel=y
/api/plot/?kind=scatter&x=1,2,3,4,5&y=5,3,4,2,1&color=red
/api/plot/?kind=bar&x=A,B,C,D&y=10,20,30,15
/api/plot/?kind=hist&data=1,2,2,3,3,3,4,4,4,4,5,5,5,5,5
/api/plot/?kind=violin&data=1,2,3,4,5&data2=3,4,5,6,7&labels=Control,Treatment
/api/plot/?kind=pie&data=30,50,20&labels=A,B,C
/api/plot/?kind=heatmap&data=1,2,3,4,5,6,7,8,9&nrows=3&ncols=3&title=Correlation+Matrix
/api/plot/?kind=errorbar&x=1,2,3,4,5&y=10,20,15,25,18&yerr=2,3,1,4,2&ylabel=Value
Response: Raw PNG image (Content-Type: image/png) displayed directly in the browser.
Create Plot (Full Spec)
Create figures programmatically using the full figrecipe declarative specification. Supports multiple overlaid plots, custom styling, and multi-panel layouts.
/api/plot/
Request Body (JSON)
Full figrecipe spec. See Plot Types for all supported types.
Example: Multi-series line plot
curl -X POST "https://scitex.ai/api/plot/" \
-H "Content-Type: application/json" \
-d '{
"figure": {"width_mm": 80, "height_mm": 60},
"plots": [
{"type": "line", "x": [1,2,3,4,5], "y": [1,4,9,16,25], "label": "quadratic"},
{"type": "scatter", "x": [1,2,3,4,5], "y": [2,5,8,14,22], "color": "red", "label": "data"}
],
"xlabel": "X", "ylabel": "Y", "title": "My Figure", "legend": true
}'
JSON Response
{
"success": true,
"figure_base64": "iVBORw0KGgoAAAANSUhEUgAA...(base64 PNG data)..."
}
Get Raw PNG Image
Add "figure_format": "png" to the request body to receive raw PNG directly.
curl -X POST "https://scitex.ai/api/plot/" \
-H "Content-Type: application/json" \
-d '{"figure": {"width_mm": 80}, "plots": [{"type": "bar", "x": [0,1,2], "y": [10,20,30]}], "figure_format": "png"}' \
-o result.png
Plot from CSV Upload New
Upload a CSV file and specify column names instead of inline data arrays. Same endpoint — the API detects the input mode from the Content-Type header.
/api/plot/
multipart/form-data
Form Fields
| Field | Type | Required | Description |
|---|---|---|---|
csv_file
|
file | Required | CSV or TSV file (max 10 MB) |
kind
|
string | Required |
Plot type: line, scatter, bar, hist, box, violin, etc.
|
x_col
|
string | Depends | Column name for X-axis (line, scatter, bar) |
y_col
|
string | Depends | Column name for Y-axis (line, scatter, bar) |
data_col
|
string | Depends | Column name for distribution data (hist, box, violin, pie) |
color, title, xlabel, ylabel
|
string | Optional | Styling options |
Example: Scatter from CSV
curl -F "[email protected]" \
-F "kind=scatter" \
-F "x_col=time" \
-F "y_col=temperature" \
-F "title=Temperature over Time" \
"https://scitex.ai/api/plot/" \
-o plot.png
Response: Raw PNG image (Content-Type: image/png).
Supported Plot Types
All plot types use the SCITEX publication-ready style by default (Arial font, clean spines, 300 DPI).
| Kind | Category | Required Params (GET) | Description |
|---|---|---|---|
line
|
Line |
x, y
|
Line plot connecting data points |
scatter
|
Points |
x, y
|
Scatter plot of individual data points |
bar
|
Categorical |
x (labels), y
|
Vertical bar chart |
barh
|
Categorical |
x, y
|
Horizontal bar chart |
hist
|
Distribution |
data
|
Histogram of value distribution |
box
|
Distribution |
data
|
Box plot (median, quartiles, whiskers) |
violin
|
Distribution |
data
|
Violin plot with KDE density estimation |
pie
|
Proportion |
data, labels
|
Pie chart |
heatmap
|
Matrix |
data, nrows, ncols
|
Color-coded matrix visualization |
step
|
Line |
x, y
|
Step function plot |
errorbar
|
Line |
x, y, yerr
|
Line plot with error bars |
stem
|
Line |
x, y
|
Stem plot (lollipop chart) |