From 0fb1a0ed6bfc579f7577aae59de59819bac8e104 Mon Sep 17 00:00:00 2001 From: Andrew Palugniok Date: Fri, 6 Oct 2017 20:07:48 +0100 Subject: [PATCH] Implemented camera attribute for PGFPlots. --- src/backends/pgfplots.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index b54d8aa0..a5f1a1b0 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -33,6 +33,7 @@ const _pgfplots_attr = merge_with_base_supported([ # :match_dimensions, :tick_direction, :framestyle, + :camera, ]) const _pgfplots_seriestype = [:path, :path3d, :scatter, :steppre, :stepmid, :steppost, :histogram2d, :ysticks, :xsticks, :contour, :shape] const _pgfplots_style = [:auto, :solid, :dash, :dot, :dashdot, :dashdotdot] @@ -380,6 +381,11 @@ function _update_plot_object(plt::Plot{PGFPlotsBackend}) kw[:legendPos] = _pgfplots_legend_pos[legpos] end + if is3d(sp) + azim, elev = sp[:camera] + kw[:view] = "{$(azim)}{$(elev)}" + end + axisf = PGFPlots.Axis if sp[:projection] == :polar axisf = PGFPlots.PolarAxis