# Colorbar cutoff in Plots.jl with pyplot

**URL:** <https://discourse.julialang.org/t/colorbar-cutoff-in-plots-jl-with-pyplot/48178>\
**Category:** Visualization\
**Created:** [October 11, 2020, 8:00pm UTC](https://discourse.julialang.org/t/colorbar-cutoff-in-plots-jl-with-pyplot/48178 "2020-10-11T20:00:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gideonsimpson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gideonsimpson/32/1928_2.png) [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Post date:** [October 11, 2020, 8:00pm UTC](https://discourse.julialang.org/t/colorbar-cutoff-in-plots-jl-with-pyplot/48178/1 "2020-10-11T20:00:01Z")

</div>

I’ve got the following issue (see attached figure), where, with my font selections, the colorbar tick labels are cutoff. How do I expand the figure to include them or shrink the width of the colorbar? ![test](https://global.discourse-cdn.com/julialang/original/3X/6/a/6a317a7b15e135bbbd678895116101995b0bf821.png)

---

<div class="post-metadata">

**Author:** ![tzxiong](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tzxiong/32/17502_2.png) [@tzxiong](https://discourse.julialang.org/u/tzxiong)\
**Post date:** [November 16, 2020, 5:04am UTC](https://discourse.julialang.org/t/colorbar-cutoff-in-plots-jl-with-pyplot/48178/2 "2020-11-16T05:04:18Z")

</div>

Hi @gideonsimpson, I ran into the same problem today. Did you find out a solution? My temporary solution is to always let the final xtick to be the largest value of the xaxis, which might not be the most beautiful solution, but it works for me.

---

<div class="post-metadata">

**Author:** ![BeastyBlacksmith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beastyblacksmith/32/4741_2.png) [@BeastyBlacksmith](https://discourse.julialang.org/u/BeastyBlacksmith)\
**Post date:** [November 17, 2020, 12:47pm UTC](https://discourse.julialang.org/t/colorbar-cutoff-in-plots-jl-with-pyplot/48178/3 "2020-11-17T12:47:06Z")

</div>

You should be able to increase the `right_margin` like

```julia
plot(..., right_margin = 3Plots.mm)

```
