Files
egutierrez 7c95b36a5f chore(registry): añadir uses_functions a consumidores reales (viz)
Auditoria del issue 0044: 9 archivos .md de cpp/functions/viz/ con
uses_functions actualizado. Resuelve dependencias detectadas via
#include: plot_static (consumido por bar_chart, histogram, line_plot,
pie_chart, scatter_plot), gl_loader, gl_framebuffer, gl_shader,
graph_force_layout, graph_renderer, graph_spatial_hash, orbit_camera,
sparkline y tokens.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 23:40:37 +02:00

48 lines
1.5 KiB
Markdown

---
name: scatter_plot
kind: component
lang: cpp
domain: viz
version: "1.1.0"
purity: pure
signature: "void scatter_plot(const char* title, const float* xs, const float* ys, int count, float height = 200.0f)"
description: "Scatter plot 2D con ImPlot, ejes pineados y altura explicita para no vibrar al redimensionar"
tags: [implot, chart, visualization, gpu, scatter, locked-axes]
uses_functions: ["plot_static_cpp_viz"]
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [implot]
tested: false
tests: []
test_file_path: ""
file_path: "cpp/functions/viz/scatter_plot.cpp"
framework: imgui
params:
- name: title
desc: "Titulo del grafico / id interno"
- name: xs
desc: "Array de coordenadas X"
- name: ys
desc: "Array de coordenadas Y"
- name: count
desc: "Numero de puntos en los arrays xs/ys"
- name: height
desc: "Altura del plot en pixeles (default 200). Explicita para evitar feedback loops"
output: "Renderiza el scatter en el frame ImGui actual con ejes pineados"
notes: "consumido por cpp/apps/chart_demo/main.cpp; scaffolding/demo en primitives_gallery"
---
# scatter_plot
Wrapper atomico sobre `ImPlot::PlotScatter` configurado para visualizacion estatica.
## v1.1
- **Altura explicita** (`height`).
- **Ejes pineados** (`plot_static::kAxisFlags` + `ImPlotCond_Always`) calculados a partir de min/max de `xs`/`ys` con 5% de headroom en ambos ejes.
- **Sin inputs, sin auto-fit** — ver `viz/plot_static.h`.
Soporta `float` y `double`.