Skip to content

Commit 8460034

Browse files
committed
Add support for multiple polar axis draws in polarheatmap and polar methods
1 parent c14e08d commit 8460034

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/gr/plot.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,7 @@ def plot_data(_figure = true)
886886
GR.setfillintstyle(GR::INTSTYLE_HOLLOW)
887887
GR.fillarc(-ρ[i], ρ[i], -ρ[i], ρ[i], θ[i - 1], θ[i])
888888
end
889+
draw_polar_axes(2)
889890

890891
when :polarheatmap, :nonuniformpolarheatmap
891892
w, h = z.shape
@@ -905,7 +906,8 @@ def plot_data(_figure = true)
905906
θ = x.map { |i| i * 180 / Math::PI }
906907
GR.nonuniformpolarcellarray(θ, ρ, w, h, colors)
907908
end
908-
draw_polar_axes
909+
draw_polar_axes(1)
910+
draw_polar_axes(2)
909911
kvs[:zrange] = [cmin, cmax]
910912
colorbar
911913

@@ -1048,6 +1050,7 @@ def plot_data(_figure = true)
10481050
when :polar
10491051
GR.uselinespec(spec)
10501052
plot_polar(x, y)
1053+
draw_polar_axes(2)
10511054

10521055
when :trisurf
10531056
GR.trisurface(x, y, z)

0 commit comments

Comments
 (0)