Merge pull request #1737 from ma-laforge/inspectdr
Re-establish support for alpha on markers (InspectDR).
This commit is contained in:
commit
5d0740c0e5
@ -22,6 +22,7 @@ const _inspectdr_attr = merge_with_base_supported([
|
|||||||
:foreground_color_legend, :foreground_color_title,
|
:foreground_color_legend, :foreground_color_title,
|
||||||
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
:foreground_color_axis, :foreground_color_border, :foreground_color_guide, :foreground_color_text,
|
||||||
:label,
|
:label,
|
||||||
|
:seriescolor, :seriesalpha,
|
||||||
:linecolor, :linestyle, :linewidth, :linealpha,
|
:linecolor, :linestyle, :linewidth, :linealpha,
|
||||||
:markershape, :markercolor, :markersize, :markeralpha,
|
:markershape, :markercolor, :markersize, :markeralpha,
|
||||||
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
:markerstrokewidth, :markerstrokecolor, :markerstrokealpha,
|
||||||
@ -35,7 +36,8 @@ const _inspectdr_attr = merge_with_base_supported([
|
|||||||
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
:legendfontfamily, :legendfontsize, :legendfontcolor,
|
||||||
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
:tickfontfamily, :tickfontsize, :tickfontcolor,
|
||||||
:guidefontfamily, :guidefontsize, :guidefontcolor,
|
:guidefontfamily, :guidefontsize, :guidefontcolor,
|
||||||
:grid, :legend, #:colorbar,
|
:grid, #:gridalpha, :gridstyle, :gridlinewidth, #alhpa & linewidth are per plot - not per subplot
|
||||||
|
:legend, #:legendtitle, :colorbar,
|
||||||
# :marker_z,
|
# :marker_z,
|
||||||
# :line_z,
|
# :line_z,
|
||||||
# :levels,
|
# :levels,
|
||||||
@ -260,8 +262,10 @@ For st in :shape:
|
|||||||
nmax = i
|
nmax = i
|
||||||
if length(rng) > 1
|
if length(rng) > 1
|
||||||
linewidth = series[:linewidth]
|
linewidth = series[:linewidth]
|
||||||
linecolor = _inspectdr_mapcolor(_cycle(series[:linecolor], i))
|
c = plot_color(get_linecolor(series), get_linealpha(series))
|
||||||
fillcolor = _inspectdr_mapcolor(_cycle(series[:fillcolor], i))
|
linecolor = _inspectdr_mapcolor(_cycle(c, i))
|
||||||
|
c = plot_color(get_fillcolor(series), get_fillalpha(series))
|
||||||
|
fillcolor = _inspectdr_mapcolor(_cycle(c, i))
|
||||||
line = InspectDR.line(
|
line = InspectDR.line(
|
||||||
style=:solid, width=linewidth, color=linecolor
|
style=:solid, width=linewidth, color=linecolor
|
||||||
)
|
)
|
||||||
@ -275,8 +279,10 @@ For st in :shape:
|
|||||||
i = (nmax >= 2 ? div(nmax, 2) : nmax) #Must pick one set of colors for legend
|
i = (nmax >= 2 ? div(nmax, 2) : nmax) #Must pick one set of colors for legend
|
||||||
if i > 1 #Add dummy waveform for legend entry:
|
if i > 1 #Add dummy waveform for legend entry:
|
||||||
linewidth = series[:linewidth]
|
linewidth = series[:linewidth]
|
||||||
linecolor = _inspectdr_mapcolor(_cycle(series[:linecolor], i))
|
c = plot_color(get_linecolor(series), get_linealpha(series))
|
||||||
fillcolor = _inspectdr_mapcolor(_cycle(series[:fillcolor], i))
|
linecolor = _inspectdr_mapcolor(_cycle(c, i))
|
||||||
|
c = plot_color(get_fillcolor(series), get_fillalpha(series))
|
||||||
|
fillcolor = _inspectdr_mapcolor(_cycle(c, i))
|
||||||
wfrm = InspectDR.add(plot, Float64[], Float64[], id=series[:label])
|
wfrm = InspectDR.add(plot, Float64[], Float64[], id=series[:label])
|
||||||
wfrm.line = InspectDR.line(
|
wfrm.line = InspectDR.line(
|
||||||
style=:none, width=linewidth, #linewidth affects glyph
|
style=:none, width=linewidth, #linewidth affects glyph
|
||||||
@ -295,7 +301,7 @@ For st in :shape:
|
|||||||
wfrm.line = InspectDR.line(
|
wfrm.line = InspectDR.line(
|
||||||
style = _style,
|
style = _style,
|
||||||
width = series[:linewidth],
|
width = series[:linewidth],
|
||||||
color = series[:linecolor],
|
color = plot_color(get_linecolor(series), get_linealpha(series)),
|
||||||
)
|
)
|
||||||
#InspectDR does not control markerstrokewidth independently.
|
#InspectDR does not control markerstrokewidth independently.
|
||||||
if :none == _style
|
if :none == _style
|
||||||
@ -305,8 +311,8 @@ For st in :shape:
|
|||||||
wfrm.glyph = InspectDR.glyph(
|
wfrm.glyph = InspectDR.glyph(
|
||||||
shape = _inspectdr_mapglyph(series[:markershape]),
|
shape = _inspectdr_mapglyph(series[:markershape]),
|
||||||
size = _inspectdr_mapglyphsize(series[:markersize]),
|
size = _inspectdr_mapglyphsize(series[:markersize]),
|
||||||
color = _inspectdr_mapcolor(series[:markerstrokecolor]),
|
color = _inspectdr_mapcolor(plot_color(series[:markerstrokecolor], series[:markerstrokealpha])),
|
||||||
fillcolor = _inspectdr_mapcolor(series[:markercolor]),
|
fillcolor = _inspectdr_mapcolor(plot_color(series[:markercolor], series[:markeralpha])),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user