Implemented camera attribute for PyPlot.
This commit is contained in:
parent
65a28e76e5
commit
94e79f1e4c
@ -35,6 +35,7 @@ const _pyplot_attr = merge_with_base_supported([
|
|||||||
:stride,
|
:stride,
|
||||||
:framestyle,
|
:framestyle,
|
||||||
:tick_direction,
|
:tick_direction,
|
||||||
|
:camera,
|
||||||
])
|
])
|
||||||
const _pyplot_seriestype = [
|
const _pyplot_seriestype = [
|
||||||
:path, :steppre, :steppost, :shape,
|
:path, :steppre, :steppost, :shape,
|
||||||
@ -1104,6 +1105,13 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
ax[:set_aspect](isa(aratio, Symbol) ? string(aratio) : aratio, anchor = "C")
|
ax[:set_aspect](isa(aratio, Symbol) ? string(aratio) : aratio, anchor = "C")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#camera/view angle
|
||||||
|
if is3d(sp)
|
||||||
|
#convert azimuthal to match GR behaviour
|
||||||
|
#view_init(elevation, azimuthal) so reverse :camera args
|
||||||
|
ax[:view_init]((sp[:camera].-(90,0))[end:-1:1]...)
|
||||||
|
end
|
||||||
|
|
||||||
# legend
|
# legend
|
||||||
py_add_legend(plt, sp, ax)
|
py_add_legend(plt, sp, ax)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user