You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ext/SparseMatrixColoringsColorsExt.jl
+12-13Lines changed: 12 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -37,13 +37,13 @@ const DEFAULT_PAD = 0
37
37
38
38
function SparseMatrixColorings.show_colors(
39
39
res::AbstractColoringResult;
40
-
colorscheme=nothing,
41
-
background_color::Colorant=DEFAULT_BACKGROUND_COLOR, # color used for zero matrix entries and pad
42
-
border_color::Colorant=DEFAULT_BORDER_COLOR, # color used for zero matrix entries and pad
43
-
scale::Int=DEFAULT_SCALE, # scale size of matrix entries to `scale × scale` pixels
44
-
border::Int=DEFAULT_BORDER, # border around matrix entries
45
-
pad::Int=DEFAULT_PAD, # pad between matrix entries
46
-
warn::Bool=true,
40
+
colorscheme=nothing,
41
+
background_color::Colorant=DEFAULT_BACKGROUND_COLOR, # color used for zero matrix entries and pad
42
+
border_color::Colorant=DEFAULT_BORDER_COLOR, # color used for zero matrix entries and pad
43
+
scale::Int=DEFAULT_SCALE, # scale size of matrix entries to `scale × scale` pixels
44
+
border::Int=DEFAULT_BORDER, # border around matrix entries
45
+
pad::Int=DEFAULT_PAD, # pad between matrix entries
46
+
warn::Bool=true,
47
47
)
48
48
scale <1&&throw(ArgumentError("`scale` has to be ≥ 1."))
49
49
border <0&&throw(ArgumentError("`border` has to be ≥ 0."))
@@ -53,15 +53,14 @@ function SparseMatrixColorings.show_colors(
53
53
if warn &&ncolors(res) >length(colorscheme)
54
54
@warn"`show_colors` will reuse colors since the provided `colorscheme` has $(length(colorscheme)) colors and the matrix needs $(ncolors(res)). You can turn off this warning via the keyword argument `warn = false`, or choose a larger `colorscheme` from ColorSchemes.jl."
0 commit comments