supportedGraphs utils and pngs; removed args/kwargs from defaults

This commit is contained in:
Thomas Breloff 2015-09-29 14:05:24 -04:00
parent a0455561b6
commit 8a9b3286e9
12 changed files with 20 additions and 108 deletions

View File

@ -180,13 +180,11 @@ Some keyword arguments you can set:
Keyword | Default | Type | Aliases Keyword | Default | Type | Aliases
---- | ---- | ---- | ---- ---- | ---- | ---- | ----
`:annotation` | `nothing` | Series | `:ann`, `:annotate`, `:annotations`, `:anns` `:annotation` | `nothing` | Series | `:ann`, `:annotate`, `:annotations`, `:anns`
`:args` | `Any[]` | Series | `:argss`
`:axis` | `left` | Series | `:axiss` `:axis` | `left` | Series | `:axiss`
`:color` | `auto` | Series | `:c`, `:colors` `:color` | `auto` | Series | `:c`, `:colors`
`:fillto` | `nothing` | Series | `:area`, `:fill`, `:filltos` `:fillto` | `nothing` | Series | `:area`, `:fill`, `:filltos`
`:group` | `nothing` | Series | `:g`, `:groups` `:group` | `nothing` | Series | `:g`, `:groups`
`:heatmap_c` | `(0.15,0.5)` | Series | `:heatmap_cs` `:heatmap_c` | `(0.15,0.5)` | Series | `:heatmap_cs`
`:kwargs` | `Any[]` | Series | `:kwargss`
`:label` | `AUTO` | Series | `:lab`, `:labels` `:label` | `AUTO` | Series | `:lab`, `:labels`
`:linestyle` | `solid` | Series | `:linestyles`, `:ls`, `:s`, `:style` `:linestyle` | `solid` | Series | `:linestyles`, `:ls`, `:s`, `:style`
`:linetype` | `path` | Series | `:linetypes`, `:lt`, `:t`, `:type` `:linetype` | `path` | Series | `:linetypes`, `:lt`, `:t`, `:type`

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -106,9 +106,9 @@ _seriesDefaults[:reg] = false # regression line?
_seriesDefaults[:group] = nothing _seriesDefaults[:group] = nothing
_seriesDefaults[:ribbon] = nothing _seriesDefaults[:ribbon] = nothing
_seriesDefaults[:annotation] = nothing _seriesDefaults[:annotation] = nothing
_seriesDefaults[:args] = [] # additional args to pass to the backend # _seriesDefaults[:args] = [] # additional args to pass to the backend
_seriesDefaults[:kwargs] = [] # additional keyword args to pass to the backend # _seriesDefaults[:kwargs] = [] # additional keyword args to pass to the backend
# note: can be Vector{Dict} or Vector{Tuple} # # note: can be Vector{Dict} or Vector{Tuple}
const _plotDefaults = Dict{Symbol, Any}() const _plotDefaults = Dict{Symbol, Any}()

View File

@ -10,7 +10,7 @@ gadfly() = backend(:gadfly)
# supportedArgs(::GadflyPackage) = setdiff(_allArgs, [:heatmap_c, :pos, :screen, :yrightlabel]) # supportedArgs(::GadflyPackage) = setdiff(_allArgs, [:heatmap_c, :pos, :screen, :yrightlabel])
supportedArgs(::GadflyPackage) = [ supportedArgs(::GadflyPackage) = [
:annotation, :annotation,
:args, # :args,
# :axis, # :axis,
:background_color, :background_color,
:color, :color,
@ -18,7 +18,7 @@ supportedArgs(::GadflyPackage) = [
# :foreground_color, # :foreground_color,
:group, :group,
# :heatmap_c, # :heatmap_c,
:kwargs, # :kwargs,
:label, :label,
:layout, :layout,
:legend, :legend,

View File

@ -11,7 +11,7 @@ pyplot() = backend(:pyplot)
# supportedArgs(::PyPlotPackage) = setdiff(_allArgs, [:reg, :heatmap_c, :fillto, :pos, :xlims, :ylims, :xticks, :yticks]) # supportedArgs(::PyPlotPackage) = setdiff(_allArgs, [:reg, :heatmap_c, :fillto, :pos, :xlims, :ylims, :xticks, :yticks])
supportedArgs(::PyPlotPackage) = [ supportedArgs(::PyPlotPackage) = [
:annotation, :annotation,
:args, # :args,
:axis, :axis,
:background_color, :background_color,
:color, :color,
@ -19,7 +19,7 @@ supportedArgs(::PyPlotPackage) = [
:foreground_color, :foreground_color,
:group, :group,
# :heatmap_c, # :heatmap_c,
:kwargs, # :kwargs,
:label, :label,
:layout, :layout,
:legend, :legend,

View File

@ -13,7 +13,7 @@ export [pkgname]
# supportedArgs(::[PkgName]Package) = _allArgs # supportedArgs(::[PkgName]Package) = _allArgs
supportedArgs(::[PkgName]Package) = [ supportedArgs(::[PkgName]Package) = [
:annotation, :annotation,
:args, # :args,
:axis, :axis,
:background_color, :background_color,
:color, :color,
@ -21,7 +21,7 @@ supportedArgs(::[PkgName]Package) = [
:foreground_color, :foreground_color,
:group, :group,
# :heatmap_c, # :heatmap_c,
:kwargs, # :kwargs,
:label, :label,
:layout, :layout,
:legend, :legend,

View File

@ -212,12 +212,12 @@ extendSeriesData(v::AVec, z::AVec) = (append!(v, z); v)
# --------------------------------------------------------------- # ---------------------------------------------------------------
function supportGraph(allvals, func) function supportGraph(allvals, func)
vals = reverse(allvals) vals = reverse(sort(allvals))
x = ASCIIString[] x = ASCIIString[]
y = ASCIIString[] y = ASCIIString[]
for b in backends()
supported = func(Plots.backendInstance(b))
for val in vals for val in vals
for b in sort(backends())
supported = func(Plots.backendInstance(b))
if val in supported if val in supported
push!(x, string(b)) push!(x, string(b))
push!(y, string(val)) push!(y, string(val))
@ -233,6 +233,13 @@ supportGraphStyles() = supportGraph(_allStyles, supportedStyles)
supportGraphMarkers() = supportGraph(_allMarkers, supportedMarkers) supportGraphMarkers() = supportGraph(_allMarkers, supportedMarkers)
supportGraphAxes() = supportGraph(_allAxes, supportedAxes) supportGraphAxes() = supportGraph(_allAxes, supportedAxes)
function dumpSupportGraphs()
for func in (supportGraphArgs, supportGraphTypes, supportGraphStyles, supportGraphMarkers, supportGraphAxes)
plt = func()
png(IMG_DIR * "/supported/$(string(func))")
end
end
# --------------------------------------------------------------- # ---------------------------------------------------------------