From 86c26085b3f30994e4bf20a783c1a130c5f62fcf Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Thu, 15 Oct 2020 09:01:12 +0200 Subject: [PATCH 1/3] fix polar heatmap on GR --- src/backends/gr.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index 4bd87ce6..5e1c6785 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -1493,7 +1493,7 @@ function gr_add_series(sp, series) frng = series[:fillrange] # recompute data - if ispolar(sp) + if ispolar(sp) && z === nothing rmin, rmax = axis_limits(sp, :y) if frng !== nothing _, frng = convert_to_polar(x, frng, (rmin, rmax)) @@ -1733,7 +1733,7 @@ function gr_draw_heatmap(series, x, y, z, clims) else phimin, phimax = 0.0, 360.0 # nonuniform polar array is not yet supported in GR.jl nx, ny = length(series[:x]), length(series[:y]) - xmin, xmax, ymin, ymax = gr_xy_axislims(sp) + xmin, xmax, ymin, ymax = gr_xy_axislims(series[:subplot]) GR.setwindow(-ymax, ymax, -ymax, ymax) if ymin > 0 @warn "'ymin[1] > 0' (rmin) is not yet supported." From 3d2f7571a090be0250f3f797f6475355f53a7733 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Thu, 15 Oct 2020 09:06:41 +0200 Subject: [PATCH 2/3] add polar heatmap example --- src/examples.jl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/examples.jl b/src/examples.jl index e7ca2640..1b44c11b 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -1040,15 +1040,23 @@ const _examples = PlotExample[ ) end] ), + PlotExample( # 49 + "Polar heatmaps", + "", + [quote + z = (1:4) .+ (1:8)' + heatmap(z, projection = :polar) + end] + ), ] # Some constants for PlotDocs and PlotReferenceImages _animation_examples = [2, 31] _backend_skips = Dict( :gr => [25, 30, 47], - :pyplot => [2, 25, 30, 31, 47], - :plotlyjs => [2, 21, 24, 25, 30, 31], - :plotly => [2, 21, 24, 25, 30, 31], + :pyplot => [2, 25, 30, 31, 47, 49], + :plotlyjs => [2, 21, 24, 25, 30, 31, 49], + :plotly => [2, 21, 24, 25, 30, 31, 49], :pgfplots => [2, 5, 6, 10, 16, 20, 22, 23, 25, 28, 30, 31, 34, 37, 38, 39, 47], :pgfplotsx => [ 2, # animation @@ -1058,7 +1066,8 @@ _backend_skips = Dict( 30, # @df 31, # animation 32, # spy - 47, # mesh3 + 47, # mesh3 + 49, # polar heatmap ], ) From 60dcfa9a909ea7ea0536d2b1be774272e564d8da Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Thu, 15 Oct 2020 09:32:20 +0200 Subject: [PATCH 3/3] up version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index b9060268..e6dca89b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Plots" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" author = ["Tom Breloff (@tbreloff)"] -version = "1.6.11" +version = "1.6.12" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"