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

[BUG] Histogram log scale is broken #4774

Closed
Moelf opened this issue Jun 9, 2023 · 1 comment · Fixed by #4782
Closed

[BUG] Histogram log scale is broken #4774

Moelf opened this issue Jun 9, 2023 · 1 comment · Fixed by #4782

Comments

@Moelf
Copy link
Member

Moelf commented Jun 9, 2023

data = randn(10^6);

histogram(data; yscale=:log10)


DomainError with -4.773573484531328:

log will only return a complex result if called with a complex argument. Try log(Complex(x)).

    throw_complex_domainerror(::Symbol, ::Float64)@math.jl:33
    _log(::Float64, ::Val{:ℯ}, ::Symbol)@log.jl:301
    log@log.jl:267[inlined]
    log@math.jl:343[inlined]
    round_base@utils.jl:84[inlined]
    floor_base(::Float64, ::Float64)@utils.jl:79
    macro expansion@recipes.jl:440[inlined]
    apply_recipe(::AbstractDict{Symbol, Any}, ::Type{Val{:bar}}, ::Any, ::Any, ::Any)@RecipesBase.jl:300
    _process_seriesrecipe(::Any, ::Any)@series_recipe.jl:50
    _process_seriesrecipe(::Any, ::Any)@series_recipe.jl:62
    _process_seriesrecipes!(::Any, ::Any)@series_recipe.jl:27
    recipe_pipeline!(::Any, ::Any, ::Any)@RecipesPipeline.jl:99
    _plot!(::Plots.Plot, ::Any, ::Any)@plot.jl:223
    #plot#188@plot.jl:102[inlined]
    plot@plot.jl:93[inlined]
    #histogram#369@RecipesBase.jl:427[inlined]
    histogram@RecipesBase.jl:427[inlined]
    top-level scope@[Local: 1](http://localhost:1234/edit?id=12711bf8-0717-11ee-1283-dbe7b91dd08a#)[inlined]
@jyhu17
Copy link

jyhu17 commented Jul 19, 2023

Same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants