ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 29 Mar 2016 10:27:18 +0200Interactive 3d plotting in SageMathCloud Jupyter?https://ask.sagemath.org/question/32898/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!Mon, 28 Mar 2016 02:46:02 +0200https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/Answer by William Stein for <p>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!</p>
https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/?answer=32902#post-id-32902Look at this:
https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2016-03-28-3d.sagewsTue, 29 Mar 2016 06:00:59 +0200https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/?answer=32902#post-id-32902Comment by Alasdair for <p>Look at this:</p>
<p><a href="https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2016-03-28-3d.sagews">https://cloud.sagemath.com/projects/4...</a></p>
https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/?comment=32905#post-id-32905I 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.Tue, 29 Mar 2016 10:27:18 +0200https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/?comment=32905#post-id-32905Answer by schilly for <p>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!</p>
https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/?answer=32899#post-id-32899 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. Mon, 28 Mar 2016 17:49:52 +0200https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/?answer=32899#post-id-32899Comment by Alasdair for <p>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. </p>
<p>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. </p>
<p>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. </p>
https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/?comment=32904#post-id-32904I'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.Tue, 29 Mar 2016 10:24:17 +0200https://ask.sagemath.org/question/32898/interactive-3d-plotting-in-sagemathcloud-jupyter/?comment=32904#post-id-32904