JuliaPlots / JuliaPlots/PlotlyJS.jl

Error bars (`yerror`) are still displayed even if the plot is disabled

Open
#436 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
444
Forks
86
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Small self-contained example:
```
using Plots
plotlyjs();

scatter([0], [0])
```
results in:
![newplot](https://user-images.githubusercontent.com/88600/170092230-3b37b263-f843-4b04-957e-f91e5741f8b3.png)
Clicking on `y1` in legend results in:
![newplot (1)](https://user-images.githubusercontent.com/88600/170092344-67857b27-3116-4fa7-a082-ea74c0593d93.png)
The entirety of the plot was hidden. All good so far.

Now, second example:
```
using Plots
plotlyjs();

scatter([0], [0], yerror=1)
```
results in:
![newplot (2)](https://user-images.githubusercontent.com/88600/170092618-3c6a04e8-a410-4de6-8339-111d66787c20.png)
Cool, there's now error bars.
But, let's see what happens upon clicking on `y1` in legend:
![newplot (3)](https://user-images.githubusercontent.com/88600/170092795-e413180d-192e-400a-b980-b563076ec0a3.png)
The error bars are still drawn, even though the plot no longer is.
This seems like a bug, although i'm not sure if PlotlyJS is to blame.

**Version info**

```
julia> versioninfo()
Julia Version 1.8.0-beta3
Commit 3e092a2521 (2022-03-29 15:42 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: 32 × AMD Ryzen 9 5950X 16-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
Threads: 32 on 32 virtual cores

julia> using Pkg; pkg"status"
Status `~/.julia/environments/v1.8/Project.toml`
[a93c6f00] DataFrames v1.3.4
[31c24e10] Distributions v0.25.59
[38e38edf] GLM v1.7.0
[28b8d3ca] GR v0.64.3
[7073ff75] IJulia v1.23.3
[2fda8390] LsqFit v0.12.1
[eff96d63] Measurements v2.7.2
[58dd65bb] Plotly v0.4.1
[f0f68f2c] PlotlyJS v0.18.8
[91a5bcdd] Plots v1.29.0
[f27b6e38] Polynomials v3.0.1
[276daf66] SpecialFunctions v2.1.5
[f3b207a7] StatsPlots v0.14.34
[1986cc42] Unitful v1.11.0
[42071c24] UnitfulRecipes v1.5.3

julia>

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.