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.Mon, 02 Apr 2018 02:33:25 +0200Plotly/Cufflinks and Jupyter Notebookshttps://ask.sagemath.org/question/41863/plotlycufflinks-and-jupyter-notebooks/The code below is my attempt to use plotly offline to display the Lorenz attractor. The exact same code works on a Jupyter notebook that I host locally, but not in CoCalc. I've checked to make sure that all of the necessary packages are available and up to date.
Instead of a plot, I get a "Fetch additional output..." button that says "WARNING: 1 intermediate output message was discarded."
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
import pandas as pd
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)
import cufflinks as cf
cf.go_offline()
%matplotlib inline
def dx(x,y,z):
return 10*(y-x)
def dy(x,y,z):
return x*(28-z)-y
def dz(x,y,z):
return x*y-(8/3)*z
y0 = [1,1,1]
t = np.linspace(0,100,10000)
def f(y,t):
return [dx(y[0],y[1],y[2]),dy(y[0],y[1],y[2]),dz(y[0],y[1],y[2])]
sol = odeint(f,y0,t)
df = pd.DataFrame({'x':sol[:,0],'y':sol[:,1],'z':sol[:,2]})
df.iplot(kind='scatter3d',x='x',y='y',z='z')spacebumpMon, 02 Apr 2018 02:33:25 +0200https://ask.sagemath.org/question/41863/Trouble Installing Plotly on a Sage VirtualBoxhttps://ask.sagemath.org/question/11348/trouble-installing-plotly-on-a-sage-virtualbox/Trouble Installing Plotly on a Sage VirtualBox
I am trying to use plotly on a virtual box vm using the downloaded
virtual machine image of SageMath.
I can get to the command line, <Right-Ctrl and F1>
I did not have pip which is used to install plotly but got it with
"sudo yum -y install python-pip"
then ran pip to get plotly
"sudo /usr/bin/pip-python ///install plotly"
back in sage <Right-Ctrl and F2>
"import plotly"
fails
but at the linux command line
"python"
"import plotly"
works, so possibly I installed to the wrong copy of python?
from http://ask.sagemath.org/question/3481/how-to-upgrade-a-python-package-with-pip
also tried some variaions on "sage --python /usr/bin/pip-python install"
all of which failed
any help?russ_henselThu, 27 Mar 2014 12:09:40 +0100https://ask.sagemath.org/question/11348/