py_get<component>color removal;
marker stroke, adjustments
This commit is contained in:
parent
7c88256ca4
commit
8c9422f470
@ -229,11 +229,6 @@ function fix_xy_lengths!(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
py_linecolor(series::Series) = py_color(series[:linecolor])
|
|
||||||
py_markercolor(series::Series) = py_color(series[:markercolor])
|
|
||||||
py_markerstrokecolor(series::Series) = py_color(series[:markerstrokecolor])
|
|
||||||
py_fillcolor(series::Series) = py_color(series[:fillcolor])
|
|
||||||
|
|
||||||
py_linecolormap(series::Series) = py_colormap(series[:linecolor])
|
py_linecolormap(series::Series) = py_colormap(series[:linecolor])
|
||||||
py_markercolormap(series::Series) = py_colormap(series[:markercolor])
|
py_markercolormap(series::Series) = py_colormap(series[:markercolor])
|
||||||
py_fillcolormap(series::Series) = py_colormap(series[:fillcolor])
|
py_fillcolormap(series::Series) = py_colormap(series[:fillcolor])
|
||||||
@ -486,8 +481,8 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
:arrowstyle => "simple,head_length=$(a.headlength),head_width=$(a.headwidth)",
|
:arrowstyle => "simple,head_length=$(a.headlength),head_width=$(a.headwidth)",
|
||||||
:shrinkA => 0,
|
:shrinkA => 0,
|
||||||
:shrinkB => 0,
|
:shrinkB => 0,
|
||||||
:edgecolor => py_linecolor(series),
|
:edgecolor => py_color(get_linecolor(series)),
|
||||||
:facecolor => py_linecolor(series),
|
:facecolor => py_color(get_linecolor(series)),
|
||||||
:linewidth => py_thickness_scale(plt, get_linewidth(series)),
|
:linewidth => py_thickness_scale(plt, get_linewidth(series)),
|
||||||
:linestyle => py_linestyle(st, get_linestyle(series)),
|
:linestyle => py_linestyle(st, get_linestyle(series)),
|
||||||
)
|
)
|
||||||
@ -533,11 +528,11 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
handle = []
|
handle = []
|
||||||
x,y = xyargs
|
x,y = xyargs
|
||||||
shapes = series[:markershape]
|
shapes = series[:markershape]
|
||||||
msc = py_markerstrokecolor(series)
|
msc = py_color(get_markerstrokecolor(series), get_markerstrokealpha(series))
|
||||||
lw = py_thickness_scale(plt, series[:markerstrokewidth])
|
lw = py_thickness_scale(plt, series[:markerstrokewidth])
|
||||||
for i=eachindex(y)
|
for i=eachindex(y)
|
||||||
if series[:marker_z] !== nothing
|
if series[:marker_z] !== nothing
|
||||||
extrakw[:c] = [py_color(get_markercolor(series, i))]
|
extrakw[:c] = [py_color(get_markercolor(series, i), get_markercoloralpha(series, i))]
|
||||||
end
|
end
|
||||||
|
|
||||||
push!(handle, ax."scatter"(_cycle(x,i), _cycle(y,i);
|
push!(handle, ax."scatter"(_cycle(x,i), _cycle(y,i);
|
||||||
@ -545,7 +540,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
zorder = series[:series_plotindex] + 0.5,
|
zorder = series[:series_plotindex] + 0.5,
|
||||||
marker = py_marker(_cycle(shapes,i)),
|
marker = py_marker(_cycle(shapes,i)),
|
||||||
s = py_thickness_scale(plt, _cycle(series[:markersize],i) .^ 2),
|
s = py_thickness_scale(plt, _cycle(series[:markersize],i) .^ 2),
|
||||||
facecolors = get_markercolor(series, i),
|
facecolors = get_markercolor(series, i), # Not sure if we need get_markercoloralpha(series, i) here
|
||||||
edgecolors = msc,
|
edgecolors = msc,
|
||||||
linewidths = lw,
|
linewidths = lw,
|
||||||
extrakw...
|
extrakw...
|
||||||
@ -585,7 +580,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
zorder = series[:series_plotindex] + 0.5,
|
zorder = series[:series_plotindex] + 0.5,
|
||||||
marker = prev_marker,
|
marker = prev_marker,
|
||||||
s = cur_scale_list,
|
s = cur_scale_list,
|
||||||
edgecolors = py_markerstrokecolor(series),
|
edgecolors = py_color(get_markerstrokecolor(series), get_markerstrokealpha(series)), # Do we need include i?
|
||||||
linewidths = py_thickness_scale(plt, series[:markerstrokewidth]),
|
linewidths = py_thickness_scale(plt, series[:markerstrokewidth]),
|
||||||
facecolors = cur_color_list,
|
facecolors = cur_color_list,
|
||||||
extrakw...
|
extrakw...
|
||||||
@ -606,7 +601,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
zorder = series[:series_plotindex] + 0.5,
|
zorder = series[:series_plotindex] + 0.5,
|
||||||
marker = prev_marker,
|
marker = prev_marker,
|
||||||
s = cur_scale_list,
|
s = cur_scale_list,
|
||||||
edgecolors = py_markerstrokecolor(series),
|
edgecolors = py_color(get_markerstrokecolor(series), get_markerstrokealpha(series)),
|
||||||
linewidths = py_thickness_scale(plt, series[:markerstrokewidth]),
|
linewidths = py_thickness_scale(plt, series[:markerstrokewidth]),
|
||||||
facecolors = cur_color_list,
|
facecolors = cur_color_list,
|
||||||
extrakw...
|
extrakw...
|
||||||
@ -621,7 +616,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
zorder = series[:series_plotindex] + 0.5,
|
zorder = series[:series_plotindex] + 0.5,
|
||||||
marker = py_marker(series[:markershape]),
|
marker = py_marker(series[:markershape]),
|
||||||
s = py_thickness_scale(plt, series[:markersize] .^ 2),
|
s = py_thickness_scale(plt, series[:markersize] .^ 2),
|
||||||
edgecolors = py_markerstrokecolor(series),
|
edgecolors = py_color(get_markerstrokecolor(series), get_markerstrokealpha(series)),
|
||||||
linewidths = py_thickness_scale(plt, series[:markerstrokewidth]),
|
linewidths = py_thickness_scale(plt, series[:markerstrokewidth]),
|
||||||
extrakw...
|
extrakw...
|
||||||
)
|
)
|
||||||
@ -635,7 +630,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
zorder = series[:series_plotindex],
|
zorder = series[:series_plotindex],
|
||||||
gridsize = series[:bins],
|
gridsize = series[:bins],
|
||||||
linewidths = py_thickness_scale(plt, series[:linewidth]),
|
linewidths = py_thickness_scale(plt, series[:linewidth]),
|
||||||
edgecolors = py_linecolor(series),
|
edgecolors = py_color(get_linecolor(series)),
|
||||||
cmap = py_fillcolormap(series), # applies to the pcolorfast object
|
cmap = py_fillcolormap(series), # applies to the pcolorfast object
|
||||||
extrakw...
|
extrakw...
|
||||||
)
|
)
|
||||||
@ -708,7 +703,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
rstride = series[:stride][1],
|
rstride = series[:stride][1],
|
||||||
cstride = series[:stride][2],
|
cstride = series[:stride][2],
|
||||||
linewidth = py_thickness_scale(plt, series[:linewidth]),
|
linewidth = py_thickness_scale(plt, series[:linewidth]),
|
||||||
edgecolor = py_linecolor(series),
|
edgecolor = py_color(get_linecolor(series)),
|
||||||
extrakw...
|
extrakw...
|
||||||
)
|
)
|
||||||
push!(handles, handle)
|
push!(handles, handle)
|
||||||
@ -734,7 +729,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
|||||||
zorder = series[:series_plotindex],
|
zorder = series[:series_plotindex],
|
||||||
cmap = py_fillcolormap(series),
|
cmap = py_fillcolormap(series),
|
||||||
linewidth = py_thickness_scale(plt, series[:linewidth]),
|
linewidth = py_thickness_scale(plt, series[:linewidth]),
|
||||||
edgecolor = py_linecolor(series),
|
edgecolor = py_color(get_linecolor(series)),
|
||||||
extrakw...
|
extrakw...
|
||||||
)
|
)
|
||||||
push!(handles, handle)
|
push!(handles, handle)
|
||||||
@ -1320,7 +1315,7 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
|
|||||||
color = py_color(single_color(get_linecolor(series, clims)), get_linealpha(series)),
|
color = py_color(single_color(get_linecolor(series, clims)), get_linealpha(series)),
|
||||||
linewidth = py_thickness_scale(plt, clamp(get_linewidth(series), 0, 5)),
|
linewidth = py_thickness_scale(plt, clamp(get_linewidth(series), 0, 5)),
|
||||||
linestyle = py_linestyle(:path, get_linestyle(series)),
|
linestyle = py_linestyle(:path, get_linestyle(series)),
|
||||||
marker = py_marker(_cycle(series[:markershape], 1)),
|
marker = py_marker(_cycle(series[:markershape], 1)), # Need to adjust markersize to match the legend box size
|
||||||
markeredgecolor = py_color(single_color(get_markerstrokecolor(series)), get_markerstrokealpha(series)),
|
markeredgecolor = py_color(single_color(get_markerstrokecolor(series)), get_markerstrokealpha(series)),
|
||||||
markerfacecolor = py_color(single_color(get_markercolor(series, clims)), get_markeralpha(series))
|
markerfacecolor = py_color(single_color(get_markercolor(series, clims)), get_markeralpha(series))
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user