Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plt get colors in range

import matplotlib

cmap = matplotlib.cm.get_cmap('Spectral')

rgba = cmap(0.5)
print(rgba) # (0.99807766255210428, 0.99923106502084169, 0.74602077638401709, 1.0)
Comment

PREVIOUS NEXT
Code Example
Python :: plotting confusion matrix 
Python :: count elements in columns pandas 
Python :: how to select axis value in python 
Python :: Upper letter list 
Python :: python winsound 
Python :: generate random integers in a range 
Python :: Create a single executable from a Python project 
Python :: maximum and minimum value of array python 
Python :: how to create a dictionary in python 
Python :: python join list ignore none and empty string 
Python :: python icon on task bar 
Python :: python uppercase 
Python :: numpy array sorting 
Python :: python request coinmarketcap 
Python :: pyautogui tab key 
Python :: dict get list of values 
Python :: python file to array 
Python :: python count character occurrences 
Python :: how to check if python is installed 
Python :: how to use pip commands in pycharm 
Python :: python int to bytes 
Python :: python get pixel 
Python :: print for loop in same line python 
Python :: import discord 
Python :: python randrange 
Python :: max int python 
Python :: split at first occurrence python 
Python :: pandas fillna with another column 
Python :: django login page 
Python :: in python 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =