fix extra blank space in GR with log axis and engineering notation

This commit is contained in:
Daniel Schwabeneder 2019-12-10 13:12:35 +01:00
parent 3459bcd817
commit fbbbd40353

View File

@ -1116,9 +1116,10 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
# @show cv dv ymin xi yi flip mirror (flip $ mirror) # @show cv dv ymin xi yi flip mirror (flip $ mirror)
if xaxis[:ticks] in (:auto, :native) if xaxis[:ticks] in (:auto, :native)
# ensure correct dispatch in gr_text for automatic log ticks # ensure correct dispatch in gr_text for automatic log ticks
if xaxis[:formatter] in (:scientific, :auto)
if xaxis[:scale] in _logScales if xaxis[:scale] in _logScales
dv = string(dv, "\\ ") dv = string(dv, "\\ ")
elseif xaxis[:formatter] in (:scientific, :auto) end
dv = convert_sci_unicode(dv) dv = convert_sci_unicode(dv)
end end
end end
@ -1135,9 +1136,10 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
# @show cv dv xmin xi yi # @show cv dv xmin xi yi
if yaxis[:ticks] in (:auto, :native) if yaxis[:ticks] in (:auto, :native)
# ensure correct dispatch in gr_text for automatic log ticks # ensure correct dispatch in gr_text for automatic log ticks
if yaxis[:formatter] in (:scientific, :auto)
if yaxis[:scale] in _logScales if yaxis[:scale] in _logScales
dv = string(dv, "\\ ") dv = string(dv, "\\ ")
elseif yaxis[:formatter] in (:scientific, :auto) end
dv = convert_sci_unicode(dv) dv = convert_sci_unicode(dv)
end end
end end