Skip to content

Commit 1237dc9

Browse files
committed
create new feature for colormaps and include in defeault features
1 parent 8a58df3 commit 1237dc9

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

plotters/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ default = [
7070
"ttf",
7171
"image",
7272
"deprecated_items", "all_series", "all_elements",
73-
"full_palette"
73+
"full_palette",
74+
"colormaps"
7475
]
7576
all_series = ["area_series", "line_series", "point_series", "surface_series"]
7677
all_elements = ["errorbar", "candlestick", "boxplot", "histogram"]
@@ -83,6 +84,7 @@ svg_backend = ["plotters-svg"]
8384

8485
# Colors
8586
full_palette = []
87+
colormaps = []
8688

8789
# Elements
8890
errorbar = []

plotters/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,9 @@ pub mod prelude {
852852
#[cfg(feature = "full_palette")]
853853
pub use crate::style::full_palette;
854854

855+
#[cfg(feature = "colormaps")]
856+
pub use crate::style::colors::colormaps::*;
857+
855858
pub use crate::style::{
856859
AsRelative, Color, FontDesc, FontFamily, FontStyle, FontTransform, HSLColor, IntoFont,
857860
IntoTextStyle, Palette, Palette100, Palette99, Palette9999, PaletteColor, RGBAColor,

plotters/src/style/colors/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,5 @@ define_color!(TRANSPARENT, 0, 0, 0, 0.0, "Transparent");
5858

5959
#[cfg(feature = "full_palette")]
6060
pub mod full_palette;
61+
#[cfg(feature = "colormaps")]
62+
pub mod colormaps;

0 commit comments

Comments
 (0)