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

add stronger typing to poetic plotting, fixes #882 #883

Merged
merged 3 commits into from
Aug 25, 2016

Conversation

tlnagy
Copy link
Member

@tlnagy tlnagy commented Aug 23, 2016

Related to #881 and #871

@coveralls
Copy link

coveralls commented Aug 24, 2016

Coverage Status

Coverage increased (+0.2%) to 65.67% when pulling 47336cb on tlnagy:pull-request/24f5d936 into 4a36837 on dcjones:master.

@coveralls
Copy link

coveralls commented Aug 24, 2016

Coverage Status

Coverage increased (+0.02%) to 65.458% when pulling 47336cb on tlnagy:pull-request/24f5d936 into 4a36837 on dcjones:master.

@shashi
Copy link
Collaborator

shashi commented Aug 24, 2016

Wow this is a pretty action at a distance kind of problem. I guess this fix is warranted though.

@tlnagy
Copy link
Member Author

tlnagy commented Aug 24, 2016

Indeed. I would've preferred a different workaround to this (something more like #874), but that was a lucky fix. However, this is a much more robust fix for this error and it looks like the tests pass. Hopefully no one is passing anything too funky to the a and b parameters.

Also, based on your suggestion in #882, I added a test for the ambiguity method error.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 65.458% when pulling 8804dde on tlnagy:pull-request/24f5d936 into 4a36837 on dcjones:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 65.458% when pulling 8804dde on tlnagy:pull-request/24f5d936 into 4a36837 on dcjones:master.

@shashi
Copy link
Collaborator

shashi commented Aug 25, 2016

Hopefully no one is passing anything too funky to the a and b parameters.

julia> brightness(x::RGB) = (x.r+x.g+x.b)/3
brightness (generic function with 1 method)

julia> plot([brightness], colorant"black", colorant"white")
ERROR: MethodError: `isless` has no method matching isless(::ColorTypes.RGB{FixedPointNumbers.UFixed{UInt8,8}}, ::ColorTypes.RGB{FixedPointNumbers.UFixed{UInt8,8}})
Closest candidates are:
  isless(::DataArrays.NAtype, ::Any)
  isless(::Any, ::DataArrays.NAtype)
 in plot at /home/shashi/.julia/v0.4/Gadfly/src/poetry.jl:44

haha.

yeah, if someone's using funky a and b then they can open an issue.

@shashi shashi merged commit f3f9bda into GiovineItalia:master Aug 25, 2016
@tlnagy tlnagy deleted the pull-request/24f5d936 branch August 25, 2016 05:30
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

Successfully merging this pull request may close these issues.

None yet

3 participants