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