Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Heyo, I am doing some work to get our sweet (astronomy centric) plotting tools out in the wild. This seemed like a nice entry point, and I thought I might probe your interest in future contributions here...
This ports
celestial-pointing/src/plot/svg.rsfrom plotters to rizzma, a pure-Rust plotting library modelled on matplotlib. The public functions (scatter_svg,histogram_svg,vector_map_svg) keep their signatures, so no callers change, and the textplots terminal renderer is untouched.What each command draws now:
axhline/axvlineinstead of path segments.hist_with(…, 20 bins)replaces the hand-written binning, which is deleted. Bin counts are identical to before, and the grid sits behind the bars.quiver_with, in data units) instead of bare line segments. The[scale]argument still works: an arrow runs from each position toposition + scale × residual.Checked with
pointing-data/gem-28.dat(454 observations, fit with IH ID CH NP MA ME): every plot has the expected number of points, bars and arrows, and all 600 crate tests pass. Clippy is clean with-D warnings.Trade-offs, to be upfront:
svg_fonttypeto native text cuts GSCAT to about 33 KB, half of plotters', if you'd prefer that; it's a one-line change.Happy to adjust styling, or to hold this if you'd rather keep the lighter SVG backend.