padding of grouplots
This commit is contained in:
parent
1f14a4d4c6
commit
4c6b96e38a
@ -24,7 +24,9 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
push!( the_plot, PGFPlotsX.GroupPlot(
|
push!( the_plot, PGFPlotsX.GroupPlot(
|
||||||
PGFPlotsX.Options(
|
PGFPlotsX.Options(
|
||||||
"group style" => PGFPlotsX.Options(
|
"group style" => PGFPlotsX.Options(
|
||||||
"group size" => string(cols)*" by "*string(rows)
|
"group size" => string(cols)*" by "*string(rows),
|
||||||
|
"horizontal sep" => string(maximum(sp -> sp.minpad[1], plt.subplots)),
|
||||||
|
"vertical sep" => string(maximum(sp -> sp.minpad[2], plt.subplots)),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -550,6 +552,13 @@ function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter)
|
|||||||
end
|
end
|
||||||
# --------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------
|
||||||
# display calls this and then _display, its called 3 times for plot(1:5)
|
# display calls this and then _display, its called 3 times for plot(1:5)
|
||||||
|
# Set the (left, top, right, bottom) minimum padding around the plot area
|
||||||
|
# to fit ticks, tick labels, guides, colorbars, etc.
|
||||||
|
function _update_min_padding!(sp::Subplot{PGFPlotsXBackend})
|
||||||
|
# TODO: make padding more intelligent
|
||||||
|
sp.minpad = (20mm, 5mm, 2mm, 10mm)
|
||||||
|
end
|
||||||
|
|
||||||
function _create_backend_figure(plt::Plot{PGFPlotsXBackend})
|
function _create_backend_figure(plt::Plot{PGFPlotsXBackend})
|
||||||
plt.o = PGFPlotsXPlot()
|
plt.o = PGFPlotsXPlot()
|
||||||
end
|
end
|
||||||
|
|||||||
@ -59,7 +59,6 @@ end
|
|||||||
end # testset
|
end # testset
|
||||||
@testset "Layout" begin
|
@testset "Layout" begin
|
||||||
plot(Plots.fakedata(100, 10), layout=4, palette=[:grays :blues :heat :lightrainbow], bg_inside=[:orange :pink :darkblue :black])
|
plot(Plots.fakedata(100, 10), layout=4, palette=[:grays :blues :heat :lightrainbow], bg_inside=[:orange :pink :darkblue :black])
|
||||||
# TODO: no extra space for outer legends
|
|
||||||
end # testset
|
end # testset
|
||||||
@testset "Polar plots" begin
|
@testset "Polar plots" begin
|
||||||
Θ = range(0, stop=1.5π, length=100)
|
Θ = range(0, stop=1.5π, length=100)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user