Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:mainfromtimhoffm:doc-imshow3d
May 23, 2024

Conversation

timhoffm
Copy link
Member

Serving

  • Separate planes (well, one would be enough then) is a simpler example that should be done separately.

Originally posted by@story645 in#28239 (comment)

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.
Copy link
Contributor

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.

Copy link
Member

@story645story645May 23, 2024
edited
Loading

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 taghttps://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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Image from the built docs:

image

It may be more impactful if you manually set the axlims so the images line up with the backing planes, but your call. Can self merge if you prefer as-is.

Copy link
MemberAuthor

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.

@timhoffmtimhoffm added this to thev3.9.1 milestoneMay 23, 2024
@timhoffmtimhoffm merged commitd901275 intomatplotlib:mainMay 23, 2024
20 checks passed
@timhoffmtimhoffm deleted the doc-imshow3d branchMay 23, 2024 08:33
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMay 23, 2024
rcomer added a commit that referenced this pull requestMay 23, 2024
…280-on-v3.9.xBackport PR#28280 on branch v3.9.x (DOC: Add an example for 2D images in 3D plots)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@story645story645story645 left review comments

@scottshambaughscottshambaughscottshambaugh approved these changes

Assignees
No one assigned
Labels
Documentation: examplesfiles in galleries/examples
Projects
None yet
Milestone
v3.9.1
Development

Successfully merging this pull request may close these issues.

3 participants
@timhoffm@story645@scottshambaugh

[8]ページ先頭

©2009-2025 Movatter.jp