-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Special cmap #22
Comments
Hello, I couldn´t find it either so chatgpt created a custom one for me: Define the RGB values of regular green and dark greenwhite = (0.56, 0.7372, 0.56) #Abbreviated RGB notation applis a division by 255 Use LinearSegmentedColormap to define the colorscalecdict = {'red': ((0.0, white[0], white[0]), (0.25, regn_green[0], regn_green[0]), (1.0, dark_green[0], dark_green[0])), mycmap = colors.LinearSegmentedColormap('myGreen', cdict) Test the colorscale with a colorbarplt.colorbar(plt.imshow([[0,.25,.50,.75, 1]], cmap=mycmap)) # adjust the data range if needed |
I've seen this confusion matrix example using your code, but I can't manage to find the specific color map that was used here.
The text was updated successfully, but these errors were encountered: