“zufällige Farbe Python Matplotlib” Code-Antworten

zufällige Farbe Python Matplotlib

import random
import numpy as np

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

Matplotlib -Zufallsfarbe

import random

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

Ähnliche Antworten wie “zufällige Farbe Python Matplotlib”

Fragen ähnlich wie “zufällige Farbe Python Matplotlib”

Weitere verwandte Antworten zu “zufällige Farbe Python Matplotlib” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen