Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot replicate example from tutorial containing dims() #451

Closed
saumil-sh opened this issue Mar 31, 2023 · 2 comments
Closed

Cannot replicate example from tutorial containing dims() #451

saumil-sh opened this issue Mar 31, 2023 · 2 comments

Comments

@saumil-sh
Copy link

saumil-sh commented Mar 31, 2023

Bug description

There is already an issue with documentation of dims()

I want to plot distributions as shown in example 2 in the tutorial. However, the example throws an error. I expect the tutorial example to run as it is without errors.

Steps to reproduce

Minimal (non)working example

using CairoMakie
CairoMakie.activate!(type="svg")
using AlgebraOfGraphics

x = [-pi .. 0, 0 .. pi]
y = [sin cos] # We use broadcasting semantics on `tuple.(x, y)`.
dims() * mapping(x, y, color=dims(1), linestyle=dims(2)) |> draw

Error reporting

ERROR: MethodError: no method matching *(::AlgebraOfGraphics.DimsSelector{0}, ::Layer)
Closest candidates are:
  *(::Any, ::Any, ::Any, ::Any...) at operators.jl:591
  *(::SpecialFunctions.SimplePoly, ::Any) at ~/.julia/packages/SpecialFunctions/hefUc/src/expint.jl:8
  *(::ChainRulesCore.AbstractThunk, ::Any) at ~/.julia/packages/ChainRulesCore/C73ay/src/tangent_arithmetic.jl:125
  ...

Version info

]st Makie CairoMakie AlgebraOfGraphics
  [cbdf2221] AlgebraOfGraphics v0.6.14
  [13f3f980] CairoMakie v0.10.3
  [ee78f7c6] Makie v0.19.3
@saumil-sh
Copy link
Author

Maybe I am looking at the wrong place.
The current docs are here https://aog.makie.org.
The ones I found on a search engine are https://docs.juliahub.com/AlgebraOfGraphics.

Can someone confirm whether this is the case?

@greimel
Copy link
Collaborator

greimel commented Mar 31, 2023

Your link in the OP point to old docs. Both links in the second post point to recent docs. You can check the version in the lower left corner.

image

@greimel greimel closed this as completed Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants