Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python scatter plot

import seaborn as sns

sns.scatterplot(data=df, x="x_var", y="y_var")
Comment

Simple Scatter Plot in matplotlib

import matplotlib.pyplot as plt

height = [66, 64, 30, 67, 32, 3.9, 3.1, 8.9, 7.7]
diameter = [10.2, 11, 6.9, 12, 2.8, 3.9, 3.1, 8.9, 7.7]
plt.scatter(height, diameter)
plt.show()
Comment

how to do scatter plot in pyplot

import numpy as npimport matplotlib.pyplot as plt
# Create data
N = 500x = np.random.rand(N)
y = np.random.rand(N)
colors = (0,0,0)
area = np.pi*3
# Plot
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.title('Scatter plot pythonspot.com')
plt.xlabel('x')
plt.ylabel('y')
plt.show()
Comment

plot matplotlib scatter

import numpy as np
import matplotlib.pyplot as plt

# Fixing random state for reproducibility
np.random.seed(19680801)


N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = (30 * np.random.rand(N))**2  # 0 to 15 point radii

plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()
Comment

scatter plot

# Convert cyl column from a numeric to a factor variable
mtcars$cyl <- as.factor(mtcars$cyl)
head(mtcars)
Comment

PREVIOUS NEXT
Code Example
Python :: change dataframe value by index 
Python :: tensorflow_version 
Python :: decimal in python 
Python :: check object type python 
Python :: remove string punctuation python 3 
Python :: py env 
Python :: python classes 
Python :: django migrate fake zero 
Python :: python get file path 
Python :: how to disconnect wifi using python 
Python :: python ssh into server 
Python :: program count the number of occurrences of a letter in a string python 
Python :: if __name__ == 
Python :: set value based on column 
Python :: csv writer python 
Python :: count number of spaces in string python 
Python :: work with gzip 
Python :: Module "django.contrib.auth.hashers" does not define a "BcryptPasswordHasher" attribute/class 
Python :: iterate through characters in a string python 
Python :: batchnormalization keras 
Python :: binary to decimal python 
Python :: fast fourier transform python 
Python :: play sound on python 
Python :: python find the average of a list 
Python :: print 1to 10 number without using loop in python 
Python :: python efficiently find duplicates in list 
Python :: count dictionary keys 
Python :: how to use pafy 
Python :: creating a pandas df 
Python :: python soap 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =