Link axes before adding series.

This commit is contained in:
Andrew Palugniok 2018-03-15 19:13:38 +01:00
parent da4111579d
commit d183d579cf

View File

@ -102,8 +102,13 @@ function plot(plt1::Plot, plts_tail::Plot...; kw...)
end
end
# create the layout and initialize the subplots
# create the layout
plt.layout, plt.subplots, plt.spmap = build_layout(layout, num_sp, copy(plts))
# do we need to link any axes together?
link_axes!(plt.layout, plt[:link])
# initialize the subplots
cmdidx = 1
for (idx, sp) in enumerate(plt.subplots)
_initialize_subplot(plt, sp)
@ -127,9 +132,6 @@ function plot(plt1::Plot, plts_tail::Plot...; kw...)
_update_subplot_args(plt, sp, d, idx, false)
end
# do we need to link any axes together?
link_axes!(plt.layout, plt[:link])
# finish up
current(plt)
_do_plot_show(plt, get(d, :show, default(:show)))