GiovineItalia / Gadfly.jl

Crafty statistical graphics for Julia.

Home Page:http://gadflyjl.org/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zooming broken on faceted plots

rben01 opened this issue · comments

commented

Issue: when using a faceted plot via Geom.subplot_grid, zooming does not work correctly. Pressing I and O to zoom in and out does not zoom all subplots the same way, and using shift+drag to zoom in on a selected portion of a graph hides most parts of other graphs.

To reproduce:

julia> using Pkg, DataFrames, Random, Gadfly

julia> VERSION
v"1.9.2"

julia> Pkg.status("Gadfly")
Status `~/.julia/environments/v1.9/Project.toml`
  [c91e804a] Gadfly v1.4.0

julia> nrows = 2000
2000

julia> df = DataFrame(:a => randn(nrows), :b => randn(nrows), :c => rand('a':'d', nrows))
2000×3 DataFrame
  Row │ a            b           c    
      │ Float64      Float64     Char 
──────┼───────────────────────────────
    1-0.514853    -0.37189    b
    20.22696     -0.905798   b
    3-0.152049    -0.35202    a
    40.317134     1.59357    c
    5-0.37718      0.0605893  d
    6-1.00071      2.02576    a
    70.363566    -0.514146   d
    80.857302    -0.137145   b
                     
 1994-0.114597     0.329542   a
 1995-0.114567     0.492426   d
 19960.510985     1.47101    b
 1997-0.957645    -1.10034    a
 1998-0.267756    -1.80968    a
 19990.803785    -1.59344    b
 20001.21938      2.3976     b
                     1985 rows omitted

julia> plot(df, x=:a, y=:b,xgroup=:c, Scale.xgroup(levels='a':'d'), Geom.subplot_grid(Geom.point))

Here is the html produced:

Gadfly Plot.html.zip