From 8abd70bed8e4be9a92d2b7354448c4aa886ed17d Mon Sep 17 00:00:00 2001 From: Andrew Palugniok Date: Sun, 8 Apr 2018 20:59:21 +0100 Subject: [PATCH] =?UTF-8?q?Replace=20`=C3=97`=20with=20`\times`=20for=20PG?= =?UTF-8?q?FPlots.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backends/pgfplots.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index 2396000e..dfde2a0d 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -425,8 +425,10 @@ function pgf_axis(sp::Subplot, letter) push!(style, string(letter, "ticklabels = {\$", join(tick_labels,"\$,\$"), "\$}")) elseif axis[:showaxis] tick_labels = ispolar(sp) && letter == :x ? [ticks[2][3:end]..., "0", "45"] : ticks[2] - tick_labels = ( axis[:formatter] in (:scientific, :auto) ? - string.("\$", convert_sci_unicode.(tick_labels), "\$") : tick_labels ) + if axis[:formatter] in (:scientific, :auto) + tick_labels = string.("\$", convert_sci_unicode.(tick_labels), "\$") + tick_labels = replace.(tick_labels, "×", "\\times") + end push!(style, string(letter, "ticklabels = {", join(tick_labels,","), "}")) else push!(style, string(letter, "ticklabels = {}")) @@ -598,7 +600,6 @@ end function _display(plt::Plot{PGFPlotsBackend}) # prepare the object - PGFPlots.pushPGFPlotsPreamble("\\usepackage{fontspec}") pgfplt = PGFPlots.plot(plt.o) # save an svg