Skip to content

Commit

Permalink
forward aspect ratio for 3D plots in pgfplotsx (#4231)
Browse files Browse the repository at this point in the history
* forward aspect_ratio to unit vector ratio

* add equal case
  • Loading branch information
BeastyBlacksmith authored Jun 10, 2022
1 parent ae2ddc8 commit 6266ff8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/backends/pgfplotsx.jl
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
push!(axis_opt, "colorbar" => "false")
end
if RecipesPipeline.is3d(sp)
ar = sp[:aspect_ratio]
if ar !== :auto && ar !== :equal
push!(axis_opt, "unit vector ratio" => join(ar, " "))
else
push!(axis_opt, "unit vector ratio" => 1)
end
azim, elev = sp[:camera]
push!(axis_opt, "view" => (azim, elev))
end
Expand Down

0 comments on commit 6266ff8

Please sign in to comment.