Skip to content

Commit 37db20f

Browse files
committed
more user-friendly error msg in scatter_gplot()
1 parent 29803b1 commit 37db20f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/helpers.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function scatter_gplot(X; marker = nothing, ms = 4, plotOrder = :normal, c = :vi
126126
if size(marker) == (N,) || size(marker) == (N, 1)
127127
marker = marker[:] # reshape N x 1 matrix to a vector of length N
128128
else
129-
error("marker only accepts a vector of length N or an N x 1 matrix, where N is the total number of points.")
129+
error("marker only accepts a vector of length $(N) or an $(N) x 1 matrix.")
130130
end
131131
if plotOrder == :normal
132132
idx = 1:N
@@ -162,7 +162,7 @@ function scatter_gplot!(X; marker = nothing, ms = 4, plotOrder = :normal, c = :v
162162
if size(marker) == (N,) || size(marker) == (N, 1)
163163
marker = marker[:] # reshape N x 1 matrix to a vector of length N
164164
else
165-
error("marker only accepts a vector of length N or an N x 1 matrix, where N is the total number of points.")
165+
error("marker only accepts a vector of length $(N) or an $(N) x 1 matrix.")
166166
end
167167
if plotOrder == :normal
168168
idx = 1:N

0 commit comments

Comments
 (0)