UnicodePlots: allow setting width / height
This commit is contained in:
parent
a361ba60b8
commit
6c67908a3a
@ -18,6 +18,9 @@ const _canvas_map = (
|
||||
function unicodeplots_rebuild(plt::Plot{UnicodePlotsBackend})
|
||||
plt.o = UnicodePlots.Plot[]
|
||||
|
||||
up_width = UnicodePlots.DEFAULT_WIDTH[]
|
||||
up_height = UnicodePlots.DEFAULT_HEIGHT[]
|
||||
|
||||
has_layout = prod(size(plt.layout)) > 1
|
||||
for sp in plt.subplots
|
||||
sp_kw = sp[:extra_kwargs]
|
||||
@ -51,8 +54,8 @@ function unicodeplots_rebuild(plt::Plot{UnicodePlotsBackend})
|
||||
end
|
||||
|
||||
# blank plots will not be shown
|
||||
width = has_layout && isempty(series_list(sp)) ? 0 : UnicodePlots.DEFAULT_WIDTH[]
|
||||
height = UnicodePlots.DEFAULT_HEIGHT[]
|
||||
width = has_layout && isempty(series_list(sp)) ? 0 : get(sp_kw, :width, up_width)
|
||||
height = get(sp_kw, :height, up_height)
|
||||
|
||||
plot_3d = is3d(sp)
|
||||
blend = get(sp_kw, :blend, true)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user