Merge pull request #1195 from apalugniok/pgfplots-logticks
Fix log scale ticks LaTeX error for PGFPlots. (fixes #1192)
This commit is contained in:
commit
5bfa6151ac
@ -300,7 +300,15 @@ function pgf_axis(sp::Subplot, letter)
|
||||
if !(axis[:ticks] in (nothing, false, :none)) && framestyle != :none
|
||||
ticks = get_ticks(axis)
|
||||
push!(style, string(letter, "tick = {", join(ticks[1],","), "}"))
|
||||
if axis[:showaxis]
|
||||
if axis[:showaxis] && axis[:scale] in (:ln, :log2, :log10) && axis[:ticks] == :auto
|
||||
# wrap the power part of label with }
|
||||
tick_labels = String[begin
|
||||
base, power = split(label, "^")
|
||||
power = string("{", power, "}")
|
||||
string(base, "^", power)
|
||||
end for label in ticks[2]]
|
||||
push!(style, string(letter, "ticklabels = {\$", join(tick_labels,"\$,\$"), "\$}"))
|
||||
elseif axis[:showaxis]
|
||||
push!(style, string(letter, "ticklabels = {", join(ticks[2],","), "}"))
|
||||
else
|
||||
push!(style, string(letter, "ticklabels = {}"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user