# JupyterLab Plotting Problem

**URL:** <https://discourse.julialang.org/t/jupyterlab-plotting-problem/86302>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [August 25, 2022, 5:09am UTC](https://discourse.julialang.org/t/jupyterlab-plotting-problem/86302 "2022-08-25T05:09:39Z")\
**Posts on this page:** 3\
**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:** [August 25, 2022, 5:09am UTC](https://discourse.julialang.org/t/jupyterlab-plotting-problem/86302/1 "2022-08-25T05:09:39Z")

</div>

Hi all,

I have been trying to plot and compare the result in:

1. JupyterLab / iJulia
2. Julia REPL

I try this code:

```julia
using Plots, LaTeXStrings, Plots.PlotMeasures
gr()

f(x) = x^(2)
g(x) = x^(4)
h(x) = x^(6)

plot(f,-10,10, xticks=false, xlims=(-10,10), ylims=(-10,10), 
    bottom_margin = 10mm, label=L"f(x) = x^{2}", framestyle = :zerolines, 
    legend=:outerright)
plot!(g,-10,10, xticks=false, xlims=(-10,10), ylims=(-10,10), 
    bottom_margin = 10mm, label=L"f(x) = x^{4}", framestyle = :zerolines, 
    legend=:outerright)
plot!(h,-10,10, xticks=false, xlims=(-10,10), ylims=(-10,10), 
    bottom_margin = 10mm, label=L"f(x) = x^{6}", framestyle = :zerolines, 
    legend=:outerright)

# horizontal green dash line
plot!([2,0],[f(2),f(2)], label="", linecolor=:green, linestyle=:dash)

# vertical green dash line
plot!([2,2],[0,f(2)], label="", linecolor=:green, linestyle=:dash)

annotate!([(-0.5,f(5), (L"x^{\alpha}", 10, :black))])
annotate!([(2,-0.5, (L"x", 10, :black))])
annotate!([(8,5.55, (L"dom(f)=\mathbb{R}", 10, :black))])
annotate!([(8,4.55, (L"codom(f)=\mathbb{R_{+}}", 10, :black))])

```

In JupyterLab, the x^{6} graph is cutted, but when I use Julia REPL it shows fully. Why is it happening?

 ![Capture d’écran_2022-08-25_12-05-43](https://global.discourse-cdn.com/julialang/original/3X/8/f/8fa8346d6d8414e4b6982c2c7345a7cebbbc2d4f.png)

Julia REPL result:

 ![Capture d’écran_2022-08-25_12-08-27](https://global.discourse-cdn.com/julialang/original/3X/9/7/97e3e17c571b3cd5fbbf140d590669d7d988ea4c.png)

This happens in JupyterLab, when I try Its All Set tutorial, sometimes the plot has missing edges, points, or something.

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [August 25, 2022, 7:05am UTC](https://discourse.julialang.org/t/jupyterlab-plotting-problem/86302/2 "2022-08-25T07:05:34Z")

</div>

sampling?

Try  
`plot!(h,-5,5,`

---

<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:** [August 25, 2022, 8:24am UTC](https://discourse.julialang.org/t/jupyterlab-plotting-problem/86302/3 "2022-08-25T08:24:32Z")

</div>

It works!

How can `plot!(h,-5,5,..` works?

Is the smaller the better / showing the whole plot?
