Skip to content

Commit

Permalink
add recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith committed May 22, 2024
1 parent 3db0408 commit 42dc080
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PlotsBase/src/DataSeries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ mutable struct Series
plotattributes::DefaultsDict
end

@recipe function f(s::Series)
for (k, v) in s.plotattributes
k == :subplot && continue
plotattributes[k] = v
end
()
end

Base.getindex(series::Series, k::Symbol) = series.plotattributes[k]
Base.setindex!(series::Series, v, k::Symbol) = (series.plotattributes[k] = v)
Base.get(series::Series, k::Symbol, v) = get(series.plotattributes, k, v)
Expand Down

0 comments on commit 42dc080

Please sign in to comment.