added normalize kw, and added to pyplot

This commit is contained in:
Thomas Breloff 2016-04-24 22:47:32 -04:00
parent 50fa013801
commit 44079a7bf7
3 changed files with 7 additions and 2 deletions

View File

@ -154,6 +154,7 @@ _seriesDefaults[:xerror] = nothing
_seriesDefaults[:yerror] = nothing
_seriesDefaults[:ribbon] = nothing
_seriesDefaults[:quiver] = nothing
_seriesDefaults[:normalize] = false # do we want a normalized histogram?
const _plotDefaults = KW()
@ -356,6 +357,9 @@ end
:velocity => :quiver,
:quiver2d => :quiver,
:gradient => :quiver,
:norm => :normalize,
:normed => :normalize,
:normalized => :normalize,
)
# add all pluralized forms to the _keyAliases dict

View File

@ -449,7 +449,7 @@ function _add_series(pkg::PyPlotBackend, plt::Plot, d::KW)
edgecolor = pylinecolor(d),
linewidth = d[:linewidth],
bins = d[:nbins],
normed = (lt == :density),
normed = d[:normalize],
orientation = (isvertical(d) ? "vertical" : "horizontal"),
histtype = (d[:bar_position] == :stack ? "barstacked" : "bar")
)[1]

View File

@ -101,12 +101,13 @@ supportedArgs(::PyPlotBackend) = [
:orientation,
:overwrite_figure,
:polar,
:normalize,
]
supportedAxes(::PyPlotBackend) = _allAxes
supportedTypes(::PyPlotBackend) = [
:none, :line, :path, :steppre, :steppost, :shape,
:scatter, :hist2d, :hexbin, :hist, :density,
:bar, :box, :violin, :quiver,
:bar, :sticks, :box, :violin, :quiver,
:hline, :vline, :heatmap,
:contour, :path3d, :scatter3d, :surface, :wireframe
]