Skip to content

Commit 433cc28

Browse files
committed
Fix regression in vlines()
1 parent 5794eb2 commit 433cc28

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/plot.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,12 @@ function helper_vhlines(arg1, vert::Bool, first::Bool, xymin, xymax, percent, d)
15341534
!isnan(xymin) && (xy[1] = !percent ? xymin : xy[1] + (xy[2]-xy[1]) * xymin)
15351535
!isnan(xymax) && (xy[2] = !percent ? xymax : xy[1] + (xy[2]-xy[1]) * xymax)
15361536
D::GMTdataset = mat2ds(mat, x=xy, multi=true, nanseg=true)[1]
1537-
vert && (d[:yx] = true) # Because we need to swapp x / y columns in the vlines case
1537+
#vert && (d[:yx] = true) # Because we need to swapp x / y columns in the vlines case
1538+
if (vert)
1539+
for k = 1:size(D,1)
1540+
D.data[k,1], D.data[k,2] = D.data[k,2], D.data[k,1]
1541+
end
1542+
end
15381543
delete!(d, [[:xmin], [:xmax], [:ymin], [:ymax]])
15391544

15401545
common_plot_xyz("", D, "lines", first, false, d)

0 commit comments

Comments
 (0)