Skip to content

Commit ac07502

Browse files
committed
accept matrix input for the kw marker in scatter_gplot()
1 parent b58b3b6 commit ac07502

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/helpers.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ SCATTER\\_GPLOT!(X; ...) adds a plot to `current` one.
123123
function scatter_gplot(X; marker = nothing, ms = 4, plotOrder = :normal, c = :viridis)
124124
dim = size(X,2)
125125
if marker != nothing && plotOrder != :normal
126+
marker = marker[:] # reshape N x 1 matrix to a N-dim vector
126127
if plotOrder == :s2l
127128
idx = sortperm(marker)
128129
elseif plotOrder == :l2s
@@ -148,6 +149,7 @@ end
148149
function scatter_gplot!(X; marker = nothing, ms = 4, plotOrder = :normal, c = :viridis)
149150
dim = size(X,2)
150151
if marker != nothing && plotOrder != :normal
152+
marker = marker[:] # reshape N x 1 matrix to a N-dim vector
151153
if plotOrder == :s2l
152154
idx = sortperm(marker)
153155
elseif plotOrder == :l2s

0 commit comments

Comments
 (0)