fix pyplot alpha and added stroke support
This commit is contained in:
parent
918ba72107
commit
f1cca13796
@ -264,19 +264,31 @@ function _add_series(pkg::PyPlotPackage, plt::Plot; kw...)
|
|||||||
else
|
else
|
||||||
extra_kwargs[:c] = getPyPlotColor(c, d[:markeralpha])
|
extra_kwargs[:c] = getPyPlotColor(c, d[:markeralpha])
|
||||||
end
|
end
|
||||||
|
if d[:markeralpha] != nothing
|
||||||
|
extra_kwargs[:alpha] = d[:markeralpha]
|
||||||
|
end
|
||||||
|
extra_kwargs[:edgecolors] = getPyPlotColor(d[:markerstrokecolor], d[:markerstrokealpha])
|
||||||
else
|
else
|
||||||
extra_kwargs[:markersize] = d[:markersize]
|
extra_kwargs[:markersize] = d[:markersize]
|
||||||
extra_kwargs[:markerfacecolor] = getPyPlotColor(d[:markercolor], d[:markeralpha])
|
extra_kwargs[:markerfacecolor] = getPyPlotColor(d[:markercolor], d[:markeralpha])
|
||||||
extra_kwargs[:markeredgecolor] = getPyPlotColor(plt.plotargs[:foreground_color])
|
extra_kwargs[:markeredgecolor] = getPyPlotColor(d[:markerstrokecolor], d[:markerstrokealpha])
|
||||||
extra_kwargs[:markeredgewidth] = d[:linewidth]
|
extra_kwargs[:markeredgewidth] = d[:markerstrokewidth]
|
||||||
extra_kwargs[:drawstyle] = getPyPlotStepStyle(lt)
|
extra_kwargs[:drawstyle] = getPyPlotStepStyle(lt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# if d[:markeralpha] != nothing
|
||||||
|
# extra_kwargs[:alpha] = d[:markeralpha]
|
||||||
|
# elseif d[:linealpha] != nothing
|
||||||
|
# extra_kwargs[:alpha] = d[:linealpha]
|
||||||
|
# end
|
||||||
|
|
||||||
# set these for all types
|
# set these for all types
|
||||||
if lt != :contour
|
if lt != :contour
|
||||||
extra_kwargs[:color] = color
|
if !(lt in (:scatter, :scatter3d))
|
||||||
extra_kwargs[:linewidth] = d[:linewidth]
|
extra_kwargs[:color] = color
|
||||||
|
extra_kwargs[:linewidth] = d[:linewidth]
|
||||||
|
end
|
||||||
extra_kwargs[:label] = d[:label]
|
extra_kwargs[:label] = d[:label]
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -308,6 +320,8 @@ function _add_series(pkg::PyPlotPackage, plt::Plot; kw...)
|
|||||||
PyPlot.colorbar(d[:serieshandle])
|
PyPlot.colorbar(d[:serieshandle])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @show extra_kwargs
|
||||||
|
|
||||||
# this sets the bg color inside the grid
|
# this sets the bg color inside the grid
|
||||||
ax[:set_axis_bgcolor](getPyPlotColor(plt.plotargs[:background_color]))
|
ax[:set_axis_bgcolor](getPyPlotColor(plt.plotargs[:background_color]))
|
||||||
|
|
||||||
|
|||||||
@ -95,8 +95,8 @@ supportedArgs(::PyPlotPackage) = [
|
|||||||
:markershape,
|
:markershape,
|
||||||
:markercolor,
|
:markercolor,
|
||||||
:markersize,
|
:markersize,
|
||||||
# :markerstrokewidth,
|
:markerstrokewidth,
|
||||||
# :markerstrokecolor,
|
:markerstrokecolor,
|
||||||
# :markerstrokestyle,
|
# :markerstrokestyle,
|
||||||
:n,
|
:n,
|
||||||
:nbins,
|
:nbins,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user