I am trying to create a 2D plot in python where the horizontal axis is split into a number of intervals or columns and the color of each column varies along the vertical axis.
The color of each interval depends on the value of a periodic function of time. For simplicity, let's say these values range between 0 and 1. Then values closer to 1 should be dark red and values close to 0 should be dark blue for example (the actual colors don't really matter).
Here is an example of what the plot should look like:
Is there a way to do this in Python using matplotlib?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.