# Change colorbar position and decimal points in the legend (Plots.jl with gr)

**URL:** <https://discourse.julialang.org/t/change-colorbar-position-and-decimal-points-in-the-legend-plots-jl-with-gr/122471>\
**Category:** Visualization\
**Tags:** plots\
**Created:** [November 10, 2024, 8:27pm UTC](https://discourse.julialang.org/t/change-colorbar-position-and-decimal-points-in-the-legend-plots-jl-with-gr/122471 "2024-11-10T20:27:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pex/32/49986_2.png) [@PeX](https://discourse.julialang.org/u/PeX)\
**Post date:** [November 10, 2024, 8:27pm UTC](https://discourse.julialang.org/t/change-colorbar-position-and-decimal-points-in-the-legend-plots-jl-with-gr/122471/1 "2024-11-10T20:27:53Z")

</div>

Hi all,  
I’m trying to create a heatmap using Plots.jl with the following:

```julia
    heatmap(
        p1_range, 
        p2_range, 
        log_sse_grid', 
        c=:viridis, 
        xlabel=xlabel, 
        ylabel=ylabel, 
        colorbar_title="log10(SSE)",
        title="Log10 Sensitivity of SSE to Initial Guesses for $xlabel and $ylabel",
	fontfamily="Computer Modern",
	cbar=true,
	titlefontsize=18,
     tickfontsize=13,
	margin= 13mm,
     size=(900,700),
     dpi=600
    )

```

But for some reason, I don’t see the colorbar at all:

 ![Screenshot 2024-11-10 at 12.26.05 PM](https://global.discourse-cdn.com/julialang/original/3X/6/7/678d3063f3f1c5c4f6cc29e50ce5526d131b5c49.png)

I wonder how I can fix this, maybe by changing its position and eliminating the decimal points of the values in the legend.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [November 11, 2024, 9:23pm UTC](https://discourse.julialang.org/t/change-colorbar-position-and-decimal-points-in-the-legend-plots-jl-with-gr/122471/2 "2024-11-11T21:23:16Z")

</div>

Please see [this thread](https://discourse.julialang.org/t/specify-digits-in-contour-plot-scale/71384) for a Plots.jl solution to control the number of digits in the colorbar.

On the other hand, a simple way to move the colorbar title away from the colorbar numbers is to add line breaks, e.g:

```julia
colorbar_title="\n\nlog10(SSE)"

```
