8000 matplotlib 3d interactive plot boundaries · Issue #24679 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

matplotlib 3d interactive plot boundaries #24679

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

Open
SaHaddad opened this issue Dec 9, 2022 · 8 comments
Open

matplotlib 3d interactive plot boundaries #24679

SaHaddad opened this issue Dec 9, 2022 · 8 comments

Comments

@SaHaddad
Copy link
SaHaddad commented Dec 9, 2022

Hi I want to zoom in more on the plot but the curve is cutted out by a "frame" as shown in the picture below and i would like to see the curve fill all the window. I asked help on discord but couldn't get an answer any help would be greatly appreciated
image

@oscargus
Copy link
Member

The box aspect is fixed in 3D plots, but you can change it by calling set_box_aspect. As opposed to the 2D case, setting it to None will not make it adapt, but that seems like a reasonable request, although it will require a bit of ad-hoc since there is not a unique way to figure out how to fill the window.

@SaHaddad
Copy link
Author

@oscargus
Sorry but what should i put in the setboxaspect thing exactly ?
Here is my code

from mpl_toolkits.mplot3d import Axes3D
import math as mt
def attracteur(x,y,z,dt):
    lx,ly,lz,=[x],[y],[z]
    t=0
    β,ρ,σ=8/3,28,10
    while t<100:
        x,y,z=(x+dt*(σ*(y-x))),(y+dt*(ρ*x-y-x*z)),(z+dt*(y*x-β*z))
        t+=dt
        lx.append(x)
        ly.append(y)
        lz.append(z)
    pl.figure()
    ax=pl.axes(projection='3d')
    ax.plot3D(lx,ly,lz,'b',linewidth=0.5)
    pl.title('')
    ax.set_ylabel('$y$')
    ax.set_xlabel('$x$')
    ax.set_zlabel('$z$')
    pl.show()

and a video will explain itself
2022-12-09_19-43-38.webm

@oscargus
Copy link
Member
oscargus commented Dec 28, 2022

Sorry, it didn't work as I expected. One can affect it, but I cannot really find a way to expand it to cover the whole frame.

May be related with #20655

@QuLogic
Copy link
Member
QuLogic commented Oct 10, 2024

I think this is fixed by #27349.

@QuLogic QuLogic closed this as completed Oct 10, 2024
@QuLogic QuLogic added this to the v3.10.0 milestone Oct 10, 2024
@scottshambaugh
Copy link
Contributor

I don't believe this is related to #27349 - my interpretation of the original issue is that the user wants to expand the 2D clip box to fill the entire figure, like so
image

@SaHaddad
Copy link
Author

Wow ! To be honest i was surprised to get any emails out of that issue recently. And yes what the previous comment illustrates is exactly what i was asking about. Are they still no commands to do it ?

@scottshambaugh
Copy link
Contributor
scottshambaugh commented Oct 16, 2024

Hey @SaHaddad, unfortunately there is still not a way to change this yet.

@SaHaddad
Copy link
Author

No worries this is just a nit pick.

@scottshambaugh scottshambaugh modified the milestones: v3.10.0, v3.11.0 Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0