From 76d1e26f7d5397806fa67bb9afb689abd0b2b72d Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Mon, 21 Sep 2015 17:04:20 -0400 Subject: [PATCH] readme --- README.md | 58 +++++++++++++++++++------------------- docs/example_generation.jl | 5 ++-- src/args.jl | 3 +- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 25a3060b..5f90abac 100644 --- a/README.md +++ b/README.md @@ -157,36 +157,36 @@ ohlc!(args...; kw...) = plot!(args...; kw..., linetype = :ohlc) Some keyword arguments you can set: -Keyword | Default Value | Aliases | Applies To +Keyword | Default | Type | Aliases ---- | ---- | ---- | ---- -args | Any[] | [:args,:argss] | Series -axis | left | [:axis,:axiss] | Series -color | auto | [:c,:color,:colors] | Series -fillto | nothing | [:area,:fill,:fillto,:filltos] | Series -group | nothing | [:g,:group,:groups] | Series -heatmap_c | (0.15,0.5) | [:heatmap_c,:heatmap_cs] | Series -kwargs | Any[] | [:kwargs,:kwargss] | Series -label | AUTO | [:lab,:label,:labels] | Series -linestyle | solid | [:linestyle,:linestyles,:ls,:s,:style] | Series -linetype | path | [:linetype,:linetypes,:lt,:t,:type] | Series -marker | none | [:m,:marker,:markers] | Series -markercolor | match | [:markercolor,:markercolors,:mc,:mcolor] | Series -markersize | 6 | [:markersize,:markersizes,:ms,:msize] | Series -nbins | 100 | [:nb,:nbin,:nbins,:nbinss] | Series -reg | false | [:reg,:regs] | Series -ribbon | nothing | [:r,:ribbon,:ribbons] | Series -width | 1 | [:linewidth,:w,:width,:widths] | Series -background_color | RGB{Float64}(0.1,0.1,0.1) | [:background,:background_color,:bg,:bg_color,:bgcolor] | Plot -legend | true | [:leg,:legend] | Plot -show | false | [:display,:show] | Plot -size | (800,600) | [:size,:windowsize,:wsize] | Plot -title | | [:title] | Plot -windowtitle | Plots.jl | [:windowtitle,:wtitle] | Plot -xlabel | | [:xlab,:xlabel] | Plot -xticks | true | [:xticks] | Plot -ylabel | | [:ylab,:ylabel] | Plot -yrightlabel | | [:y2lab,:y2label,:ylab2,:ylabel2,:ylabelright,:ylabr,:yrightlabel,:yrlab] | Plot -yticks | true | [:yticks] | Plot +args | Any[] | Series | `:args`, `:argss` +axis | left | Series | `:axis`, `:axiss` +color | auto | Series | `:c`, `:color`, `:colors` +fillto | nothing | Series | `:area`, `:fill`, `:fillto`, `:filltos` +group | nothing | Series | `:g`, `:group`, `:groups` +heatmap_c | (0.15,0.5) | Series | `:heatmap_c`, `:heatmap_cs` +kwargs | Any[] | Series | `:kwargs`, `:kwargss` +label | AUTO | Series | `:lab`, `:label`, `:labels` +linestyle | solid | Series | `:linestyle`, `:linestyles`, `:ls`, `:s`, `:style` +linetype | path | Series | `:linetype`, `:linetypes`, `:lt`, `:t`, `:type` +marker | none | Series | `:m`, `:marker`, `:markers` +markercolor | match | Series | `:markercolor`, `:markercolors`, `:mc`, `:mcolor` +markersize | 6 | Series | `:markersize`, `:markersizes`, `:ms`, `:msize` +nbins | 100 | Series | `:nb`, `:nbin`, `:nbins`, `:nbinss` +reg | false | Series | `:reg`, `:regs` +ribbon | nothing | Series | `:r`, `:ribbon`, `:ribbons` +width | 1 | Series | `:linewidth`, `:w`, `:width`, `:widths` +background_color | RGB{Float64}(0.1,0.1,0.1) | Plot | `:background`, `:background_color`, `:bg`, `:bg_color`, `:bgcolor` +legend | true | Plot | `:leg`, `:legend` +show | false | Plot | `:display`, `:show` +size | (800,600) | Plot | `:size`, `:windowsize`, `:wsize` +title | | Plot | `:title` +windowtitle | Plots.jl | Plot | `:windowtitle`, `:wtitle` +xlabel | | Plot | `:xlab`, `:xlabel` +xticks | true | Plot | `:xticks` +ylabel | | Plot | `:ylab`, `:ylabel` +yrightlabel | | Plot | `:y2lab`, `:y2label`, `:ylab2`, `:ylabel2`, `:ylabelright`, `:ylabr`, `:yrightlabel`, `:yrlab` +yticks | true | Plot | `:yticks` diff --git a/docs/example_generation.jl b/docs/example_generation.jl index 445ffc9f..5f621405 100644 --- a/docs/example_generation.jl +++ b/docs/example_generation.jl @@ -218,10 +218,11 @@ function buildReadme() readme = readall("$DOCDIR/readme_template.md") # build keyword arg table - kwtable = "Keyword | Default Value | Aliases | Applies To\n---- | ---- | ---- | ----\n" + kwtable = "Keyword | Default | Type | Aliases \n---- | ---- | ---- | ----\n" for d in (Plots._seriesDefaults, Plots._plotDefaults) for k in sort(collect(keys(d))) - kwtable = string(kwtable, "$k | $(d[k]) | $(aliases(Plots._keyAliases, k)) | $(d==Plots._seriesDefaults ? "Series" : "Plot") \n") + aliasstr = createStringOfMarkDownSymbols(aliases(Plots._keyAliases, k)) + kwtable = string(kwtable, "$k | $(d[k]) | $(d==Plots._seriesDefaults ? "Series" : "Plot") | $aliasstr \n") end end readme = replace(readme, "[[KEYWORD_ARGS_TABLE]]", kwtable) diff --git a/src/args.jl b/src/args.jl index af55ea90..465f3cce 100644 --- a/src/args.jl +++ b/src/args.jl @@ -149,7 +149,8 @@ function aliasesAndAutopick(d::Dict, sym::Symbol, aliases::Dict, options::AVec, end function aliases(aliasMap::Dict, val) - sort(vcat(val, collect(keys(filter((k,v)-> v==val, aliasMap))))) + # sort(vcat(val, collect(keys(filter((k,v)-> v==val, aliasMap))))) + sort(collect(keys(filter((k,v)-> v==val, aliasMap)))) end # -----------------------------------------------------------------------------