From 366d598ff0602c6dfb6745f2959d7407cdba4b64 Mon Sep 17 00:00:00 2001 From: yha Date: Wed, 29 Jan 2020 01:25:04 +0200 Subject: [PATCH] Implement plotattributes with defaults. Fixes "-->" in series recipes. --- src/Plots.jl | 2 +- src/args.jl | 193 +++++++++++++++-------------- src/axes.jl | 19 +-- src/backends/unicodeplots.jl | 2 +- src/layouts.jl | 6 +- src/pipeline.jl | 23 ++-- src/plot.jl | 15 ++- src/precompile.jl | 227 +++++++++++------------------------ src/series.jl | 2 +- src/subplots.jl | 2 +- src/types.jl | 53 +++++++- src/utils.jl | 10 +- 12 files changed, 256 insertions(+), 298 deletions(-) diff --git a/src/Plots.jl b/src/Plots.jl index 6b64f9c0..152f0f24 100644 --- a/src/Plots.jl +++ b/src/Plots.jl @@ -11,7 +11,7 @@ import SparseArrays: findnz using FFMPEG @reexport using RecipesBase -import RecipesBase: plot, plot!, animate +import RecipesBase: plot, plot!, animate, is_explicit using Base.Meta @reexport using PlotUtils @reexport using PlotThemes diff --git a/src/args.jl b/src/args.jl index a6f0f41d..fd6cceb3 100644 --- a/src/args.jl +++ b/src/args.jl @@ -90,7 +90,7 @@ like_surface(seriestype::Symbol) = seriestype in _surface_like is3d(seriestype::Symbol) = seriestype in _3dTypes is3d(series::Series) = is3d(series.plotattributes) -is3d(plotattributes::KW) = trueOrAllTrue(is3d, Symbol(plotattributes[:seriestype])) +is3d(plotattributes::AKW) = trueOrAllTrue(is3d, Symbol(plotattributes[:seriestype])) is3d(sp::Subplot) = string(sp.attr[:projection]) == "3d" ispolar(sp::Subplot) = string(sp.attr[:projection]) == "polar" @@ -418,37 +418,26 @@ const _suppress_warnings = Set{Symbol}([ # add defaults for the letter versions const _axis_defaults_byletter = KW() -for letter in (:x,:y,:z) - for k in keys(_axis_defaults) - # for k in ( - # :guide, - # :lims, - # :ticks, - # :scale, - # :rotation, - # :flip, - # :link, - # :tickfont, - # :guidefont, - # :foreground_color_axis, - # :foreground_color_border, - # :foreground_color_text, - # :foreground_color_guide, - # :discrete_values, - # :formatter, - # ) - _axis_defaults_byletter[Symbol(letter,k)] = :match - # allow the underscore version too: xguide or x_guide - add_aliases(Symbol(letter, k), Symbol(letter, "_", k)) +function reset_axis_defaults_byletter!() + for letter in (:x,:y,:z) + _axis_defaults_byletter[letter] = KW() + for (k,v) in _axis_defaults + _axis_defaults_byletter[letter][k] = v + end end end +reset_axis_defaults_byletter!() + +for letter in (:x,:y,:z), k in keys(_axis_defaults) + # allow the underscore version too: xguide or x_guide + add_aliases(Symbol(letter, k), Symbol(letter, "_", k)) +end const _all_defaults = KW[ _series_defaults, _plot_defaults, - _subplot_defaults, - _axis_defaults_byletter + _subplot_defaults ] const _initial_defaults = deepcopy(_all_defaults) @@ -463,6 +452,12 @@ const _initial_fontsizes = Dict(:titlefontsize => _subplot_defaults[:titlefonts const _all_args = sort(collect(union(map(keys, _all_defaults)...))) +is_subplot_attr(k) = haskey(_subplot_defaults, k) +is_series_attr(k) = haskey(_series_defaults, k) +#is_axis_attr(k) = haskey(_axis_defaults_byletter, k) +is_axis_attr(k) = haskey(_axis_defaults, Symbol(chop(string(k); head=1, tail=0))) +is_axis_attr_noletter(k) = haskey(_axis_defaults, k) + RecipesBase.is_key_supported(k::Symbol) = is_attr_supported(k) # ----------------------------------------------------------------------------- @@ -475,7 +470,7 @@ autopick(notarr, idx::Integer) = notarr autopick_ignore_none_auto(arr::AVec, idx::Integer) = autopick(setdiff(arr, [:none, :auto]), idx) autopick_ignore_none_auto(notarr, idx::Integer) = notarr -function aliasesAndAutopick(plotattributes::KW, sym::Symbol, aliases::Dict{Symbol,Symbol}, options::AVec, plotIndex::Int) +function aliasesAndAutopick(plotattributes::AKW, sym::Symbol, aliases::Dict{Symbol,Symbol}, options::AVec, plotIndex::Int) if plotattributes[sym] == :auto plotattributes[sym] = autopick_ignore_none_auto(options, plotIndex) elseif haskey(aliases, plotattributes[sym]) @@ -611,6 +606,16 @@ end # ----------------------------------------------------------------------------- +function parse_axis_kw(s::Symbol) + s = string(s) + for letter in ('x', 'y', 'z') + if startswith(s, letter) + return (Symbol(letter), Symbol(chop(s, head=1, tail=0))) + end + end + return nothing +end + # update the defaults globally """ @@ -629,6 +634,10 @@ function default(k::Symbol) if haskey(_axis_defaults, k) return _axis_defaults[k] end + if (axis_k = parse_axis_kw(k)) !== nothing + letter, key = axis_k + return _axis_defaults_byletter[letter][key] + end k in _suppress_warnings || error("Unknown key: ", k) end @@ -644,6 +653,11 @@ function default(k::Symbol, v) _axis_defaults[k] = v return v end + if (axis_k = parse_axis_kw(k)) !== nothing + letter, key = axis_k + _axis_defaults_byletter[letter][key] = v + return v + end k in _suppress_warnings || error("Unknown key: ", k) end @@ -655,19 +669,20 @@ function default(; kw...) end end -function default(plotattributes::KW, k::Symbol) +function default(plotattributes::AKW, k::Symbol) get(plotattributes, k, default(k)) end function reset_defaults() foreach(merge!, _all_defaults, _initial_defaults) merge!(_axis_defaults, _initial_axis_defaults) + reset_axis_defaults_byletter!() end # ----------------------------------------------------------------------------- # if arg is a valid color value, then set plotattributes[csym] and return true -function handleColors!(plotattributes::KW, arg, csym::Symbol) +function handleColors!(plotattributes::AKW, arg, csym::Symbol) try if arg == :auto plotattributes[csym] = :auto @@ -684,7 +699,7 @@ end -function processLineArg(plotattributes::KW, arg) +function processLineArg(plotattributes::AKW, arg) # seriestype if allLineTypes(arg) plotattributes[:seriestype] = arg @@ -723,7 +738,7 @@ function processLineArg(plotattributes::KW, arg) end -function processMarkerArg(plotattributes::KW, arg) +function processMarkerArg(plotattributes::AKW, arg) # markershape if allShapes(arg) plotattributes[:markershape] = arg @@ -763,7 +778,7 @@ function processMarkerArg(plotattributes::KW, arg) end -function processFillArg(plotattributes::KW, arg) +function processFillArg(plotattributes::AKW, arg) # fr = get(plotattributes, :fillrange, 0) if typeof(arg) <: Brush arg.size === nothing || (plotattributes[:fillrange] = arg.size) @@ -793,7 +808,7 @@ function processFillArg(plotattributes::KW, arg) end -function processGridArg!(plotattributes::KW, arg, letter) +function processGridArg!(plotattributes::AKW, arg, letter) if arg in _allGridArgs || isa(arg, Bool) plotattributes[Symbol(letter, :grid)] = hasgrid(arg, letter) @@ -821,7 +836,7 @@ function processGridArg!(plotattributes::KW, arg, letter) end end -function processMinorGridArg!(plotattributes::KW, arg, letter) +function processMinorGridArg!(plotattributes::AKW, arg, letter) if arg in _allGridArgs || isa(arg, Bool) plotattributes[Symbol(letter, :minorgrid)] = hasgrid(arg, letter) @@ -854,7 +869,7 @@ function processMinorGridArg!(plotattributes::KW, arg, letter) end end -function processFontArg!(plotattributes::KW, fontname::Symbol, arg) +function processFontArg!(plotattributes::AKW, fontname::Symbol, arg) T = typeof(arg) if T <: Font plotattributes[Symbol(fontname, :family)] = arg.family @@ -901,7 +916,7 @@ function _add_markershape(plotattributes::KW) end "Handle all preprocessing of args... break out colors/sizes/etc and replace aliases." -function preprocessArgs!(plotattributes::KW) +function preprocessArgs!(plotattributes::AKW) replaceAliases!(plotattributes, _keyAliases) # clear all axis stuff @@ -921,7 +936,7 @@ function preprocessArgs!(plotattributes::KW) # end # handle axis args common to all axis - args = pop!(plotattributes, :axis, ()) + args = pop_kw!(plotattributes, :axis, ()) for arg in wraptuple(args) for letter in (:x, :y, :z) process_axis_arg!(plotattributes, arg, letter) @@ -930,7 +945,7 @@ function preprocessArgs!(plotattributes::KW) # handle axis args for letter in (:x, :y, :z) asym = Symbol(letter, :axis) - args = pop!(plotattributes, asym, ()) + args = pop_kw!(plotattributes, asym, ()) if !(typeof(args) <: Axis) for arg in wraptuple(args) process_axis_arg!(plotattributes, arg, letter) @@ -948,7 +963,7 @@ function preprocessArgs!(plotattributes::KW) end # handle grid args common to all axes - args = pop!(plotattributes, :grid, ()) + args = pop_kw!(plotattributes, :grid, ()) for arg in wraptuple(args) for letter in (:x, :y, :z) processGridArg!(plotattributes, arg, letter) @@ -957,13 +972,13 @@ function preprocessArgs!(plotattributes::KW) # handle individual axes grid args for letter in (:x, :y, :z) gridsym = Symbol(letter, :grid) - args = pop!(plotattributes, gridsym, ()) + args = pop_kw!(plotattributes, gridsym, ()) for arg in wraptuple(args) processGridArg!(plotattributes, arg, letter) end end # handle minor grid args common to all axes - args = pop!(plotattributes, :minorgrid, ()) + args = pop_kw!(plotattributes, :minorgrid, ()) for arg in wraptuple(args) for letter in (:x, :y, :z) processMinorGridArg!(plotattributes, arg, letter) @@ -972,21 +987,21 @@ function preprocessArgs!(plotattributes::KW) # handle individual axes grid args for letter in (:x, :y, :z) gridsym = Symbol(letter, :minorgrid) - args = pop!(plotattributes, gridsym, ()) + args = pop_kw!(plotattributes, gridsym, ()) for arg in wraptuple(args) processMinorGridArg!(plotattributes, arg, letter) end end # fonts for fontname in (:titlefont, :legendfont, :legendtitlefont) - args = pop!(plotattributes, fontname, ()) + args = pop_kw!(plotattributes, fontname, ()) for arg in wraptuple(args) processFontArg!(plotattributes, fontname, arg) end end # handle font args common to all axes for fontname in (:tickfont, :guidefont) - args = pop!(plotattributes, fontname, ()) + args = pop_kw!(plotattributes, fontname, ()) for arg in wraptuple(args) for letter in (:x, :y, :z) processFontArg!(plotattributes, Symbol(letter, fontname), arg) @@ -996,7 +1011,7 @@ function preprocessArgs!(plotattributes::KW) # handle individual axes font args for letter in (:x, :y, :z) for fontname in (:tickfont, :guidefont) - args = pop!(plotattributes, Symbol(letter, fontname), ()) + args = pop_kw!(plotattributes, Symbol(letter, fontname), ()) for arg in wraptuple(args) processFontArg!(plotattributes, Symbol(letter, fontname), arg) end @@ -1004,7 +1019,7 @@ function preprocessArgs!(plotattributes::KW) end # handle line args - for arg in wraptuple(pop!(plotattributes, :line, ())) + for arg in wraptuple(pop_kw!(plotattributes, :line, ())) processLineArg(plotattributes, arg) end @@ -1018,7 +1033,7 @@ function preprocessArgs!(plotattributes::KW) processMarkerArg(plotattributes, arg) anymarker = true end - delete!(plotattributes, :marker) + reset_kw!(plotattributes, :marker) if haskey(plotattributes, :markershape) plotattributes[:markershape] = _replace_markershape(plotattributes[:markershape]) if plotattributes[:markershape] == :none && plotattributes[:seriestype] in (:scatter, :scatterbins, :scatterhist, :scatter3d) #the default should be :auto, not :none, so that :none can be set explicitly and would be respected @@ -1032,7 +1047,7 @@ function preprocessArgs!(plotattributes::KW) for arg in wraptuple(get(plotattributes, :fill, ())) processFillArg(plotattributes, arg) end - delete!(plotattributes, :fill) + reset_kw!(plotattributes, :fill) # handle series annotations if haskey(plotattributes, :series_annotations) @@ -1149,7 +1164,7 @@ end const _already_warned = Dict{Symbol,Set{Symbol}}() const _to_warn = Set{Symbol}() -function warnOnUnsupported_args(pkg::AbstractBackend, plotattributes::KW) +function warnOnUnsupported_args(pkg::AbstractBackend, plotattributes) empty!(_to_warn) bend = backend_name(pkg) already_warned = get!(_already_warned, bend, Set{Symbol}()) @@ -1173,7 +1188,7 @@ end # _markershape_supported(pkg::AbstractBackend, shape::Shape) = Shape in supported_markers(pkg) # _markershape_supported(pkg::AbstractBackend, shapes::AVec) = all([_markershape_supported(pkg, shape) for shape in shapes]) -function warnOnUnsupported(pkg::AbstractBackend, plotattributes::KW) +function warnOnUnsupported(pkg::AbstractBackend, plotattributes) if !is_seriestype_supported(pkg, plotattributes[:seriestype]) @warn("seriestype $(plotattributes[:seriestype]) is unsupported with $pkg. Choose from: $(supported_seriestypes(pkg))") end @@ -1231,18 +1246,19 @@ slice_arg(wrapper::InputWrapper, idx) = wrapper.obj slice_arg(v, idx) = v -# given an argument key (k), we want to extract the argument value for this index. -# matrices are sliced by column, otherwise we -# if nothing is set (or container is empty), return the default or the existing value. -function slice_arg!(plotattributes_in::KW,plotattributes_out::KW, k::Symbol, default_value, idx::Int, remove_pair::Bool) - v = get(plotattributes_in, k, get(plotattributes_out, k, default_value)) - plotattributes_out[k] = if haskey(plotattributes_in, k) && typeof(v) <: AMat && !isempty(v) +# given an argument key (k), extract the argument value for this index, +# and set into plotattributes[k]. Matrices are sliced by column. +# if nothing is set (or container is empty), return the existing value. +function slice_arg!(plotattributes_in, plotattributes_out, + k::Symbol, idx::Int, remove_pair::Bool) + v = get(plotattributes_in, k, plotattributes_out[k]) + plotattributes_out[k] = if haskey(plotattributes_in, k) && typeof(v) <: AMat && !isempty(v) slice_arg(v, idx) else v end if remove_pair - delete!(plotattributes_in, k) + reset_kw!(plotattributes_in, k) end return end @@ -1262,15 +1278,9 @@ end # end # end -function color_or_nothing!(plotattributes::KW, k::Symbol) +function color_or_nothing!(plotattributes, k::Symbol) v = plotattributes[k] - plotattributes[k] = if v === nothing || v == false - RGBA{Float64}(0,0,0,0) - elseif v != :match - plot_color(v) - else - v - end + plotattributes[k] = v == :match ? v : plot_color(v) return end @@ -1369,18 +1379,18 @@ Base.get(series::Series, k::Symbol, v) = get(series.plotattributes, k, v) # ----------------------------------------------------------------------------- -function fg_color(plotattributes::KW) - fg = default(plotattributes, :foreground_color) +function fg_color(plotattributes::Attr) + fg = plotattributes[:foreground_color] if fg == :auto - bg = plot_color(default(plotattributes, :background_color)) + bg = plot_color(plotattributes[:background_color]) fg = isdark(bg) ? colorant"white" : colorant"black" else plot_color(fg) end end -function fg_color_sp(plotattributes::KW) - fgsp = default(plotattributes, :foreground_color_subplot) +function fg_color_sp(plotattributes::Attr) + fgsp = plotattributes[:foreground_color_subplot] if fg == :match fg_color(plotattributes) else @@ -1391,13 +1401,15 @@ end # update attr from an input dictionary -function _update_plot_args(plt::Plot, plotattributes_in::KW) - for (k,v) in _plot_defaults - slice_arg!(plotattributes_in, plt.attr, k, v, 1, true) - end +function _update_plot_args(plt::Plot, plotattributes_in::AKW) + # TODO do merged kws need to be removed from plotattributes_in? + merge!(plt.attr, plotattributes_in) + # for (k,v) in _plot_defaults + # slice_arg!(plotattributes_in, plt.attr, k, v, 1, true) + # end # handle colors - plotattributes= plt.attr + plotattributes= plt.attr plt[:background_color] = plot_color(plotattributes[:background_color]) plt[:foreground_color] = fg_color(plotattributes) # bg = plot_color(plt.attr[:background_color]) @@ -1444,7 +1456,7 @@ function _update_subplot_colors(sp::Subplot) return end -function _update_axis(plt::Plot, sp::Subplot, plotattributes_in::KW, letter::Symbol, subplot_index::Int) +function _update_axis(plt::Plot, sp::Subplot, plotattributes_in::AKW, letter::Symbol, subplot_index::Int) # get (maybe initialize) the axis axis = get_axis(sp, letter) @@ -1460,13 +1472,13 @@ function _update_axis(plt::Plot, sp::Subplot, plotattributes_in::KW, letter::Sym return end -function _update_axis(axis::Axis, plotattributes_in::KW, letter::Symbol, subplot_index::Int) +function _update_axis(axis::Axis, plotattributes_in::AKW, letter::Symbol, subplot_index::Int) # grab magic args (for example `xaxis = (:flip, :log)`) args = wraptuple(get(plotattributes_in, Symbol(letter, :axis), ())) # build the KW of arguments from the letter version (i.e. xticks --> ticks) kw = KW() - for (k,v) in _axis_defaults + for k in keys(_axis_defaults) # first get the args without the letter: `tickfont = font(10)` # note: we don't pop because we want this to apply to all axes! (delete after all have finished) if haskey(plotattributes_in, k) @@ -1511,12 +1523,12 @@ function _update_axis_links(plt::Plot, axis::Axis, letter::Symbol) end # update a subplots args and axes -function _update_subplot_args(plt::Plot, sp::Subplot, plotattributes_in::KW, subplot_index::Int, remove_pair::Bool) - anns = pop!(sp.attr, :annotations, []) +function _update_subplot_args(plt::Plot, sp::Subplot, plotattributes_in, subplot_index::Int, remove_pair::Bool) + anns = pop_kw!(sp.attr, :annotations) - # grab those args which apply to this subplot - for (k,v) in _subplot_defaults - slice_arg!(plotattributes_in, sp.attr, k, v, subplot_index, remove_pair) + # # grab those args which apply to this subplot + for k in keys(_subplot_defaults) + slice_arg!(plotattributes_in, sp.attr, k, subplot_index, remove_pair) end _update_subplot_periphery(sp, anns) @@ -1550,30 +1562,27 @@ function get_series_color(c::AbstractArray, sp::Subplot, n::Int, seriestype) map(x->get_series_color(x, sp, n, seriestype), c) end -function ensure_gradient!(plotattributes::KW, csym::Symbol, asym::Symbol) +function ensure_gradient!(plotattributes::AKW, csym::Symbol, asym::Symbol) if !isa(plotattributes[csym], ColorGradient) plotattributes[csym] = typeof(plotattributes[asym]) <: AbstractVector ? cgrad() : cgrad(alpha = plotattributes[asym]) end end -function _replace_linewidth(plotattributes::KW) +function _replace_linewidth(plotattributes::AKW) # get a good default linewidth... 0 for surface and heatmaps - if get(plotattributes, :linewidth, :auto) == :auto + if plotattributes[:linewidth] == :auto plotattributes[:linewidth] = (get(plotattributes, :seriestype, :path) in (:surface,:heatmap,:image) ? 0 : 1) end end -function _add_defaults!(plotattributes::KW, plt::Plot, sp::Subplot, commandIndex::Int) - # add default values to our dictionary, being careful not to delete what we just added! - for (k,v) in _series_defaults - slice_arg!(plotattributes, plotattributes, k, v, commandIndex, false) +function _slice_series_args!(plotattributes::AKW, plt::Plot, sp::Subplot, commandIndex::Int) + for k in keys(_series_defaults) + haskey(plotattributes, k) && slice_arg!(plotattributes, plotattributes, k, commandIndex, false) end - return plotattributes end - -function _update_series_attributes!(plotattributes::KW, plt::Plot, sp::Subplot) +function _update_series_attributes!(plotattributes::AKW, plt::Plot, sp::Subplot) pkg = plt.backend globalIndex = plotattributes[:series_plotindex] plotIndex = _series_index(plotattributes, sp) diff --git a/src/axes.jl b/src/axes.jl index baebcaac..0b97e8c2 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -7,29 +7,20 @@ # ------------------------------------------------------------------------- function Axis(sp::Subplot, letter::Symbol, args...; kw...) - # init with values from _plot_defaults - plotattributes = KW( + explicit = KW( :letter => letter, - # :extrema => (Inf, -Inf), :extrema => Extrema(), :discrete_map => Dict(), # map discrete values to discrete indices :continuous_values => zeros(0), + :discrete_values => [], :use_minor => false, :show => true, # show or hide the axis? (useful for linked subplots) ) - # get defaults from letter version, unless match - for (k,v) in _axis_defaults - lk = Symbol(letter, k) - lv = _axis_defaults_byletter[lk] - plotattributes[k] = (lv == :match ? v : lv) - end - - # merge!(plotattributes, _axis_defaults) - plotattributes[:discrete_values] = [] + attr = Attr(explicit, _axis_defaults_byletter[letter]) # update the defaults - attr!(Axis([sp], plotattributes), args...; kw...) + attr!(Axis([sp], attr), args...; kw...) end function get_axis(sp::Subplot, letter::Symbol) @@ -361,7 +352,7 @@ function expand_extrema!(axis::Axis, v::AVec{N}) where N<:Number end -function expand_extrema!(sp::Subplot, plotattributes::KW) +function expand_extrema!(sp::Subplot, plotattributes::AKW) vert = isvertical(plotattributes) # first expand for the data diff --git a/src/backends/unicodeplots.jl b/src/backends/unicodeplots.jl index cabb89bb..b0eb8b31 100644 --- a/src/backends/unicodeplots.jl +++ b/src/backends/unicodeplots.jl @@ -92,7 +92,7 @@ end # add a single series -function addUnicodeSeries!(o, plotattributes::KW, addlegend::Bool, xlim, ylim) +function addUnicodeSeries!(o, plotattributes, addlegend::Bool, xlim, ylim) # get the function, or special handling for step/bar/hist st = plotattributes[:seriestype] if st == :histogram2d diff --git a/src/layouts.jl b/src/layouts.jl index 1bc5367b..46ef19e7 100644 --- a/src/layouts.jl +++ b/src/layouts.jl @@ -464,11 +464,11 @@ end # constructors # pass the layout arg through -function layout_args(plotattributes::KW) - layout_args(get(plotattributes, :layout, default(:layout))) +function layout_args(plotattributes::AKW) + layout_args(plotattributes[:layout]) end -function layout_args(plotattributes::KW, n_override::Integer) +function layout_args(plotattributes::AKW, n_override::Integer) layout, n = layout_args(n_override, get(plotattributes, :layout, n_override)) if n != n_override error("When doing layout, n ($n) != n_override ($(n_override)). You're probably trying to force existing plots into a layout that doesn't fit them.") diff --git a/src/pipeline.jl b/src/pipeline.jl index 4966b7f8..463aa26c 100644 --- a/src/pipeline.jl +++ b/src/pipeline.jl @@ -3,7 +3,7 @@ # ------------------------------------------------------------------ # preprocessing -function command_idx(kw_list::AVec{KW}, kw::KW) +function series_idx(kw_list::AVec{KW}, kw::KW) Int(kw[:series_plotindex]) - Int(kw_list[1][:series_plotindex]) + 1 end @@ -42,7 +42,9 @@ function _preprocess_args(plotattributes::KW, args, still_to_process::Vector{Rec for (k,v) in plotattributes for defdict in (_subplot_defaults, _axis_defaults, - _axis_defaults_byletter) + _axis_defaults_byletter[:x], + _axis_defaults_byletter[:y], + _axis_defaults_byletter[:z]) if haskey(defdict, k) delete!(plotattributes, k) end @@ -261,16 +263,16 @@ function _subplot_setup(plt::Plot, plotattributes::KW, kw_list::Vector{KW}) for kw in kw_list # get the Subplot object to which the series belongs. sps = get(kw, :subplot, :auto) - sp = get_subplot(plt, _cycle(sps == :auto ? plt.subplots : plt.subplots[sps], command_idx(kw_list,kw))) + sp = get_subplot(plt, _cycle(sps == :auto ? plt.subplots : plt.subplots[sps], series_idx(kw_list,kw))) kw[:subplot] = sp # extract subplot/axis attributes from kw and add to sp_attr attr = KW() for (k,v) in collect(kw) - if haskey(_subplot_defaults, k) || haskey(_axis_defaults_byletter, k) + if is_subplot_attr(k) || is_axis_attr(k) attr[k] = pop!(kw, k) end - if haskey(_axis_defaults, k) + if is_axis_attr_noletter(k) v = pop!(kw, k) for letter in (:x,:y,:z) attr[Symbol(letter,k)] = v @@ -303,7 +305,7 @@ end # getting ready to add the series... last update to subplot from anything # that might have been added during series recipes -function _prepare_subplot(plt::Plot{T}, plotattributes::KW) where T +function _prepare_subplot(plt::Plot{T}, plotattributes::AKW) where T st::Symbol = plotattributes[:seriestype] sp::Subplot{T} = plotattributes[:subplot] sp_idx = get_subplot_index(plt, sp) @@ -327,7 +329,7 @@ end # ------------------------------------------------------------------ # series types -function _override_seriestype_check(plotattributes::KW, st::Symbol) +function _override_seriestype_check(plotattributes::AKW, st::Symbol) # do we want to override the series type? if !is3d(st) && !(st in (:contour,:contour3d)) z = plotattributes[:z] @@ -339,7 +341,7 @@ function _override_seriestype_check(plotattributes::KW, st::Symbol) st end -function _prepare_annotations(sp::Subplot, plotattributes::KW) +function _prepare_annotations(sp::Subplot, plotattributes::AKW) # strip out series annotations (those which are based on series x/y coords) # and add them to the subplot attr sp_anns = annotations(sp[:annotations]) @@ -356,7 +358,7 @@ function _prepare_annotations(sp::Subplot, plotattributes::KW) # sp.attr[:annotations] = vcat(sp_anns, series_anns) end -function _expand_subplot_extrema(sp::Subplot, plotattributes::KW, st::Symbol) +function _expand_subplot_extrema(sp::Subplot, plotattributes::AKW, st::Symbol) # adjust extrema and discrete info if st == :image xmin, xmax = ignorenan_extrema(plotattributes[:x]); ymin, ymax = ignorenan_extrema(plotattributes[:y]) @@ -385,7 +387,8 @@ end # this method recursively applies series recipes when the seriestype is not supported # natively by the backend -function _process_seriesrecipe(plt::Plot, plotattributes::KW) +function _process_seriesrecipe(plt::Plot, plotattributes::AKW) + #println("process $(typeof(plotattributes))") # replace seriestype aliases st = Symbol(plotattributes[:seriestype]) st = plotattributes[:seriestype] = get(_typeAliases, st, st) diff --git a/src/plot.jl b/src/plot.jl index 4352403a..1a7ddabb 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -96,7 +96,7 @@ function plot(plt1::Plot, plts_tail::Plot...; kw...) series_attr = KW() for (k,v) in plotattributes - if haskey(_series_defaults, k) + if is_series_attr(k) series_attr[k] = pop!(plotattributes,k) end end @@ -119,7 +119,7 @@ function plot(plt1::Plot, plts_tail::Plot...; kw...) sp.attr[:subplot_index] = idx for series in serieslist merge!(series.plotattributes, series_attr) - _add_defaults!(series.plotattributes, plt, sp, cmdidx) + _slice_series_args!(series.plotattributes, plt, sp, cmdidx) push!(plt.series_list, series) _series_added(plt, series) cmdidx += 1 @@ -217,21 +217,20 @@ function _plot!(plt::Plot, plotattributes::KW, args::Tuple) for kw in kw_list sp::Subplot = kw[:subplot] - # idx = get_subplot_index(plt, sp) - # # we update subplot args in case something like the color palatte is part of the recipe - # _update_subplot_args(plt, sp, kw, idx, true) + # in series attributes given as vector with one element per series, + # select the value for current series + _slice_series_args!(kw, plt, sp, series_idx(kw_list,kw)) - # set default values, select from attribute cycles, and generally set the final attributes - _add_defaults!(kw, plt, sp, command_idx(kw_list,kw)) + series_attr = Attr(kw, _series_defaults) # now we have a fully specified series, with colors chosen. we must recursively handle # series recipes, which dispatch on seriestype. If a backend does not natively support a seriestype, # we check for a recipe that will convert that series type into one made up of lower-level components. # For example, a histogram is just a bar plot with binned data, a bar plot is really a filled step plot, # and a step plot is really just a path. So any backend that supports drawing a path will implicitly # be able to support step, bar, and histogram plots (and any recipes that use those components). - _process_seriesrecipe(plt, kw) + _process_seriesrecipe(plt, series_attr) end # -------------------------------- diff --git a/src/precompile.jl b/src/precompile.jl index a171ac36..c5804950 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -27,7 +27,6 @@ function _precompile_() isdefined(Plots, Symbol("#kw##gr_polyline")) && precompile(Tuple{getfield(Plots, Symbol("#kw##gr_polyline")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Array{Int64, 1}, Array{Float64, 1}}) isdefined(Plots, Symbol("#kw##gr_polyline")) && precompile(Tuple{getfield(Plots, Symbol("#kw##gr_polyline")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Base.UnitRange{Int64}, Array{Float64, 1}}) isdefined(Plots, Symbol("#kw##gr_set_font")) && precompile(Tuple{getfield(Plots, Symbol("#kw##gr_set_font")), NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}}, typeof(Plots.gr_set_font), Plots.Font}) - isdefined(Plots, Symbol("#kw##gr_set_font")) && precompile(Tuple{getfield(Plots, Symbol("#kw##gr_set_font")), NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}}, typeof(Plots.gr_set_font), Plots.Font}) isdefined(Plots, Symbol("#kw##heatmap")) && precompile(Tuple{getfield(Plots, Symbol("#kw##heatmap")), NamedTuple{(:aspect_ratio,), Tuple{Int64}}, typeof(Plots.heatmap), Array{String, 1}, Int}) isdefined(Plots, Symbol("#kw##histogram")) && precompile(Tuple{getfield(Plots, Symbol("#kw##histogram")), NamedTuple{(:bins, :weights), Tuple{Symbol, Array{Int64, 1}}}, typeof(Plots.histogram), Array{Float64, 1}}) isdefined(Plots, Symbol("#kw##histogram2d")) && precompile(Tuple{getfield(Plots, Symbol("#kw##histogram2d")), NamedTuple{(:nbins, :show_empty_bins, :normed, :aspect_ratio), Tuple{Tuple{Int64, Int64}, Bool, Bool, Int64}}, typeof(Plots.histogram2d), Array{Base.Complex{Float64}, 1}}) @@ -42,20 +41,17 @@ function _precompile_() isdefined(Plots, Symbol("#kw##scatter")) && precompile(Tuple{getfield(Plots, Symbol("#kw##scatter")), NamedTuple{(:m, :lab, :bg, :xlim, :ylim), Tuple{Tuple{Int64, Symbol}, Array{String, 2}, Symbol, Tuple{Int64, Int64}, Tuple{Int64, Int64}}}, typeof(Plots.scatter), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Int}) isdefined(Plots, Symbol("#kw##test_examples")) && precompile(Tuple{getfield(Plots, Symbol("#kw##test_examples")), NamedTuple{(:disp,), Tuple{Bool}}, typeof(Plots.test_examples), Symbol}) precompile(Tuple{typeof(Plots.__init__)}) - precompile(Tuple{typeof(Plots._add_defaults!), Base.Dict{Symbol, Any}, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Int64}) - precompile(Tuple{typeof(Plots._add_defaults!), Base.Dict{Symbol, Any}, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Int64}) precompile(Tuple{typeof(Plots._add_errorbar_kw), Array{Base.Dict{Symbol, Any}, 1}, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._add_errorbar_kw), Array{Base.Dict{Symbol, Any}, 1}, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._add_markershape), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._add_markershape), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._add_smooth_kw), Array{Base.Dict{Symbol, Any}, 1}, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._add_smooth_kw), Array{Base.Dict{Symbol, Any}, 1}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._add_the_series), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._add_the_series), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots._add_the_series), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots._add_the_series), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Plots.Attr}) precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{Array{Float64, 1}, 1}}) precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{Array{T, 1} where T, 1}}) precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{Function, 1}}) - precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{Function, 1}}) precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{String, 1}}) precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{Union{Base.Missing, Int64}, 1}}) precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, typeof(identity)}) @@ -63,21 +59,16 @@ function _precompile_() precompile(Tuple{typeof(Plots._backend_instance), Symbol}) precompile(Tuple{typeof(Plots._bin_centers), Array{Float64, 1}}) precompile(Tuple{typeof(Plots._binbarlike_baseline), Float64, Symbol}) - precompile(Tuple{typeof(Plots._cbar_unique), Array{Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, 1}, String}) - precompile(Tuple{typeof(Plots._cbar_unique), Array{Int64, 1}, String}) precompile(Tuple{typeof(Plots._cbar_unique), Array{Nothing, 1}, String}) precompile(Tuple{typeof(Plots._cbar_unique), Array{PlotUtils.ColorGradient, 1}, String}) - precompile(Tuple{typeof(Plots._cbar_unique), Array{Symbol, 1}, String}) precompile(Tuple{typeof(Plots._create_backend_figure), Plots.Plot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots._cycle), Array{Any, 1}, Int64}) precompile(Tuple{typeof(Plots._cycle), Array{Float64, 1}, Array{Int64, 1}}) - precompile(Tuple{typeof(Plots._cycle), Array{Float64, 1}, Base.StepRange{Int64, Int64}}) precompile(Tuple{typeof(Plots._cycle), Array{Float64, 1}, Base.UnitRange{Int64}}) precompile(Tuple{typeof(Plots._cycle), Array{Float64, 1}, Int64}) precompile(Tuple{typeof(Plots._cycle), Array{Plots.Subplot{T} where T<:RecipesBase.AbstractBackend, 1}, Int64}) precompile(Tuple{typeof(Plots._cycle), Array{String, 1}, Int64}) precompile(Tuple{typeof(Plots._cycle), Base.OneTo{Int64}, Array{Int64, 1}}) - precompile(Tuple{typeof(Plots._cycle), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Int64}) precompile(Tuple{typeof(Plots._cycle), Base.StepRange{Int64, Int64}, Int64}) precompile(Tuple{typeof(Plots._cycle), ColorTypes.RGBA{Float64}, Int64}) precompile(Tuple{typeof(Plots._cycle), Float64, Int64}) @@ -88,8 +79,6 @@ function _precompile_() precompile(Tuple{typeof(Plots._cycle), Symbol, Int64}) precompile(Tuple{typeof(Plots._display), Plots.Plot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots._display), Plots.Plot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots._do_plot_show), Plots.Plot{Plots.GRBackend}, Bool}) - precompile(Tuple{typeof(Plots._do_plot_show), Plots.Plot{Plots.GRBackend}, Bool}) precompile(Tuple{typeof(Plots._do_plot_show), Plots.Plot{Plots.GRBackend}, Symbol}) precompile(Tuple{typeof(Plots._do_plot_show), Plots.Plot{Plots.GRBackend}, Symbol}) precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{Array{Array{Float64, 1}, 1}, Array{Array{Float64, 1}, 1}}}) @@ -144,21 +133,19 @@ function _precompile_() precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{Plots.GroupBy, Plots.Spy}}) precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{Plots.GroupBy, typeof(Base.log), Int64}}) precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{Plots.GroupBy}}) - precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{Plots.GroupBy}}) precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{Plots.PortfolioComposition}}) precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{Plots.Spy}}) precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{typeof(Base.log), Int64}}) precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{}}) - precompile(Tuple{typeof(Plots._expand_seriestype_array), Base.Dict{Symbol, Any}, Tuple{}}) - precompile(Tuple{typeof(Plots._expand_subplot_extrema), Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Symbol}) - precompile(Tuple{typeof(Plots._expand_subplot_extrema), Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Symbol}) + precompile(Tuple{typeof(Plots._expand_subplot_extrema), Plots.Subplot{Plots.GRBackend}, Plots.Attr, Symbol}) + precompile(Tuple{typeof(Plots._expand_subplot_extrema), Plots.Subplot{Plots.GRBackend}, Plots.Attr, Symbol}) precompile(Tuple{typeof(Plots._filter_input_data!), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._heatmap_edges), Array{Float64, 1}, Bool}) precompile(Tuple{typeof(Plots._hist_edge), Tuple{Array{Float64, 1}}, Int64, Symbol}) precompile(Tuple{typeof(Plots._hist_edges), Tuple{Array{Float64, 1}, Array{Float64, 1}}, Int64}) precompile(Tuple{typeof(Plots._hist_edges), Tuple{Array{Float64, 1}, Array{Float64, 1}}, Tuple{Int64, Int64}}) precompile(Tuple{typeof(Plots._hist_edges), Tuple{Array{Float64, 1}}, Symbol}) - precompile(Tuple{typeof(Plots._override_seriestype_check), Base.Dict{Symbol, Any}, Symbol}) + precompile(Tuple{typeof(Plots._override_seriestype_check), Plots.Attr, Symbol}) precompile(Tuple{typeof(Plots._pick_default_backend)}) precompile(Tuple{typeof(Plots._pick_default_backend)}) precompile(Tuple{typeof(Plots._plot!), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{Array{Array{Float64, 1}, 1}, Array{Array{Float64, 1}, 1}}}) @@ -192,15 +179,13 @@ function _precompile_() precompile(Tuple{typeof(Plots._plot!), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{typeof(Base.log), Int64}}) precompile(Tuple{typeof(Plots._plot!), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{}}) precompile(Tuple{typeof(Plots._plot!), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{}}) - precompile(Tuple{typeof(Plots._plot!), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{}}) precompile(Tuple{typeof(Plots._plot_setup), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Array{Base.Dict{Symbol, Any}, 1}}) precompile(Tuple{typeof(Plots._plot_setup), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Array{Base.Dict{Symbol, Any}, 1}}) precompile(Tuple{typeof(Plots._plots_defaults)}) - precompile(Tuple{typeof(Plots._prepare_annotations), Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._prepare_annotations), Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._prepare_subplot), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._prepare_subplot), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._prepare_subplot), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots._prepare_annotations), Plots.Subplot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots._prepare_annotations), Plots.Subplot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots._prepare_subplot), Plots.Plot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots._prepare_subplot), Plots.Plot{Plots.GRBackend}, Plots.Attr}) precompile(Tuple{typeof(Plots._preprocess_args), Base.Dict{Symbol, Any}, Tuple{Array{Array{Float64, 1}, 1}, Array{Array{Float64, 1}, 1}}, Array{RecipesBase.RecipeData, 1}}) precompile(Tuple{typeof(Plots._preprocess_args), Base.Dict{Symbol, Any}, Tuple{Array{Array{T, 1} where T, 1}, Array{Float64, 2}}, Array{RecipesBase.RecipeData, 1}}) precompile(Tuple{typeof(Plots._preprocess_args), Base.Dict{Symbol, Any}, Tuple{Array{Array{T, 1} where T, 1}}, Array{RecipesBase.RecipeData, 1}}) @@ -229,18 +214,17 @@ function _precompile_() precompile(Tuple{typeof(Plots._preprocess_args), Base.Dict{Symbol, Any}, Tuple{Plots.Spy}, Array{RecipesBase.RecipeData, 1}}) precompile(Tuple{typeof(Plots._preprocess_args), Base.Dict{Symbol, Any}, Tuple{typeof(Base.log), Int64}, Array{RecipesBase.RecipeData, 1}}) precompile(Tuple{typeof(Plots._preprocess_args), Base.Dict{Symbol, Any}, Tuple{}, Array{RecipesBase.RecipeData, 1}}) - precompile(Tuple{typeof(Plots._preprocess_args), Base.Dict{Symbol, Any}, Tuple{}, Array{RecipesBase.RecipeData, 1}}) - precompile(Tuple{typeof(Plots._preprocess_barlike), Base.Dict{Symbol, Any}, Array{Float64, 1}, Array{Float64, 1}}) - precompile(Tuple{typeof(Plots._preprocess_barlike), Base.Dict{Symbol, Any}, Array{Int64, 1}, Array{Float64, 1}}) - precompile(Tuple{typeof(Plots._preprocess_barlike), Base.Dict{Symbol, Any}, Base.OneTo{Int64}, Array{Float64, 1}}) - precompile(Tuple{typeof(Plots._preprocess_binlike), Base.Dict{Symbol, Any}, Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Array{Float64, 1}}) + precompile(Tuple{typeof(Plots._preprocess_barlike), Plots.Attr, Array{Float64, 1}, Array{Float64, 1}}) + precompile(Tuple{typeof(Plots._preprocess_barlike), Plots.Attr, Array{Int64, 1}, Array{Float64, 1}}) + precompile(Tuple{typeof(Plots._preprocess_barlike), Plots.Attr, Base.OneTo{Int64}, Array{Float64, 1}}) + precompile(Tuple{typeof(Plots._preprocess_binlike), Plots.Attr, Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots._preprocess_userrecipe), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._preprocess_userrecipe), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._process_plotrecipe), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Array{Base.Dict{Symbol, Any}, 1}, Array{Base.Dict{Symbol, Any}, 1}}) precompile(Tuple{typeof(Plots._process_plotrecipe), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Array{Base.Dict{Symbol, Any}, 1}, Array{Base.Dict{Symbol, Any}, 1}}) - precompile(Tuple{typeof(Plots._process_seriesrecipe), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._process_seriesrecipe), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._process_seriesrecipe), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots._process_seriesrecipe), Plots.Plot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots._process_seriesrecipe), Plots.Plot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots._process_seriesrecipe), Plots.Plot{Plots.GRBackend}, Plots.Attr}) precompile(Tuple{typeof(Plots._process_userrecipe), Plots.Plot{Plots.GRBackend}, Array{Base.Dict{Symbol, Any}, 1}, RecipesBase.RecipeData}) precompile(Tuple{typeof(Plots._process_userrecipe), Plots.Plot{Plots.GRBackend}, Array{Base.Dict{Symbol, Any}, 1}, RecipesBase.RecipeData}) precompile(Tuple{typeof(Plots._process_userrecipes), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{Array{Array{Float64, 1}, 1}, Array{Array{Float64, 1}, 1}}}) @@ -271,15 +255,15 @@ function _precompile_() precompile(Tuple{typeof(Plots._process_userrecipes), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{Plots.Spy}}) precompile(Tuple{typeof(Plots._process_userrecipes), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{typeof(Base.log), Int64}}) precompile(Tuple{typeof(Plots._process_userrecipes), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{}}) - precompile(Tuple{typeof(Plots._process_userrecipes), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Tuple{}}) - precompile(Tuple{typeof(Plots._replace_linewidth), Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._replace_linewidth), Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots._replace_linewidth), Plots.Attr}) + precompile(Tuple{typeof(Plots._replace_linewidth), Plots.Attr}) precompile(Tuple{typeof(Plots._replace_markershape), Array{Symbol, 2}}) precompile(Tuple{typeof(Plots._replace_markershape), Plots.Shape}) precompile(Tuple{typeof(Plots._scale_adjusted_values), Type{Float64}, Array{Float64, 1}, Symbol}) - precompile(Tuple{typeof(Plots._series_index), Base.Dict{Symbol, Any}, Plots.Subplot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots._show), Base.IOStream, Base.Multimedia.MIME{Symbol("image/png")}, Plots.Plot{Plots.GRBackend}}) + precompile(Tuple{typeof(Plots._series_index), Plots.Attr, Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots._show), Base.IOStream, Base.Multimedia.MIME{Symbol("image/png")}, Plots.Plot{Plots.GRBackend}}) + precompile(Tuple{typeof(Plots._slice_series_args!), Base.Dict{Symbol, Any}, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Int64}) + precompile(Tuple{typeof(Plots._slice_series_args!), Base.Dict{Symbol, Any}, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Int64}) precompile(Tuple{typeof(Plots._subplot_setup), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Array{Base.Dict{Symbol, Any}, 1}}) precompile(Tuple{typeof(Plots._subplot_setup), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Array{Base.Dict{Symbol, Any}, 1}}) precompile(Tuple{typeof(Plots._transform_ticks), Base.StepRange{Int64, Int64}}) @@ -288,8 +272,12 @@ function _precompile_() precompile(Tuple{typeof(Plots._transform_ticks), Symbol}) precompile(Tuple{typeof(Plots._update_axis), Plots.Axis, Base.Dict{Symbol, Any}, Symbol, Int64}) precompile(Tuple{typeof(Plots._update_axis), Plots.Axis, Base.Dict{Symbol, Any}, Symbol, Int64}) + precompile(Tuple{typeof(Plots._update_axis), Plots.Axis, Plots.Attr, Symbol, Int64}) + precompile(Tuple{typeof(Plots._update_axis), Plots.Axis, Plots.Attr, Symbol, Int64}) precompile(Tuple{typeof(Plots._update_axis), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Symbol, Int64}) precompile(Tuple{typeof(Plots._update_axis), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Symbol, Int64}) + precompile(Tuple{typeof(Plots._update_axis), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Plots.Attr, Symbol, Int64}) + precompile(Tuple{typeof(Plots._update_axis), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Plots.Attr, Symbol, Int64}) precompile(Tuple{typeof(Plots._update_axis_colors), Plots.Axis}) precompile(Tuple{typeof(Plots._update_axis_colors), Plots.Axis}) precompile(Tuple{typeof(Plots._update_axis_links), Plots.Plot{Plots.GRBackend}, Plots.Axis, Symbol}) @@ -297,18 +285,19 @@ function _precompile_() precompile(Tuple{typeof(Plots._update_clims), Float64, Float64, Float64, Float64}) precompile(Tuple{typeof(Plots._update_clims), Float64, Float64, Int64, Int64}) precompile(Tuple{typeof(Plots._update_min_padding!), Plots.GridLayout}) - precompile(Tuple{typeof(Plots._update_min_padding!), Plots.GridLayout}) precompile(Tuple{typeof(Plots._update_min_padding!), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots._update_min_padding!), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots._update_plot_args), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots._update_plot_args), Plots.Plot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots._update_series_attributes!), Base.Dict{Symbol, Any}, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots._update_series_attributes!), Base.Dict{Symbol, Any}, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots._update_series_attributes!), Base.Dict{Symbol, Any}, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}}) + precompile(Tuple{typeof(Plots._update_plot_args), Plots.Plot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots._update_plot_args), Plots.Plot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots._update_series_attributes!), Plots.Attr, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}}) + precompile(Tuple{typeof(Plots._update_series_attributes!), Plots.Attr, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}}) + precompile(Tuple{typeof(Plots._update_series_attributes!), Plots.Attr, Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots._update_subplot_args), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Int64, Bool}) precompile(Tuple{typeof(Plots._update_subplot_args), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Int64, Bool}) - precompile(Tuple{typeof(Plots._update_subplot_args), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}, Int64, Bool}) - precompile(Tuple{typeof(Plots._update_subplot_colors), Plots.Subplot{Plots.GRBackend}}) + precompile(Tuple{typeof(Plots._update_subplot_args), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Plots.Attr, Int64, Bool}) + precompile(Tuple{typeof(Plots._update_subplot_args), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}, Plots.Attr, Int64, Bool}) precompile(Tuple{typeof(Plots._update_subplot_colors), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots._update_subplot_colors), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots._update_subplot_periphery), Plots.Subplot{Plots.GRBackend}, Array{Any, 1}}) @@ -316,10 +305,12 @@ function _precompile_() precompile(Tuple{typeof(Plots.addExtension), String, String}) precompile(Tuple{typeof(Plots.add_layout_pct!), Base.Dict{Symbol, Any}, Expr, Int64, Int64}) precompile(Tuple{typeof(Plots.add_layout_pct!), Base.Dict{Symbol, Any}, Expr, Int64, Int64}) - precompile(Tuple{typeof(Plots.aliasesAndAutopick), Base.Dict{Symbol, Any}, Symbol, Base.Dict{Symbol, Symbol}, Array{Symbol, 1}, Int64}) - precompile(Tuple{typeof(Plots.aliasesAndAutopick), Base.Dict{Symbol, Any}, Symbol, Base.Dict{Symbol, Symbol}, Array{Symbol, 1}, Int64}) + precompile(Tuple{typeof(Plots.aliasesAndAutopick), Plots.Attr, Symbol, Base.Dict{Symbol, Symbol}, Array{Symbol, 1}, Int64}) + precompile(Tuple{typeof(Plots.aliasesAndAutopick), Plots.Attr, Symbol, Base.Dict{Symbol, Symbol}, Array{Symbol, 1}, Int64}) precompile(Tuple{typeof(Plots.all3D), Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.all3D), Plots.Attr}) precompile(Tuple{typeof(Plots.allAlphas), Int64}) + precompile(Tuple{typeof(Plots.allReals), Int64}) precompile(Tuple{typeof(Plots.allStyles), Int64}) precompile(Tuple{typeof(Plots.allStyles), Symbol}) precompile(Tuple{typeof(Plots.annotate!), Array{Tuple{Int64, Float64, Plots.PlotText}, 1}}) @@ -332,12 +323,8 @@ function _precompile_() precompile(Tuple{typeof(Plots.autopick), Array{ColorTypes.RGBA{Float64}, 1}, Int64}) precompile(Tuple{typeof(Plots.autopick_ignore_none_auto), Array{Symbol, 1}, Int64}) precompile(Tuple{typeof(Plots.axis_drawing_info), Plots.Subplot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots.axis_drawing_info), Plots.Subplot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots.axis_drawing_info_3d), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.axis_drawing_info_3d), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.axis_limits), Plots.Subplot{Plots.GRBackend}, Symbol, Bool, Bool}) - precompile(Tuple{typeof(Plots.axis_limits), Plots.Subplot{Plots.GRBackend}, Symbol, Bool, Bool}) - precompile(Tuple{typeof(Plots.axis_limits), Plots.Subplot{Plots.GRBackend}, Symbol}) precompile(Tuple{typeof(Plots.axis_limits), Plots.Subplot{Plots.GRBackend}, Symbol}) precompile(Tuple{typeof(Plots.backend), Plots.GRBackend}) precompile(Tuple{typeof(Plots.backend), Symbol}) @@ -349,19 +336,17 @@ function _precompile_() precompile(Tuple{typeof(Plots.bbox!), Plots.Subplot{Plots.GRBackend}, Measures.BoundingBox{Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}, Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}}}) precompile(Tuple{typeof(Plots.bottom), Measures.BoundingBox{Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}, Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}}}) precompile(Tuple{typeof(Plots.bottompad), Plots.Subplot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots.build_layout), Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.build_layout), Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.build_layout), Plots.Attr}) + precompile(Tuple{typeof(Plots.build_layout), Plots.Attr}) precompile(Tuple{typeof(Plots.build_layout), Plots.GridLayout, Int64, Array{Plots.Plot{T} where T<:RecipesBase.AbstractBackend, 1}}) precompile(Tuple{typeof(Plots.build_layout), Plots.GridLayout, Int64, Array{Plots.Plot{T} where T<:RecipesBase.AbstractBackend, 1}}) precompile(Tuple{typeof(Plots.build_layout), Plots.GridLayout, Int64}) precompile(Tuple{typeof(Plots.build_layout), Plots.GridLayout, Int64}) precompile(Tuple{typeof(Plots.calc_num_subplots), Plots.EmptyLayout}) precompile(Tuple{typeof(Plots.calc_num_subplots), Plots.GridLayout}) - precompile(Tuple{typeof(Plots.color_or_nothing!), Base.Dict{Symbol, Any}, Symbol}) - precompile(Tuple{typeof(Plots.color_or_nothing!), Base.Dict{Symbol, Any}, Symbol}) + precompile(Tuple{typeof(Plots.color_or_nothing!), Plots.Attr, Symbol}) + precompile(Tuple{typeof(Plots.color_or_nothing!), Plots.Attr, Symbol}) precompile(Tuple{typeof(Plots.colorbar_style), Plots.Series}) - precompile(Tuple{typeof(Plots.colorbar_style), Plots.Series}) - precompile(Tuple{typeof(Plots.command_idx), Array{Base.Dict{Symbol, Any}, 1}, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.compute_gridsize), Int64, Int64, Int64}) precompile(Tuple{typeof(Plots.compute_xyz), Array{Float64, 1}, Array{Float64, 1}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.compute_xyz), Array{Float64, 1}, Array{Float64, 1}, Nothing}) @@ -384,7 +369,6 @@ function _precompile_() precompile(Tuple{typeof(Plots.convertToAnyVector), Array{Function, 1}, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.convertToAnyVector), Int64, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.convert_sci_unicode), String}) - precompile(Tuple{typeof(Plots.convert_sci_unicode), String}) precompile(Tuple{typeof(Plots.convert_to_polar), Array{Float64, 1}, Array{Float64, 1}, Tuple{Int64, Float64}}) precompile(Tuple{typeof(Plots.create_grid), Expr}) precompile(Tuple{typeof(Plots.create_grid), Expr}) @@ -395,16 +379,14 @@ function _precompile_() precompile(Tuple{typeof(Plots.create_grid_vcat), Expr}) precompile(Tuple{typeof(Plots.default), Symbol}) precompile(Tuple{typeof(Plots.default_should_widen), Plots.Axis}) - precompile(Tuple{typeof(Plots.default_should_widen), Plots.Axis}) - precompile(Tuple{typeof(Plots.discrete_value!), Plots.Axis, Array{Any, 1}}) precompile(Tuple{typeof(Plots.discrete_value!), Plots.Axis, Array{String, 1}}) precompile(Tuple{typeof(Plots.discrete_value!), Plots.Axis, Array{Union{Base.Missing, Float64}, 1}}) precompile(Tuple{typeof(Plots.discrete_value!), Plots.Axis, Base.Missing}) precompile(Tuple{typeof(Plots.discrete_value!), Plots.Axis, Char}) precompile(Tuple{typeof(Plots.discrete_value!), Plots.Axis, String}) - precompile(Tuple{typeof(Plots.ensure_gradient!), Base.Dict{Symbol, Any}, Symbol, Symbol}) - precompile(Tuple{typeof(Plots.ensure_gradient!), Base.Dict{Symbol, Any}, Symbol, Symbol}) - precompile(Tuple{typeof(Plots.ensure_gradient!), Base.Dict{Symbol, Any}, Symbol, Symbol}) + precompile(Tuple{typeof(Plots.ensure_gradient!), Plots.Attr, Symbol, Symbol}) + precompile(Tuple{typeof(Plots.ensure_gradient!), Plots.Attr, Symbol, Symbol}) + precompile(Tuple{typeof(Plots.ensure_gradient!), Plots.Attr, Symbol, Symbol}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Array{Int64, 1}}) @@ -415,38 +397,33 @@ function _precompile_() precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Base.UnitRange{Int64}}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Float64}) - precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Float64}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Int64}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Int64}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Plots.Surface{Array{Float64, 2}}}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Plots.Surface{Array{Float64, 2}}}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Axis, Tuple{Float64, Float64}}) - precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Subplot{Plots.GRBackend}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Subplot{Plots.GRBackend}, Plots.Attr}) + precompile(Tuple{typeof(Plots.expand_extrema!), Plots.Subplot{Plots.GRBackend}, Plots.Attr}) precompile(Tuple{typeof(Plots.extendSeriesData), Array{Float64, 1}, Float64}) precompile(Tuple{typeof(Plots.extractGroupArgs), Array{String, 1}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.fakedata), Int64, Int64}) precompile(Tuple{typeof(Plots.fakedata), Int64, Int64}) - precompile(Tuple{typeof(Plots.fg_color), Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.fg_color), Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.fg_color), Plots.Attr}) + precompile(Tuple{typeof(Plots.fg_color), Plots.Attr}) precompile(Tuple{typeof(Plots.filter_data!), Base.Dict{Symbol, Any}, Array{Int64, 1}}) precompile(Tuple{typeof(Plots.filter_data), Array{Float64, 1}, Array{Int64, 1}}) precompile(Tuple{typeof(Plots.filter_data), Base.OneTo{Int64}, Array{Int64, 1}}) precompile(Tuple{typeof(Plots.filter_data), Nothing, Array{Int64, 1}}) precompile(Tuple{typeof(Plots.font), Int64, Int}) precompile(Tuple{typeof(Plots.font), String, Int}) - precompile(Tuple{typeof(Plots.font), String, Int}) precompile(Tuple{typeof(Plots.font), Symbol, Int}) precompile(Tuple{typeof(Plots.frame), Plots.Animation, Plots.Plot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.frame), Plots.Animation}) precompile(Tuple{typeof(Plots.get_axis), Plots.Subplot{Plots.GRBackend}, Symbol}) precompile(Tuple{typeof(Plots.get_axis), Plots.Subplot{Plots.GRBackend}, Symbol}) precompile(Tuple{typeof(Plots.get_clims), Plots.Series}) - precompile(Tuple{typeof(Plots.get_clims), Plots.Series}) precompile(Tuple{typeof(Plots.get_clims), Plots.Subplot{Plots.GRBackend}, Plots.Series}) - precompile(Tuple{typeof(Plots.get_clims), Plots.Subplot{Plots.GRBackend}, Plots.Series}) - precompile(Tuple{typeof(Plots.get_clims), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.get_clims), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.get_fillalpha), Plots.Series, Int64}) precompile(Tuple{typeof(Plots.get_fillalpha), Plots.Series}) @@ -454,31 +431,20 @@ function _precompile_() precompile(Tuple{typeof(Plots.get_fillcolor), Plots.Series, Tuple{Float64, Float64}, Int64}) precompile(Tuple{typeof(Plots.get_fillcolor), Plots.Series, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.get_linealpha), Plots.Series, Int64}) - precompile(Tuple{typeof(Plots.get_linealpha), Plots.Series}) precompile(Tuple{typeof(Plots.get_linecolor), Plots.Series, Float64, Float64, Int64}) - precompile(Tuple{typeof(Plots.get_linecolor), Plots.Series, Float64, Float64, Int64}) - precompile(Tuple{typeof(Plots.get_linecolor), Plots.Series, Tuple{Float64, Float64}, Int64}) precompile(Tuple{typeof(Plots.get_linecolor), Plots.Series, Tuple{Float64, Float64}, Int64}) precompile(Tuple{typeof(Plots.get_linecolor), Plots.Series, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.get_linestyle), Plots.Series, Int64}) - precompile(Tuple{typeof(Plots.get_linestyle), Plots.Series}) precompile(Tuple{typeof(Plots.get_linewidth), Plots.Series, Int64}) - precompile(Tuple{typeof(Plots.get_linewidth), Plots.Series}) precompile(Tuple{typeof(Plots.get_markeralpha), Plots.Series, Int64}) precompile(Tuple{typeof(Plots.get_markercolor), Plots.Series, Float64, Float64, Int64}) - precompile(Tuple{typeof(Plots.get_markercolor), Plots.Series, Float64, Float64, Int64}) precompile(Tuple{typeof(Plots.get_markerstrokealpha), Plots.Series, Int64}) precompile(Tuple{typeof(Plots.get_markerstrokecolor), Plots.Series, Int64}) precompile(Tuple{typeof(Plots.get_minor_ticks), Plots.Subplot{Plots.GRBackend}, Plots.Axis, Tuple{Array{Float64, 1}, Array{Any, 1}}}) precompile(Tuple{typeof(Plots.get_minor_ticks), Plots.Subplot{Plots.GRBackend}, Plots.Axis, Tuple{Array{Float64, 1}, Array{String, 1}}}) - precompile(Tuple{typeof(Plots.get_minor_ticks), Plots.Subplot{Plots.GRBackend}, Plots.Axis, Tuple{Array{Float64, 1}, Array{String, 1}}}) - precompile(Tuple{typeof(Plots.get_series_color), ColorTypes.RGBA{Float64}, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) - precompile(Tuple{typeof(Plots.get_series_color), ColorTypes.RGBA{Float64}, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) precompile(Tuple{typeof(Plots.get_series_color), ColorTypes.RGBA{Float64}, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) precompile(Tuple{typeof(Plots.get_series_color), Int64, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) precompile(Tuple{typeof(Plots.get_series_color), PlotUtils.ColorGradient, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) - precompile(Tuple{typeof(Plots.get_series_color), PlotUtils.ColorGradient, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) - precompile(Tuple{typeof(Plots.get_series_color), Symbol, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) precompile(Tuple{typeof(Plots.get_series_color), Symbol, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) precompile(Tuple{typeof(Plots.get_series_color), Symbol, Plots.Subplot{Plots.GRBackend}, Int64, Symbol}) precompile(Tuple{typeof(Plots.get_subplot), Plots.Plot{Plots.GRBackend}, Plots.Subplot{Plots.GRBackend}}) @@ -495,7 +461,6 @@ function _precompile_() precompile(Tuple{typeof(Plots.gr_display), Plots.Plot{Plots.GRBackend}, String}) precompile(Tuple{typeof(Plots.gr_display), Plots.Plot{Plots.GRBackend}, String}) precompile(Tuple{typeof(Plots.gr_display), Plots.Subplot{Plots.GRBackend}, Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}, Array{Float64, 1}}) - precompile(Tuple{typeof(Plots.gr_display), Plots.Subplot{Plots.GRBackend}, Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.gr_draw_colorbar), Plots.GRColorbar, Plots.Subplot{Plots.GRBackend}, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.gr_draw_marker), Float64, Float64, Int64, Plots.Shape}) precompile(Tuple{typeof(Plots.gr_draw_marker), Float64, Float64, Int64, Symbol}) @@ -503,27 +468,18 @@ function _precompile_() precompile(Tuple{typeof(Plots.gr_draw_marker), Int64, Float64, Float64, Symbol}) precompile(Tuple{typeof(Plots.gr_draw_marker), Int64, Float64, Int64, Plots.Shape}) precompile(Tuple{typeof(Plots.gr_draw_marker), Int64, Float64, Int64, Symbol}) - precompile(Tuple{typeof(Plots.gr_draw_marker), Int64, Int64, Int64, Plots.Shape}) - precompile(Tuple{typeof(Plots.gr_draw_marker), Int64, Int64, Int64, Symbol}) precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Array{Float64, 1}, Array{Float64, 1}, Tuple{Float64, Float64}, Int64}) - precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Array{Float64, 1}, Array{Float64, 1}, Tuple{Float64, Float64}, Int64}) - precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Array{Float64, 1}, Array{Float64, 1}, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Array{Float64, 1}, Array{Float64, 1}, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Array{Int64, 1}, Array{Float64, 1}, Tuple{Float64, Float64}, Int64}) precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Array{Int64, 1}, Array{Float64, 1}, Tuple{Float64, Float64}}) - precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Array{Int64, 1}, Array{Int64, 1}, Tuple{Float64, Float64}, Int64}) - precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Array{Int64, 1}, Array{Int64, 1}, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Base.OneTo{Int64}, Array{Float64, 1}, Tuple{Float64, Float64}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Base.OneTo{Int64}, Array{Float64, 1}, Tuple{Float64, Float64}, Int64}) precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Base.OneTo{Int64}, Array{Float64, 1}, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.gr_draw_markers), Plots.Series, Float64, Float64, Tuple{Float64, Float64}, Int64}) precompile(Tuple{typeof(Plots.gr_fill_viewport), Array{Float64, 1}, ColorTypes.RGBA{Float64}}) precompile(Tuple{typeof(Plots.gr_get_color), Plots.Series}) - precompile(Tuple{typeof(Plots.gr_get_color), Plots.Series}) precompile(Tuple{typeof(Plots.gr_get_ticks_size), Tuple{Array{Float64, 1}, Array{Any, 1}}, Int64}) precompile(Tuple{typeof(Plots.gr_get_ticks_size), Tuple{Array{Float64, 1}, Array{String, 1}}, Int64}) - precompile(Tuple{typeof(Plots.gr_get_ticks_size), Tuple{Array{Float64, 1}, Array{String, 1}}, Int64}) - precompile(Tuple{typeof(Plots.gr_inqtext), Int64, Int64, String}) precompile(Tuple{typeof(Plots.gr_inqtext), Int64, Int64, String}) precompile(Tuple{typeof(Plots.gr_legend_pos), Plots.Subplot{Plots.GRBackend}, Float64, Float64}) precompile(Tuple{typeof(Plots.gr_polaraxes), Int64, Float64, Plots.Subplot{Plots.GRBackend}}) @@ -535,7 +491,6 @@ function _precompile_() precompile(Tuple{typeof(Plots.gr_set_font), Plots.Font}) precompile(Tuple{typeof(Plots.gr_set_gradient), PlotUtils.ColorGradient}) precompile(Tuple{typeof(Plots.gr_set_gradient), Plots.Series}) - precompile(Tuple{typeof(Plots.gr_set_gradient), Plots.Series}) precompile(Tuple{typeof(Plots.gr_set_line), Float64, Symbol, ColorTypes.RGBA{Float64}}) precompile(Tuple{typeof(Plots.gr_set_line), Int64, Symbol, ColorTypes.RGBA{Float64}}) precompile(Tuple{typeof(Plots.gr_set_line), Int64, Symbol, PlotUtils.ColorGradient}) @@ -551,13 +506,9 @@ function _precompile_() precompile(Tuple{typeof(Plots.gr_set_yticks_font), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.gr_set_yticks_font), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.gr_text), Float64, Float64, String}) - precompile(Tuple{typeof(Plots.gr_text), Float64, Float64, String}) - precompile(Tuple{typeof(Plots.gr_text_size), String, Int64}) precompile(Tuple{typeof(Plots.gr_text_size), String, Int64}) precompile(Tuple{typeof(Plots.gr_text_size), String}) precompile(Tuple{typeof(Plots.gr_update_colorbar!), Plots.GRColorbar, Plots.Series}) - precompile(Tuple{typeof(Plots.gr_update_colorbar!), Plots.GRColorbar, Plots.Series}) - precompile(Tuple{typeof(Plots.gr_viewport_from_bbox), Plots.Subplot{Plots.GRBackend}, Measures.BoundingBox{Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}, Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}}, Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.gr_viewport_from_bbox), Plots.Subplot{Plots.GRBackend}, Measures.BoundingBox{Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}, Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}}, Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.gr_w3tondc), Float64, Float64, Float64}) precompile(Tuple{typeof(Plots.gui), Plots.Plot{Plots.GRBackend}}) @@ -572,44 +523,32 @@ function _precompile_() precompile(Tuple{typeof(Plots.handleColors!), Base.Dict{Symbol, Any}, Symbol, Symbol}) precompile(Tuple{typeof(Plots.handleColors!), Base.Dict{Symbol, Any}, Symbol, Symbol}) precompile(Tuple{typeof(Plots.has_attribute_segments), Plots.Series}) - precompile(Tuple{typeof(Plots.has_attribute_segments), Plots.Series}) - precompile(Tuple{typeof(Plots.hascolorbar), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.hascolorbar), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.hasgrid), Symbol, Symbol}) precompile(Tuple{typeof(Plots.heatmap_edges), Array{Float64, 1}, Symbol, Array{Float64, 1}, Symbol, Tuple{Int64, Int64}}) precompile(Tuple{typeof(Plots.heatmap_edges), Array{Float64, 1}, Symbol, Bool}) - precompile(Tuple{typeof(Plots.heatmap_edges), Array{Float64, 1}, Symbol, Bool}) precompile(Tuple{typeof(Plots.heatmap_edges), Array{Float64, 1}, Symbol}) precompile(Tuple{typeof(Plots.heatmap_edges), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Symbol, Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Symbol, Tuple{Int64, Int64}}) precompile(Tuple{typeof(Plots.heatmap_edges), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Symbol, Bool}) precompile(Tuple{typeof(Plots.heatmap_edges), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Symbol, Bool}) - precompile(Tuple{typeof(Plots.heatmap_edges), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Symbol, Bool}) precompile(Tuple{typeof(Plots.heatmap_edges), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Symbol}) precompile(Tuple{typeof(Plots.heatmap_edges), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Symbol}) precompile(Tuple{typeof(Plots.ignorenan_extrema), Array{Float64, 1}}) precompile(Tuple{typeof(Plots.ignorenan_extrema), Array{Float64, 2}}) - precompile(Tuple{typeof(Plots.ignorenan_extrema), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}) precompile(Tuple{typeof(Plots.ignorenan_extrema), Base.StepRange{Int64, Int64}}) precompile(Tuple{typeof(Plots.ignorenan_extrema), Plots.Axis}) - precompile(Tuple{typeof(Plots.ignorenan_extrema), Plots.Axis}) - precompile(Tuple{typeof(Plots.ignorenan_maximum), Array{Float64, 1}}) precompile(Tuple{typeof(Plots.ignorenan_maximum), Base.OneTo{Int64}}) precompile(Tuple{typeof(Plots.ignorenan_minimum), Array{Int64, 1}}) precompile(Tuple{typeof(Plots.ignorenan_minimum), Base.OneTo{Int64}}) precompile(Tuple{typeof(Plots.inline), Plots.Plot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots.is3d), Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.is3d), Plots.Attr}) precompile(Tuple{typeof(Plots.is3d), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.is3d), Symbol}) precompile(Tuple{typeof(Plots.is_2tuple), Int64}) precompile(Tuple{typeof(Plots.is_2tuple), Symbol}) - precompile(Tuple{typeof(Plots.is_2tuple), Tuple{Array{Float64, 1}, Array{Float64, 1}}}) - precompile(Tuple{typeof(Plots.is_2tuple), Tuple{Int64, Float64}}) - precompile(Tuple{typeof(Plots.is_2tuple), Tuple{Int64, Int64}}) - precompile(Tuple{typeof(Plots.is_attr_supported), Plots.GRBackend, Symbol}) - precompile(Tuple{typeof(Plots.is_attr_supported), Symbol}) + precompile(Tuple{typeof(Plots.is_axis_attr), Symbol}) precompile(Tuple{typeof(Plots.is_marker_supported), Plots.GRBackend, Symbol}) precompile(Tuple{typeof(Plots.is_marker_supported), Plots.Shape}) - precompile(Tuple{typeof(Plots.is_marker_supported), Plots.Stroke}) precompile(Tuple{typeof(Plots.is_marker_supported), Symbol}) precompile(Tuple{typeof(Plots.is_marker_supported), Symbol}) precompile(Tuple{typeof(Plots.is_scale_supported), Plots.GRBackend, Symbol}) @@ -619,32 +558,27 @@ function _precompile_() precompile(Tuple{typeof(Plots.is_style_supported), Plots.GRBackend, Symbol}) precompile(Tuple{typeof(Plots.is_uniformly_spaced), Array{Float64, 1}}) precompile(Tuple{typeof(Plots.iscontour), Plots.Series}) - precompile(Tuple{typeof(Plots.iscontour), Plots.Series}) precompile(Tuple{typeof(Plots.isijulia)}) precompile(Tuple{typeof(Plots.ispolar), Plots.Series}) precompile(Tuple{typeof(Plots.ispolar), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.isvertical), Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.isvertical), Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.isvertical), Plots.Attr}) + precompile(Tuple{typeof(Plots.isvertical), Plots.Attr}) precompile(Tuple{typeof(Plots.iter_segments), Array{Float64, 1}, Array{Float64, 1}, Array{Float64, 1}}) - precompile(Tuple{typeof(Plots.iter_segments), Array{Float64, 1}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.iter_segments), Array{Int64, 1}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.iter_segments), Base.OneTo{Int64}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.iter_segments), Base.UnitRange{Int64}, Array{Float64, 1}}) precompile(Tuple{typeof(Plots.iter_segments), Plots.Series}) - precompile(Tuple{typeof(Plots.iter_segments), Plots.Series}) precompile(Tuple{typeof(Plots.labelfunc), Symbol, Plots.GRBackend}) precompile(Tuple{typeof(Plots.layout_args), Base.Dict{Symbol, Any}, Int64}) precompile(Tuple{typeof(Plots.layout_args), Base.Dict{Symbol, Any}, Int64}) - precompile(Tuple{typeof(Plots.layout_args), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.layout_args), Int64, Int64}) precompile(Tuple{typeof(Plots.layout_args), Int64, Plots.GridLayout}) - precompile(Tuple{typeof(Plots.layout_args), Int64, Tuple{Int64, Int64}}) precompile(Tuple{typeof(Plots.layout_args), Int64}) + precompile(Tuple{typeof(Plots.layout_args), Plots.Attr}) precompile(Tuple{typeof(Plots.layout_args), Plots.GridLayout}) precompile(Tuple{typeof(Plots.leftpad), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.legendfont), Plots.Subplot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots.legendfont), Plots.Subplot{Plots.GRBackend}}) - precompile(Tuple{typeof(Plots.legendtitlefont), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.legendtitlefont), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.like_histogram), Symbol}) precompile(Tuple{typeof(Plots.like_surface), Symbol}) @@ -671,6 +605,7 @@ function _precompile_() precompile(Tuple{typeof(Plots.optimal_ticks_and_labels), Plots.Subplot{Plots.GRBackend}, Plots.Axis, Base.UnitRange{Int64}}) precompile(Tuple{typeof(Plots.optimal_ticks_and_labels), Plots.Subplot{Plots.GRBackend}, Plots.Axis, Nothing}) precompile(Tuple{typeof(Plots.optimal_ticks_and_labels), Plots.Subplot{Plots.GRBackend}, Plots.Axis, Nothing}) + precompile(Tuple{typeof(Plots.parse_axis_kw), Symbol}) precompile(Tuple{typeof(Plots.pie_labels), Plots.Subplot{Plots.GRBackend}, Plots.Series}) precompile(Tuple{typeof(Plots.plotarea!), Plots.GridLayout, Measures.BoundingBox{Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}, Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}}}) precompile(Tuple{typeof(Plots.plotarea!), Plots.Subplot{Plots.GRBackend}, Measures.BoundingBox{Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}, Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}}}) @@ -688,6 +623,8 @@ function _precompile_() precompile(Tuple{typeof(Plots.prepare_output), Plots.Plot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.preprocessArgs!), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.preprocessArgs!), Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.preprocessArgs!), Plots.Attr}) + precompile(Tuple{typeof(Plots.preprocessArgs!), Plots.Attr}) precompile(Tuple{typeof(Plots.processFillArg), Base.Dict{Symbol, Any}, Bool}) precompile(Tuple{typeof(Plots.processFillArg), Base.Dict{Symbol, Any}, Float64}) precompile(Tuple{typeof(Plots.processFillArg), Base.Dict{Symbol, Any}, Int64}) @@ -698,13 +635,13 @@ function _precompile_() precompile(Tuple{typeof(Plots.processGridArg!), Base.Dict{Symbol, Any}, Float64, Symbol}) precompile(Tuple{typeof(Plots.processGridArg!), Base.Dict{Symbol, Any}, Int64, Symbol}) precompile(Tuple{typeof(Plots.processGridArg!), Base.Dict{Symbol, Any}, Symbol, Symbol}) + precompile(Tuple{typeof(Plots.processGridArg!), Plots.Attr, Bool, Symbol}) precompile(Tuple{typeof(Plots.processLineArg), Base.Dict{Symbol, Any}, Array{Symbol, 2}}) precompile(Tuple{typeof(Plots.processLineArg), Base.Dict{Symbol, Any}, Array{Symbol, 2}}) precompile(Tuple{typeof(Plots.processLineArg), Base.Dict{Symbol, Any}, Float64}) precompile(Tuple{typeof(Plots.processLineArg), Base.Dict{Symbol, Any}, Int64}) precompile(Tuple{typeof(Plots.processLineArg), Base.Dict{Symbol, Any}, Symbol}) precompile(Tuple{typeof(Plots.processLineArg), Base.Dict{Symbol, Any}, Symbol}) - precompile(Tuple{typeof(Plots.processLineArg), Base.Dict{Symbol, Any}, Symbol}) precompile(Tuple{typeof(Plots.processMarkerArg), Base.Dict{Symbol, Any}, Array{Symbol, 2}}) precompile(Tuple{typeof(Plots.processMarkerArg), Base.Dict{Symbol, Any}, Array{Symbol, 2}}) precompile(Tuple{typeof(Plots.processMarkerArg), Base.Dict{Symbol, Any}, Bool}) @@ -731,46 +668,30 @@ function _precompile_() precompile(Tuple{typeof(Plots.process_ribbon), Tuple{Base.LinRange{Float64}, Base.LinRange{Float64}}, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.process_ribbon), typeof(identity), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.recompute_lengths), Array{Measures.Measure, 1}}) - precompile(Tuple{typeof(Plots.recompute_lengths), Array{Measures.Measure, 1}}) precompile(Tuple{typeof(Plots.replaceAlias!), Base.Dict{Symbol, Any}, Symbol, Base.Dict{Symbol, Symbol}}) + precompile(Tuple{typeof(Plots.replaceAlias!), Plots.Attr, Symbol, Base.Dict{Symbol, Symbol}}) precompile(Tuple{typeof(Plots.replaceAliases!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Symbol}}) - precompile(Tuple{typeof(Plots.reset_extrema!), Plots.Subplot{Plots.GRBackend}}) + precompile(Tuple{typeof(Plots.replaceAliases!), Plots.Attr, Base.Dict{Symbol, Symbol}}) + precompile(Tuple{typeof(Plots.reset_axis_defaults_byletter!)}) precompile(Tuple{typeof(Plots.reset_extrema!), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.right), Measures.BoundingBox{Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}, Tuple{Measures.Length{:mm, Float64}, Measures.Length{:mm, Float64}}}}) precompile(Tuple{typeof(Plots.rightpad), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.rowsize), Expr}) precompile(Tuple{typeof(Plots.rowsize), Symbol}) precompile(Tuple{typeof(Plots.series_annotations), Array{Any, 1}}) - precompile(Tuple{typeof(Plots.series_annotations), Nothing}) precompile(Tuple{typeof(Plots.series_annotations), Plots.SeriesAnnotations}) precompile(Tuple{typeof(Plots.series_annotations_shapes!), Plots.Series, Symbol}) - precompile(Tuple{typeof(Plots.series_annotations_shapes!), Plots.Series, Symbol}) + precompile(Tuple{typeof(Plots.series_idx), Array{Base.Dict{Symbol, Any}, 1}, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.setxy!), Plots.Plot{Plots.GRBackend}, Tuple{Array{Float64, 1}, Array{Float64, 1}}, Int64}) precompile(Tuple{typeof(Plots.shape_data), Plots.Series, Int64}) - precompile(Tuple{typeof(Plots.shape_data), Plots.Series, Int64}) - precompile(Tuple{typeof(Plots.should_add_to_legend), Plots.Series}) precompile(Tuple{typeof(Plots.should_add_to_legend), Plots.Series}) precompile(Tuple{typeof(Plots.showaxis), Symbol, Symbol}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Array{Any, 1}, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Array{Any, 1}, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Base.Dict{Symbol, Any}, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Base.Dict{Symbol, Any}, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Bool, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Bool, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Float64, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Float64, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Int64, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Int64, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Measures.Length{:mm, Float64}, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Measures.Length{:mm, Float64}, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Nothing, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Nothing, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, String, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, String, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Symbol, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Symbol, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Tuple{Int64, Int64}, Int64, Bool}) - precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Tuple{Int64, Int64}, Int64, Bool}) + precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Int64, Bool}) + precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Base.Dict{Symbol, Any}, Symbol, Int64, Bool}) + precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Plots.Attr, Symbol, Int64, Bool}) + precompile(Tuple{typeof(Plots.slice_arg!), Base.Dict{Symbol, Any}, Plots.Attr, Symbol, Int64, Bool}) + precompile(Tuple{typeof(Plots.slice_arg!), Plots.Attr, Plots.Attr, Symbol, Int64, Bool}) + precompile(Tuple{typeof(Plots.slice_arg!), Plots.Attr, Plots.Attr, Symbol, Int64, Bool}) precompile(Tuple{typeof(Plots.slice_arg), Array{ColorTypes.RGBA{Float64}, 2}, Int64}) precompile(Tuple{typeof(Plots.slice_arg), Array{Measures.Length{:mm, Float64}, 2}, Int64}) precompile(Tuple{typeof(Plots.slice_arg), Array{String, 2}, Int64}) @@ -798,8 +719,8 @@ function _precompile_() precompile(Tuple{typeof(Plots.splittable_kw), Symbol, String, Int64}) precompile(Tuple{typeof(Plots.splittable_kw), Symbol, Symbol, Int64}) precompile(Tuple{typeof(Plots.straightline_data), Plots.Series, Int64}) - precompile(Tuple{typeof(Plots.straightline_data), Plots.Series, Int64}) precompile(Tuple{typeof(Plots.straightline_data), Tuple{Int64, Int64}, Tuple{Float64, Float64}, Array{Float64, 1}, Array{Float64, 1}, Int64}) + precompile(Tuple{typeof(Plots.stroke), Int64, Int64}) precompile(Tuple{typeof(Plots.stroke), Int64, Int}) precompile(Tuple{typeof(Plots.supported_markers), Plots.GRBackend}) precompile(Tuple{typeof(Plots.supported_markers)}) @@ -828,10 +749,10 @@ function _precompile_() precompile(Tuple{typeof(Plots.update_inset_bboxes!), Plots.Plot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.vline!), Array{Int64, 1}}) precompile(Tuple{typeof(Plots.wand_edges), Array{Float64, 1}}) - precompile(Tuple{typeof(Plots.warnOnUnsupported), Plots.GRBackend, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.warnOnUnsupported), Plots.GRBackend, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.warnOnUnsupported_args), Plots.GRBackend, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.warnOnUnsupported_args), Plots.GRBackend, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.warnOnUnsupported), Plots.GRBackend, Plots.Attr}) + precompile(Tuple{typeof(Plots.warnOnUnsupported), Plots.GRBackend, Plots.Attr}) + precompile(Tuple{typeof(Plots.warnOnUnsupported_args), Plots.GRBackend, Plots.Attr}) + precompile(Tuple{typeof(Plots.warnOnUnsupported_args), Plots.GRBackend, Plots.Attr}) precompile(Tuple{typeof(Plots.warnOnUnsupported_scales), Plots.GRBackend, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.warnOnUnsupported_scales), Plots.GRBackend, Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.widen), Float64, Float64, Symbol}) @@ -859,15 +780,9 @@ function _precompile_() precompile(Tuple{typeof(Plots.wraptuple), Tuple{String, Tuple{Int64, Int64}, Base.StepRange{Int64, Int64}, Symbol}}) precompile(Tuple{typeof(Plots.wraptuple), Tuple{Symbol, Float64, Plots.Stroke}}) precompile(Tuple{typeof(Plots.wraptuple), Tuple{Symbol, Int64}}) - precompile(Tuple{typeof(Plots.wraptuple), Tuple{Symbol, Symbol, Int64, Symbol, Float64}}) precompile(Tuple{typeof(Plots.wraptuple), Tuple{Symbol, Symbol, Symbol, Int64, Float64}}) precompile(Tuple{typeof(Plots.wraptuple), Tuple{}}) - precompile(Tuple{typeof(Plots.xgrid!), Plots.Plot{Plots.GRBackend}, Symbol, Int}) - precompile(Tuple{typeof(Plots.xlims), Int64}) - precompile(Tuple{typeof(Plots.xlims), Int64}) precompile(Tuple{typeof(Plots.xlims), Plots.Subplot{Plots.GRBackend}}) precompile(Tuple{typeof(Plots.yaxis!), String, Symbol}) - precompile(Tuple{typeof(Plots.ylims), Int64}) - precompile(Tuple{typeof(Plots.ylims), Int64}) precompile(Tuple{typeof(Plots.ylims), Plots.Subplot{Plots.GRBackend}}) end diff --git a/src/series.jl b/src/series.jl index 88e89b26..7ac9838a 100644 --- a/src/series.jl +++ b/src/series.jl @@ -278,7 +278,7 @@ end @recipe f(n::Integer) = is3d(get(plotattributes,:seriestype,:path)) ? (SliceIt, n, n, n) : (SliceIt, n, n, nothing) -all3D(plotattributes::KW) = trueOrAllTrue(st -> st in (:contour, :contourf, :heatmap, :surface, :wireframe, :contour3d, :image, :plots_heatmap), get(plotattributes, :seriestype, :none)) +all3D(plotattributes) = trueOrAllTrue(st -> st in (:contour, :contourf, :heatmap, :surface, :wireframe, :contour3d, :image, :plots_heatmap), get(plotattributes, :seriestype, :none)) # return a surface if this is a 3d plot, otherwise let it be sliced up @recipe function f(mat::AMat{T}) where T<:Union{Integer,AbstractFloat,Missing} diff --git a/src/subplots.jl b/src/subplots.jl index c10b1c27..131ccfe2 100644 --- a/src/subplots.jl +++ b/src/subplots.jl @@ -7,7 +7,7 @@ function Subplot(::T; parent = RootLayout()) where T<:AbstractBackend (20mm, 5mm, 2mm, 10mm), defaultbox, defaultbox, - KW(), + Attr(KW(), _subplot_defaults), nothing, nothing ) diff --git a/src/types.jl b/src/types.jl index 887245e5..e57ca498 100644 --- a/src/types.jl +++ b/src/types.jl @@ -5,6 +5,7 @@ const AVec = AbstractVector const AMat = AbstractMatrix const KW = Dict{Symbol,Any} +const AKW = AbstractDict{Symbol,Any} const TicksArgs = Union{AVec{T}, Tuple{AVec{T}, AVec{S}}, Symbol} where {T<:Real, S<:AbstractString} struct PlotsDisplay <: AbstractDisplay end @@ -18,10 +19,51 @@ wrap(obj::T) where {T} = InputWrapper{T}(obj) Base.isempty(wrapper::InputWrapper) = false +# ----------------------------------------------------------- + +struct Attr <: AbstractDict{Symbol,Any} + explicit::KW + defaults::KW +end + +Base.getindex(attr::Attr, k) = haskey(attr.explicit,k) ? + attr.explicit[k] : attr.defaults[k] +Base.haskey(attr::Attr, k) = haskey(attr.explicit,k) || haskey(attr.defaults,k) +Base.get(attr::Attr, k, default) = haskey(attr, k) ? attr[k] : default +Base.length(attr::Attr) = length(union(keys(attr.explicit), keys(attr.defaults))) +function Base.iterate(attr::Attr) + exp_keys = keys(attr.explicit) + def_keys = setdiff(keys(attr.defaults), exp_keys) + key_list = collect(Iterators.flatten((exp_keys, def_keys))) + iterate(attr, (key_list, 1)) +end +function Base.iterate(attr::Attr, (key_list, i)) + i > length(key_list) && return nothing + k = key_list[i] + (k=>attr[k], (key_list, i+1)) +end + +Base.copy(attr::Attr) = Attr(copy(attr.explicit), attr.defaults) + +RecipesBase.is_explicit(attr::Attr, k) = haskey(attr.explicit,k) +isdefault(attr::Attr, k) = !is_explicit(attr,k) && haskey(attr.defaults,k) + +Base.setindex!(attr::Attr, v, k) = attr.explicit[k] = v + +# Reset to default value and return dict +reset_kw!(attr::Attr, k) = is_explicit(attr, k) ? delete!(attr.explicit, k) : attr +# Reset to default value and return old value +pop_kw!(attr::Attr, k) = is_explicit(attr, k) ? pop!(attr.explicit, k) : attr.defaults[k] +pop_kw!(attr::Attr, k, default) = is_explicit(attr, k) ? pop!(attr.explicit, k) : get(attr.defaults, k, default) +# Fallbacks for dicts without defaults +reset_kw!(d::AKW, k) = delete!(d, k) +pop_kw!(d::AKW, k) = pop!(d, k) +pop_kw!(d::AKW, k, default) = pop!(d, k, default) + # ----------------------------------------------------------- mutable struct Series - plotattributes::KW + plotattributes::Attr end attr(series::Series, k::Symbol) = series.plotattributes[k] @@ -36,7 +78,7 @@ mutable struct Subplot{T<:AbstractBackend} <: AbstractLayout minpad::Tuple # 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 + attr::Attr # args specific to this subplot o # can store backend-specific data... like a pyplot ax plt # the enclosing Plot object (can't give it a type because of no forward declarations) end @@ -48,7 +90,7 @@ Base.show(io::IO, sp::Subplot) = print(io, "Subplot{$(sp[:subplot_index])}") # simple wrapper around a KW so we can hold all attributes pertaining to the axis in one place mutable struct Axis sps::Vector{Subplot} - plotattributes::KW + plotattributes::Attr end mutable struct Extrema @@ -67,8 +109,7 @@ const SubplotMap = Dict{Any, Subplot} mutable struct Plot{T<:AbstractBackend} <: AbstractPlot{T} backend::T # the backend type n::Int # number of series - attr::KW # arguments for the whole plot - user_attr::KW # raw arg inputs (after aliases). these are used as the input dict in `_plot!` + attr::Attr # arguments for the whole plot series_list::Vector{Series} # arguments for each series o # the backend's plot object subplots::Vector{Subplot} @@ -79,7 +120,7 @@ mutable struct Plot{T<:AbstractBackend} <: AbstractPlot{T} end function Plot() - Plot(backend(), 0, KW(), KW(), Series[], nothing, + Plot(backend(), 0, Attr(KW(), _plot_defaults), Series[], nothing, Subplot[], SubplotMap(), EmptyLayout(), Subplot[], false) end diff --git a/src/utils.jl b/src/utils.jl index 04ec2cae..dd0e139b 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -318,13 +318,13 @@ function replaceType(vec, val) push!(vec, val) end -function replaceAlias!(plotattributes::KW, k::Symbol, aliases::Dict{Symbol,Symbol}) +function replaceAlias!(plotattributes::AKW, k::Symbol, aliases::Dict{Symbol,Symbol}) if haskey(aliases, k) - plotattributes[aliases[k]] = pop!(plotattributes, k) + plotattributes[aliases[k]] = pop_kw!(plotattributes, k) end end -function replaceAliases!(plotattributes::KW, aliases::Dict{Symbol,Symbol}) +function replaceAliases!(plotattributes::AKW, aliases::Dict{Symbol,Symbol}) ks = collect(keys(plotattributes)) for k in ks replaceAlias!(plotattributes, k, aliases) @@ -415,7 +415,7 @@ isscalar(::Any) = false is_2tuple(v) = typeof(v) <: Tuple && length(v) == 2 -isvertical(plotattributes::KW) = get(plotattributes, :orientation, :vertical) in (:vertical, :v, :vert) +isvertical(plotattributes::AKW) = get(plotattributes, :orientation, :vertical) in (:vertical, :v, :vert) isvertical(series::Series) = isvertical(series.plotattributes) @@ -829,7 +829,7 @@ end debugshow(io, x) = show(io, x) debugshow(io, x::AbstractArray) = print(io, summary(x)) -function dumpdict(io::IO, plotattributes::KW, prefix = "", alwaysshow = false) +function dumpdict(io::IO, plotattributes::AKW, prefix = "", alwaysshow = false) _debugMode.on || alwaysshow || return println(io) if prefix != ""