JuliaPlots / JuliaPlots/PlotlyJS.jl

The `legend` option doesn't work

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

Description

The `legend` option cannot be used for legend positioning.

```
julia> versioninfo()
Julia Version 1.6.3
Commit ae8452a9e0 (2021-09-23 17:34 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

(Graphs) pkg> st
Project Graphs v0.1.0
Status `~/Documents/PhD/code/Graphs/Project.toml`
[336ed68f] CSV v0.9.11
[f0f68f2c] PlotlyJS v0.18.8
[91a5bcdd] Plots v1.23.6
[9d95f2ec] TypedTables v1.4.0
[8bb1440f] DelimitedFiles
```

The following example from the Plots.jl docs:

```
y = rand(100)
plot(0:10:100, rand(11, 4), lab = "lines", w = 3, palette = cgrad(:grays), fill = 0, α = 0.6)
scatter!(y, zcolor = abs.(y .- 0.5), m = (:heat, 0.8, Plots.stroke(1, :green)), ms = 10 * abs.(y .- 0.5) .+ 4, lab = "grad")
```

results in the colorbar burying the legend. Trying to reposition the legend by specifying a position tuple, e.g. `legend = (0.8, 0.8)` in any or both of the plotting function calls, doesn't seem to have any effect.

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.