How red-data-tools/gr-plot works
GR::Plot is a Ruby, MATLAB-style plotting API built on GR.rb. A caller selects a plot operation and supplies data/options; plot methods normalize or format inputs and dispatch drawing through the central plot renderer to GR. The documented surface includes 2D and 3D plots, statistical and contour plots, and histogram support. GR3 is an optional integration for 3D rendering. The excerpts show only parts of the main implementation, so uncertain internal links are omitted.
Main entry points: plot.rb Plot renderer
Components 10
Plot API
- Plot methods
lib/gr/plot.rb - Data formatting
lib/gr/plot.rb - Histogram bins
lib/gr/plot/histogram.rb
Plot rendering
- Plot renderer
lib/gr/plot.rb - Plot types
lib/gr/plot.rb - Axes and layout
lib/gr/plot.rb - Legend drawing
lib/gr/plot.rb
Rendering integrations
- GR graphics
- GR3 graphics
Other components
- Ruby caller
Connections 8
- Ruby caller → Plot methods: calls
- Plot methods → Data formatting: formats inputs
- Plot methods → Plot renderer: dispatches plots
- Plot renderer → Plot types: selects kind
- Plot renderer → Axes and layout: configures layout
- Plot renderer → Legend drawing: draws legend
- Plot renderer → GR graphics: draws with
- Plot renderer → GR3 graphics: uses for 3D