Skip to content
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

Fix issue #5. Add Type2D::XBar and Type2D::YBar #13

Merged
merged 3 commits into from
Jun 5, 2022
Merged

Fix issue #5. Add Type2D::XBar and Type2D::YBar #13

merged 3 commits into from
Jun 5, 2022

Conversation

DJDuque
Copy link
Owner

@DJDuque DJDuque commented Jun 5, 2022

Add support for horizontal and vertical bar plots. This is done through the new Type2D::XBar and Type2D::YBar variants.

This PR breaks the old Type2D::Smooth(f64) and changes it to Type2D::Smooth { tension: f64 }. This keeps consistency with e.g. XBar and YBar, 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 simple f64.

Something important to keep in mind (also noted in the documentation) is that bar_width and bar_shift in the Type2D::XBar and Type2D::YBar assume by default units of pt (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 (with compat=1.7 or higher).

Usage of the new bar plots can be seen in examples/rectangular_integration.rs.

@DJDuque DJDuque merged commit ce40569 into main Jun 5, 2022
@DJDuque DJDuque deleted the bar branch June 5, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant