Skip to content

Commit

Permalink
Add blues palette.
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorySchwartz committed Jun 24, 2020
1 parent 1807417 commit cc3b66b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion birch-beer.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: birch-beer
version: 0.3.0.0
version: 0.3.1.0
synopsis: Plot a colorful tree.
description: Generate a tree for displaying a hierarchy of groups with colors, scaling, and more.
homepage: http://github.com/GregorySchwartz/birch-beer#readme
Expand Down
5 changes: 5 additions & 0 deletions src/BirchBeer/ColorMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ getLabelColorMap Set1 (LabelMap lm) =
where
colors = interpColors (Set.size labels) $ Brewer.brewerSet Brewer.Set1 9
labels = Set.fromList . Map.elems $ lm
getLabelColorMap Blues (LabelMap lm) =
LabelColorMap . Map.fromList . flip zip colors . Set.toAscList $ labels
where
colors = interpColors (Set.size labels) $ Brewer.brewerSet Brewer.Blues 9
labels = Set.fromList . Map.elems $ lm
getLabelColorMap Ryb (LabelMap lm) =
LabelColorMap . Map.fromList . flip zip colors . Set.toAscList $ labels
where
Expand Down
2 changes: 1 addition & 1 deletion src/BirchBeer/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ data DrawLeaf = DrawItem DrawItemType | DrawText deriving (Read, Show)
data DrawCollection = CollectionGraph Double Double [Int] | PieRing | PieChart | NoLeaf | Histogram | IndividualItems deriving (Read, Show)
data DrawNodeMark = MarkModularity | MarkSignificance | MarkNone deriving (Read, Show)

data Palette = Set1 | Ryb | Hsv | Hcl deriving (Read, Show)
data Palette = Set1 | Blues | Ryb | Hsv | Hcl deriving (Read, Show)
data DrawDiscretize = CustomColorMap [Kolor] | SegmentColorMap Int
deriving (Read, Show)

Expand Down

0 comments on commit cc3b66b

Please sign in to comment.