What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-10 07:35:02
python scatterplot figsize
plt.figure(figsize=(8, 8)) plt.scatter(x, y) Add solution -
Python 2022-02-02 06:06:04
matplotlib animation
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 2022-01-26 07:30:09
poisson disc python
import numpy as np import matplotlib.pyplot as plt # Choose up to k points around each reference point as candidates for a new # sample point k = 30 # Minimum distance between samples r = 1.7 width, height = 60, 45 # Cell side length a = r/np.sqrt(2) ... Add solution -
Python 2022-01-24 02:26:08
python create adictionary randomly assigning clors to categorical vairables
# Unique category labels: 'D', 'F', 'G', ... color_labels = df['color'].unique() # List of RGB triplets rgb_values = sns.color_palette("Set2", 8) # Map label to RGB color_map = dict(zip(color_labels, rgb_values)) # Finally use the mapped valu... 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
Best helpers
Orlp
+5
Brenten1
+5
Kunder
+5
NullPointer
+5
Roshan
+5
Sg qy
+5
Bryce Wagner
+5
Rn tmssn
+5
Lara
+5
TheBeege
+5
Lim
+5
Affable Geek
+5
JCM
+5
Dasedes
+5
Mark Walsh
+5
Adb
+5
Chd
+5
RMalke
+5
Sam C.
+5
James Gentes
+5
Skout
+5