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

Update Plots to use color libraries #692

Merged
merged 17 commits into from
Mar 2, 2017

Conversation

mkborregaard
Copy link
Member

Here is a first stab at a recipe to show color libraries

@mkborregaard
Copy link
Member Author

showlibrary(:colorbrewer)

skaermbillede 2017-02-21 kl 22 47 35

@tbreloff
Copy link
Member

👍 !! But... maybe this should be in PlotRecipes? What do you think?

@mkborregaard
Copy link
Member Author

On top of my head I would say it belongs here? Color gradients are central to Plots, and the recipe does not interface with any other packages. But I don't feel strongly about it. What are the pros of putting it in PlotRecipes - that it is called with a special name rather than plot?

@tbreloff
Copy link
Member

Just in the name of keeping Plots minimal (easier to keep out new stuff than remove old stuff)

@tbreloff
Copy link
Member

But I don't feel so strongly... feel free to merge

@mkborregaard
Copy link
Member Author

mkborregaard commented Feb 22, 2017

The recipe fails on GR with

MethodError: no method matching length(::Symbol)
Closest candidates are:
  length(!Matched::SimpleVector) at essentials.jl:168
  length(!Matched::Base.MethodList) at reflection.jl:256
  length(!Matched::MethodTable) at reflection.jl:322
  ...
 in gr_text(::Float64, ::Float64, ::Symbol) at gr.jl:186
 in gr_display(::Plots.Subplot{Plots.GRBackend}, ::Measures.Length{:mm,Float64}, ::Measures.Length{:mm,Float64}, ::Array{Float64,1}) at gr.jl:706
 in gr_display(::Plots.Plot{Plots.GRBackend}) at gr.jl:494
 in _display(::Plots.Plot{Plots.GRBackend}) at gr.jl:1114
 in gui(::Plots.Plot{Plots.GRBackend}) at output.jl:123
 in gui() at output.jl:123
 in include_string(::String, ::String) at sys.dylib:?
 in include_string(::String, ::String) at sys.dylib:?
 in eval(::Module, ::Any) at sys.dylib:?
 in eval(::Module, ::Any) at sys.dylib:?
 in (::Atom.##65#68)() at eval.jl:102
 in withpath(::Atom.##65#68, ::Void) at utils.jl:30
 in withpath(::Function, ::Void) at eval.jl:38
 in macro expansion at eval.jl:101 [inlined]
 in (::Atom.##64#67{Dict{String,Any}})() at task.jl:60

@mkborregaard
Copy link
Member Author

I fixed the GR error

@mkborregaard mkborregaard changed the title plot recipe to show color libraries Update Plots to use color libraries Feb 28, 2017
@tbreloff
Copy link
Member

tbreloff commented Mar 1, 2017

Is this ready for merge? You can do it whenever

@mkborregaard
Copy link
Member Author

Yes, I'd say so, I just wanted to give @pkofod the chance to comment. Note that I merged all Plots colorlibrary related changes into this branch, so this is now the PR for color libraries, together with JuliaPlots/PlotUtils.jl#7 and JuliaPlots/PlotThemes.jl#15 and a WIP PR on PlotDocs. They must all be merged at the same time. I'll do it tomorrow if there are no comments before then.

@mkborregaard mkborregaard merged commit 032f5a5 into JuliaPlots:master Mar 2, 2017
@mkborregaard
Copy link
Member Author

Finally. I have one more thing to add - more flexible setting defaults. And I'll document all this in the colors section in PlotDocs.

@mkborregaard mkborregaard deleted the showlibrary branch March 2, 2017 21:07
@pkofod
Copy link
Contributor

pkofod commented Mar 2, 2017

Great stuff - sorry for my absence.

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.

3 participants