Skip to content

Commit 31125f2

Browse files
authored
GR: Fix zscale support in surface plots (#5063)
Previously, `zscale` was being set to a Bool value (the result of the set membership check). This caused a crash when querying the `gr_z_log_scales` tuple on the next line, because that array is indexed by symbols like :log10. Given that the lines above assign the actual symbols to `xscale` and `yscale`, it seems likely that `zscale` should behave the same. Fixes: #5062
1 parent 5242256 commit 31125f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backends/gr.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ gr_set_window(sp, vp) =
13701370
if (yscale = sp[:yaxis][:scale]) _logScales
13711371
scaleop |= gr_y_log_scales[yscale]
13721372
end
1373-
if needs_3d && (zscale = sp[:zaxis][:scale] _logScales)
1373+
if needs_3d && ((zscale = sp[:zaxis][:scale]) _logScales)
13741374
scaleop |= gr_z_log_scales[zscale]
13751375
end
13761376
sp[:xaxis][:flip] && (scaleop |= GR.OPTION_FLIP_X)

0 commit comments

Comments
 (0)