-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: Add an example for 2D images in 3D plots #28280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A fundamental limitation of the 3D plotting engine is that intersecting objects cannot | ||
be drawn correctly. One object will always be drawn after the other. Therefore, | ||
multiple image planes can well be used in the background as shown in this example. | ||
But this approach is not suitable if the planes intersect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good paragraph to include, this "2.5D" renderer behavior is non-obvious, and we should mention it as often as possible IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I also think this is great - it explains why this needs to be a separate example and so will be nice to link to off the intersecting example (and they can all have the same tag https://matplotlib.org/devdocs/devel/tag_guidelines.html )
imshow3d(ax, data_yz, value_direction='x', cmap='magma') | ||
imshow3d(ax, data_zx, value_direction='y', pos=ny, cmap='plasma') | ||
|
||
plt.show() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slightly favor leaving it as is:
- Less optional configuration code keeps the example more readable
- I like that the planes are floating above the axes cube. This is a slight visual hint that the images are not tied to the cube and can theoretically be anywhere.
…280-on-v3.9.x Backport PR #28280 on branch v3.9.x (DOC: Add an example for 2D images in 3D plots)
Serving
Originally posted by @story645 in #28239 (comment)