AlgebraOfGraphics.jl icon indicating copy to clipboard operation
AlgebraOfGraphics.jl copied to clipboard

Redundant blank facet when drawing 3D scatter plots with layout

Open liaojiahui-r opened this issue 2 years ago • 0 comments

Bug description

Learning to plot iris data with AlgebraOfGraphics.jl, but I have found that using Species as layout results in a blank and out-of-place facet. Please see the code and image as follows:

Steps to reproduce

#≡≡≡≡≡≡≡≡≡≡
## Packages
using AlgebraOfGraphics
using CairoMakie

using RDatasets: dataset
iris = dataset("datasets", "iris")

using DataFrames
describe(iris)

#≡≡≡≡≡≡≡≡≡≡
## Tweaks the current theme
set_aog_theme!()
update_theme!(
    fontsize=20,
    markersize=15,
    Axis3=(
        xgridcolor=:transparent, ygridcolor=:transparent, zgridcolor=:transparent,
        xtickcolor=:grey20, ytickcolor=:grey20, ztickcolor=:grey20,
        xspinecolor_1=:grey20, xspinecolor_2=:grey80, xspinecolor_3=:grey80,
        yspinecolor_1=:grey20, yspinecolor_2=:grey80, yspinecolor_3=:grey80,
        zspinecolor_1=:grey20, zspinecolor_2=:grey80, zspinecolor_3=:grey80,
        aspect=:equal, azimuth=45, elevation=0.1, perspectiveness=0.5,
        title="3D w/ AOG w/ theme!",
    )
)

#≡≡≡≡≡≡≡≡≡≡
## Plot
axis = (type=Axis3, width=300, height=300, limits=((3, 8), (2, 5), (0, 3)), xticks=[3, 8], yticks=[2, 5], zticks=[0, 3])
plt = data(iris) * mapping(:SepalLength, :SepalWidth, :PetalWidth, color=:Species, layout=:Species)
draw(plt; axis=axis)

Images

aog_scatter_3d_theme

Version info

versioninfo()

Julia Version 1.9.2 Commit e4ee485e909 (2023-07-05 09:39 UTC) Platform Info: OS: macOS (x86_64-apple-darwin22.4.0) CPU: 12 × Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-14.0.6 (ORCJIT, skylake) Threads: 1 on 12 virtual cores Environment: JULIA_EDITOR = code JULIA_NUM_THREADS =

Pkg.status()

Status ~/.julia/environments/v1.9/Project.toml [537997a7] AbstractPlotting v0.18.3 ⌃ [cbdf2221] AlgebraOfGraphics v0.4.8 [336ed68f] CSV v0.10.11 [159f3aea] Cairo v1.0.5 ⌃ [13f3f980] CairoMakie v0.6.3 [3e975e5d] CartesianGrids v0.1.26 [324d7699] CategoricalArrays v0.10.8 [a93c6f00] DataFrames v1.6.1 ⌃ [e9467ef8] GLMakie v0.4.4 [c91e804a] Gadfly v1.4.0 ⌅ [5c1252a2] GeometryBasics v0.3.12 [98e50ef6] JuliaFormatter v1.0.34 ⌅ [ee78f7c6] Makie v0.15.0 ⌃ [9ecf9c4f] MeshViz v0.5.4 ⌅ [eacbb407] Meshes v0.25.15 [ff71e718] MixedModels v4.15.0 [8b842266] PalmerPenguins v0.1.4 [e0fc9d43] PkgMirrors v1.3.0 [9c9e696b] PkgServerClient v0.1.3 [ccf2f8ad] PlotThemes v3.1.0 [58dd65bb] Plotly v0.4.1 [f0f68f2c] PlotlyJS v0.18.10 [91a5bcdd] Plots v1.38.17 ⌃ [c3e4b0f8] Pluto v0.19.9 [6f49c342] RCall v0.13.15 [ce6b1742] RDatasets v0.7.7 ⌅ [2913bbd2] StatsBase v0.33.21 [fd094767] Suppressor v0.2.4 ⌃ [276b4fcb] WGLMakie v0.4.4 [de0858da] Printf [9a3f8284] Random Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use status --outdated

liaojiahui-r avatar Jul 27 '23 14:07 liaojiahui-r