What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-15 09:11:18
visualizing logistic regression separator plane
f, ax = plt.subplots(figsize=(8, 6)) ax.contour(xx, yy, probs, levels=[.5], cmap="Greys", vmin=0, vmax=.6) ax.scatter(X[100:,0], X[100:, 1], c=y[100:], s=50, cmap="RdBu", vmin=-.2, vmax=1.2, edgecolor="white... 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 15:54:09
how to make a pairs plot with pandas
import pandas as pd import matplotlib.pyplot as plt %matplotlib inline from sklearn import datasets iris_dataset = datasets.load_iris() X = iris_dataset.data Y = iris_dataset.target iris_dataframe = pd.DataFrame(X, columns=iris_dataset.feature_names) ... 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-03 06:57:09
plot scatter python
# Import matplotlib import matplotlib.pyplot as plt # Set plot space as inline for inline plots and qt for external plots %matplotlib inline # Set the figure size in inches plt.figure(figsize=(10,6)) plt.scatter(x, y, label = "label_name" ) ... Add solution -
Javascript 2021-11-03 00:28:21
unexpected end of json input at
You are calling: JSON.parse(scatterSeries) But when you defined scatterSeries, you said: var scatterSeries = []; When you try to parse it as JSON it is converted to a string (""), which is empty, so you reach the end of the string before havi... Add solution