polar coords for pyplot

This commit is contained in:
Thomas Breloff 2016-04-11 06:46:28 -04:00
parent e0b2749188
commit 0a636b5899
3 changed files with 10 additions and 2 deletions

View File

@ -192,6 +192,7 @@ _plotDefaults[:legendfont] = font(8)
_plotDefaults[:grid] = true
_plotDefaults[:annotation] = nothing # annotation tuple(s)... (x,y,annotation)
_plotDefaults[:overwrite_figure] = false
_plotDefaults[:polar] = false
# TODO: x/y scales

View File

@ -210,8 +210,10 @@ function getPyPlotFunction(plt::Plot, axis::Symbol, linetype::Symbol)
end
function updateAxisColors(ax, fgcolor)
for loc in ("bottom", "top", "left", "right")
ax[:spines][loc][:set_color](fgcolor)
# for loc in ("bottom", "top", "left", "right")
for (loc, spine) in ax[:spines]
# ax[:spines][loc][:set_color](fgcolor)
spine[:set_color](fgcolor)
end
for axis in ("x", "y")
ax[:tick_params](axis=axis, colors=fgcolor, which="both")
@ -309,6 +311,10 @@ function _create_plot(pkg::PyPlotBackend; kw...)
# push!(wrap.kwargs, (:projection, "3d"))
# end
pyplot_3d_setup!(wrap, d)
if get(d, :polar, false)
push!(wrap.kwargs, (:polar, true))
end
end
plt = Plot(wrap, pkg, 0, d, KW[])

View File

@ -174,6 +174,7 @@ supportedArgs(::PyPlotBackend) = [
:ribbon,
:quiver,
:orientation,
:polar,
]
supportedAxes(::PyPlotBackend) = _allAxes
supportedTypes(::PyPlotBackend) = [:none, :line, :path, :steppre, :steppost, :shape,