gonum / plot

A repository for plotting and visualizing data
BSD 3-Clause "New" or "Revised" License
2.72k stars 202 forks source link

plotter: implement GlyphBoxer for plotter.Line #762

Closed sbinet closed 1 year ago

sbinet commented 1 year ago

Fixes #761.

Please take a look.

sbinet commented 1 year ago

one existential question: should we create one gigantic glyphbox (or rather 4, one around each of the xmin, xmax, ymin, and ymax points), or one for each of line's points (as is done in this PR) ?

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +1.50 :tada:

Comparison is base (1cd1f0e) 73.34% compared to head (49a83ba) 74.85%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #762 +/- ## ========================================== + Coverage 73.34% 74.85% +1.50% ========================================== Files 56 58 +2 Lines 5159 7368 +2209 ========================================== + Hits 3784 5515 +1731 - Misses 1191 1657 +466 - Partials 184 196 +12 ``` | [Impacted Files](https://codecov.io/gh/gonum/plot/pull/762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gonum) | Coverage Δ | | |---|---|---| | [plotter/line.go](https://codecov.io/gh/gonum/plot/pull/762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gonum#diff-cGxvdHRlci9saW5lLmdv) | `92.12% <100.00%> (+1.32%)` | :arrow_up: | ... and [54 files with indirect coverage changes](https://codecov.io/gh/gonum/plot/pull/762/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gonum) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gonum). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gonum)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

kortschak commented 1 year ago

I think what you have is probably the best approach. I am concerned about the impact on the step plot though. It does weird things to the alignment in ways that I would not expect.