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)
|
function labelfunc(scale::Symbol, backend::PlotlyBackend)
|
||||||
f = scale == :log10 ? x->"10<sup>$x</sup>" : identity
|
texfunc = labelfunc_tex(scale)
|
||||||
# replace dash with \minus (U+2212)
|
function (x)
|
||||||
x -> replace(f(x), "-" => "−")
|
tex_x = texfunc(x)
|
||||||
|
sup_x = replace( tex_x, r"\^{(.*)}"=>s"<sup>\1</sup>" )
|
||||||
|
# replace dash with \minus (U+2212)
|
||||||
|
replace(sup_x, "-" => "−")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function plotly_font(font::Font, color = font.color)
|
function plotly_font(font::Font, color = font.color)
|
||||||
|
|||||||
@ -1069,7 +1069,7 @@ guidefont(ax::Axis) = font(
|
|||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# converts unicode scientific notation, as returned by Showoff,
|
# 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)
|
function convert_sci_unicode(label::AbstractString)
|
||||||
unicode_dict = Dict(
|
unicode_dict = Dict(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user