axes_transform — ANNOTATE plot op

• Data kinds: none → axes (an op determined by its arguments alone — it takes no image or data input)

• Call: import fullseye as fs; fs.ledger.axes_transform(rect, xlim, ylim, invert_y=True, xscale='linear', yscale='linear') (to call the implementation directly, import annotate; annotate.axes_transform(rect, xlim, ylim, invert_y=True, xscale='linear', yscale='linear'); from the registry, opsannotate.get("axes_transform"))

Usage

Build the (closed-form) mapping from data coordinates to pixel coordinates.

The mismatch between the image fact row points down and the graph convention y points up is absorbed in this 1 place only. Figure code carries this dict around.

px = x0 + (x - xmin)/(xmax - xmin) * (w - 1)

py = y0 + (h - 1) - (y - ymin)/(ymax - ymin) * (h - 1) # invert_y

Parameters

rect : (x, y, w, h)

Drawing area (top-left origin, pixels).

xlim, ylim : (lo, hi)

Data range. lo == hi makes the slope infinite, so ValueError.

lo > hi (inverted axis) is also allowed -- for drawing depth or rank upside down.

invert_y : bool

If True (default), ylim[0] comes at the bottom edge = an ordinary graph.

If False, the image's own orientation (ylim[0] at the top edge).

xscale, yscale : {'linear','log'}

'log' is the common logarithm. If the range includes values at or below 0, ValueError

(a figure that passes 0 to a log axis and draws -inf as "the edge" is a lie).

Returns

dict

{"rect", "xlim", "ylim", "invert_y", "xscale", "yscale"}.

Raises

ValueError

invalid rectangle, range non-finite or of zero width, w or h below 2,

unknown scale, range at or below 0 on a log axis.

Detailed usage guide

• figure_annotation family guide

Background guides (the physics and conventions behind this op)

• dataset_conventions — Training-dataset conventions — COCO / YOLO / VOC and pitfalls in visual inspection

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• annotate_gallery — py -3.11 examples/annotate_gallery.py

• annotate_paper_tour — py -3.11 examples/annotate_paper_tour.py

• poc_beam_modal_video — py -3.11 examples/poc_beam_modal_video.py

• poc_camera_calibration — py -3.11 examples/poc_camera_calibration.py

• poc_camera_shake_deblur — py -3.11 examples/poc_camera_shake_deblur.py

• poc_crack_width_timeseries — py -3.11 examples/poc_crack_width_timeseries.py

• poc_dehazing — py -3.11 examples/poc_dehazing.py

• poc_dic_strain — py -3.11 examples/poc_dic_strain.py

• poc_driving_decisions — py -3.11 examples/poc_driving_decisions.py

• poc_driving_traffic — py -3.11 examples/poc_driving_traffic.py

• poc_focus_stacking — py -3.11 examples/poc_focus_stacking.py

• poc_interferometry_step — py -3.11 examples/poc_interferometry_step.py

• poc_measurement_system_analysis — py -3.11 examples/poc_measurement_system_analysis.py

• poc_motion_magnification — py -3.11 examples/poc_motion_magnification.py

• poc_panorama_drift — py -3.11 examples/poc_panorama_drift.py

• poc_particle_tracking — py -3.11 examples/poc_particle_tracking.py

• poc_photoelasticity — py -3.11 examples/poc_photoelasticity.py

• poc_pxrd_phase_peel — py -3.11 examples/poc_pxrd_phase_peel.py

• poc_registration_basin — py -3.11 examples/poc_registration_basin.py

• poc_river_surface_velocity — py -3.11 examples/poc_river_surface_velocity.py

• poc_strain_history — py -3.11 examples/poc_strain_history.py

• poc_structure_4d_deterioration — py -3.11 examples/poc_structure_4d_deterioration.py

• poc_superresolution_limits — py -3.11 examples/poc_superresolution_limits.py

• poc_template_tracking — py -3.11 examples/poc_template_tracking.py

• poc_timelapse_growth — py -3.11 examples/poc_timelapse_growth.py

• poc_wound_area_tracking — py -3.11 examples/poc_wound_area_tracking.py

• poc_xyt_event_surface — py -3.11 examples/poc_xyt_event_surface.py

Ops the type connects to (they accept axes as input)

data_to_pixel · axes_frame · grid_lines · ticks · plot_series

Same category (plot)

data_to_pixel · nice_ticks · axes_frame · grid_lines · ticks · plot_series


*Provenance: annotate.py — ANNOTATE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.