Skip to content

Commit 6266ff8

Browse files
forward aspect ratio for 3D plots in pgfplotsx (#4231)
* forward aspect_ratio to unit vector ratio * add equal case
1 parent ae2ddc8 commit 6266ff8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/backends/pgfplotsx.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
233233
push!(axis_opt, "colorbar" => "false")
234234
end
235235
if RecipesPipeline.is3d(sp)
236+
ar = sp[:aspect_ratio]
237+
if ar !== :auto && ar !== :equal
238+
push!(axis_opt, "unit vector ratio" => join(ar, " "))
239+
else
240+
push!(axis_opt, "unit vector ratio" => 1)
241+
end
236242
azim, elev = sp[:camera]
237243
push!(axis_opt, "view" => (azim, elev))
238244
end

0 commit comments

Comments
 (0)