What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-16 05:52:28
python matplotlib hist set axis range
# Basic syntax: plt.ylim(min,max) plt.xlim(min,max) # Example usage: import matplotlib.pyplot as plt plt.plot(range(5)) plt.xlim(-5, 5) plt.ylim(-5, 5) # Note, this approach is more versatile than using range=[min,max] which # only works in some plots,... Add solution -
Python 2021-11-14 21:26:20
plotting graphs in keras
# Visualize training history from keras.models import Sequential from keras.layers import Dense import matplotlib.pyplot as plt import numpy # load pima indians dataset dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=","... Add solution -
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 -
Python 2021-11-13 07:19:18
python draw rectangle on image
img = matplotlib. image. imread("./kite_logo.png") figure, ax = pyplot. subplots(1) rect = patches. Rectangle((125,100),50,25, edgecolor='r', facecolor="none") ax. imshow(img) Displays an image. ax. add_patch(rect) Add rectangle to image. Add solution