# Plots not working properly

**URL:** <https://discourse.julialang.org/t/plots-not-working-properly/56310>\
**Category:** General Usage\
**Created:** [March 2, 2021, 8:22am UTC](https://discourse.julialang.org/t/plots-not-working-properly/56310 "2021-03-02T08:22:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 2, 2021, 8:22am UTC](https://discourse.julialang.org/t/plots-not-working-properly/56310/1 "2021-03-02T08:22:20Z")

</div>

I’m on Julia 1.5.0 on my work desktop. Yesterday, I updated the packages (`Pkg.update()`] since my 3D scatter-plots didn’t work properly. (`pyplot` showed the data in the 2D plane, and not in 3D; `gr` put the axes labels inside of the plot). So, now I have `Plots` v. 1.10.6, `GR` v. 0.55.0, and `PyPlot` v. 2.9.0.

A couple of plots produced by `gr`:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/1/e167fdcdf86ad32028dcb2b580eadf02fdc33633.png)  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/3/13cbff757057df4405629d334f657b9cfb956319.png)

After switching back and forth between `gr` and `pyplot` a couple of times, the above becomes as follows using `gr`…

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/0/408b31c0674615bb70bf0b327683c1e7d59a3f66.png)  
Better, but still not like it should be… there is no sense of 3D-effect.

After a couple of more attempts with `gr` – removing and putting back the `camera` key-word, I get more what I would have expected in the first place…

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

Anyone knows what is going on?

Also, I _still_ prefer `pyplot` over `gr`: sure, `gr` produces crisper plots, but `gr` has rather poor support for `LaTeX` in the text fields.

However, if I use `pyplot` as back-end, I get the following error message:

```julia
KeyError: key :cbar_handle not found

Stacktrace:
 [1] getindex at .\dict.jl:467 [inlined]
...

```

Other times, I get some plot, but it doesn’t look very nice:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/9/c984627fc0ea578a63a859654b4c8c9d030d9773.jpeg)

- Data don’t properly show through the surface plot (I’ve seen that in the past, too)
- the label is overwritten by the color bar
- axes labels look ugly (can probably rotate the z axis label, though)

SO… anyone knows if there is a way to fix this?

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 2, 2021, 8:39am UTC](https://discourse.julialang.org/t/plots-not-working-properly/56310/2 "2021-03-02T08:39:49Z")

</div>

…after a bit more playing around:

- It seems like the `camera` keyword is the “sinner”. If I remove the `camera` specification, the `gr` back-end seems to produce the results correctly.

→ I still miss the possibility to properly use LaTeX typesetting with `gr`  
 → Also, I notice that `gr` seems to switch the x and y axes in 3D plots compared to `pyplot`  
 → ( marker type `:o` in `gr` looks more like a polygon than to a circle, in my eyes)

The problem with `pyplot` may only be in 3D.
