What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-14 14:49:14
simulate robot arm using python
import math import matplotlib.pyplot as plt l1 = 0.8 l2 = 0.5 n_theta = 10 # No of divisions theta_start = 0 # Starting angle theta_end = math.pi/2 # Ending angle theta1 = [] theta2 = [] for i in range(0,n_theta): theta1.append(theta_start+ (theta_e... Add solution -
Other 2021-11-09 06:17:20
matplotlib animate
import matplotlib.pyplot as plt from matplotlib import cm import numpy as np from celluloid import Camera numpoints = 10 points = np.random.random((2, numpoints)) colors = cm.rainbow(np.linspace(0, 1, numpoints)) camera = Camera(plt.figure()) for _ in ra... Add solution -
Python 2021-11-08 12:03:10
set font size xaxis pandas
plt.figure() plt.rcParams.update({'font.size': 22}) # must set in top ax1 = df_plot.plot(x='wind_direct',y=plot_columns,figsize=(30,18),linewidth=5,kind='line',legend=True, fontsize=16) ax1.legend(loc=2,fontsize=20) ax1.set_ylabel('kw',fontdict={'fontsiz... Add solution -
Python 2021-11-03 19:55:14
how to scatter plot in matplotlib of two sets
import matplotlib.pyplot as plt fig = plt.figure() ax1 = fig.add_subplot(111) ax1.scatter(x1, y1, s = 10, c = 'b', label = 'elbow') ax1.scatter(x2, y2, s = 10, c = 'r', label = 'shoulder') plt.legend(loc='upper left'); plt.show() Add solution -
Python 2021-11-02 22:59:10
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.2... Add solution