Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Project: My Project
Views: 19
Image: ubuntu2204
Kernel: Python 3 (system-wide)
# Yoda! -- over 53,756 triangles. from scipy import io x = io.loadmat('yodapose.mat') from sage.plot.plot3d.index_face_set import IndexFaceSet V = x['V']; F3=x['F3']-1; F4=x['F4']-1 Y = IndexFaceSet(F3,V,color='green') + IndexFaceSet(F4,V,color='green') Y = Y.rotateZ(-1); Y = Y.rotateX(-1) show(Y, frame=False)
/ext/sage/10.4/local/var/lib/sage/venv-python3.12.4/lib/python3.12/site-packages/scikits/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html __import__("pkg_resources").declare_namespace(__name__) /ext/sage/10.4/local/var/lib/sage/venv-python3.12.4/lib/python3.12/site-packages/scikits/__init__.py:1: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('scikits')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages __import__("pkg_resources").declare_namespace(__name__)
Graphics3d Object
# 53756 vertices! len(x['V'])
53756
import matplotlib.pyplot as plt import numpy as np # Vector field function (example: a simple radial field) def vector_field(x, y, z): u = x v = y w = z return u, v, w # Create the grid x, y, z = np.mgrid[-2:2:20j, -2:2:20j, -2:2:20j] # Compute the vector field u, v, w = vector_field(x, y, z) # Plot the vector field fig = plt.figure() ax = fig.add_subplot(111, projection='3d') ax.quiver(x, y, z, u, v, w, length=0.1) ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') plt.title('3D Vector Field') plt.s() # LaTeX equation for the vector field (example) latex_equation = r'\mathbf{F}(x, y, z) = \langle x, y, z \rangle' print(f"LaTeX equation: ${latex_equation}$")
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[3], line 26 24 ax.set_zlabel('Z') 25 plt.title('3D Vector Field') ---> 26 plt.s() 29 # LaTeX equation for the vector field (example) 30 latex_equation = r'\mathbf{F}(x, y, z) = \langle x, y, z \rangle' AttributeError: module 'matplotlib.pyplot' has no attribute 's'
Image in a Jupyter notebook

Intro


σ−ν−=γ\sigma-\nu-=\gamma