From 39824e432d890e14f4a82ceaadae2ab12c6807d5 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Tue, 22 Oct 2024 21:27:13 +0000 Subject: [PATCH] build based on 3c303f8 --- 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 387d97d..2cec6db 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-22T21:18:30","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-22T21:26:54","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/basics/index.html b/dev/basics/index.html index c689c6c..aa57811 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 5a405b0..c2bb788 100644 --- a/dev/catalogue/index.html +++ b/dev/catalogue/index.html @@ -94490,4 +94490,4 @@

« IntroductionBasic usage »
+ diff --git a/dev/finding/index.html b/dev/finding/index.html index 87b7ac8..38115f2 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 63fc966..4887912 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 8ba1b8a..a37d68f 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 0bcd719..fad144e 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 0152bb0..1d0c553 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-10-22T21:18:24.008 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-10-22T21:26:47.917 with Julia 1.11.1
diff --git a/dev/plotting/index.html b/dev/plotting/index.html index 8fa64ed..f9a36cb 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 17c9c15..cd85d2c 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