diff --git a/src/backends.jl b/src/backends.jl index 42349caf..362fa32a 100644 --- a/src/backends.jl +++ b/src/backends.jl @@ -971,6 +971,7 @@ const _unicodeplots_scale = [:identity, :ln, :log2, :log10] # Additional constants const _canvas_type = Ref(:auto) +const _border_type = Ref(:auto) # ------------------------------------------------------------------------------ # hdf5 diff --git a/src/backends/unicodeplots.jl b/src/backends/unicodeplots.jl index 8cff84e3..83edb538 100644 --- a/src/backends/unicodeplots.jl +++ b/src/backends/unicodeplots.jl @@ -40,6 +40,12 @@ function unicodeplots_rebuild(plt::Plot{UnicodePlotsBackend}) ct end + border_type = if (bt = _border_type[]) == :auto + isijulia() ? :ascii : :solid + else + bt + end + kw = ( compact = true, title = texmath2unicode(sp[:title]), @@ -47,7 +53,7 @@ function unicodeplots_rebuild(plt::Plot{UnicodePlotsBackend}) ylabel = texmath2unicode(yaxis[:guide]), xscale = xaxis[:scale], yscale = yaxis[:scale], - border = isijulia() ? :ascii : :solid, + border = border_type, xlim = xlim, ylim = ylim, ) @@ -213,7 +219,7 @@ end function _show(io::IO, m::MIME"text/plain", plt::Plot{UnicodePlotsBackend}, ::Type{Val{true}}) nr, nc = size(plt.layout) - if nr == 1 && nc == 1 # fast path + if nr == 1 && nc == 1 # fast path _show(io, m, plt, Val{false}) else lines_colored = Array{Union{Nothing,Vector{String}}}(undef, nr, nc)