From 3b962ffb08b45a6a821bc236ccdeab7d6368d6a0 Mon Sep 17 00:00:00 2001 From: Ben Ide Date: Wed, 18 Sep 2019 19:09:43 -0400 Subject: [PATCH] added latex formatter for ticks (solves #2042, #2147) --- src/axes.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/axes.jl b/src/axes.jl index 6eb23422..d3120886 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -218,6 +218,8 @@ function optimal_ticks_and_labels(sp::Subplot, axis::Axis, ticks = nothing) map(labelfunc(scale, backend()), Showoff.showoff(scaled_ticks, :plain)) elseif formatter == :scientific Showoff.showoff(unscaled_ticks, :scientific) + elseif formatter == :latex + map(x -> string("\$", replace(convert_sci_unicode(x), '×' => "\\times"), "\$"), Showoff.showoff(unscaled_ticks, :auto)) else # there was an override for the formatter... use that on the unscaled ticks map(formatter, unscaled_ticks)