insets resp. to window
This commit is contained in:
parent
4eef8e7352
commit
cdb5c5a238
@ -64,7 +64,7 @@ end
|
|||||||
function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||||
if !pgfx_plot.is_created
|
if !pgfx_plot.is_created
|
||||||
the_plot = PGFPlotsX.TikzPicture(PGFPlotsX.Options())
|
the_plot = PGFPlotsX.TikzPicture(PGFPlotsX.Options())
|
||||||
rows, cols = size(plt.layout.grid)
|
# rows, cols = size(plt.layout.grid)
|
||||||
bgc = plt.attr[:background_color_outside] == :match ? plt.attr[:background_color] : plt.attr[:background_color_outside]
|
bgc = plt.attr[:background_color_outside] == :match ? plt.attr[:background_color] : plt.attr[:background_color_outside]
|
||||||
if bgc isa Colors.Colorant
|
if bgc isa Colors.Colorant
|
||||||
cstr = plot_color(bgc)
|
cstr = plot_color(bgc)
|
||||||
@ -291,7 +291,10 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
if sp in inset_subplots
|
if sp in inset_subplots
|
||||||
dx, dy = sp.bbox.x0
|
dx, dy = sp.bbox.x0
|
||||||
push!(axis.options,
|
push!(axis.options,
|
||||||
"at" => "($(_pgfplotsx_subplot_ids[Symbol(string(sp.parent[:subplot_index]))]).north west)",
|
"at" => sp.parent isa Subplot ?
|
||||||
|
"($(_pgfplotsx_subplot_ids[Symbol(string(sp.parent[:subplot_index]))]).north west)"
|
||||||
|
:
|
||||||
|
"(current bounding box.north west)",
|
||||||
"anchor" => "outer north west",
|
"anchor" => "outer north west",
|
||||||
"xshift" => string(dx),
|
"xshift" => string(dx),
|
||||||
"yshift" => string(-dy)
|
"yshift" => string(-dy)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user