What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-28 09:24:02
Examples using matplotlib.pyplot.quiver
''' ======================================================== Demonstration of advanced quiver and quiverkey functions ======================================================== Known problem: the plot autoscaling does not take into account the arrows, so t... Add solution -
Python 2021-09-27 11:22:02
python wordcloud
from wordcloud import WordCloud, STOPWORDS import matplotlib.pyplot as plt text = 'Python Kurs: mit Python programmieren lernen für Anfänger und Fortgeschrittene Dieses Python Tutorial entsteht im Rahmen von Uni-Kursen und kann hier kostenlos g... Add solution -
Python 2021-09-27 10:19:02
plot 3d python
#import pyplot and Axes3D import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D #plotting a scatter for example fig = plt.figure() ax = fig.add_subplot(111,projection = "3d") ax.scatter(xs = data["x"], ys = data[&quo... Add solution -
Other 2021-09-27 09:15:03
open cverror: (-215:Assertion failed) src.type() == CV_8UC1 in function 'cv::adaptiveThreshold'
from keras.preprocessing import image import cv2 import matplotlib.pyplot as plt img = image.load_img('15f8U.png', grayscale=True, target_size=(224, 224)) img = image.img_to_array(img, dtype='uint8') print(img.shape) ## output : (224,224,3) #plt.imshow(... Add solution -
Python 2021-09-26 23:44:03
sklearn roc curve
import sklearn.metrics as metrics # calculate the fpr and tpr for all thresholds of the classification probs = model.predict_proba(X_test) preds = probs[:,1] fpr, tpr, threshold = metrics.roc_curve(y_test, preds) roc_auc = metrics.auc(fpr, tpr) # method ... Add solution -
Python 2021-09-26 01:33:04
matplotlib get and chan values of tick labels
import matplotlib.pyplot as plt fig, ax = plt.subplots() # We need to draw the canvas, otherwise the labels won't be positioned and # won't have values yet. fig.canvas.draw() labels = [item.get_text() for item in ax.get_xticklabels()] labels[1] = 'Tes... Add solution