diff --git a/src/axes.jl b/src/axes.jl index 855f8d97..1cecd211 100644 --- a/src/axes.jl +++ b/src/axes.jl @@ -212,7 +212,7 @@ function optimal_ticks_and_labels(axis::Axis, ticks = nothing) formatter = axis[:formatter] if formatter == :auto # the default behavior is to make strings of the scaled values and then apply the labelfunc - map(labelfunc(scale, backend()), Showoff.showoff(scaled_ticks, :plain)) + map(labelfunc(scale, backend()), Showoff.showoff(scaled_ticks, :auto)) elseif formatter == :scientific Showoff.showoff(unscaled_ticks, :scientific) else diff --git a/src/backends/gr.jl b/src/backends/gr.jl index 7ff6f606..f259f143 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -223,7 +223,7 @@ function gr_polaraxes(rmin::Real, rmax::Real, sp::Subplot) sinf = sind.(a) cosf = cosd.(a) rtick_values, rtick_labels = get_ticks(yaxis) - if yaxis[:formatter] == :scientific && yaxis[:ticks] in (:auto, :native) + if (yaxis[:formatter] == :scientific || contains(rtick_labels,"×10") )&& yaxis[:ticks] in (:auto, :native) rtick_labels = convert_sci_unicode(rtick_labels) end @@ -889,7 +889,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) # ensure correct dispatch in gr_text for automatic log ticks if xaxis[:scale] in _logScales dv = string(dv, "\\ ") - elseif xaxis[:formatter] == :scientific + elseif xaxis[:formatter] == :scientific || contains(dv,"×10") dv = convert_sci_unicode(dv) end end @@ -908,7 +908,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) # ensure correct dispatch in gr_text for automatic log ticks if yaxis[:scale] in _logScales dv = string(dv, "\\ ") - elseif yaxis[:formatter] == :scientific + elseif yaxis[:formatter] == :scientific || contains(dv,"×10") dv = convert_sci_unicode(dv) end end