Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add third angle to view_init() #14453

Copy link
Copy link
Closed
@baloe

Description

@baloe
Issue body actions

Bug report

Bug summary

mpl_toolkits.mplot3d.axes3d.Axes3D.view_init
provides a means to set the elevation and the azimuth, but the z-axis is always aligned with the vertical camera axis.
A third angle would be required to permit any view.

The issue was reported on stackoverflow 3.5 years ago.

Code for reproduction

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = Axes3D(fig)

ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('z')
plt.show()

Actual outcome

Figure_1

Now, however hard you try to rotate the plot interactively or what angles you set in ax.view_init(), you will never be able to get the z-axis in a horizontalish position that is required to produce the plot below:

Expected outcome

By rotating interactively or via ax.view_init() one should be able to obtain this view below. Unfortunately, this is not possible.
Figure_2

Matplotlib version

  • Operating system: Ubuntu 16.04
  • Matplotlib version: 3.1.0, py37h5429711_0
  • Matplotlib backend: Qt5Agg
  • Python version: 3.7.3 (conda)
Gabriel-p, GProulx, BorisLestsov, lubosz, dennisritter and 16 more

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.