JuliaPlots / StatsPlots.jl

Statistical plotting recipes for Plots.jl
Other
437 stars 88 forks source link

number of bins is not working on dataviewer #472

Open diegozea opened 2 years ago

diegozea commented 2 years ago

Hi! As you will see in the following two screen captures, the slider to select the number of bins is not working:

  1. (min)

image

  1. (max)

image

I have run the example code in the README:

import RDatasets
iris = RDatasets.dataset("datasets", "iris")
using StatsPlots, Interact
using Blink
w = Window()
body!(w, dataviewer(iris))

I have found this problem with this setup:

(test_gui) pkg> st
      Status `~/Documents/Book/Chapter06/test_gui/Project.toml`
  [ad839575] Blink v0.12.5
  [c601a237] Interact v0.10.4
  [c3e4b0f8] Pluto v0.17.3
  [ce6b1742] RDatasets v0.7.6
  [f3b207a7] StatsPlots v0.14.29

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
diegozea commented 2 years ago

In fact, it looks like this is not working:

    # Add bins if the plot allows it
    display_nbins = @map (&plot_type) in [corrplot, cornerplot, histogram, marginalhist] ? "block" : "none"

As I can see the bins slider even for scatter plots:

image