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

Color aesthetic issue with Julia 0.5-rc4? #900

Closed
Mattriks opened this issue Sep 18, 2016 · 14 comments
Closed

Color aesthetic issue with Julia 0.5-rc4? #900

Mattriks opened this issue Sep 18, 2016 · 14 comments
Labels

Comments

@Mattriks
Copy link
Member

Can anyone replicate this error? I'm using Julia 0.5-rc4, Gadfly 0.4.4, and IJulia 1.3 (note I've used the REPL below for convenience). The error doesn't occur:

  • if I output to a PNG file
  • in any case, with Julia 0.5-rc3
  • in any case, if you leave out the color=id aesthetic from the plot statement.

rc4

@tlnagy
Copy link
Member

tlnagy commented Sep 18, 2016

Are you using the masters for Gadfly and Compose?

@tlnagy
Copy link
Member

tlnagy commented Sep 18, 2016

I can reproduce this on 0.5-rc4. Shoot.

@tlnagy tlnagy added the bug label Sep 18, 2016
@tlnagy
Copy link
Member

tlnagy commented Sep 18, 2016

As far as I'm able to tell, this looks like a bug in Base. Maybe @shashi might know? He has more experience with Compose than me.

@Mattriks
Copy link
Member Author

Yes, using masters. Since the error doesn't occur in 0.5-rc3 (image below), it seems that some change has been made in 0.5-rc4, such that a conflict occurs between Gadfly and Base.

rc3

Is it related to those #NULL statements ?

@tlnagy
Copy link
Member

tlnagy commented Sep 19, 2016

Yeah it probably is related to that. Let me see if I can make a minimal example. Kind of hard to post this to base as an issue until we narrow this down a bit.

@tlnagy
Copy link
Member

tlnagy commented Sep 19, 2016

This works on RC4

julia> a = Dict{Type, Nullable{Type}}()
Dict{Type,Nullable{Type}} with 0 entries

julia> a[Int64] = Nullable{Float64}()
Nullable{Float64}()

julia> show(a)
Dict{Type,Nullable{Type}}(Pair{Type,Nullable{Type}}(Int64,#NULL))

@tlnagy
Copy link
Member

tlnagy commented Sep 19, 2016

The error is pointing to dict.jl:71 which was last touched by @vtjnash between RC3 and RC4. The corresponding Compose code hasn't changed in three years. JuliaLang/julia@256a296 looks like it made a lot of changes to printing dicts and might be the culprit here.

@vtjnash
Copy link

vtjnash commented Sep 19, 2016

This might be fixed by JuliaLang/julia#18534, but I don't seem to be able to reproduce right now since I get:

julia> using Gadfly

julia> id = ["a","a","b","b","c"];

julia> p = plot(x=1:5, y=rand(5), color=id, Geom.point); draw(PNG(4inch, 3.3inch), p);
ERROR: UndefVarError: minheight not defined
 in realize_brute_force(::Compose.Table, ::Compose.ParentDrawContext) at /Users/jameson/.julia/v0.6/Compose/src/table.jl:246
 in drawpart(::Compose.Image{Compose.PNGBackend}, ::Compose.Table, ::Compose.IdentityTransform, ::NTuple{4,Float64}, ::Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}) at /Users/jameson/.julia/v0.6/Compose/src/container.jl:472
 in drawpart(::Compose.Image{Compose.PNGBackend}, ::Compose.Context, ::Compose.IdentityTransform, ::NTuple{4,Float64}, ::Measures.BoundingBox{Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}},Tuple{Measures.Length{:mm,Float64},Measures.Length{:mm,Float64}}}) at /Users/jameson/.julia/v0.6/Compose/src/container.jl:590 (repeats 2 times)
 in draw(::Compose.Image{Compose.PNGBackend}, ::Compose.Context) at /Users/jameson/.julia/v0.6/Compose/src/container.jl:434
 in draw(::Compose.Image{Compose.PNGBackend}, ::Gadfly.Plot) at /Users/jameson/.julia/v0.6/Gadfly/src/Gadfly.jl:822

@tlnagy
Copy link
Member

tlnagy commented Sep 19, 2016

@vtjnash That's really weird, must be something that has been changed upstream.

@Mattriks
Copy link
Member Author

Just updating that my original issue occurs in Julia 0.5.0 release. Gadfly plots with a color aesthetic don't plot to screen when using a PNG backend (they will plot to file).

@tlnagy
Copy link
Member

tlnagy commented Sep 20, 2016

Paging @vtjnash again, this is a problem. Thanks for checking

@Mattriks
Copy link
Member Author

I've been using Julia-0.6-pre.alpha for a while, and this issue has disappeared. Hope it doesn't reappear in the anticipated 0.6-rc's!

@bjarthur
Copy link
Member

if this is no longer a problem in 0.6 we should close this issue.

@Mattriks
Copy link
Member Author

Ok by me. Also #936 is a duplicate of this.

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

No branches or pull requests

4 participants