add legendtitle for pgfplotsx
This commit is contained in:
parent
ebfe97a692
commit
9c1b30f774
@ -240,6 +240,16 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
PGFPlotsX.Axis
|
PGFPlotsX.Axis
|
||||||
end
|
end
|
||||||
axis = axisf(axis_opt)
|
axis = axisf(axis_opt)
|
||||||
|
if sp[:legendtitle] !== nothing
|
||||||
|
push!(axis, PGFPlotsX.Options("\\addlegendimage{empty legend}" => nothing))
|
||||||
|
push!(
|
||||||
|
axis,
|
||||||
|
PGFPlotsX.LegendEntry(
|
||||||
|
string("\\hspace{-.6cm}{\\textbf{", sp[:legendtitle], "}}"),
|
||||||
|
false,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
end
|
||||||
for (series_index, series) in enumerate(series_list(sp))
|
for (series_index, series) in enumerate(series_list(sp))
|
||||||
# give each series a uuid for fillbetween
|
# give each series a uuid for fillbetween
|
||||||
series_id = uuid4()
|
series_id = uuid4()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user