What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-22 07:05:27
norm.pdf python
# import required libraries from scipy.stats import norm import numpy as np import matplotlib.pyplot as plt import seaborn as sb # Creating the distribution data = np.arange(1,10,0.01) pdf = norm.pdf(data , loc = 5.3 , scale = 1 ) #Visualizi... Add solution -
Python 2021-11-22 02:21:07
how to plot a bar using matplotlib
import matplotlib.pyplot as plt # creating the dataset data = {'C':20, 'C++':15, 'Java':30, 'Python':35} courses = list(data.keys()) values = list(data.values()) fig = plt.figure(figsize = (5, 5)) # creating the bar plot p... Add solution -
Python 2021-11-20 09:17:57
central limit theorem python example
import numpy as npimport matplotlib.pyplot as pltdef repeat_sample_draws_exponential(n, samp_size, mu, show_all=False): means = [] samples = [] for ii in range(0, n): samples.append(np.random.exponential(mu, samp_size)) means.append... Add solution -
Python 2021-11-16 21:48:21
python bubble plot
import matplotlib.pyplot as plt # scatter plot with scatter() function # bubble size with "s" # df dataframe contain columns X, Y, Z variables values plt.scatter('X', 'Y', s='Z', data=df) plt.xlabel("X", size=16) plt.ylabel("y&quo... 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-08 20:34:16
if key in dict python time complexity
""" Time complexity of looking for a value in a hashable object is O(1). Dictionary keys are hashable. The code below is just for demonstration purposes, feel free to run it and see that the plot has no correlation with n. """... Add solution -
Python 2021-11-07 05:42:10
matplotlib axis labels
# Basic syntax: plt.xlabel("X axis label") # Add ", fontsize = #" to control fontsize plt.ylabel("Y axis label") # Example usage: plt.plot(range(5)) plt.xlabel("X axis label") plt.ylabel("Y axis label") p... 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 -
Python 2021-10-29 16:50:16
how to read iris data in python
print(__doc__) # Code source: Gaël Varoquaux # Modified for documentation by Jaques Grobler # License: BSD 3 clause import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from sklearn import datasets from sklearn.decomposition imp... Add solution