What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-17 06:25:01
matplotlib embedded in tkinter
# Creates simple Graph embedded in tkinter import tkinter from tkinter import * import numpy as np from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk from matplotlib.figure import Figure tkFenster = Tk() tkFenster.geom... Add solution -
Python 2022-03-13 04:10:03
Circular heatmap python
from pylab import * import numpy as np from scipy.interpolate import griddata #create 5000 Random points distributed within the circle radius 100 max_r = 100 max_theta = 2.0 * np.pi number_points = 5000 points = np.random.rand(number_points,2)*[max_r,max... Add solution -
Python 2022-03-12 07:00:02
how to find the labels of the confusion matrix in python
""" In order to find the labels just use the Counter function to count the records from y_test and then check row-wise sum of the confusion matrix. Then apply the labels to the corresponding rows using the inbuilt seaborn plot as shown b... Add solution -
Python 2022-03-02 12:20:01
significant figures on axes plot matplotlib
import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import FormatStrFormatter fig, ax = plt.subplots() ax.yaxis.set_major_formatter(FormatStrFormatter('%g')) ax.yaxis.set_ticks(np.arange(-2, 2, 0.25)) x = np.arange(-1, 1, 0.1) plt... Add solution -
Python 2022-03-02 09:20:03
python gaussian filter
>>> from scipy import misc >>> import matplotlib.pyplot as plt >>> fig = plt.figure() >>> plt.gray() # show the filtered result in grayscale >>> ax1 = fig.add_subplot(121) # left side >>> ax2 = fig.a... Add solution -
Python 2022-02-18 09:15:04
matplotlib change bar color under threshold
import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) N = 5 ind = np.arange(N) width = 0.5 vals = [1,2,3,4,5] colors = ['r','b','b','b','b'] ax.barh(ind, vals, width, color=colors) plt.show() Add solution -
Python 2022-02-18 07:30:05
multiclass classification model
knn=KNeighborsClassifier() svc=SVC() lr=LogisticRegression() dt=DecisionTreeClassifier() gnb=GaussianNB() rfc=RandomForestClassifier() xgb=XGBClassifier() gbc=GradientBoostingClassifier() ada=AdaBoostClassifier() ------------------------------------------... Add solution
Best helpers
Tick tock
+5
Nathaniel
+5
Jela
+5
Snagulus
+5
Rajesh Paul
+5
Ent
+5
Wolf
+5
Jason Heo
+5
Hi-yi
+5
ANeves
+5
Gbarry
+5
Adam Dexter
+5
IberoMedia
+5
Pars usta
+5
Farzan
+5
John Kuhl
+5
Lpapp
+5
Naved Ame
+5
Scared Guy
+5
Man-kit LI
+5
Freddie
+5
Puoygae
+5
Nhgrif
+5
Mihaela
+5