From ef3180e451970ef14b4fac985d60608ca791a14e Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sat, 9 Nov 2024 03:37:11 +0000 Subject: [PATCH] build based on 39a7a54 --- dev/.documenter-siteinfo.json | 2 +- dev/basics/index.html | 12 ++++++------ dev/catalogue/index.html | 2 +- dev/finding/index.html | 4 ++-- dev/functionindex/index.html | 2 +- dev/goodpractice/index.html | 2 +- dev/images/index.html | 2 +- dev/index.html | 2 +- dev/plotting/index.html | 2 +- dev/references/index.html | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 0b70c19..2657be3 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-09T03:18:40","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-09T03:36:52","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/basics/index.html b/dev/basics/index.html index 4fec5e4..c0d8150 100644 --- a/dev/basics/index.html +++ b/dev/basics/index.html @@ -174,7 +174,7 @@ botticelli (notes) palette from artist Sandro Bot... - ...found 6 results for "ice"

To read the notes of a built-in colorscheme cscheme:

colorschemes[:cscheme].notes
source

If you prefer, you can ‘roll your own’ search.

[k for (k, v) in ColorSchemes.colorschemes if occursin(r"colorbrew"i, v.category)]
+ ...found 6 results for "ice"

To read the notes of a built-in colorscheme cscheme:

colorschemes[:cscheme].notes
source

If you prefer, you can ‘roll your own’ search.

[k for (k, v) in ColorSchemes.colorschemes if occursin(r"colorbrew"i, v.category)]
 265-element Array{Symbol,1}:
  :BuPu_6
  :Spectral_4
@@ -572,12 +572,12 @@
      width="180mm" height="25mm" viewBox="0 0 9 1" stroke="none"
      preserveAspectRatio="none" shape-rendering="crispEdges">
 
-    
         
     
 
-
+
 
 
 
@@ -603,12 +603,12 @@
      width="180mm" height="25mm" viewBox="0 0 30 1" stroke="none"
      preserveAspectRatio="none" shape-rendering="crispEdges">
 
-    
         
     
 
-
+
 
 
 
@@ -722,4 +722,4 @@
 	gray         not currently in stock
 perceptuallyuniformsequential 4
 diverging    12
-miscellaneous 17
+miscellaneous 17 diff --git a/dev/catalogue/index.html b/dev/catalogue/index.html index 63b3082..34e3d15 100644 --- a/dev/catalogue/index.html +++ b/dev/catalogue/index.html @@ -100494,4 +100494,4 @@

« IntroductionBasic usage »
+ diff --git a/dev/finding/index.html b/dev/finding/index.html index f7a92e5..5a2d61e 100644 --- a/dev/finding/index.html +++ b/dev/finding/index.html @@ -8,7 +8,7 @@ julia> cs = ColorScheme(range(Colors.RGB(0,0,0), stop=Colors.RGB(1,1,1), length=5)) julia> getinverse(cs, cs[3]) -0.5source

Example of using getinverse()

One example use for getinverse() is to convert a heatmap image into an Array of continuous values, e.g. temperature.

In this example, we will convert a heatmap image representing temperature into an array of elevation values. The image represents global temperature anomalies averaged from 2008 through 2012, with blue as -2°C and Red as +2°C. Higher than normal temperatures are shown in red (red is +2°C) and lower than normal temperatures are shown in blue (blue is -2°C). The global surface temperature in 2012 was +0.55°C.

NASA archive source.

using Images, FileIO, Downloads, ColorSchemes
+0.5
source

Example of using getinverse()

One example use for getinverse() is to convert a heatmap image into an Array of continuous values, e.g. temperature.

In this example, we will convert a heatmap image representing temperature into an array of elevation values. The image represents global temperature anomalies averaged from 2008 through 2012, with blue as -2°C and Red as +2°C. Higher than normal temperatures are shown in red (red is +2°C) and lower than normal temperatures are shown in blue (blue is -2°C). The global surface temperature in 2012 was +0.55°C.

NASA archive source.

using Images, FileIO, Downloads, ColorSchemes
 img = Downloads.download("https://www.giss.nasa.gov/research/news/archive/20130115/719282main_2008_2012_printdata.1462.jpg") |> load
 img = imresize(img, Tuple(Int(x) for x in size(img) .* 0.2));
 display(img)

"heatmap 1"

temps = [getinverse(ColorSchemes.temperaturemap, pixel) for pixel in img]
@@ -53,4 +53,4 @@
     label("largest positive anomaly", :E, maxpt, offset=20)
     circle(minpt, 5, :fill)
     label("largest negative anomaly", :E, minpt, offset=20)
