diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index ecf0833a..c2b1ef51 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -233,10 +233,7 @@ end # function args args = if st == :contour opt[:x], opt[:y], opt[:z].surf' - elseif st == :heatmap || st == :surface - @show opt[:x] - @show opt[:y] - @show opt[:z] + elseif st in (:heatmap, :surface, :wireframe) surface_to_vecs(opt[:x], opt[:y], opt[:z]) elseif is3d(st) opt[:x], opt[:y], opt[:z] @@ -313,7 +310,9 @@ function pgfx_series_coordinates!(st_val::Val{:volume}, segment_opt, opt, args) return PGFPlotsX.Coordinates(args...) end function pgfx_series_coordinates!(st_val::Val{:wireframe}, segment_opt, opt, args) - push!( segment_opt, "mesh" => nothing ) + push!( segment_opt, "mesh" => nothing, + "mesh/rows" => length(opt[:x]) + ) return PGFPlotsX.Coordinates(args...) end function pgfx_series_coordinates!(st_val::Val{:shape}, segment_opt, opt, args) diff --git a/test/test_pgfplotsx.jl b/test/test_pgfplotsx.jl index b8f6b146..70f51a72 100644 --- a/test/test_pgfplotsx.jl +++ b/test/test_pgfplotsx.jl @@ -76,7 +76,7 @@ end histogram2d(randn(10000), randn(10000), nbins=20) # TODO: should work, when heatmaps works? end # testset - @testset "Heatmap" begin + @testset "Heatmap-like" begin xs = [string("x", i) for i = 1:10] ys = [string("y", i) for i = 1:4] z = float((1:4) * reshape(1:10, 1, :)) @@ -86,6 +86,9 @@ end @test Plots.pgfx_axes(pgfx_plot.o)[1]["colorbar"] === nothing @test Plots.pgfx_axes(pgfx_plot.o)[1]["colormap name"] == "plots1" end + + pgfx_plot = wireframe(xs, ys, z, aspect_ratio=1) + # TODO: clims are wrong end # testset @testset "Contours" begin x = 1:0.5:20