-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dashed line style. #483
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Is it ready to merge?
@AaronErhardt Sure, thanks for your review! |
Does this also allow |
Currently not. It needs a custom drawing function setting for the border style. |
A simple work similar to
LineSeries
andPathElement
.New Types
Added
DashedLineSeries
(underline_series
feature) andDashedPathElement
.plotters::series::line_series::DashedLineSeries
- A simple type just makingstd::iter::once(element)
by implementingIntoIterator
, and has the same options as the element type.plotters::element::basic_shapes::DashedPathElement
- A element type drawing dashed lines pixel-wised.Options
points
: The iterator of the points.size
: The dash size.spacing
: The dash-to-dash spacing (gap size).style
: The shape style.If the points are too dense, it will become a solid line.(solved)Preview
Use blue line. The cross markers are the input points.
Another SVG example of my work is 3D coordinates. The curves are projected on a sphere, the main shape using a red dashed line, and the mechanism behind the sphere is shown with gray dashed lines.