Skip to content

Commit

Permalink
add Makie basic recipe (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
Moelf authored Feb 8, 2023
1 parent 8be6bc9 commit 2c14b8f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ version = "3.2.4"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MakieCore = "20f20a25-4f0e-4fdf-b5d1-57303727442b"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"

[compat]
RecipesBase = "0.7, 0.8, 1"
MakieCore = "0.6"
julia = "1.6"

[extras]
Expand Down
1 change: 1 addition & 0 deletions src/Polynomials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Base: evalpoly
include("abstract.jl")
include("show.jl")
include("plots.jl")
include("makie.jl")
include("contrib.jl")

# Interface for all AbstractPolynomials
Expand Down
8 changes: 8 additions & 0 deletions src/makie.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import MakieCore

function MakieCore.convert_arguments(P::Type{<:MakieCore.XYBased}, p::AbstractPolynomial)
xs = poly_interval(p)
return MakieCore.convert_arguments(P, xs, p.(xs))
end

MakieCore.plottype(p::AbstractPolynomial) = MakieCore.Lines

0 comments on commit 2c14b8f

Please sign in to comment.