diff --git a/.travis.yml b/.travis.yml index a4ca0ed6..abf00122 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,9 @@ addons: - xauth - xvfb +env: + - GKS_ENCODING="utf8" + cache: directories: - $HOME/.julia/artifacts diff --git a/Project.toml b/Project.toml index 26d82018..1b164cc1 100644 --- a/Project.toml +++ b/Project.toml @@ -55,7 +55,6 @@ GeometryTypes = "4d00f742-c7ba-57c2-abde-4428a4b178cb" Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44" ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1" Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0" -LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925" @@ -69,4 +68,4 @@ UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228" VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92" [targets] -test = ["FileIO", "GeometryTypes", "Gtk", "ImageMagick", "Images", "LaTeXStrings", "LibGit2", "OffsetArrays", "PGFPlotsX", "HDF5", "Random", "RDatasets", "StaticArrays", "StatsPlots", "Test", "UnicodePlots", "VisualRegressionTests"] +test = ["FileIO", "GeometryTypes", "Gtk", "ImageMagick", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "HDF5", "Random", "RDatasets", "StaticArrays", "StatsPlots", "Test", "UnicodePlots", "VisualRegressionTests"] diff --git a/src/animation.jl b/src/animation.jl index e0a12d9f..f83880a0 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -71,6 +71,7 @@ function buildanimation(anim::Animation, fn::AbstractString, is_animated_gif::Bool=true; fps::Real = 20, loop::Integer = 0, variable_palette::Bool=false, + verbose=false, show_msg::Bool=true) if length(anim.frames) == 0 throw(ArgumentError("Cannot build empty animations")) @@ -79,20 +80,23 @@ function buildanimation(anim::Animation, fn::AbstractString, fn = abspath(expanduser(fn)) animdir = anim.dir framerate = ffmpeg_framerate(fps) + verbose_level = (verbose isa Int ? verbose : + verbose ? 32 # "info" + : 16) # "error" if is_animated_gif if variable_palette # generate a colorpalette for each frame for highest quality, but larger filesize palette="palettegen=stats_mode=single[pal],[0:v][pal]paletteuse=new=1" - ffmpeg_exe(`-v 0 -framerate $framerate -loop $loop -i $(animdir)/%06d.png -lavfi "$palette" -y $fn`) + ffmpeg_exe(`-v $verbose_level -framerate $framerate -loop $loop -i $(animdir)/%06d.png -lavfi "$palette" -y $fn`) else # generate a colorpalette first so ffmpeg does not have to guess it - ffmpeg_exe(`-v 0 -i $(animdir)/%06d.png -vf "palettegen=stats_mode=diff" -y "$(animdir)/palette.bmp"`) + ffmpeg_exe(`-v $verbose_level -i $(animdir)/%06d.png -vf "palettegen=stats_mode=diff" -y "$(animdir)/palette.bmp"`) # then apply the palette to get better results - ffmpeg_exe(` -v 0 -framerate $framerate -loop $loop -i $(animdir)/%06d.png -i "$(animdir)/palette.bmp" -lavfi "paletteuse=dither=sierra2_4a" -y $fn`) + ffmpeg_exe(`-v $verbose_level -framerate $framerate -loop $loop -i $(animdir)/%06d.png -i "$(animdir)/palette.bmp" -lavfi "paletteuse=dither=sierra2_4a" -y $fn`) end else - ffmpeg_exe(`-v 0 -framerate $framerate -loop $loop -i $(animdir)/%06d.png -pix_fmt yuv420p -y $fn`) + ffmpeg_exe(`-v $verbose_level -framerate $framerate -loop $loop -i $(animdir)/%06d.png -pix_fmt yuv420p -y $fn`) end show_msg && @info("Saved animation to ", fn) diff --git a/src/args.jl b/src/args.jl index cebc5344..9a19211c 100644 --- a/src/args.jl +++ b/src/args.jl @@ -450,38 +450,33 @@ const _initial_fontsizes = Dict(:titlefontsize => _subplot_defaults[:titlefonts :tickfontsize => _axis_defaults[:tickfontsize], :guidefontsize => _axis_defaults[:guidefontsize]) -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) - const _internal_args = [:plot_object, :series_plotindex, :markershape_to_add, :letter, :idxfilter] -const _magic_axis_args = [:axis, :tickfont, :guidefont] + +const _axis_args = sort(union(collect(keys(_axis_defaults)))) +const _series_args = sort(union(collect(keys(_series_defaults)))) +const _subplot_args = sort(union(collect(keys(_subplot_defaults)))) +const _plot_args = sort(union(collect(keys(_plot_defaults)))) + +const _magic_axis_args = [:axis, :tickfont, :guidefont, :grid, :minorgrid] const _magic_subplot_args = [:titlefont, :legendfont, :legendtitlefont, ] const _magic_series_args = [:line, :marker, :fill] -function is_noletter_attribute(k) - is_axis_attr_noletter(k) && return true - k in _magic_axis_args && return true - return false -end +const _all_axis_args = sort(union([_axis_args; _magic_axis_args])) +const _all_subplot_args = sort(union([_subplot_args; _magic_subplot_args])) +const _all_series_args = sort(union([_series_args; _magic_series_args])) +const _all_plot_args = _plot_args -function is_default_attribute(k) - k in _internal_args && return true - k in _all_args && return true - is_axis_attr(k) && return true - is_noletter_attribute(k) && return true - k in _magic_subplot_args && return true - k in _magic_series_args && return true - Symbol(chop(string(k); head = 1, tail = 0)) in _magic_axis_args && return true - return false -end +const _all_args = + sort([_all_axis_args; _all_subplot_args; _all_series_args; _all_plot_args]) + +is_subplot_attr(k) = k in _all_subplot_args +is_series_attr(k) = k in _all_series_args +is_axis_attr(k) = Symbol(chop(string(k); head=1, tail=0)) in _all_axis_args +is_axis_attr_noletter(k) = k in _all_axis_args + +RecipesBase.is_key_supported(k::Symbol) = is_attr_supported(k) +is_default_attribute(k) = k in _internal_args || k in _all_args || is_axis_attr_noletter(k) # ----------------------------------------------------------------------------- @@ -942,22 +937,6 @@ end function preprocessArgs!(plotattributes::AKW) replaceAliases!(plotattributes, _keyAliases) - # clear all axis stuff - # if haskey(plotattributes, :axis) && plotattributes[:axis] in (:none, nothing, false) - # plotattributes[:ticks] = nothing - # plotattributes[:foreground_color_border] = RGBA(0,0,0,0) - # plotattributes[:foreground_color_axis] = RGBA(0,0,0,0) - # plotattributes[:grid] = false - # delete!(plotattributes, :axis) - # end - # for letter in (:x, :y, :z) - # asym = Symbol(letter, :axis) - # if haskey(plotattributes, asym) || plotattributes[asym] in (:none, nothing, false) - # plotattributes[Symbol(letter, :ticks)] = nothing - # plotattributes[Symbol(letter, :foreground_color_border)] = RGBA(0,0,0,0) - # end - # end - # handle axis args common to all axis args = pop_kw!(plotattributes, :axis, ()) for arg in wraptuple(args) @@ -1015,13 +994,6 @@ function preprocessArgs!(plotattributes::AKW) processMinorGridArg!(plotattributes, arg, letter) end end - # fonts - for fontname in (:titlefont, :legendfont, :legendtitlefont) - 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_kw!(plotattributes, fontname, ()) @@ -1040,17 +1012,27 @@ function preprocessArgs!(plotattributes::AKW) end end end - # handle axes guides - if haskey(plotattributes, :guide) - guide = pop!(plotattributes, :guide) - for letter in (:x, :y, :z) - guide_sym = Symbol(letter, :guide) - if !is_explicit(plotattributes, guide_sym) - plotattributes[guide_sym] = guide + # handle axes args + for k in _axis_args + if haskey(plotattributes, k) + v = plotattributes[k] + for letter in (:x, :y, :z) + lk = Symbol(letter, k) + if !is_explicit(plotattributes, lk) + plotattributes[lk] = v + end end end end + # fonts + for fontname in (:titlefont, :legendfont, :legendtitlefont) + args = pop_kw!(plotattributes, fontname, ()) + for arg in wraptuple(args) + processFontArg!(plotattributes, fontname, arg) + end + end + # handle line args for arg in wraptuple(pop_kw!(plotattributes, :line, ())) processLineArg(plotattributes, arg) @@ -1504,12 +1486,9 @@ function _update_axis(plt::Plot, sp::Subplot, plotattributes_in::AKW, letter::Sy end 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 in keys(_axis_defaults) + for k in _all_axis_args # 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) @@ -1524,7 +1503,7 @@ function _update_axis(axis::Axis, plotattributes_in::AKW, letter::Symbol, subplo end # update the axis - attr!(axis, args...; kw...) + attr!(axis; kw...) return end diff --git a/src/axes.jl b/src/axes.jl index 702ff5ba..822de875 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -84,6 +84,9 @@ function attr!(axis::Axis, args...; kw...) process_axis_arg!(plotattributes, arg) end + # then preprocess keyword arguments + preprocessArgs!(KW(kw)) + # then override for any keywords... only those keywords that already exists in plotattributes for (k,v) in kw if haskey(plotattributes, k) diff --git a/src/examples.jl b/src/examples.jl index f17832a5..a1592df8 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -889,6 +889,36 @@ const _examples = PlotExample[ end, ], ), + PlotExample( + "Setting defaults and font arguments", + "", + [ + quote + begin + using Plots + default( + titlefont = (20, "times"), + legendfontsize = 18, + guidefont = (18, :darkgreen), + tickfont = (12, :orange), + guide = "x", + framestyle = :zerolines, + yminorgrid = true + ) + plot( + [sin, cos], + -2π, + 2π, + label = ["sin(θ)" "cos(θ)"], + title = "Trigonometric Functions", + xlabel = "θ", + linewidth = 2, + legend = :outertopleft, + ) + end + end, + ], + ), ] # Some constants for PlotDocs and PlotReferenceImages diff --git a/src/pipeline.jl b/src/pipeline.jl index ef846dd1..2659b74c 100644 --- a/src/pipeline.jl +++ b/src/pipeline.jl @@ -62,14 +62,8 @@ function _preprocess_args(plotattributes::AKW, args, still_to_process::Vector{Re # remove subplot and axis args from plotattributes... they will be passed through in the kw_list if !isempty(args) for (k,v) in plotattributes - for defdict in (_subplot_defaults, - _axis_defaults, - _axis_defaults_byletter[:x], - _axis_defaults_byletter[:y], - _axis_defaults_byletter[:z]) - if haskey(defdict, k) - reset_kw!(plotattributes, k) - end + if k in _all_subplot_args || k in _all_axis_args + reset_kw!(plotattributes, k) end end end diff --git a/src/precompile.jl b/src/precompile.jl index c5ea00d8..5f377a1e 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -1,66 +1,63 @@ function _precompile_() ccall(:jl_generating_output, Cint, ()) == 1 || return nothing isdefined(Plots, Symbol("#@layout")) && precompile(Tuple{getfield(Plots, Symbol("#@layout")), LineNumberNode, Module, Expr}) - isdefined(Plots, Symbol("#kw##_make_hist")) && precompile(Tuple{getfield(Plots, Symbol("#kw##_make_hist")), NamedTuple{(:normed, :weights), Tuple{Bool, Array{Int64, 1}}}, typeof(Plots._make_hist), Tuple{Array{Float64, 1}}, Symbol}) - isdefined(Plots, Symbol("#kw##_make_hist")) && precompile(Tuple{getfield(Plots, Symbol("#kw##_make_hist")), NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}}, typeof(Plots._make_hist), Tuple{Array{Float64, 1}, Array{Float64, 1}}, Int64}) - isdefined(Plots, Symbol("#kw##_make_hist")) && precompile(Tuple{getfield(Plots, Symbol("#kw##_make_hist")), NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}}, typeof(Plots._make_hist), Tuple{Array{Float64, 1}, Array{Float64, 1}}, Tuple{Int64, Int64}}) - isdefined(Plots, Symbol("#kw##_make_hist")) && precompile(Tuple{getfield(Plots, Symbol("#kw##_make_hist")), NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}}, typeof(Plots._make_hist), Tuple{Array{Float64, 1}}, Symbol}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:foreground_color_grid, :grid, :gridalpha, :gridstyle, :gridlinewidth), Tuple{ColorTypes.RGBA{Float64}, Bool, Float64, Symbol, Int64}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:formatter,), Tuple{Symbol}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:grid, :lims), Tuple{Bool, Tuple{Int64, Int64}}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:grid, :lims, :flip), Tuple{Bool, Tuple{Int64, Int64}, Bool}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:grid, :ticks), Tuple{Bool, Nothing}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:grid,), Tuple{Bool}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:guide,), Tuple{String}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:lims, :flip, :ticks, :guide), Tuple{Tuple{Int64, Int64}, Bool, Base.StepRange{Int64, Int64}, String}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:lims,), Tuple{Tuple{Float64, Float64}}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:lims,), Tuple{Tuple{Int64, Int64}}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:rotation,), Tuple{Int64}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:scale, :guide), Tuple{Symbol, String}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:ticks,), Tuple{Base.UnitRange{Int64}}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##attr!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##attr!")), NamedTuple{(:ticks,), Tuple{Nothing}}, typeof(Plots.attr!), Plots.Axis}) - isdefined(Plots, Symbol("#kw##contour")) && precompile(Tuple{getfield(Plots, Symbol("#kw##contour")), NamedTuple{(:fill,), Tuple{Bool}}, typeof(Plots.contour), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Int}) - 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{Float64, 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), 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.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, 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.StepRange{Int64, Int64}, 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_polyline")) && precompile(Tuple{getfield(Plots, Symbol("#kw##gr_polyline")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Base.UnitRange{Int64}, Base.UnitRange{Int64}}) - 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}}) - isdefined(Plots, Symbol("#kw##histogram2d")) && precompile(Tuple{getfield(Plots, Symbol("#kw##histogram2d")), NamedTuple{(:nbins,), Tuple{Int64}}, typeof(Plots.histogram2d), Array{Float64, 1}, Array{Float64, 1}}) - isdefined(Plots, Symbol("#kw##hline!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##hline!")), NamedTuple{(:line,), Tuple{Tuple{Int64, Symbol, Float64, Array{Symbol, 2}}}}, typeof(Plots.hline!), Array{Float64, 2}}) - isdefined(Plots, Symbol("#kw##lens!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##lens!")), NamedTuple{(:inset,), Tuple{Tuple{Int64, Measures.BoundingBox{Tuple{Measures.Length{:w, Float64}, Measures.Length{:h, Float64}}, Tuple{Measures.Length{:w, Float64}, Measures.Length{:h, Float64}}}}}}, typeof(Plots.lens!), Array{Int64, 1}, Int}) - isdefined(Plots, Symbol("#kw##pie")) && precompile(Tuple{getfield(Plots, Symbol("#kw##pie")), NamedTuple{(:title, :l), Tuple{String, Float64}}, typeof(Plots.pie), Array{String, 1}, Int}) - isdefined(Plots, Symbol("#kw##plotly_annotation_dict")) && precompile(Tuple{getfield(Plots, Symbol("#kw##plotly_annotation_dict")), NamedTuple{(:xref, :yref), Tuple{String, String}}, typeof(Plots.plotly_annotation_dict), Float64, Float64, Plots.PlotText}) - isdefined(Plots, Symbol("#kw##plotly_annotation_dict")) && precompile(Tuple{getfield(Plots, Symbol("#kw##plotly_annotation_dict")), NamedTuple{(:xref, :yref), Tuple{String, String}}, typeof(Plots.plotly_annotation_dict), Float64, Float64, String}) - isdefined(Plots, Symbol("#kw##plotly_annotation_dict")) && precompile(Tuple{getfield(Plots, Symbol("#kw##plotly_annotation_dict")), NamedTuple{(:xref, :yref), Tuple{String, String}}, typeof(Plots.plotly_annotation_dict), Int64, Float64, Plots.PlotText}) - isdefined(Plots, Symbol("#kw##plotly_annotation_dict")) && precompile(Tuple{getfield(Plots, Symbol("#kw##plotly_annotation_dict")), NamedTuple{(:xref, :yref), Tuple{String, String}}, typeof(Plots.plotly_annotation_dict), Int64, Float64, String}) - isdefined(Plots, Symbol("#kw##portfoliocomposition")) && precompile(Tuple{getfield(Plots, Symbol("#kw##portfoliocomposition")), NamedTuple{(:labels,), Tuple{Array{String, 2}}}, typeof(Plots.portfoliocomposition), Array{Float64, 2}, Int}) - isdefined(Plots, Symbol("#kw##scatter!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##scatter!")), NamedTuple{(:marker, :series_annotations), Tuple{Tuple{Int64, Float64, Symbol}, Array{Any, 1}}}, typeof(Plots.scatter!), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Int}) - isdefined(Plots, Symbol("#kw##scatter!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##scatter!")), NamedTuple{(:markersize, :c), Tuple{Int64, Symbol}}, typeof(Plots.scatter!), Array{Float64, 1}}) - isdefined(Plots, Symbol("#kw##scatter!")) && precompile(Tuple{getfield(Plots, Symbol("#kw##scatter!")), NamedTuple{(:zcolor, :m, :ms, :lab), Tuple{Array{Float64, 1}, Tuple{Symbol, Float64, Plots.Stroke}, Array{Float64, 1}, String}}, typeof(Plots.scatter!), Array{Float64, 1}}) - isdefined(Plots, Symbol("#kw##scatter")) && precompile(Tuple{getfield(Plots, Symbol("#kw##scatter")), NamedTuple{(:framestyle, :title, :color, :layout, :label, :markerstrokewidth, :ticks), Tuple{Array{Symbol, 2}, Array{String, 2}, Base.ReshapedArray{Int64, 2, Base.UnitRange{Int64}, Tuple{}}, Int64, String, Int64, Base.UnitRange{Int64}}}, typeof(Plots.scatter), Array{Array{Float64, 1}, 1}, Array{Array{Float64, 1}, 1}}) - 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##scatter")) && precompile(Tuple{getfield(Plots, Symbol("#kw##scatter")), NamedTuple{(:marker_z, :color, :legend), Tuple{typeof(Base.:+), Symbol, Bool}}, typeof(Plots.scatter), Array{Float64, 1}, Array{Float64, 1}}) - isdefined(Plots, Symbol("#kw##standalone_html")) && precompile(Tuple{getfield(Plots, Symbol("#kw##standalone_html")), NamedTuple{(:title,), Tuple{String}}, typeof(Plots.standalone_html), Plots.Plot{Plots.PlotlyBackend}}) - isdefined(Plots, Symbol("#kw##test_examples")) && precompile(Tuple{getfield(Plots, Symbol("#kw##test_examples")), NamedTuple{(:skip,), Tuple{Array{Int64, 1}}}, typeof(Plots.test_examples), Symbol}) + isdefined(Plots, Symbol("#_make_hist##kw")) && precompile(Tuple{getfield(Plots, Symbol("#_make_hist##kw")), NamedTuple{(:normed, :weights), Tuple{Bool, Array{Int64, 1}}}, typeof(Plots._make_hist), Tuple{Array{Float64, 1}}, Symbol}) + isdefined(Plots, Symbol("#_make_hist##kw")) && precompile(Tuple{getfield(Plots, Symbol("#_make_hist##kw")), NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}}, typeof(Plots._make_hist), Tuple{Array{Float64, 1}, Array{Float64, 1}}, Int64}) + isdefined(Plots, Symbol("#_make_hist##kw")) && precompile(Tuple{getfield(Plots, Symbol("#_make_hist##kw")), NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}}, typeof(Plots._make_hist), Tuple{Array{Float64, 1}, Array{Float64, 1}}, Tuple{Int64, Int64}}) + isdefined(Plots, Symbol("#_make_hist##kw")) && precompile(Tuple{getfield(Plots, Symbol("#_make_hist##kw")), NamedTuple{(:normed, :weights), Tuple{Bool, Nothing}}, typeof(Plots._make_hist), Tuple{Array{Float64, 1}}, Symbol}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:foreground_color_grid, :grid, :gridalpha, :gridstyle, :gridlinewidth), Tuple{ColorTypes.RGBA{Float64}, Bool, Float64, Symbol, Int64}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:formatter,), Tuple{Symbol}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:grid, :lims), Tuple{Bool, Tuple{Int64, Int64}}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:grid, :lims, :flip), Tuple{Bool, Tuple{Int64, Int64}, Bool}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:grid, :ticks), Tuple{Bool, Nothing}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:grid,), Tuple{Bool}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:guide,), Tuple{String}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:lims, :flip, :ticks, :guide), Tuple{Tuple{Int64, Int64}, Bool, Base.StepRange{Int64, Int64}, String}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:lims,), Tuple{Tuple{Float64, Float64}}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:lims,), Tuple{Tuple{Int64, Float64}}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:lims,), Tuple{Tuple{Int64, Int64}}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:rotation,), Tuple{Int64}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:scale, :guide), Tuple{Symbol, String}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:ticks,), Tuple{Base.UnitRange{Int64}}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#attr!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#attr!##kw")), NamedTuple{(:ticks,), Tuple{Nothing}}, typeof(Plots.attr!), Plots.Axis}) + isdefined(Plots, Symbol("#contour##kw")) && precompile(Tuple{getfield(Plots, Symbol("#contour##kw")), NamedTuple{(:fill,), Tuple{Bool}}, typeof(Plots.contour), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Int}) + isdefined(Plots, Symbol("#gr_polyline##kw")) && precompile(Tuple{getfield(Plots, Symbol("#gr_polyline##kw")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Array{Float64, 1}, Array{Float64, 1}}) + isdefined(Plots, Symbol("#gr_polyline##kw")) && precompile(Tuple{getfield(Plots, Symbol("#gr_polyline##kw")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Array{Int64, 1}, Array{Float64, 1}}) + isdefined(Plots, Symbol("#gr_polyline##kw")) && precompile(Tuple{getfield(Plots, Symbol("#gr_polyline##kw")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Array{Float64, 1}}) + isdefined(Plots, Symbol("#gr_polyline##kw")) && precompile(Tuple{getfield(Plots, Symbol("#gr_polyline##kw")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Base.StepRange{Int64, Int64}, Array{Float64, 1}}) + isdefined(Plots, Symbol("#gr_polyline##kw")) && precompile(Tuple{getfield(Plots, Symbol("#gr_polyline##kw")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Base.UnitRange{Int64}, Array{Float64, 1}}) + isdefined(Plots, Symbol("#gr_polyline##kw")) && precompile(Tuple{getfield(Plots, Symbol("#gr_polyline##kw")), NamedTuple{(:arrowside, :arrowstyle), Tuple{Symbol, Symbol}}, typeof(Plots.gr_polyline), Base.UnitRange{Int64}, Base.UnitRange{Int64}}) + isdefined(Plots, Symbol("#gr_set_font##kw")) && precompile(Tuple{getfield(Plots, Symbol("#gr_set_font##kw")), NamedTuple{(:halign, :valign, :rotation), Tuple{Symbol, Symbol, Int64}}, typeof(Plots.gr_set_font), Plots.Font}) + isdefined(Plots, Symbol("#heatmap##kw")) && precompile(Tuple{getfield(Plots, Symbol("#heatmap##kw")), NamedTuple{(:aspect_ratio,), Tuple{Int64}}, typeof(Plots.heatmap), Array{String, 1}, Int}) + isdefined(Plots, Symbol("#histogram##kw")) && precompile(Tuple{getfield(Plots, Symbol("#histogram##kw")), NamedTuple{(:bins, :weights), Tuple{Symbol, Array{Int64, 1}}}, typeof(Plots.histogram), Array{Float64, 1}}) + isdefined(Plots, Symbol("#histogram2d##kw")) && precompile(Tuple{getfield(Plots, Symbol("#histogram2d##kw")), NamedTuple{(:nbins, :show_empty_bins, :normed, :aspect_ratio), Tuple{Tuple{Int64, Int64}, Bool, Bool, Int64}}, typeof(Plots.histogram2d), Array{Base.Complex{Float64}, 1}}) + isdefined(Plots, Symbol("#histogram2d##kw")) && precompile(Tuple{getfield(Plots, Symbol("#histogram2d##kw")), NamedTuple{(:nbins,), Tuple{Int64}}, typeof(Plots.histogram2d), Array{Float64, 1}, Array{Float64, 1}}) + isdefined(Plots, Symbol("#hline!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#hline!##kw")), NamedTuple{(:line,), Tuple{Tuple{Int64, Symbol, Float64, Array{Symbol, 2}}}}, typeof(Plots.hline!), Array{Float64, 2}}) + isdefined(Plots, Symbol("#lens!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#lens!##kw")), NamedTuple{(:inset,), Tuple{Tuple{Int64, Measures.BoundingBox{Tuple{Measures.Length{:w, Float64}, Measures.Length{:h, Float64}}, Tuple{Measures.Length{:w, Float64}, Measures.Length{:h, Float64}}}}}}, typeof(Plots.lens!), Array{Int64, 1}, Int}) + isdefined(Plots, Symbol("#pie##kw")) && precompile(Tuple{getfield(Plots, Symbol("#pie##kw")), NamedTuple{(:title, :l), Tuple{String, Float64}}, typeof(Plots.pie), Array{String, 1}, Int}) + isdefined(Plots, Symbol("#plotly_annotation_dict##kw")) && precompile(Tuple{getfield(Plots, Symbol("#plotly_annotation_dict##kw")), NamedTuple{(:xref, :yref), Tuple{String, String}}, typeof(Plots.plotly_annotation_dict), Float64, Float64, Plots.PlotText}) + isdefined(Plots, Symbol("#plotly_annotation_dict##kw")) && precompile(Tuple{getfield(Plots, Symbol("#plotly_annotation_dict##kw")), NamedTuple{(:xref, :yref), Tuple{String, String}}, typeof(Plots.plotly_annotation_dict), Float64, Float64, String}) + isdefined(Plots, Symbol("#plotly_annotation_dict##kw")) && precompile(Tuple{getfield(Plots, Symbol("#plotly_annotation_dict##kw")), NamedTuple{(:xref, :yref), Tuple{String, String}}, typeof(Plots.plotly_annotation_dict), Int64, Float64, Plots.PlotText}) + isdefined(Plots, Symbol("#plotly_annotation_dict##kw")) && precompile(Tuple{getfield(Plots, Symbol("#plotly_annotation_dict##kw")), NamedTuple{(:xref, :yref), Tuple{String, String}}, typeof(Plots.plotly_annotation_dict), Int64, Float64, String}) + isdefined(Plots, Symbol("#portfoliocomposition##kw")) && precompile(Tuple{getfield(Plots, Symbol("#portfoliocomposition##kw")), NamedTuple{(:labels,), Tuple{Array{String, 2}}}, typeof(Plots.portfoliocomposition), Array{Float64, 2}, Int}) + isdefined(Plots, Symbol("#scatter!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#scatter!##kw")), NamedTuple{(:marker, :series_annotations), Tuple{Tuple{Int64, Float64, Symbol}, Array{Any, 1}}}, typeof(Plots.scatter!), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Int}) + isdefined(Plots, Symbol("#scatter!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#scatter!##kw")), NamedTuple{(:markersize, :c), Tuple{Int64, Symbol}}, typeof(Plots.scatter!), Array{Float64, 1}}) + isdefined(Plots, Symbol("#scatter!##kw")) && precompile(Tuple{getfield(Plots, Symbol("#scatter!##kw")), NamedTuple{(:zcolor, :m, :ms, :lab), Tuple{Array{Float64, 1}, Tuple{Symbol, Float64, Plots.Stroke}, Array{Float64, 1}, String}}, typeof(Plots.scatter!), Array{Float64, 1}}) + isdefined(Plots, Symbol("#scatter##kw")) && precompile(Tuple{getfield(Plots, Symbol("#scatter##kw")), NamedTuple{(:framestyle, :title, :color, :layout, :label, :markerstrokewidth, :ticks), Tuple{Array{Symbol, 2}, Array{String, 2}, Base.ReshapedArray{Int64, 2, Base.UnitRange{Int64}, Tuple{}}, Int64, String, Int64, Base.UnitRange{Int64}}}, typeof(Plots.scatter), Array{Array{Float64, 1}, 1}, Array{Array{Float64, 1}, 1}}) + isdefined(Plots, Symbol("#scatter##kw")) && precompile(Tuple{getfield(Plots, Symbol("#scatter##kw")), 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("#scatter##kw")) && precompile(Tuple{getfield(Plots, Symbol("#scatter##kw")), NamedTuple{(:marker_z, :color, :legend), Tuple{typeof(Base.:+), Symbol, Bool}}, typeof(Plots.scatter), Array{Float64, 1}, Array{Float64, 1}}) + isdefined(Plots, Symbol("#standalone_html##kw")) && precompile(Tuple{getfield(Plots, Symbol("#standalone_html##kw")), NamedTuple{(:title,), Tuple{String}}, typeof(Plots.standalone_html), Plots.Plot{Plots.PlotlyBackend}}) + isdefined(Plots, Symbol("#test_examples##kw")) && precompile(Tuple{getfield(Plots, Symbol("#test_examples##kw")), NamedTuple{(:skip,), Tuple{Array{Int64, 1}}}, typeof(Plots.test_examples), Symbol}) precompile(Tuple{typeof(Plots.__init__)}) 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_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}, Plots.Attr}) precompile(Tuple{typeof(Plots._add_the_series), Plots.Plot{Plots.PlotlyBackend}, Plots.Subplot{Plots.PlotlyBackend}, 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{Real, 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)}) + precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{Array{Float64, 1}, 1}, Symbol}) + precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{Array{T, 1} where T, 1}, Symbol}) + precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, Array{Function, 1}, Symbol}) + precompile(Tuple{typeof(Plots._apply_type_recipe), Base.Dict{Symbol, Any}, typeof(identity), Symbol}) precompile(Tuple{typeof(Plots._backend_instance), Symbol}) precompile(Tuple{typeof(Plots._bin_centers), Array{Float64, 1}}) precompile(Tuple{typeof(Plots._binbarlike_baseline), Float64, Symbol}) @@ -212,6 +209,7 @@ function _precompile_() precompile(Tuple{typeof(Plots._plot_setup), Plots.Plot{Plots.PlotlyBackend}, Base.Dict{Symbol, Any}, Array{Base.Dict{Symbol, Any}, 1}}) precompile(Tuple{typeof(Plots._plotly_framestyle), Symbol}) precompile(Tuple{typeof(Plots._plots_defaults)}) + precompile(Tuple{typeof(Plots._postprocess_axis_args!), Base.Dict{Symbol, Any}, Symbol}) precompile(Tuple{typeof(Plots._prepare_annotations), Plots.Subplot{Plots.GRBackend}, Plots.Attr}) precompile(Tuple{typeof(Plots._prepare_annotations), Plots.Subplot{Plots.PlotlyBackend}, Plots.Attr}) precompile(Tuple{typeof(Plots._prepare_subplot), Plots.Plot{Plots.GRBackend}, Plots.Attr}) @@ -242,6 +240,7 @@ 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_axis_args!), Base.Dict{Symbol, Any}}) 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}}) @@ -392,6 +391,7 @@ function _precompile_() precompile(Tuple{typeof(Plots.color_or_nothing!), Plots.Attr, Symbol}) precompile(Tuple{typeof(Plots.colorbar_style), Plots.Series}) precompile(Tuple{typeof(Plots.compute_gridsize), Int64, Int64, Int64}) + precompile(Tuple{typeof(Plots.compute_x), Nothing, Plots.Surface{Array{Float64, 2}}, Nothing}) precompile(Tuple{typeof(Plots.compute_xyz), Array{Float64, 1}, Array{Float64, 1}, Base.UnitRange{Int64}}) precompile(Tuple{typeof(Plots.compute_xyz), Array{Float64, 1}, Array{Float64, 1}, Nothing}) precompile(Tuple{typeof(Plots.compute_xyz), Array{Float64, 1}, typeof(identity), Nothing}) @@ -399,21 +399,19 @@ function _precompile_() precompile(Tuple{typeof(Plots.compute_xyz), Array{String, 1}, Array{String, 1}, Plots.Surface{Array{Float64, 2}}}) precompile(Tuple{typeof(Plots.compute_xyz), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Array{Float64, 1}, Nothing}) precompile(Tuple{typeof(Plots.compute_xyz), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Plots.Surface{Array{Float64, 2}}}) + precompile(Tuple{typeof(Plots.compute_xyz), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Plots.Surface{Array{Float64, 2}}, Nothing}) precompile(Tuple{typeof(Plots.compute_xyz), Base.StepRange{Int64, Int64}, Array{Float64, 1}, Nothing}) + precompile(Tuple{typeof(Plots.compute_xyz), Base.StepRange{Int64, Int64}, Plots.Surface{Array{Float64, 2}}, Nothing}) precompile(Tuple{typeof(Plots.compute_xyz), Nothing, Array{Float64, 1}, Nothing}) precompile(Tuple{typeof(Plots.compute_xyz), Nothing, Array{Union{Base.Missing, Float64}, 1}, Nothing}) precompile(Tuple{typeof(Plots.compute_xyz), Nothing, Base.UnitRange{Int64}, Nothing}) precompile(Tuple{typeof(Plots.compute_xyz), Nothing, Nothing, Nothing}) + precompile(Tuple{typeof(Plots.compute_xyz), Nothing, Plots.Surface{Array{Float64, 2}}, Nothing}) precompile(Tuple{typeof(Plots.concatenate_fillrange), Base.UnitRange{Int64}, Tuple{Array{Float64, 1}, Array{Float64, 1}}}) precompile(Tuple{typeof(Plots.contour), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Int}) precompile(Tuple{typeof(Plots.contour_levels), Plots.Series, Tuple{Float64, Float64}}) precompile(Tuple{typeof(Plots.convertLegendValue), Bool}) precompile(Tuple{typeof(Plots.convertLegendValue), Symbol}) - precompile(Tuple{typeof(Plots.convertToAnyVector), Array{Array{Float64, 1}, 1}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.convertToAnyVector), Array{Array{T, 1} where T, 1}, Base.Dict{Symbol, Any}}) - precompile(Tuple{typeof(Plots.convertToAnyVector), Array{Float64, 2}, Base.Dict{Symbol, Any}}) - 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_to_polar), Base.StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, Array{Float64, 1}, Tuple{Int64, Float64}}) precompile(Tuple{typeof(Plots.copy_series!), Plots.Series, Symbol}) @@ -796,6 +794,14 @@ function _precompile_() precompile(Tuple{typeof(Plots.series_annotations), Plots.SeriesAnnotations}) 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.series_vector), Array{Array{Float64, 1}, 1}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.series_vector), Array{Array{T, 1} where T, 1}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.series_vector), Array{Float64, 2}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.series_vector), Array{Function, 1}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.series_vector), Array{Real, 1}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.series_vector), Array{Union{Base.Missing, Int64}, 1}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.series_vector), Array{Union{Base.Missing, Number}, 1}, Base.Dict{Symbol, Any}}) + precompile(Tuple{typeof(Plots.series_vector), typeof(identity), Base.Dict{Symbol, Any}}) precompile(Tuple{typeof(Plots.shape_data), Plots.Series, Int64}) precompile(Tuple{typeof(Plots.should_add_to_legend), Plots.Series}) precompile(Tuple{typeof(Plots.showaxis), Symbol, Symbol}) diff --git a/src/series.jl b/src/series.jl index bbb49469..e2ae1057 100644 --- a/src/series.jl +++ b/src/series.jl @@ -27,31 +27,31 @@ prepareSeriesData(s::Surface) = s # non-numeric Surface, such as an image prepareSeriesData(v::Volume) = Volume(prepareSeriesData(v.v), v.x_extents, v.y_extents, v.z_extents) # default: assume x represents a single series -convertToAnyVector(x, plotattributes) = Any[prepareSeriesData(x)] +series_vector(x, plotattributes) = [prepareSeriesData(x)] # fixed number of blank series -convertToAnyVector(n::Integer, plotattributes) = Any[zeros(0) for i in 1:n] +series_vector(n::Integer, plotattributes) = [zeros(0) for i in 1:n] # vector of data points is a single series -convertToAnyVector(v::AVec{<:DataPoint}, plotattributes) = Any[prepareSeriesData(v)] +series_vector(v::AVec{<:DataPoint}, plotattributes) = [prepareSeriesData(v)] # list of things (maybe other vectors, functions, or something else) -function convertToAnyVector(v::AVec, plotattributes) +function series_vector(v::AVec, plotattributes) if all(x -> x isa MaybeNumber, v) - convertToAnyVector(Vector{MaybeNumber}(v), plotattributes) + series_vector(Vector{MaybeNumber}(v), plotattributes) elseif all(x -> x isa MaybeString, v) - convertToAnyVector(Vector{MaybeString}(v), plotattributes) + series_vector(Vector{MaybeString}(v), plotattributes) else - vcat((convertToAnyVector(vi, plotattributes) for vi in v)...) + vcat((series_vector(vi, plotattributes) for vi in v)...) end end # Matrix is split into columns -function convertToAnyVector(v::AMat{<:DataPoint}, plotattributes) +function series_vector(v::AMat{<:DataPoint}, plotattributes) if all3D(plotattributes) - Any[prepareSeriesData(Surface(v))] + [prepareSeriesData(Surface(v))] else - Any[prepareSeriesData(v[:, i]) for i in axes(v, 2)] + [prepareSeriesData(v[:, i]) for i in axes(v, 2)] end end @@ -60,13 +60,13 @@ end process_fillrange(range::Number, plotattributes) = [range] -process_fillrange(range, plotattributes) = convertToAnyVector(range, plotattributes) +process_fillrange(range, plotattributes) = series_vector(range, plotattributes) process_ribbon(ribbon::Number, plotattributes) = [ribbon] -process_ribbon(ribbon, plotattributes) = convertToAnyVector(ribbon, plotattributes) +process_ribbon(ribbon, plotattributes) = series_vector(ribbon, plotattributes) # ribbon as a tuple: (lower_ribbons, upper_ribbons) -process_ribbon(ribbon::Tuple{Any,Any}, plotattributes) = collect(zip(convertToAnyVector(ribbon[1], plotattributes), - convertToAnyVector(ribbon[2], plotattributes))) +process_ribbon(ribbon::Tuple{Any,Any}, plotattributes) = collect(zip(series_vector(ribbon[1], plotattributes), + series_vector(ribbon[2], plotattributes))) # -------------------------------------------------------------------- @@ -126,9 +126,9 @@ struct SliceIt end z = z.data end - xs = convertToAnyVector(x, plotattributes) - ys = convertToAnyVector(y, plotattributes) - zs = convertToAnyVector(z, plotattributes) + xs = series_vector(x, plotattributes) + ys = series_vector(y, plotattributes) + zs = series_vector(z, plotattributes) fr = pop!(plotattributes, :fillrange, nothing) @@ -227,7 +227,7 @@ _apply_type_recipe(plotattributes, v::AbstractArray{<:DataPoint}, letter) = v # axis args before type recipes should still be mapped to all axes function _preprocess_axis_args!(plotattributes) for (k, v) in plotattributes - if is_noletter_attribute(k) + if is_axis_attr_noletter(k) pop!(plotattributes, k) for l in (:x, :y, :z) lk = Symbol(l, k) @@ -246,7 +246,7 @@ function _postprocess_axis_args!(plotattributes, letter) pop!(plotattributes, :letter) if letter in (:x, :y, :z) for (k, v) in plotattributes - if is_noletter_attribute(k) + if is_axis_attr_noletter(k) pop!(plotattributes, k) lk = Symbol(letter, k) haskey(plotattributes, lk) || (plotattributes[lk] = v)