I am trying to plot rectangles inside a circle and color each rectangle based on their value. Each rectangle depicts the failure rate at that position. Initially I have divided the range of values into 5 intervals of 20 limits each and assigned a fixed color as below example.
{'0-20':'Yellow', '21-40':'Orange', '41-60':'Coral', '61-80':'Red', '81-100':'Black'}
Later, I scrapped the idea and went with the 'plasma' cmap from matplotlib.colors.cmaps. It ideally colored the rectangle in the shades of yellow to purple. However, it misses the small data point values to show on the plot. I am looking for the flexibility of changing the range of intervals.
from matplotlib import cm
plasma = cm.get_cmap('plasma', 30)
Ideally I want something as below. If the max value of a rectangle is 92 and min value is 0. I want to divide the range into 6 intervals and plot them based on the interval . Attached is the color bar I am looking for.
Is there a way to achieve this in matplotlib? Kindly help.
Edit: Adding few more details. I am not looking for the fixed color , rather I am looking for gradient which intensifies from lower limit to upper limit of the range in each interval.For example in the attached picture all value between 0 to 15.33 have the color intensifying from yellow to red.