GR heatmap: warning for non-equal spacing
This commit is contained in:
parent
dc31cd7103
commit
1e3d10ad31
@ -719,7 +719,10 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
if st == :heatmap
|
if st == :heatmap
|
||||||
outside_ticks = true
|
outside_ticks = true
|
||||||
for ax in (sp[:xaxis], sp[:yaxis])
|
for ax in (sp[:xaxis], sp[:yaxis])
|
||||||
ax[:scale] != :identity && warn("GR: heatmap with $(ax[:scale]) scale not supported.")
|
v = series[ax[:letter]]
|
||||||
|
if diff(collect(extrema(diff(v)))) > 1e-6*std(v)
|
||||||
|
warn("GR: heatmap only supported with equally spaced data.")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
x, y = heatmap_edges(series[:x], sp[:xaxis][:scale]), heatmap_edges(series[:y], sp[:yaxis][:scale])
|
x, y = heatmap_edges(series[:x], sp[:xaxis][:scale]), heatmap_edges(series[:y], sp[:yaxis][:scale])
|
||||||
xy_lims = x[1], x[end], y[1], y[end]
|
xy_lims = x[1], x[end], y[1], y[end]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user