pyplot: marker size scales correctly
This commit is contained in:
parent
f4ad9ece77
commit
fbd8c6ef25
@ -539,7 +539,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
label = series[:label],
|
||||
zorder = series[:series_plotindex] + 0.5,
|
||||
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 = py_color(get_markercolor(series, i), get_markercoloralpha(series, i)),
|
||||
edgecolors = msc,
|
||||
linewidths = lw,
|
||||
@ -570,7 +570,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
push!(cur_y_list, _cycle(y,i))
|
||||
|
||||
push!(cur_color_list, _cycle(markercolor, i))
|
||||
push!(cur_scale_list, py_thickness_scale(plt, _cycle(series[:markersize],i) .^ 2))
|
||||
push!(cur_scale_list, py_thickness_scale(plt, _cycle(series[:markersize],i)).^ 2)
|
||||
|
||||
continue
|
||||
end
|
||||
@ -580,7 +580,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
zorder = series[:series_plotindex] + 0.5,
|
||||
marker = prev_marker,
|
||||
s = cur_scale_list,
|
||||
edgecolors = py_color(get_markerstrokecolor(series), get_markerstrokealpha(series)), # Do we need include i?
|
||||
edgecolors = py_color(get_markerstrokecolor(series), get_markerstrokealpha(series)),
|
||||
linewidths = py_thickness_scale(plt, series[:markerstrokewidth]),
|
||||
facecolors = cur_color_list,
|
||||
extrakw...
|
||||
@ -590,7 +590,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
cur_y_list = [_cycle(y,i)]
|
||||
|
||||
cur_color_list = [_cycle(markercolor, i)]
|
||||
cur_scale_list = [py_thickness_scale(plt, _cycle(series[:markersize],i) .^ 2)]
|
||||
cur_scale_list = [py_thickness_scale(plt, _cycle(series[:markersize],i)) .^ 2]
|
||||
|
||||
prev_marker = cur_marker
|
||||
end
|
||||
@ -615,7 +615,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
label = series[:label],
|
||||
zorder = series[:series_plotindex] + 0.5,
|
||||
marker = py_marker(series[:markershape]),
|
||||
s = py_thickness_scale(plt, series[:markersize] .^ 2),
|
||||
s = py_thickness_scale(plt, series[:markersize]) .^2,
|
||||
edgecolors = py_color(get_markerstrokecolor(series), get_markerstrokealpha(series)),
|
||||
linewidths = py_thickness_scale(plt, series[:markerstrokewidth]),
|
||||
extrakw...
|
||||
@ -1320,10 +1320,10 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
|
||||
linewidth = py_thickness_scale(plt, clamp(get_linewidth(series), 0, 5)),
|
||||
linestyle = py_linestyle(:path, get_linestyle(series)),
|
||||
marker = py_marker(_cycle(series[:markershape], 1)),
|
||||
markersize = py_thickness_scale(plt, 6), # 6 looks same the default
|
||||
markersize = py_thickness_scale(plt, 6), # 6 looks same the default, do not put ^2
|
||||
markeredgecolor = py_color(single_color(get_markerstrokecolor(series)), get_markerstrokealpha(series)),
|
||||
markerfacecolor = py_color(single_color(get_markercolor(series, clims)), get_markeralpha(series)),
|
||||
markeredgewidth = py_thickness_scale(plt, 1)
|
||||
markeredgewidth = py_thickness_scale(plt, 1.1) # scales better
|
||||
)
|
||||
else
|
||||
series[:serieshandle][1]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user