Merge pull request #2296 from BeastyBlacksmith/pgfplotsx-heatmap

fix pgfplotsx heatmap
This commit is contained in:
Daniel Schwabeneder 2019-12-03 14:04:23 +01:00 committed by GitHub
commit bf60d6482f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,6 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
push!(axis_opt, push!(axis_opt,
"colorbar" => nothing, "colorbar" => nothing,
"colormap name" => "plots$(sp.attr[:subplot_index])", "colormap name" => "plots$(sp.attr[:subplot_index])",
"colormap access" => "direct",
) )
# goto is needed to break out of col and series for # goto is needed to break out of col and series for
@goto colorbar_end @goto colorbar_end
@ -201,7 +200,6 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
if st == :heatmap if st == :heatmap
push!(axis.options, push!(axis.options,
"view" => "{0}{90}", "view" => "{0}{90}",
"shader" => "flat corner",
) )
end end
# treat segments # treat segments
@ -347,7 +345,7 @@ function pgfx_series_coordinates!(st_val::Union{Val{:scatter}, Val{:scatter3d}},
end end
function pgfx_series_coordinates!(st_val::Val{:heatmap}, segment_opt, opt, args) function pgfx_series_coordinates!(st_val::Val{:heatmap}, segment_opt, opt, args)
push!(segment_opt, push!(segment_opt,
"surf" => nothing, "matrix plot*" => nothing,
"mesh/rows" => length(opt[:x]), "mesh/rows" => length(opt[:x]),
"mesh/cols" => length(opt[:y]), "mesh/cols" => length(opt[:y]),
) )