# How to plot multiple interval notations with plots layout in Julia?

**URL:** https://discourse.julialang.org/t/how-to-plot-multiple-interval-notations-with-plots-layout-in-julia/90166
**Category:** General Usage
**Tags:** plotting
**Created:** [November 12, 2022, 3:57pm UTC](https://discourse.julialang.org/t/how-to-plot-multiple-interval-notations-with-plots-layout-in-julia/90166 "2022-11-12T15:57:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)
#### Post date: [November 12, 2022, 3:57pm UTC](https://discourse.julialang.org/t/how-to-plot-multiple-interval-notations-with-plots-layout-in-julia/90166/1 "2022-11-12T15:57:27Z")

</div>

Hi all,

I have this code to plot interval notation:

```julia
using Plots, LaTeXStrings, Plots.PlotMeasures

f(x) = 0.1
plot([0.3,0.9],[0,0],arrow=true,color=:black,linewidth=2, xticks=false, yticks=false,
ylims=(0,1), showaxis=false, label="", bottom_margin = 10mm)
#plot!(f,0.55,0.7, fill=(0, 0.2, :green), label="")

annotate!([(0.4,0, (L"|", 17, :black))])
annotate!([(0.4,-0.1, (L"-1", 10, :black))])
annotate!([(0.6,0, (L"|", 17, :black))])
annotate!([(0.6,-0.1, (L"3", 10, :black))])
annotate!([(0.4,0.1, (L"0", 10, :black))])
annotate!([(0.6,0.1, (L"0", 10, :black))])
annotate!([(0.35,0.1, (L"+", 10, :red))])
annotate!([(0.5,0.1, (L"-", 10, :black))])
annotate!([(0.65,0.1, (L"+", 10, :red))])
annotate!([(0.35,0.2, (L"f'(x)", 12, :black))])

```

![Capture d’écran_2022-11-12_22-53-17](https://global.discourse-cdn.com/julialang/original/3X/0/7/07f88378c8e8f684f41be6b89eb6fde6b9d8c2fc.png)

Now, I want to plot multiple interval notations (not just 1 interval notation) with plots layout, but I don’t know how…  
I want to be like this:  
 ![Capture d’écran_2022-11-12_22-55-56](https://global.discourse-cdn.com/julialang/original/3X/7/8/78dc1e3a1d0b6f4a7b06af0ccd76f4c8dbaa6d5a.png)

I was thinking of using:

```julia
plot(p1, p2, layout = (2, 1), legend=:outerright,
     xaxis = "x", yaxis = "y(x)", label=[s1 s2])

```

But, since I am using `annotate` it can’t be done easily…

Anyone can help me? Thanks.