-end 800 460

"heatmap min and max"

We can display the array of continuous values as a grayscale image, where black is 0.0 and white is 1.0.

Gray.(temps)

"heatmap 2 grey"

+end 800 460

"heatmap min and max"

We can display the array of continuous values as a grayscale image, where black is 0.0 and white is 1.0.

Gray.(temps)

"heatmap 2 grey"

diff --git a/dev/functionindex/index.html b/dev/functionindex/index.html index b1dec1d..8f9a088 100644 --- a/dev/functionindex/index.html +++ b/dev/functionindex/index.html @@ -1,2 +1,2 @@ -Functions · ColorSchemes
+Functions · ColorSchemes
diff --git a/dev/goodpractice/index.html b/dev/goodpractice/index.html index 9b923a0..f16fad0 100644 --- a/dev/goodpractice/index.html +++ b/dev/goodpractice/index.html @@ -1,2 +1,2 @@ -Good practice · ColorSchemes

Good practice

There are hundreds of colorschemes in this package, and they're useful for many different purposes. However, if you're intending to use a colorscheme for communicating features of a scientific dataset, you should choose it with care.

Perceptual uniformity

You should choose a perceptually uniform colorscheme: a set of colors arranged so that equal steps in data are perceived by the viewer as equal steps in the color space.

Researchers[Kovesi][ZhouHansen] have found that the human brain perceives changes in the lightness parameter as changes in the data much better than, for example, changes in hue. So sequential colorschemes with monotonically increasing lightness values will be better interpreted by the viewer.

The Lab color space represents a color with three components: Lightness, RedGreen, and YellowBlue. The Lightness parameter can be used to indicate how uniform the colors will be perceived by viewers.

In the following diagrams, the Lightness Lab component of each color step is plotted in y as x moves through the colorscheme. You can see how the lightness increases evenly in the recommended schemes.

Sequential

Good choices include viridis, inferno, plasma, magma:

Example block outputExample block output

ColorCET schemes (findcolorscheme("colorcet") will return the very long names to save you typing them):

Example block output

Fabio Crameri's Scientific colorschemes:

Example block outputExample block output

Diverging

For diverging colorschemes, the lightness values of the extremes should be broadly equivalent. As well as the diverging- ColorCET colorschemes, there are suitable schemes in Scientific, ColorBrewer, and others.

Example block outputExample block outputExample block output

Less suitable for data visualization

Colorschemes with rapid changes in lightness are less suitable, because the viewer's interpretation of a region of data might be influenced by the coloring, rather than by the data values.

Example block outputExample block outputExample block output

References

  • KovesiGood Colour Maps: How to Design Them | Peter Kovesi | arXiv:1509.03700 [cs.GR] | https://doi.org/10.48550/arXiv.1509.03700
  • ZhouHansenA Survey of Colormaps in Visualization | Liang Zhou, Charles D Hansen | https://pubmed.ncbi.nlm.nih.gov/26513793/
+Good practice · ColorSchemes

Good practice

There are hundreds of colorschemes in this package, and they're useful for many different purposes. However, if you're intending to use a colorscheme for communicating features of a scientific dataset, you should choose it with care.

Perceptual uniformity

You should choose a perceptually uniform colorscheme: a set of colors arranged so that equal steps in data are perceived by the viewer as equal steps in the color space.

Researchers[Kovesi][ZhouHansen] have found that the human brain perceives changes in the lightness parameter as changes in the data much better than, for example, changes in hue. So sequential colorschemes with monotonically increasing lightness values will be better interpreted by the viewer.

The Lab color space represents a color with three components: Lightness, RedGreen, and YellowBlue. The Lightness parameter can be used to indicate how uniform the colors will be perceived by viewers.

In the following diagrams, the Lightness Lab component of each color step is plotted in y as x moves through the colorscheme. You can see how the lightness increases evenly in the recommended schemes.

Sequential

Good choices include viridis, inferno, plasma, magma:

Example block outputExample block output

ColorCET schemes (findcolorscheme("colorcet") will return the very long names to save you typing them):

Example block output

Fabio Crameri's Scientific colorschemes:

Example block outputExample block output

Diverging

For diverging colorschemes, the lightness values of the extremes should be broadly equivalent. As well as the diverging- ColorCET colorschemes, there are suitable schemes in Scientific, ColorBrewer, and others.

Example block outputExample block outputExample block output

Less suitable for data visualization

Colorschemes with rapid changes in lightness are less suitable, because the viewer's interpretation of a region of data might be influenced by the coloring, rather than by the data values.

Example block outputExample block outputExample block output

References

  • KovesiGood Colour Maps: How to Design Them | Peter Kovesi | arXiv:1509.03700 [cs.GR] | https://doi.org/10.48550/arXiv.1509.03700
  • ZhouHansenA Survey of Colormaps in Visualization | Liang Zhou, Charles D Hansen | https://pubmed.ncbi.nlm.nih.gov/26513793/
diff --git a/dev/images/index.html b/dev/images/index.html index 5b487d2..b1da389 100644 --- a/dev/images/index.html +++ b/dev/images/index.html @@ -31,4 +31,4 @@ save(filename, imOutput) end -draw(-0.4 + 0.6im, 1200) +draw(-0.4 + 0.6im, 1200) diff --git a/dev/index.html b/dev/index.html index 60e07ef..bee5763 100644 --- a/dev/index.html +++ b/dev/index.html @@ -40,4 +40,4 @@ )

The new name - here mynewcolorscheme - should be a valid Julia variable name.

3 If you're adding the new colorscheme to an existing category, it will appear in the catalog document automatically.

4 Otherwise, to add a new category to the catalog (which will add all the colorschemes in that category), add this code to catalogue.md:

    ```@example catalog
     using Luxor, ColorSchemes # hide
     ColorSchemeCategory("category for my new scheme") # hide
-    ```

5 If there's a license file, add it to data/ as well.

Documentation

This documentation was built using Documenter.jl.

Documentation built 2024-11-09T03:18:34.592 with Julia 1.11.1
+ ```

5 If there's a license file, add it to data/ as well.

Documentation

This documentation was built using Documenter.jl.

Documentation built 2024-11-09T03:36:45.540 with Julia 1.11.1
diff --git a/dev/plotting/index.html b/dev/plotting/index.html index 732ca7b..e8d5e17 100644 --- a/dev/plotting/index.html +++ b/dev/plotting/index.html @@ -85,4 +85,4 @@ alpha=0.8, linewidth=0.25) -display(fig)

"pyplot"

+display(fig)

"pyplot"

diff --git a/dev/references/index.html b/dev/references/index.html index e74731e..7bd59e5 100644 --- a/dev/references/index.html +++ b/dev/references/index.html @@ -1,2 +1,2 @@ -References · ColorSchemes

References

✦ cmocean

From "Beautiful colormaps for oceanography": cmocean

✦ scientific

From Scientific colormaps

✦ matplotlib

From matplot

✦ colorbrewer

From ColorBrewer

✦ gnuplot

From GNUPlot

✦ colorcet

From "collection of perceptually accurate colormaps"

✦ Seaborn

From "colorschemes used by Seaborn, a Python data visualization library based on matplotlib."

✦ ggthemes/tableau

From "ggthemes tableau palettes"

✦ CVD/(ColorBlind)-friendly schemes

Colorschemes designed with color-vision deficient users in mind, by authors such as Paul Tol, Masataka Okabe, Kei Ito, and Martin Krzywinski.

✦ Flags

Colors extracted from flags of different countries and regions, downloaded from Flagpedia. Intended to represent these regions in visualizations, but not necessarily effective. Many flags have similar colorschemes. The flags are named according to the region's ISO3166 two-letter abbreviation (often the same as top-level WWW domain), with any hyphens removed.

✦ general and miscellaneous

+References · ColorSchemes

References

✦ cmocean

From "Beautiful colormaps for oceanography": cmocean

✦ scientific

From Scientific colormaps

✦ matplotlib

From matplot

✦ colorbrewer

From ColorBrewer

✦ gnuplot

From GNUPlot

✦ colorcet

From "collection of perceptually accurate colormaps"

✦ Seaborn

From "colorschemes used by Seaborn, a Python data visualization library based on matplotlib."

✦ ggthemes/tableau

From "ggthemes tableau palettes"

✦ CVD/(ColorBlind)-friendly schemes

Colorschemes designed with color-vision deficient users in mind, by authors such as Paul Tol, Masataka Okabe, Kei Ito, and Martin Krzywinski.

✦ Flags

Colors extracted from flags of different countries and regions, downloaded from Flagpedia. Intended to represent these regions in visualizations, but not necessarily effective. Many flags have similar colorschemes. The flags are named according to the region's ISO3166 two-letter abbreviation (often the same as top-level WWW domain), with any hyphens removed.

✦ general and miscellaneous