# Marker shapes in Plots

**URL:** <https://discourse.julialang.org/t/marker-shapes-in-plots/53806>\
**Category:** Visualization\
**Created:** [January 22, 2021, 8:25pm UTC](https://discourse.julialang.org/t/marker-shapes-in-plots/53806 "2021-01-22T20:25:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yarahmad](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@yarahmad](https://discourse.julialang.org/u/yarahmad)\
**Post date:** [January 22, 2021, 8:25pm UTC](https://discourse.julialang.org/t/marker-shapes-in-plots/53806/1 "2021-01-22T20:25:12Z")

</div>

I have to use two marker shapes say: circle and star5, to plot some simulation results via scatter plot. However, the second marker shape, apart from its type, does not appear in plots. I have been trying different ways to code and/or use marker shapes in Plot() and Plot!() functions, but they have not helped me out.

using Plots  
MarkerShapes[i,:]= [Plots.supported\_markers()[3], Plots.supported\_markers()[5]]  
for j=1:T  
if j==1  
My\_Plot = plot(X, Y, color = Color[1,1], label = Label[1,1], xlims = (-0.3,0.4), xticks = -0.3:0.05:0.4, markershape = MarkerShapes[1,:], seriestype=:scatter, legend=false)  
else  
My\_Plot = plot!(X, Y, color = Color[1,i], label = Label[1,i], xlims = (-0.3,0.4), xticks = -0.3:0.05:0.4, markershape = MarkerShapes[i,:], seriestype=:scatter, legend=false)  
end

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [January 25, 2021, 1:29pm UTC](https://discourse.julialang.org/t/marker-shapes-in-plots/53806/2 "2021-01-25T13:29:34Z")

</div>

This works:

```julia
julia> plot()
       for i in 1:10
         if isodd(i)
           scatter!(rand(10),markershape=:circle,label="")
         else
           scatter!(rand(10),markershape=:star5,label="")
         end
       end
       plot!(title="multiple shapes")

```

![ms](https://global.discourse-cdn.com/julialang/original/3X/c/d/cde2c8754370e29dbdd1a0a4dac3dc7a599e85d9.png)

---

<div class="post-metadata">

**Author:** ![Libbum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/libbum/32/3935_2.png) [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Post date:** [January 27, 2021, 12:37pm UTC](https://discourse.julialang.org/t/marker-shapes-in-plots/53806/3 "2021-01-27T12:37:57Z")

</div>

You can also supply a vector to the `markershape`.

```julia
position = rand(10,2)
markershape = map(i->isodd(i) ? :circle : :star5, 1:length(position))
scatter(position; markershape)

```
