Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

RuntimeError: Error in qhull Delaunay triangulation calculation: singular input data (exitcode=2); use python verbose option (-v) to see original qhull error.

from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.gca(projection='3d')
X = np.arange(-5, 5, 0.25)
Y = np.arange(-5, 5, 0.25)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
                       linewidth=0, antialiased=False)
ax.set_zlim(-1.01, 1.01)

ax.zaxis.set_major_locator(LinearLocator(10))
ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))

fig.colorbar(surf, shrink=0.5, aspect=5)

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: detail view use slug or anything else pk 
Python :: dividing counter object in python 
Python :: colorbar remove tick lines and border 
Python :: helper for FastAPI Users to create a super user 
Python :: list lambda functions boto3 
Python :: py2-pip (no such package) required by world py2-pip 
Python :: is python procedural 
Python :: print Hello in horse 
Python :: 3.81/(1000*1000*100) 
Python :: how can I get response from amazon with beautiful soap if I get 503? 
Python :: logarithmic 2d histogram 
Python :: break up word in clomun pandas 
Python :: open anarchy ip 
Python :: poython command options 
Python :: i=int(input("enter the number")); sum=0; pro=1; while(i0): d=1%10; if (d%2==0): sum=sum+d; else: pro=pro*d; i=i//10; print("sum=",sum,"product=",pro); 
Python :: python print statement 
Python :: creating a record in python 
Python :: https://practice.geeksforgeeks.org/problems/coin-change2448/1 
Python :: split dataframe into multiple parts 
Python :: Requests-html absolute url 
Python :: pe039 
Python :: what is fourier transform in python 
Python :: python chunks iterator 
Python :: Python - Comment jouer le fichier Mp3 
Python :: pause and resume threads python 
Python :: plot line2d on axis 
Python :: how to convert a axis label to non scientific notation in matploltlib 
Python :: programe to find contagious sum of sequence 
Python :: grading system in python with nested if 
Python :: python list three from the back 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =