# Set markeralpha of points on scatterplot based on vector

**URL:** <https://discourse.julialang.org/t/set-markeralpha-of-points-on-scatterplot-based-on-vector/106337>\
**Category:** General Usage\
**Created:** [November 16, 2023, 9:59pm UTC](https://discourse.julialang.org/t/set-markeralpha-of-points-on-scatterplot-based-on-vector/106337 "2023-11-16T21:59:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpowell96](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wpowell96/32/46900_2.png) [@wpowell96](https://discourse.julialang.org/u/wpowell96)\
**Post date:** [November 16, 2023, 9:59pm UTC](https://discourse.julialang.org/t/set-markeralpha-of-points-on-scatterplot-based-on-vector/106337/1 "2023-11-16T21:59:23Z")

</div>

Given a 3D scatter plot with N points and another vector with N points, one can set the color within a colormap of the individual points on the scatter plot with the extra vector as so:

```julia
using Plots, Random

w = rand(100)
x = rand(100)
y = rand(100)
z = rand(100)

scatter(x,y,z, marker_z = w)

```

Is there a way to set the alpha of the individual points in a similar manner without plotting points one at a time in a loop?
