Custom colorbar pygmt

Hi everyone,

I need to put a custom colorbar for my pygmt figure. the intervals are 0,0.5,1,2.5 and 3.5 with colors of green,yellow,orange and red. Is there anyway to do it in pygmt?

Hey @mtabbakhha,

it is a bit difficult to help you out without any script. Maybe you can provide a small script or code example, that people understand in more detail what you want to accomplish :wink:. You can format your script as code by placing three backticks (```) in the line before and after the block with the code:

```
# your script formated as code
```

Maybe this PyGMT gallery example serves as an orientation:
Color points by categories — PyGMT