Merge pull request #2364 from yha/heatmap-fillcolor
Fix heatmap with non-gradient fillcolor
This commit is contained in:
commit
73ff286162
@ -1685,7 +1685,8 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
# pdf output, and also supports alpha values.
|
# pdf output, and also supports alpha values.
|
||||||
# Note that drawimage draws uniformly spaced data correctly
|
# Note that drawimage draws uniformly spaced data correctly
|
||||||
# even on log scales, where it is visually non-uniform.
|
# even on log scales, where it is visually non-uniform.
|
||||||
colors = plot_color.(series[:fillcolor][z_normalized], series[:fillalpha])
|
fillgrad = _as_gradient(series[:fillcolor])
|
||||||
|
colors = plot_color.(fillgrad[z_normalized], series[:fillalpha])
|
||||||
colors[isnan.(z_normalized)] .= RGBA(0,0,0,0)
|
colors[isnan.(z_normalized)] .= RGBA(0,0,0,0)
|
||||||
rgba = gr_color.(colors)
|
rgba = gr_color.(colors)
|
||||||
GR.drawimage(first(x), last(x), last(y), first(y), w, h, rgba)
|
GR.drawimage(first(x), last(x), last(y), first(y), w, h, rgba)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user