# How to adjust the density of streamplot in Julia?

**URL:** https://discourse.julialang.org/t/how-to-adjust-the-density-of-streamplot-in-julia/67647
**Category:** Modelling & Simulations
**Tags:** question, plotting, diffeq
**Created:** [September 3, 2021, 1:38pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-density-of-streamplot-in-julia/67647 "2021-09-03T13:38:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![GoH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goh/32/28770_2.png) [@GoH](https://discourse.julialang.org/u/GoH)
#### Post date: [September 3, 2021, 1:38pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-density-of-streamplot-in-julia/67647/1 "2021-09-03T13:38:51Z")

</div>

Hi, I am trying to generate the phase space of the SI model, based on the example code in [https://lazarusa.github.io/BeautifulMakie/FlowFields/streamplots3/](https://lazarusa.github.io/BeautifulMakie/FlowFields/streamplots3/)

my code (in Pluto notebook) is

```julia
begin
	using CairoMakie
	let
		β=0.4
		μ=0.1
	    PP_SIS(S,I) = Point(-β*S*I+μ*I,-β*S*I-μ*I)
	    
	    fig = Figure(resolution = (700, 400), fontsize = 20)
	    ax1 = fig[1, 1] = Axis(fig, xlabel = "S", ylabel = "I", title = "phase portrait of SIS model",
	    aspect = 1, backgroundcolor = :black)
	    
	    streamplot!(ax1, PP_SIS, 0.01..0.99, 0.01..0.99, colormap = Reverse(:plasma),
	        gridsize= (32,32), arrow_size = 8)
	    
		    fig
	end
end

```

and got the following result

 ![Screen Shot 2021-09-03 at 15.34.19](https://global.discourse-cdn.com/julialang/original/3X/7/5/7509e49af2467bdb871a67bb0fc7ecd589d6e904.jpeg)

but I found it a little bit hard to clearly observe the flows, thus I am wondering whether I can adjust the density of it…

Many thanks in advance!

---

<div class="post-metadata">

### Author: ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)
#### Post date: [September 3, 2021, 3:08pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-density-of-streamplot-in-julia/67647/2 "2021-09-03T15:08:40Z")

</div>

do you actually have stronger flows? Why not do a heat map also. [https://lazarusa.github.io/BeautifulMakie/FlowFields/streamplotAndHeatmap/](https://lazarusa.github.io/BeautifulMakie/FlowFields/streamplotAndHeatmap/)
