winston log10 scale

This commit is contained in:
Thomas Breloff 2015-10-03 17:18:58 -05:00
parent da05e7fe5e
commit 623ca1effc
4 changed files with 105 additions and 24 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -71,14 +71,14 @@ supportedArgs(::WinstonPackage) = [
:ylims, :ylims,
# :yrightlabel, # :yrightlabel,
# :yticks, # :yticks,
# :xscale, :xscale,
# :yscale, :yscale,
] ]
supportedAxes(::WinstonPackage) = [:auto, :left] supportedAxes(::WinstonPackage) = [:auto, :left]
supportedTypes(::WinstonPackage) = [:none, :line, :path, :sticks, :scatter, :hist, :bar] supportedTypes(::WinstonPackage) = [:none, :line, :path, :sticks, :scatter, :hist, :bar]
supportedStyles(::WinstonPackage) = [:auto, :solid, :dash, :dot, :dashdot] supportedStyles(::WinstonPackage) = [:auto, :solid, :dash, :dot, :dashdot]
supportedMarkers(::WinstonPackage) = [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1] supportedMarkers(::WinstonPackage) = [:none, :auto, :rect, :ellipse, :diamond, :utriangle, :dtriangle, :cross, :xcross, :star1]
supportedScales(::WinstonPackage) = [:identity] supportedScales(::WinstonPackage) = [:identity, :log10]
subplotSupported(::WinstonPackage) = false subplotSupported(::WinstonPackage) = false
@ -221,7 +221,12 @@ end
# ---------------------------------------------------------------- # ----------------------------------------------------------------
const _winstonNames = Dict(:xlims => :xrange, :ylims => :yrange) const _winstonNames = Dict(
:xlims => :xrange,
:ylims => :yrange,
:xscale => :xlog,
:yscale => :ylog,
)
function updatePlotItems(plt::Plot{WinstonPackage}, d::Dict) function updatePlotItems(plt::Plot{WinstonPackage}, d::Dict)
window, canvas, wplt = getWinstonItems(plt) window, canvas, wplt = getWinstonItems(plt)
@ -230,6 +235,14 @@ function updatePlotItems(plt::Plot{WinstonPackage}, d::Dict)
Winston.setattr(wplt, string(get(_winstonNames, k, k)), d[k]) Winston.setattr(wplt, string(get(_winstonNames, k, k)), d[k])
end end
end end
for k in (:xscale, :yscale)
if haskey(d, k)
islogscale = d[k] == :log10
Winston.setattr(wplt, (k == :xscale ? :xlog : :ylog), islogscale)
end
end
end end