[#19]:svarga:feature, add plot::donut driver with adjustable plot::hole#20
Merged
Conversation
plot::donut(labels, values, opts...) is now its own driver — a pie with a
default 0.55 inner-radius hole. Both pie and donut accept plot::hole{r} to
set/override the hole fraction (tag renamed donut_t -> hole_t). pie_view gains
a default_inner member; impl::hole_of(fallback, ...) returns the fallback when
no plot::hole{} is given. Updated example, tests (donut driver + hole override),
and docs.
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.
Summary
plot::donut(labels, values, opts...)is now its own driver — a pie with a default 0.55 inner-radius hole.plot::pieandplot::donutacceptplot::hole{r}(r in (0,1)) to set/override the hole fraction.donut_t→hole_tand the option structplot::donut{}(value) →plot::hole{}.pie_viewgains adefault_innermember;impl::hole_of(fallback, ...)returns the fallback when noplot::hole{}is given.Tests
ctest5/5 pass; Valgrind clean (0 errors) onplot_new+plot_fill.plot::hole{}override coverage inplot_new.cpp; donut driver inplot_fill.cppstill asserts a filled ring.Updated example (
examples/pie.cpp) and docs (doxy/docs/index.md).