Skip to content

3d plots using the default renderer soemtimes don't show #8199

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
jirilebl opened this issue Feb 20, 2025 · 0 comments
Open

3d plots using the default renderer soemtimes don't show #8199

jirilebl opened this issue Feb 20, 2025 · 0 comments

Comments

@jirilebl
Copy link

Sometimes, and I don't know at all how to exactly trigger it, a 3d plot just doesn't show. This happens when the output was there in a worksheet that was closed and I open it. I can try to rerun the code but the output is still not there. The output frame is just totally empty white space. If I change anything trivial about the code and rerun it, the plot it shows, if I change it back and rerun, it gives empty space again. This is in the standard jupyter notebook with the latest sage kernel and I've reproduced it with both Firefox and Chrome. Then a few minutes later it may start working again even for the original parameters. The latest one it was not working for a while was

var('x y')
f(x,y)=(xy)/(x^2+y^2)
gr=plot3d(f(x,y), (x, -1, 1), (y, -1, 1), opacity=0.8, plot_points=150)
gr=gr+parametric_plot3d((x,0,f(x,0)),(x,-1,1),color='orange',thickness=2)
gr=gr+parametric_plot3d((0,y,f(0,y)),(y,-1,1),color='orange',thickness=2)
gr=gr+parametric_plot3d((x,0.5
x,f(x,0.5x)),(x,-1,1),color='orange',thickness=2)
gr=gr+parametric_plot3d((x,x,f(x,x)),(x,-1,1),color='orange',thickness=2)
gr=gr+parametric_plot3d((x,2
x,f(x,2x)),(x,-0.5,0.5),color='orange',thickness=2)
gr=gr+parametric_plot3d((x,-0.5
x,f(x,-0.5x)),(x,-1,1),color='orange',thickness=2)
gr=gr+parametric_plot3d((x,-x,f(x,-x)),(x,-1,1),color='orange',thickness=2)
gr=gr+parametric_plot3d((x,-2
x,f(x,-2*x)),(x,-0.5,0.5),color='orange',thickness=2)
show(gr)

When I changed the plot_points to 151 it worked and gave a picture. Now a few minutes later it works with 150 as well, so there is nothing wrong with the 150.

It almost feels like some sort of caching going wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant