Skip to content

Commit 2c14b8f

Browse files
authored
add Makie basic recipe (#465)
1 parent 8be6bc9 commit 2c14b8f

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ version = "3.2.4"
66

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

1112
[compat]
1213
RecipesBase = "0.7, 0.8, 1"
14+
MakieCore = "0.6"
1315
julia = "1.6"
1416

1517
[extras]

src/Polynomials.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Base: evalpoly
77
include("abstract.jl")
88
include("show.jl")
99
include("plots.jl")
10+
include("makie.jl")
1011
include("contrib.jl")
1112

1213
# Interface for all AbstractPolynomials

src/makie.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import MakieCore
2+
3+
function MakieCore.convert_arguments(P::Type{<:MakieCore.XYBased}, p::AbstractPolynomial)
4+
xs = poly_interval(p)
5+
return MakieCore.convert_arguments(P, xs, p.(xs))
6+
end
7+
8+
MakieCore.plottype(p::AbstractPolynomial) = MakieCore.Lines

0 commit comments

Comments
 (0)