fixed linetype aliases; for qwt as well

This commit is contained in:
Thomas Breloff 2015-09-21 16:18:58 -04:00
parent bc13b81351
commit 3739c2881b
2 changed files with 15 additions and 3 deletions

View File

@ -114,7 +114,7 @@ _plotDefaults[:xlabel] = ""
_plotDefaults[:ylabel] = ""
_plotDefaults[:yrightlabel] = ""
_plotDefaults[:legend] = true
_plotDefaults[:background_color] = colorant"white"
_plotDefaults[:background_color] = RGB(0.1,0.1,0.1) # colorant"white"
_plotDefaults[:xticks] = true
_plotDefaults[:yticks] = true
_plotDefaults[:size] = (800,600)
@ -298,6 +298,10 @@ function getSeriesArgs(pkg::PlottingPackage, initargs::Dict, kw, commandIndex::I
d[k] = _seriesDefaults[k]
end
end
if haskey(_typeAliases, d[:linetype])
d[:linetype] = _typeAliases[d[:linetype]]
end
aliasesAndAutopick(d, :axis, _axesAliases, supportedAxes(pkg), plotIndex)
aliasesAndAutopick(d, :linestyle, _styleAliases, supportedStyles(pkg), plotIndex)

View File

@ -16,9 +16,16 @@ const _qwtAliases = Dict(
:path => :line,
)
function replaceLinetypeAlias(d)
if haskey(_qwtAliases, d[:linetype])
d[:linetype] = _qwtAliases[d[:linetype]]
end
end
function adjustQwtKeywords(iscreating::Bool; kw...)
d = Dict(kw)
replaceAliases!(d, _qwtAliases)
# replaceAliases!(d, _qwtAliases)
replaceLinetypeAlias(d)
# if !iscreating
# d[:heatmap_n] = d[:nbins]
# end
@ -41,7 +48,8 @@ end
function plot(pkg::QwtPackage; kw...)
d = Dict(kw)
replaceAliases!(d, _qwtAliases)
# replaceAliases!(d, _qwtAliases)
replaceLinetypeAlias(d)
# d = adjustQwtKeywords(true; kw...)
o = Qwt.plot(zeros(0,0); d..., show=false)
plt = Plot(o, pkg, 0, d, Dict[])