Unify preamble pushes
This commit is contained in:
parent
140afeb53d
commit
f58d585a20
@ -6,10 +6,15 @@ Base.@kwdef mutable struct PGFPlotsXPlot
|
|||||||
function PGFPlotsXPlot(is_created, was_shown, the_plot)
|
function PGFPlotsXPlot(is_created, was_shown, the_plot)
|
||||||
pgfx_plot = new(is_created, was_shown, the_plot)
|
pgfx_plot = new(is_created, was_shown, the_plot)
|
||||||
# tikz libraries
|
# tikz libraries
|
||||||
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "\\usetikzlibrary{arrows.meta}")
|
|
||||||
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "\\usetikzlibrary{backgrounds}")
|
|
||||||
PGFPlotsX.push_preamble!(pgfx_plot.the_plot,
|
PGFPlotsX.push_preamble!(pgfx_plot.the_plot,
|
||||||
"""
|
"""
|
||||||
|
% Load TikZ libraries
|
||||||
|
\\usetikzlibrary{arrows.meta, backgrounds}
|
||||||
|
|
||||||
|
% Load PGFPlots libraries
|
||||||
|
\\usepgfplotslibrary{patchplots, fillbetween}
|
||||||
|
|
||||||
|
% Set some useful keys
|
||||||
\\pgfkeys{/tikz/.cd,
|
\\pgfkeys{/tikz/.cd,
|
||||||
background color/.initial=white,
|
background color/.initial=white,
|
||||||
background color/.get=\\backcol,
|
background color/.get=\\backcol,
|
||||||
@ -25,8 +30,7 @@ Base.@kwdef mutable struct PGFPlotsXPlot
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
# pgfplots libraries
|
# pgfplots libraries
|
||||||
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "\\usepgfplotslibrary{patchplots}")
|
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "")
|
||||||
PGFPlotsX.push_preamble!(pgfx_plot.the_plot, "\\usepgfplotslibrary{fillbetween}")
|
|
||||||
pgfx_plot
|
pgfx_plot
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user