From 2e9e1fc42404374a20ae0187d8342d6b99f29e61 Mon Sep 17 00:00:00 2001 From: Godisemo Date: Fri, 14 Sep 2018 10:02:15 +0200 Subject: [PATCH 1/2] Fix Julia v1.0 deprecations for pgfplots backend --- src/backends/pgfplots.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index 864126ce..017c232a 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -424,7 +424,7 @@ function pgf_axis(sp::Subplot, letter) tick_labels = ispolar(sp) && letter == :x ? [ticks[2][3:end]..., "0", "45"] : ticks[2] if axis[:formatter] in (:scientific, :auto) tick_labels = string.("\$", convert_sci_unicode.(tick_labels), "\$") - tick_labels = replace.(tick_labels, "×", "\\times") + tick_labels = replace.(tick_labels, Ref("×" => "\\times")) end push!(style, string(letter, "ticklabels = {", join(tick_labels,","), "}")) else @@ -563,7 +563,7 @@ function _update_plot_object(plt::Plot{PGFPlotsBackend}) # add the series object to the PGFPlots.Axis for series in series_list(sp) - push!.(o, pgf_series(sp, series)) + push!.(Ref(o), pgf_series(sp, series)) # add series annotations anns = series[:series_annotations] From ecf483702f0068c6ff1333ea2a848438ce4aeb83 Mon Sep 17 00:00:00 2001 From: Godisemo Date: Fri, 14 Sep 2018 10:36:49 +0200 Subject: [PATCH 2/2] Fix deprecated syntax in PGFPlots backend --- src/backends/pgfplots.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index 017c232a..26865bb9 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -413,7 +413,7 @@ function pgf_axis(sp::Subplot, letter) push!(style, string(letter, "tick = {", join(tick_values,","), "}")) if axis[:showaxis] && axis[:scale] in (:ln, :log2, :log10) && axis[:ticks] == :auto # wrap the power part of label with } - tick_labels = Vector{String}(length(ticks[2])) + tick_labels = Vector{String}(undef, length(ticks[2])) for (i, label) in enumerate(ticks[2]) base, power = split(label, "^") power = string("{", power, "}")