Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use concrete number of grid regions #9

Merged
merged 3 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GridVisualizeTools"
uuid = "5573ae12-3b76-41d9-b48c-81d0b6e61cc5"
authors = ["Jürgen Fuhrmann <[email protected]>"]
version = "1.1.1"
version = "2.0.0"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand Down
12 changes: 4 additions & 8 deletions src/colors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ RGB{Float64}(0.85, 0.6, 0.6)

"""
function region_cmap(n)
ColorSchemes.distinguishable_colors(max(5, n),
[Colors.RGB{Float64}(0.85, 0.6, 0.6),
Colors.RGB{Float64}(0.6, 0.85, 0.6),
Colors.RGB{Float64}(0.6, 0.6, 0.85)];
ColorSchemes.distinguishable_colors(n,
[Colors.RGB(0.85, 0.6, 0.6), Colors.RGB(0.6, 0.85, 0.6), Colors.RGB(0.6, 0.6, 0.85)];
lchoices = range(70; stop = 80, length = 5),
cchoices = range(25; stop = 65, length = 15),
hchoices = range(20; stop = 360, length = 15))
Expand All @@ -40,10 +38,8 @@ RGB{Float64}(1.0, 0.0, 0.0)

"""
function bregion_cmap(n)
ColorSchemes.distinguishable_colors(max(5, n),
[Colors.RGB{Float64}(1.0, 0.0, 0.0),
Colors.RGB{Float64}(0.0, 1.0, 0.0),
Colors.RGB{Float64}(0.0, 0.0, 1.0)];
ColorSchemes.distinguishable_colors(n,
[Colors.RGB(1.0, 0.0, 0.0), Colors.RGB(0.0, 1.0, 0.0), Colors.RGB(0.0, 0.0, 1.0)];
lchoices = range(50; stop = 75, length = 10),
cchoices = range(75; stop = 100, length = 10),
hchoices = range(20; stop = 360, length = 30))
Expand Down
Loading