Fix issue #5. Add Type2D::XBar and Type2D::YBar #13
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.
Add support for horizontal and vertical bar plots. This is done through the new
Type2D::XBar
andType2D::YBar
variants.This PR breaks the old
Type2D::Smooth(f64)
and changes it toType2D::Smooth { tension: f64 }
. This keeps consistency with e.g.XBar
andYBar
, and should be the way to define new variants in the future. It is just much more clear to have the inner required data named rather than just a simplef64
.Something important to keep in mind (also noted in the documentation) is that
bar_width
andbar_shift
in theType2D::XBar
andType2D::YBar
assume by default units ofpt
(Latex's pgfplots fault). So it is a priority to fix issue #12. This will make it much more easy to work with bar plots in units of the axis (withcompat=1.7
or higher).Usage of the new bar plots can be seen in
examples/rectangular_integration.rs
.