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

Add plotting recipes #284

Merged
merged 8 commits into from
Feb 6, 2024
Merged

Conversation

hyrodium
Copy link
Collaborator

@hyrodium hyrodium commented Feb 4, 2024

This PR fixes #279.

julia> using Plots, Rotations

julia> plot(rand(QuatRotation); linewidth=3)

julia> plot!(rand(QuatRotation); linewidth=3, origin=(1,0,0))
Peek.2024-02-05.02-12.mp4

@hyrodium
Copy link
Collaborator Author

hyrodium commented Feb 4, 2024

Perhaps the origin points should be a cube, not a disk.

@hyrodium
Copy link
Collaborator Author

hyrodium commented Feb 5, 2024

Visualizing Slerp

using Rotations
using Plots
using Random
plotly()
Random.seed!(42)
R1 = rand(QuatRotation)
R2 = rand(QuatRotation)

plot(R1; linewidth=3, label="R1")
plot!(R2; linewidth=3, label="R2", origin=(1,0,0))

N = 12
for i in 2:N-1
    t = i/N
    plot!(slerp(R1,R2,t); linewidth=3, label=nothing, origin=(t,0,0), boxsize=0.0, axissize=3/4)
end
plot!()
Peek.2024-02-05.12-29.mp4

@hyrodium
Copy link
Collaborator Author

hyrodium commented Feb 5, 2024

TODO

  • fix dependency for Julia 1.6
  • Add support for Rotation{2}
  • Add tests
  • Add docs (maybe in another PR)

@hyrodium
Copy link
Collaborator Author

hyrodium commented Feb 6, 2024

using Rotations
using Plots
plot(Angle2d(0.2); aspectratio=1)
plot!(Angle2d(0.3); aspectratio=1)

image

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (5407354) 90.44% compared to head (1478a4f) 90.63%.
Report is 3 commits behind head on master.

Files Patch % Lines
ext/RotationsRecipesBaseExt.jl 96.07% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #284      +/-   ##
==========================================
+ Coverage   90.44%   90.63%   +0.19%     
==========================================
  Files          17       18       +1     
  Lines        1664     1709      +45     
==========================================
+ Hits         1505     1549      +44     
- Misses        159      160       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hyrodium hyrodium merged commit d3fe01d into JuliaGeometry:master Feb 6, 2024
10 checks passed
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.

Add plotting methods
1 participant