# Help me in julia plots

**URL:** <https://discourse.julialang.org/t/help-me-in-julia-plots/78891>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [April 1, 2022, 11:18pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891 "2022-04-01T23:18:21Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lamis\_Njeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lamis_njeh/32/34292_2.png) [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Post date:** [April 1, 2022, 11:18pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/1 "2022-04-01T23:18:21Z")

</div>

how could I make a heatmap in julia ?

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [April 2, 2022, 2:36am UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/2 "2022-04-02T02:36:39Z")

</div>

```julia
using Plots
heatmap(x)

```

---

<div class="post-metadata">

**Author:** ![acxz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acxz/32/16759_2.png) [@acxz](https://discourse.julialang.org/u/acxz)\
**Post date:** [April 2, 2022, 2:43am UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/3 "2022-04-02T02:43:35Z")

</div>

I also love using Plotly. Here is the documentation for using Heatmaps in Julia with the Plotly backend: [Heatmaps in Julia](https://plotly.com/julia/heatmaps/)

---

<div class="post-metadata">

**Author:** ![Lamis\_Njeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lamis_njeh/32/34292_2.png) [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Post date:** [April 2, 2022, 6:19pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/4 "2022-04-02T18:19:12Z")

</div>

thank you sir for your help but I did that and it didn’t work jupyter said that  
“UndefVarError: heatmap not defined”

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/2/124a5f837f7fe0dc86dce5eb4cea349ac0d011e5.png)

---

<div class="post-metadata">

**Author:** ![Lamis\_Njeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lamis_njeh/32/34292_2.png) [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Post date:** [April 2, 2022, 9:08pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/5 "2022-04-02T21:08:35Z")

</div>

Thank you sir for your help but In my jupyter notebook it doesn’t work

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/e/7e42df7f67ddf50b82dff0fcbcfe5da3150db911.png)

---

<div class="post-metadata">

**Author:** ![feanor12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/feanor12/32/8212_2.png) [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Post date:** [April 2, 2022, 11:40pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/6 "2022-04-02T23:40:44Z")

</div>

```julia
import Plots
data=rand(10,10)
Plots.heatmap(data)

```

---

<div class="post-metadata">

**Author:** ![acxz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acxz/32/16759_2.png) [@acxz](https://discourse.julialang.org/u/acxz)\
**Post date:** [April 2, 2022, 11:49pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/7 "2022-04-02T23:49:42Z")

</div>

@Lamis_Njeh please post your output as text in codeblocks, sending information over pictures is not good practice as if other people have the same issue, they cannot Ctrl-F through it.

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [April 3, 2022, 8:29am UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/8 "2022-04-03T08:29:48Z")

</div>

We’ll need to know more about your system, because

```julia
using Plots
heatmap(rand(10,10))

```

produces  
 ![heatmap](https://global.discourse-cdn.com/julialang/original/3X/b/8/b8e640748f430b62c9c943f5c5886f3768003362.png)

I would have asked what `df` is, but since you’re getting a `not defined` error something is wrong with your Plots package. Could you please tell us the output of `using Pkg; Pkg.status("Plots")`?

---

<div class="post-metadata">

**Author:** ![acxz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acxz/32/16759_2.png) [@acxz](https://discourse.julialang.org/u/acxz)\
**Post date:** [April 3, 2022, 12:31pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/9 "2022-04-03T12:31:09Z")

</div>

Looking at the `No changes` line in his output, I’m guessing the package didn’t install correctly. At this point, I’d probably recreate my local julia env, by deleting the Manifest and Project tomls.

---

<div class="post-metadata">

**Author:** ![Lamis\_Njeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lamis_njeh/32/34292_2.png) [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Post date:** [April 3, 2022, 12:50pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/10 "2022-04-03T12:50:05Z")

</div>

thank you for your attention  
df is a dataset  
but sir I did the same but it still an error In jupyter  
but in atom it works

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/0/603477f08110845348fcdfa4e011419bddcc5df7.png)

---

<div class="post-metadata">

**Author:** ![albheim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albheim/32/34660_2.png) [@albheim](https://discourse.julialang.org/u/albheim)\
**Post date:** [April 3, 2022, 1:08pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/11 "2022-04-03T13:08:38Z")

</div>

Does it work if you put the using and the heatmap in differnt blocks in jupyter? Dont use jupyter much, but think I have seen something like that before.

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [April 3, 2022, 1:36pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/12 "2022-04-03T13:36:19Z")

</div>

`No changes` is normal output if there is already an installation. But if something is holding back the version of `Plots` to a version before `heatmap` (which is _very_ long ago by my memory), this would happen. That’s why I want the `status` output.

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [April 3, 2022, 1:37pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/13 "2022-04-03T13:37:27Z")

</div>

Good shout. I don’t know jupyter either, but that would explain it.

---

<div class="post-metadata">

**Author:** ![Lamis\_Njeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lamis_njeh/32/34292_2.png) [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Post date:** [April 3, 2022, 2:58pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/14 "2022-04-03T14:58:43Z")

</div>

have you a solution to apply julia in data science ? It clear that the problem is in jupyter but I don’t have other solution for my projects in Machinne Learning

---

<div class="post-metadata">

**Author:** ![albheim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albheim/32/34660_2.png) [@albheim](https://discourse.julialang.org/u/albheim)\
**Post date:** [April 3, 2022, 3:43pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/15 "2022-04-03T15:43:40Z")

</div>

My guess was that the problem might just be that you try to import a package and use functions from it in the same block, and this somehow becomes problematic from the whole block being parsed as one or something.

So if this helped you can probably avoid similar problems by just putting imports in separate blocks from where you use functionality from them.

---

<div class="post-metadata">

**Author:** ![Lamis\_Njeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lamis_njeh/32/34292_2.png) [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Post date:** [April 3, 2022, 4:41pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/16 "2022-04-03T16:41:03Z")

</div>

yeah that explain a lot  
can I ask you what do you use in julia Programming language IDE as well as notebook

---

<div class="post-metadata">

**Author:** ![Lamis\_Njeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lamis_njeh/32/34292_2.png) [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Post date:** [April 3, 2022, 4:53pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/17 "2022-04-03T16:53:13Z")

</div>

you were right thank you

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [April 3, 2022, 6:23pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/18 "2022-04-03T18:23:16Z")

</div>

I mostly use vim+the repl. For things I want to present to people, I might take to Pluto (I prefer the evaluation order in Neptune, but it’s a lot less polished)

---

<div class="post-metadata">

**Author:** ![Lamis\_Njeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lamis_njeh/32/34292_2.png) [@Lamis\_Njeh](https://discourse.julialang.org/u/Lamis_Njeh)\
**Post date:** [April 3, 2022, 7:04pm UTC](https://discourse.julialang.org/t/help-me-in-julia-plots/78891/19 "2022-04-03T19:04:24Z")

</div>

thank you so mush sir
