qwt fixes

This commit is contained in:
Thomas Breloff 2015-09-21 22:14:59 -04:00
parent c9df244333
commit 454630dace

View File

@ -7,6 +7,7 @@ export qwt!
qwt!() = plotter!(:qwt) qwt!() = plotter!(:qwt)
supportedTypes(::QwtPackage) = [:none, :line, :path, :steppre, :steppost, :sticks, :scatter, :heatmap, :hexbin, :hist, :bar] supportedTypes(::QwtPackage) = [:none, :line, :path, :steppre, :steppost, :sticks, :scatter, :heatmap, :hexbin, :hist, :bar]
supportedMarkers(::QwtPackage) = [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1, :star2, :hexagon]
# ------------------------------- # -------------------------------
@ -26,33 +27,24 @@ end
function adjustQwtKeywords(iscreating::Bool; kw...) function adjustQwtKeywords(iscreating::Bool; kw...)
d = Dict(kw) d = Dict(kw)
# replaceAliases!(d, _qwtAliases)
replaceLinetypeAlias(d)
# if !iscreating
# d[:heatmap_n] = d[:nbins]
# end
# if d[:linetype] == :hexbin
# d[:linetype] = :heatmap
# elseif d[:linetype] == :scatter
if d[:linetype] == :scatter if d[:linetype] == :scatter
d[:linetype] = :none d[:linetype] = :none
if d[:marker] == :none if d[:marker] == :none
d[:marker] = :ellipse d[:marker] = :ellipse
end end
elseif !iscreating && d[:linetype] == :bar elseif !iscreating && d[:linetype] == :bar
return barHack(; kw...) d = barHack(; kw...)
elseif !iscreating && d[:linetype] == :hist elseif !iscreating && d[:linetype] == :hist
return barHack(; histogramHack(; kw...)...) d = barHack(; histogramHack(; kw...)...)
end end
replaceLinetypeAlias(d)
show(d)
d d
end end
function plot(pkg::QwtPackage; kw...) function plot(pkg::QwtPackage; kw...)
d = Dict(kw) d = Dict(kw)
# replaceAliases!(d, _qwtAliases)
replaceLinetypeAlias(d)
# d = adjustQwtKeywords(true; kw...)
o = Qwt.plot(zeros(0,0); d..., show=false) o = Qwt.plot(zeros(0,0); d..., show=false)
plt = Plot(o, pkg, 0, d, Dict[]) plt = Plot(o, pkg, 0, d, Dict[])
plt plt
@ -60,7 +52,6 @@ end
function plot!(::QwtPackage, plt::Plot; kw...) function plot!(::QwtPackage, plt::Plot; kw...)
d = adjustQwtKeywords(false; kw...) d = adjustQwtKeywords(false; kw...)
# @show d
Qwt.oplot(plt.o; d...) Qwt.oplot(plt.o; d...)
push!(plt.seriesargs, d) push!(plt.seriesargs, d)
plt plt