# Create a colorbar given the range of levelset and colors

**URL:** <https://discourse.julialang.org/t/create-a-colorbar-given-the-range-of-levelset-and-colors/38763>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [May 4, 2020, 8:40pm UTC](https://discourse.julialang.org/t/create-a-colorbar-given-the-range-of-levelset-and-colors/38763 "2020-05-04T20:40:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mleprovost](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mleprovost/32/7166_2.png) [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Post date:** [May 4, 2020, 8:40pm UTC](https://discourse.julialang.org/t/create-a-colorbar-given-the-range-of-levelset-and-colors/38763/1 "2020-05-04T20:40:07Z")

</div>

Hello,

I would like to plot only the colorbar, given the range of level sets `clims` and the range of color to use.

I have something like this in mind:

```julia
using Plots
colorbar(clims = (-2, 2), color = cgrad((colormap("RdBu")))

```
