(merged topics since they are the same)
I would suggest reading the matplotlib tutorial. This way you could leverage the code you already have.
Otherwise, you could read the tutorials on Plotly (since that is built right into Anvil), or use any visualization library you like.
You could also upload an image of a colorbar if you already have one and it doesn’t need to change. See the Image component.
Also, see this in case it helps.