Vector{Any}
This commit is contained in:
parent
7185e36795
commit
bb0b6e5d33
@ -53,7 +53,7 @@ function plot(args...; kw...)
|
||||
# create an empty Plot then process
|
||||
plt = Plot()
|
||||
# plt.user_attr = plotattributes
|
||||
_plot!(plt, plotattributes, args)
|
||||
_plot!(plt, plotattributes, Any[args...])
|
||||
end
|
||||
|
||||
# build a new plot from existing plots
|
||||
@ -154,7 +154,7 @@ function plot!(plt::Plot, args...; kw...)
|
||||
plotattributes = KW(kw)
|
||||
preprocessArgs!(plotattributes)
|
||||
# merge!(plt.user_attr, plotattributes)
|
||||
_plot!(plt, plotattributes, args)
|
||||
_plot!(plt, plotattributes, Any[args...])
|
||||
end
|
||||
|
||||
# -------------------------------------------------------------------------------
|
||||
@ -162,9 +162,10 @@ end
|
||||
# this is the core plotting function. recursively apply recipes to build
|
||||
# a list of series KW dicts.
|
||||
# note: at entry, we only have those preprocessed args which were passed in... no default values yet
|
||||
function _plot!(plt::Plot{T}, plotattributes::KW, args::Tuple) where {T}
|
||||
function _plot!(plt::Plot{T}, plotattributes::KW, args::Vector{Any}) where {T}
|
||||
plotattributes[:plot_object] = plt
|
||||
|
||||
|
||||
if !isempty(args) && !isdefined(Main, :StatsPlots) &&
|
||||
first(split(string(typeof(args[1])), ".")) == "DataFrames"
|
||||
@warn("You're trying to plot a DataFrame, but this functionality is provided by StatsPlots")
|
||||
|
||||
@ -143,7 +143,7 @@ struct SliceIt end
|
||||
rib = ribbons[mod1(i,mr)]
|
||||
di[:ribbon] = isa(rib, Function) ? map(rib, di[:x]) : rib
|
||||
|
||||
push!(series_list, RecipeData(di, ()))
|
||||
push!(series_list, RecipeData(di, Any[]))
|
||||
end
|
||||
end
|
||||
nothing # don't add a series for the main block
|
||||
|
||||
@ -30,10 +30,11 @@ attr!(series::Series, v, k::Symbol) = (series.plotattributes[k] = v)
|
||||
# -----------------------------------------------------------
|
||||
|
||||
# a single subplot
|
||||
const StandardPad = Measures.Length{:mm,Float64}
|
||||
mutable struct Subplot{T<:AbstractBackend} <: AbstractLayout
|
||||
parent::AbstractLayout
|
||||
series_list::Vector{Series} # arguments for each series
|
||||
minpad::Tuple # leftpad, toppad, rightpad, bottompad
|
||||
minpad::Tuple{StandardPad,StandardPad,StandardPad,StandardPad} # leftpad, toppad, rightpad, bottompad
|
||||
bbox::BoundingBox # the canvas area which is available to this subplot
|
||||
plotarea::BoundingBox # the part where the data goes
|
||||
attr::KW # args specific to this subplot
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user