Merge branch 'tick-format' of https://github.com/yha/Plots.jl into tick-format
This commit is contained in:
parent
f23e6c224d
commit
bd7f0dc8d4
@ -20,9 +20,13 @@ using UUIDs
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
function labelfunc(scale::Symbol, backend::PlotlyBackend)
|
||||
f = scale == :log10 ? x->"10<sup>$x</sup>" : identity
|
||||
texfunc = labelfunc_tex(scale)
|
||||
function (x)
|
||||
tex_x = texfunc(x)
|
||||
sup_x = replace( tex_x, r"\^{(.*)}"=>s"<sup>\1</sup>" )
|
||||
# replace dash with \minus (U+2212)
|
||||
x -> replace(f(x), "-" => "−")
|
||||
replace(sup_x, "-" => "−")
|
||||
end
|
||||
end
|
||||
|
||||
function plotly_font(font::Font, color = font.color)
|
||||
|
||||
@ -1069,7 +1069,7 @@ guidefont(ax::Axis) = font(
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# converts unicode scientific notation, as returned by Showoff,
|
||||
# to a tex-like format (supported by gr, pyplot, and gpfplot).
|
||||
# to a tex-like format (supported by gr, pyplot, and pgfplots).
|
||||
|
||||
function convert_sci_unicode(label::AbstractString)
|
||||
unicode_dict = Dict(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user