# Interactive 3d plotting in SageMathCloud Jupyter?

So I'm experimenting with some 3d plots. I can create an interactive plot in Sage with plot3d, but the options are limited. I can create a 3d plot with more control using matplotlib inside Jupyter, except that the resulting plot is not interactive - I can't pan, zoom, or rotate to find the best view of the plot. So what I need is some plotting functionality which has the control of matplotlib, and the interactivity of plot3d. I understand that something similar can be obtained with Mayavi, but this is not part of SageMathCloud Jupyter. And I want to do this online so I can share it with a co-worker. Advice, as usual , would be appreciated!

edit retag close merge delete

Sort by » oldest newest most voted

hi, those two plotting capabilities are entirely different. one of them is a 3d rendering, which happens based on a triangulated grid and lightning in your browser. the other one is a projected drawing, which has much higher quality but there is no lightning nor such a 3d wireframe.

the only middle ground is to use either interacts (in sagews) or ipywidgets (in jupyter) to create control sliders for changing the pan and tilt of the 3d projection of the matplotlib 3d plotting parameters.

and personal remark: what exactly do you want to try to plot? I'm not a fan of 3d plots at all and would rather suggest to explore techniques from 2d plotting. maybe that does solve this better, I don't know.

more

I'm trying to plot some differences of functions related to inequalities - this is part of some research I've been invited to join by contributing some numeric tests, and plotting. We are plotting functions of three variables - each a difference of two other functions - holding one variable fixed and plotting against the other two. Much of the mathematics is new to me (Specht's ratio?), so I'm just trying to plot some 3d graphs. I'm leaving it to the lead researcher to make sense of them.

more

I have been able to get nice interactive plots with Sage (as per your worksheet), and with Python+Mayavi. I haven't tried Matlab or Octave yet. The main trouble with Sage is the lack of control of 3d plots: axes labels and precise ranges of colors, for example.