contour improvements: colorbar, contour_labels and levels
This commit is contained in:
parent
4797f18819
commit
f59ad1620a
@ -27,7 +27,7 @@ const _pgfplots_attr = merge_with_base_supported([
|
|||||||
:tickfont, :guidefont, :legendfont,
|
:tickfont, :guidefont, :legendfont,
|
||||||
:grid, :legend,
|
:grid, :legend,
|
||||||
:colorbar,
|
:colorbar,
|
||||||
:fill_z, :line_z, :marker_z, #:levels,
|
:fill_z, :line_z, :marker_z, :levels,
|
||||||
# :ribbon, :quiver, :arrow,
|
# :ribbon, :quiver, :arrow,
|
||||||
# :orientation,
|
# :orientation,
|
||||||
# :overwrite_figure,
|
# :overwrite_figure,
|
||||||
@ -38,6 +38,7 @@ const _pgfplots_attr = merge_with_base_supported([
|
|||||||
:tick_direction,
|
:tick_direction,
|
||||||
:framestyle,
|
:framestyle,
|
||||||
:camera,
|
:camera,
|
||||||
|
:contour_labels,
|
||||||
])
|
])
|
||||||
const _pgfplots_seriestype = [:path, :path3d, :scatter, :steppre, :stepmid, :steppost, :histogram2d, :ysticks, :xsticks, :contour, :shape, :straightline,]
|
const _pgfplots_seriestype = [:path, :path3d, :scatter, :steppre, :stepmid, :steppost, :histogram2d, :ysticks, :xsticks, :contour, :shape, :straightline,]
|
||||||
const _pgfplots_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
const _pgfplots_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot]
|
||||||
@ -250,6 +251,8 @@ function pgf_series(sp::Subplot, series::Series)
|
|||||||
func = if st == :histogram2d
|
func = if st == :histogram2d
|
||||||
PGFPlots.Histogram2
|
PGFPlots.Histogram2
|
||||||
else
|
else
|
||||||
|
kw[:labels] = series[:contour_labels]
|
||||||
|
kw[:levels] = series[:levels]
|
||||||
PGFPlots.Contour
|
PGFPlots.Contour
|
||||||
end
|
end
|
||||||
push!(series_collection, func(args...; kw...))
|
push!(series_collection, func(args...; kw...))
|
||||||
@ -511,6 +514,7 @@ function _update_plot_object(plt::Plot{PGFPlotsBackend})
|
|||||||
|
|
||||||
if any(s[:seriestype] == :contour for s in series_list(sp))
|
if any(s[:seriestype] == :contour for s in series_list(sp))
|
||||||
kw[:view] = "{0}{90}"
|
kw[:view] = "{0}{90}"
|
||||||
|
kw[:colorbar] = !(sp[:colorbar] in (:none, :off, :hide, false))
|
||||||
elseif is3d(sp)
|
elseif is3d(sp)
|
||||||
azim, elev = sp[:camera]
|
azim, elev = sp[:camera]
|
||||||
kw[:view] = "{$(azim)}{$(elev)}"
|
kw[:view] = "{$(azim)}{$(elev)}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user