diff --git a/src/animation.jl b/src/animation.jl index 48075fe6..77e41d91 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -24,7 +24,7 @@ immutable AnimatedGif filename::Compat.ASCIIString end -function gif(anim::Animation, fn = "tmp.gif"; fps::Integer = 20) +function gif(anim::Animation, fn = tempname()*".gif"; fps::Integer = 20) fn = abspath(fn) try diff --git a/src/args.jl b/src/args.jl index 4b88a5f9..2e9daa31 100644 --- a/src/args.jl +++ b/src/args.jl @@ -712,7 +712,7 @@ end function extractGroupArgs(v::AVec, args...) groupLabels = sort(collect(unique(v))) n = length(groupLabels) - if n > 20 + if n > 100 warn("You created n=$n groups... Is that intended?") end groupIds = Vector{Int}[filter(i -> v[i] == glab, 1:length(v)) for glab in groupLabels] diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index 81f022bd..80686061 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -952,7 +952,10 @@ function py_compute_axis_minval(axis::Axis) minval = 1.0 sp = axis.sp for series in series_list(axis.sp) - minval = min(minval, minimum(abs(series.d[axis[:letter]]))) + v = series.d[axis[:letter]] + if !isempty(v) + minval = min(minval, minimum(abs(v))) + end end # now if the axis limits go to a smaller abs value, use that instead diff --git a/src/plot.jl b/src/plot.jl index e1bcb174..507f6cf6 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -337,9 +337,6 @@ function _plot!(plt::Plot, d::KW, args...) :label => "", :primary => false, ))) - - # don't allow something else to handle it - d[:smooth] = false end else @@ -349,6 +346,9 @@ function _plot!(plt::Plot, d::KW, args...) end end + # don't allow something else to handle it + d[:smooth] = false + # merge in anything meant for plot/subplot/axis for kw in kw_list for (k,v) in kw @@ -405,13 +405,15 @@ function _plot!(plt::Plot, d::KW, args...) # we'll keep a map of subplot to an attribute override dict. # any series which belong to that subplot sp_attrs = Dict{Subplot,Any}() - for (i,kw) in enumerate(kw_list) + for kw in kw_list # get the Subplot object to which the series belongs sp = get(kw, :subplot, :auto) + command_idx = kw[:series_plotindex] - kw_list[1][:series_plotindex] + 1 sp = if sp == :auto - mod1(i,length(plt.subplots)) + cycle(plt.subplots, command_idx) + # mod1(command_idx, length(plt.subplots)) else - slice_arg(sp, i) + slice_arg(sp, command_idx) end sp = kw[:subplot] = get_subplot(plt, sp) # idx = get_subplot_index(plt, sp) @@ -452,7 +454,7 @@ function _plot!(plt::Plot, d::KW, args...) # this is it folks! # TODO: we probably shouldn't use i for tracking series index, but rather explicitly track it in recipes - for (i,kw) in enumerate(kw_list) + for kw in kw_list command_idx = kw[:series_plotindex] - kw_list[1][:series_plotindex] + 1 # # get the Subplot object to which the series belongs