# How fill a poly object with a color gradient defined by the values inside it?

**URL:** <https://discourse.julialang.org/t/how-fill-a-poly-object-with-a-color-gradient-defined-by-the-values-inside-it/109667>\
**Category:** New to Julia\
**Tags:** makie\
**Created:** [February 3, 2024, 12:31pm UTC](https://discourse.julialang.org/t/how-fill-a-poly-object-with-a-color-gradient-defined-by-the-values-inside-it/109667 "2024-02-03T12:31:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Midez](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Midez](https://discourse.julialang.org/u/Midez)\
**Post date:** [February 3, 2024, 12:31pm UTC](https://discourse.julialang.org/t/how-fill-a-poly-object-with-a-color-gradient-defined-by-the-values-inside-it/109667/1 "2024-02-03T12:31:47Z")

</div>

Hello everyone,

to better understand what I eagerly try to do I have attached you the data and code

```julia
using DelimitedFiles, CairoMakie, Colors

ol = readdlm("/Users/.../outline.txt");
vx = readdlm("/Users/.../x_data.txt");
vz = readdlm("/Users/.../y_data.txt");
qx = readdlm("/Users/.../qx_data.txt");
qz = readdlm("/Users/.../qy_data.txt");
nn = readdlm("/Users/.../norm.txt")

f = Figure(resolution = (1920,1080),fontsize = 32)

Axis(f[1, 1], limits = (-1.6, 1.6, -0.1, 1.275), aspect = DataAspect(), backgroundcolor = "white",spinewidth = 2.75)

lines!(ol,color = (:blue,0.15),linewidth = 6)

arrows!(vec(vx),vec(vz),vec(qx),vec(qz),arrowsize = 14, lengthscale = 0.06, linewidth = 3.25;
        arrowcolor = vec(nn), linecolor = vec(nn), transparency = false, colormap = cgrad(:buda, rev=true))

display(f)

```

Since uploading .txt-files is not possible here, I have upload the files here: [https://tubcloud.tu-berlin.de/s/QN9WcyB5KBjBcCC](https://tubcloud.tu-berlin.de/s/QN9WcyB5KBjBcCC)

Now what I am actually try to do is to fill the inside (as background for the arrow-plot) with a color gradient, similar to

```julia
surface!(vec(vx),vec(vz),vec(qz),Shading = false)

```

However this gives a really pixelated fill, that reaches over the edge.

Is there a nice way to smoothly fill my object (based on the interior) ?
