Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

random color python matplotlib

import random
import numpy as np

plt.scatter(x, y, c=np.random.rand(3,))
Comment

matplotlib random color

import random

# note that matplotlib requires 2d array for rbg colors
rgb = [[random.random(), random.random(), random.random()]]
plt.scatter(x, y, c=rgb)
Comment

PREVIOUS NEXT
Code Example
Python :: python random.choices vs random.sample 
Python :: python time a funciton 
Python :: iterate through csv python 
Python :: reload all extensions discord.py 
Python :: docker python 3.8 ubuntu 
Python :: special characters list in python 
Python :: python random string 
Python :: age in days to age in years 
Python :: linear search in python 
Python :: divide two columns pandas 
Python :: remove multiple space python 
Python :: extract frames from video python 
Python :: pydrive list folders 
Python :: jupyter notebook show more rows 
Python :: python web3 to wei 
Python :: python remove read only file 
Python :: triangle pygame 
Python :: import decisiontreeclassifier 
Python :: df shift one column 
Python :: define a column as index pandas 
Python :: text to ascii art python 
Python :: check key pressed pygame 
Python :: python get all file names in a dir 
Python :: python program that takes command line arguments as input and print the number of arguments 
Python :: pandas ttable with sum totals 
Python :: first 2 terms 
Python :: opening image in python 
Python :: increase contrast cv2 
Python :: get rid of axes numbers matplotlib 
Python :: sort list of dictionaries python by value 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =