Skip to content

Commit 88a1492

Browse files
committed
shorten macro name for easier usage
1 parent 0af9ee5 commit 88a1492

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

plotters/src/style/colors/colormaps.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ macro_rules! implement_linear_interpolation_color_map {
245245
}
246246

247247
#[doc(inline)]
248-
pub use crate::define_linear_interpolation_color_map;
248+
pub use crate::def_linear_colormap;
249249

250250
#[macro_export]
251251
#[doc(hidden)]
@@ -256,7 +256,7 @@ pub use crate::define_linear_interpolation_color_map;
256256
///
257257
/// ```
258258
/// use plotters::prelude::*;
259-
/// define_linear_interpolation_color_map! {
259+
/// def_linear_colormap! {
260260
/// BlackWhite,
261261
/// RGBColor,
262262
/// "Simple chromatic colormap from black to white.",
@@ -269,7 +269,7 @@ pub use crate::define_linear_interpolation_color_map;
269269
///
270270
/// Hint: Some helper macros and functions have been deliberately hidden from end users.
271271
/// Look for them in the source code if you are interested.
272-
macro_rules! define_linear_interpolation_color_map{
272+
macro_rules! def_linear_colormap{
273273
($color_scale_name:ident, $color_type:ident, $doc:expr, $(($($color_value:expr),+)),*) => {
274274
#[doc = $doc]
275275
pub struct $color_scale_name;
@@ -294,7 +294,7 @@ macro_rules! define_linear_interpolation_color_map{
294294
}
295295
}
296296

297-
define_linear_interpolation_color_map! {
297+
def_linear_colormap! {
298298
ViridisRGBA,
299299
RGBAColor,
300300
"A colormap optimized for visually impaired people (RGBA format).
@@ -310,7 +310,7 @@ define_linear_interpolation_color_map! {
310310
(254, 232, 37, 1.0)
311311
}
312312

313-
define_linear_interpolation_color_map! {
313+
def_linear_colormap! {
314314
ViridisRGB,
315315
RGBColor,
316316
"A colormap optimized for visually impaired people (RGB Format).
@@ -326,23 +326,23 @@ define_linear_interpolation_color_map! {
326326
(254, 232, 37)
327327
}
328328

329-
define_linear_interpolation_color_map! {
329+
def_linear_colormap! {
330330
BlackWhite,
331331
RGBColor,
332332
"Simple chromatic colormap from black to white.",
333333
( 0, 0, 0),
334334
(255, 255, 255)
335335
}
336336

337-
define_linear_interpolation_color_map! {
337+
def_linear_colormap! {
338338
MandelbrotHSL,
339339
HSLColor,
340340
"Colormap created to replace the one used in the mandelbrot example.",
341341
(0.0, 1.0, 0.5),
342342
(1.0, 1.0, 0.5)
343343
}
344344

345-
define_linear_interpolation_color_map! {
345+
def_linear_colormap! {
346346
VulcanoHSL,
347347
HSLColor,
348348
"A vulcanic colormap that display red/orange and black colors",
@@ -351,7 +351,7 @@ define_linear_interpolation_color_map! {
351351
}
352352

353353
use super::full_palette::*;
354-
define_linear_interpolation_color_map! {
354+
def_linear_colormap! {
355355
Bone,
356356
RGBColor,
357357
"Dark colormap going from black over blue to white.",
@@ -360,7 +360,7 @@ define_linear_interpolation_color_map! {
360360
WHITE
361361
}
362362

363-
define_linear_interpolation_color_map! {
363+
def_linear_colormap! {
364364
Copper,
365365
RGBColor,
366366
"Friendly black to brown colormap.",

0 commit comments

Comments
 (0)