What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-13 23:04:02
how to plot a scatter plot in matplotlib
# 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-09-11 22:26:02
cumulative chart python plotly
cumsum = np.cumsum(x) trace = go.Scatter(x=[i for i in range(len(cumsum))], y=10*cumsum/np.linalg.norm(cumsum), marker=dict(color='rgb(150, 25, 120)')) layout = go.Layout( title="Cumulative Distribution Function" ) fig... Add solution -
Python 2021-09-08 04:23:03
matplotlib add legend axis x
fig = plt.figure(figsize=(10,5)) ax = fig.add_subplot(111) ax.set_title('ADR vs Rating (CS:GO)') ax.scatter(x=data[:,0],y=data[:,1],label='Data') plt.plot(data[:,0], m*data[:,0] + b,color='red',label='Our Fitting Line') ax.set_xlabel('ADR') ax.set_ylabel... Add solution -
Other 2021-09-05 23:08:01
d3 to plot graph
<script> // set the dimensions and margins of the graph var margin = {top: 10, right: 30, bottom: 30, left: 60}, width = 460 - margin.left - margin.right, height = 400 - margin.top - margin.bottom; // append the svg object to the body of the... Add solution -
Go 2021-08-30 19:28:01
matplotlib logo image on a plot
import matplotlib.image as image import matplotlib.pyplot as plt im = image.imread('debian-swirl.png') fig, ax = plt.subplots() ax.imshow(im, aspect='auto', extent=(0.4, 0.6, .5, .7), zorder=-1) ax.yaxis.tick_left() ax.tick_params(axis='y', colors='black... Add solution