# Plotting an image - why does a white border appear?

**URL:** <https://discourse.julialang.org/t/plotting-an-image-why-does-a-white-border-appear/87335>\
**Category:** New to Julia\
**Tags:** plots\
**Created:** [September 15, 2022, 8:12pm UTC](https://discourse.julialang.org/t/plotting-an-image-why-does-a-white-border-appear/87335 "2022-09-15T20:12:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nash](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nash/32/14482_2.png) [@Nash](https://discourse.julialang.org/u/Nash)\
**Post date:** [September 15, 2022, 8:12pm UTC](https://discourse.julialang.org/t/plotting-an-image-why-does-a-white-border-appear/87335/1 "2022-09-15T20:12:46Z")

</div>

Using the following code, I plot and annotate an image. But I get a white and disproportionate border around my image. Why? And how can I ask plot not to show that border?

```julia
using TestImages
using Plots

img = testimage("mandrill")
plot(img, axis=([], false))
Plots.annotate!(250.,300.,Plots.text("1",20,20)) 
Plots.annotate!(250.,400.,Plots.text("2",20,20)) 

```

---

<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:** [September 15, 2022, 9:04pm UTC](https://discourse.julialang.org/t/plotting-an-image-why-does-a-white-border-appear/87335/2 "2022-09-15T21:04:51Z")

</div>

Try playing with keyword argument `size`. Reducing the margins using Measures also helps to some extent.

The following code frames the mandrill more tightly:

```julia
using TestImages, Measures, Plots

img = testimage("mandrill")
plot(img, framestyle=:none, size=size(img), margins=-10mm)

```

 ![Plots_Images_white_border](https://global.discourse-cdn.com/julialang/original/3X/f/1/f1517aed9f8ed256d8414fa2ae5195a222851fd0.jpeg)
