Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plot sphere in matplotlib

import matplotlib.pyplot as plt
import numpy as np
plt.rcParams["figure.figsize"] = [7.00, 3.50]
plt.rcParams["figure.autolayout"] = True
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
r = 0.05
u, v = np.mgrid[0:2 * np.pi:30j, 0:np.pi:20j]
x = np.cos(u) * np.sin(v)
y = np.sin(u) * np.sin(v)
z = np.cos(v)
ax.plot_surface(x, y, z, cmap=plt.cm.YlGnBu_r)
plt.show()
Comment

plot on sphere

Graphics3D[{Point[{{2, 3, 4}, {1, 4, 5}}], Sphere[]}]
Comment

PREVIOUS NEXT
Code Example
Python :: python create list of specific length 
Python :: instabot login python 
Python :: print list in reverse order python 
Python :: python get date from unix timestamp 
Python :: import csv from google drive python 
Python :: convert float to integer pandas 
Python :: In file included from psycopg/psycopgmodule.c:28:./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory35 | #include <Python.h| ^~~~~~~~~~compilation terminated. 
Python :: Print a specific value of dictionary 
Python :: calculate age python 
Python :: hello world in python 
Python :: get time python 
Python :: python print on file 
Python :: python remove spaces 
Python :: smallest program to make diamond python 
Python :: seaborn countplot 
Python :: pygame.rect 
Python :: how to delete file in python 
Python :: how to add vertical line on subplot in matplotlib 
Python :: python pandas apply function to one column 
Python :: sort a stack using recursion 
Python :: python check if int 
Python :: subprocess.check_output python 
Python :: python name input 
Python :: convert list into integer in python 
Python :: plot size 
Python :: how to press enter in selenium python 
Python :: remove string punctuation python 3 
Python :: copy string python 
Python :: copyfile pyhon 
Python :: python dict append 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =