allow disabling the colorbar in pgfplotsx

This commit is contained in:
Daniel Schwabeneder 2020-05-13 15:15:42 +02:00
parent 238aca6a78
commit 0a6e691222

View File

@ -215,11 +215,10 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
colormap={plots$(sp.attr[:subplot_index])}{$cm},
}""",
)
push!(
axis_opt,
"colorbar" => nothing,
"colormap name" => "plots$(sp.attr[:subplot_index])",
)
if sp[:colorbar] == true
push!(axis_opt, "colorbar" => nothing)
end
push!(axis_opt, "colormap name" => "plots$(sp.attr[:subplot_index])")
if cg isa PlotUtils.CategoricalColorGradient
push!(
axis_opt,
@ -233,6 +232,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
end
@label colorbar_end
if sp[:colorbar] == true
push!(
axis_opt,
"colorbar style" => PGFPlotsX.Options(
@ -241,6 +241,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
"point meta max" => get_clims(sp)[2],
"point meta min" => get_clims(sp)[1],
)
end
if RecipesPipeline.is3d(sp)
azim, elev = sp[:camera]
push!(axis_opt, "view" => (azim, elev))