Skip to content

Commit

Permalink
Update scientific schemes docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pratiman-91 committed Jul 4, 2024
1 parent 1219a73 commit 73a2db9
Show file tree
Hide file tree
Showing 47 changed files with 114 additions and 41 deletions.
48 changes: 48 additions & 0 deletions colormaps/cmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -27726,6 +27726,54 @@ def turku_r(self):

return cmap

@property
def vanimo(self):
cname = "vanimo"
cmap_file = os.path.join(CMAPSFILE_DIR, "scientific", "vanimo.rgb")
cmap = Colormap(self._coltbl(cmap_file), name=cname)
if version.parse(mlp_version) >= version.parse("3.6.0"):
if cname in sorted(_colormaps):
if version.parse(mlp_version) >= version.parse("3.9.0"):
return matplotlib.colormaps[cname]
else:
return matplotlib.cm.get_cmap(cname)
else:
matplotlib.colormaps.register(name=cname, cmap=cmap)
else:
if cname in matplotlib.cm._cmap_registry:
if version.parse(mlp_version) >= version.parse("3.9.0"):
return matplotlib.colormaps[cname]
else:
return matplotlib.cm.get_cmap(cname)
else:
matplotlib.cm.register_cmap(name=cname, cmap=cmap)

return cmap

@property
def vanimo_r(self):
cname = "vanimo_r"
cmap_file = os.path.join(CMAPSFILE_DIR, "scientific", "vanimo.rgb")
cmap = Colormap(self._coltbl(cmap_file)[::-1], name=cname)
if version.parse(mlp_version) >= version.parse("3.6.0"):
if cname in sorted(_colormaps):
if version.parse(mlp_version) >= version.parse("3.9.0"):
return matplotlib.colormaps[cname]
else:
return matplotlib.cm.get_cmap(cname)
else:
matplotlib.colormaps.register(name=cname, cmap=cmap)
else:
if cname in matplotlib.cm._cmap_registry:
if version.parse(mlp_version) >= version.parse("3.9.0"):
return matplotlib.colormaps[cname]
else:
return matplotlib.cm.get_cmap(cname)
else:
matplotlib.cm.register_cmap(name=cname, cmap=cmap)

return cmap

@property
def vik(self):
cname = "vik"
Expand Down
File renamed without changes.
7 changes: 6 additions & 1 deletion colormaps/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ def show_cmaps(category, cmap_list):
axs[0].set_title(f"{category} colormaps", fontsize=14)

for ax, name in zip(axs, cmap_list):
ax.imshow(gradient, aspect="auto", cmap=eval("cmaps." + name))
colors1 = getattr(cmaps, name)
if version.parse(mlp_version) >= version.parse("3.9.0"):
colors1 = matplotlib.colormaps[name]
else:
colors1 = matplotlib.cm.get_cmap(name)
ax.imshow(gradient, aspect="auto", cmap=colors1)
ax.text(
-0.01,
0.5,
Expand Down
Binary file modified docs/assets/images/scientific/acton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/bam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/bamako.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/bamo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/batlow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/batlowk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/batloww.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/berlin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/bilbao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/broc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/brocO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/buda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/bukavu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/cork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/corko.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/davos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/devon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/fes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/glasgow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/grayc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/hawaii.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/imola.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/lajolla.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/lapaz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/scientific/lipari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/scientific/lisbon.png
Binary file added docs/assets/images/scientific/managua.png
Binary file added docs/assets/images/scientific/navia.png
Binary file added docs/assets/images/scientific/naviaw.png
Binary file modified docs/assets/images/scientific/nuuk.png
Binary file modified docs/assets/images/scientific/oleron.png
Binary file modified docs/assets/images/scientific/oslo.png
Binary file modified docs/assets/images/scientific/roma.png
Binary file added docs/assets/images/scientific/romao.png
Binary file modified docs/assets/images/scientific/tofino.png
Binary file modified docs/assets/images/scientific/tokyo.png
Binary file modified docs/assets/images/scientific/turku.png
Binary file added docs/assets/images/scientific/vanimo.png
Binary file modified docs/assets/images/scientific/vik.png
Binary file added docs/assets/images/scientific/viko.png
7 changes: 7 additions & 0 deletions docs/docs/Diverging.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,20 @@

| Name | Colormap | Code | Levels |
| ----------- | ----------- | -----------| -----------|
| bam| ![bam](/assets/images/scientific/bam.png) | ```cmaps.bam``` | 256|
| bamo| ![bamo](/assets/images/scientific/bamo.png) | ```cmaps.bamo``` | 256|
| berlin| ![berlin](/colormaps/assets/images/scientific/berlin.png) | ```cmaps.berlin``` | 256|
| broc| ![broc](/colormaps/assets/images/scientific/broc.png) | ```cmaps.broc``` | 256|
| brocO| ![brocO](/assets/images/scientific/brocO.png) | ```cmaps.brocO``` | 256|
| cork| ![cork](/colormaps/assets/images/scientific/cork.png) | ```cmaps.cork``` | 256|
| corko| ![corko](/assets/images/scientific/corko.png) | ```cmaps.corko``` | 256|
| lisbon| ![lisbon](/colormaps/assets/images/scientific/lisbon.png) | ```cmaps.lisbon``` | 256|
| roma| ![roma](/colormaps/assets/images/scientific/roma.png) | ```cmaps.roma``` | 256|
| romao| ![romao](/assets/images/scientific/romao.png) | ```cmaps.romao``` | 256|
| tofino| ![tofino](/colormaps/assets/images/scientific/tofino.png) | ```cmaps.tofino``` | 256|
| vanimo| ![vanimo](/assets/images/scientific/vanimo.png) | ```cmaps.vanimo``` | 256|
| vik| ![vik](/colormaps/assets/images/scientific/vik.png) | ```cmaps.vik``` | 256|
| viko| ![viko](/assets/images/scientific/viko.png) | ```cmaps.viko``` | 256|

## Cmasher

Expand Down
12 changes: 11 additions & 1 deletion docs/docs/Sequential.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,26 @@
| ----------- | ----------- | -----------| -----------|
| acton| ![acton](/colormaps/assets/images/scientific/acton.png) | ```cmaps.acton``` | 256|
| bamako| ![bamako](/colormaps/assets/images/scientific/bamako.png) | ```cmaps.bamako``` | 256|
| batlow| ![batlow](/colormaps/assets/images/scientific/batlow.png) | ```cmaps.batlow``` | 256|
| batlow| ![batlow](/assets/images/scientific/batlow.png) | ```cmaps.batlow``` | 256|
| batlowk| ![batlowk](/assets/images/scientific/batlowk.png) | ```cmaps.batlowk``` | 256|
| batloww| ![batloww](/assets/images/scientific/batloww.png) | ```cmaps.batloww``` | 256|
| bilbao| ![bilbao](/colormaps/assets/images/scientific/bilbao.png) | ```cmaps.bilbao``` | 256|
| buda| ![buda](/colormaps/assets/images/scientific/buda.png) | ```cmaps.buda``` | 256|
| bukavu| ![bukavu](/assets/images/scientific/bukavu.png) | ```cmaps.bukavu``` | 256|
| davos| ![davos](/colormaps/assets/images/scientific/davos.png) | ```cmaps.davos``` | 256|
| devon| ![devon](/colormaps/assets/images/scientific/devon.png) | ```cmaps.devon``` | 256|
| fes| ![fes](/assets/images/scientific/fes.png) | ```cmaps.fes``` | 256|
| glasgow| ![glasgow](/assets/images/scientific/glasgow.png) | ```cmaps.glasgow``` | 256|
| grayc| ![grayc](/colormaps/assets/images/scientific/grayc.png) | ```cmaps.grayc``` | 256|
| hawaii| ![hawaii](/colormaps/assets/images/scientific/hawaii.png) | ```cmaps.hawaii``` | 256|
| imola| ![imola](/colormaps/assets/images/scientific/imola.png) | ```cmaps.imola``` | 256|
| lajolla| ![lajolla](/colormaps/assets/images/scientific/lajolla.png) | ```cmaps.lajolla``` | 256|
| lapaz| ![lapaz](/colormaps/assets/images/scientific/lapaz.png) | ```cmaps.lapaz``` | 256|
| lipari| ![lipari](/assets/images/scientific/lipari.png) | ```cmaps.lipari``` | 256|
| lisbon| ![lisbon](/assets/images/scientific/lisbon.png) | ```cmaps.lisbon``` | 256|
| managua| ![managua](/assets/images/scientific/managua.png) | ```cmaps.managua``` | 256|
| navia| ![navia](/assets/images/scientific/navia.png) | ```cmaps.navia``` | 256|
| naviaw| ![naviaw](/assets/images/scientific/naviaw.png) | ```cmaps.naviaw``` | 256|
| nuuk| ![nuuk](/colormaps/assets/images/scientific/nuuk.png) | ```cmaps.nuuk``` | 256|
| oleron| ![oleron](/colormaps/assets/images/scientific/oleron.png) | ```cmaps.oleron``` | 256|
| oslo| ![oslo](/colormaps/assets/images/scientific/oslo.png) | ```cmaps.oslo``` | 256|
Expand Down
19 changes: 18 additions & 1 deletion docs/docs/collections/scientific.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,26 @@
| ----------- | ----------- | -----------| -----------|
| acton| ![acton](/colormaps/assets/images/scientific/acton.png) | ```cmaps.acton``` | 256|
| bamako| ![bamako](/colormaps/assets/images/scientific/bamako.png) | ```cmaps.bamako``` | 256|
| batlow| ![batlow](/colormaps/assets/images/scientific/batlow.png) | ```cmaps.batlow``` | 256|
| batlow| ![batlow](/assets/images/scientific/batlow.png) | ```cmaps.batlow``` | 256|
| batlowk| ![batlowk](/assets/images/scientific/batlowk.png) | ```cmaps.batlowk``` | 256|
| batloww| ![batloww](/assets/images/scientific/batloww.png) | ```cmaps.batloww``` | 256|
| bilbao| ![bilbao](/colormaps/assets/images/scientific/bilbao.png) | ```cmaps.bilbao``` | 256|
| buda| ![buda](/colormaps/assets/images/scientific/buda.png) | ```cmaps.buda``` | 256|
| bukavu| ![bukavu](/assets/images/scientific/bukavu.png) | ```cmaps.bukavu``` | 256|
| davos| ![davos](/colormaps/assets/images/scientific/davos.png) | ```cmaps.davos``` | 256|
| devon| ![devon](/colormaps/assets/images/scientific/devon.png) | ```cmaps.devon``` | 256|
| fes| ![fes](/assets/images/scientific/fes.png) | ```cmaps.fes``` | 256|
| glasgow| ![glasgow](/assets/images/scientific/glasgow.png) | ```cmaps.glasgow``` | 256|
| grayc| ![grayc](/colormaps/assets/images/scientific/grayc.png) | ```cmaps.grayc``` | 256|
| hawaii| ![hawaii](/colormaps/assets/images/scientific/hawaii.png) | ```cmaps.hawaii``` | 256|
| imola| ![imola](/colormaps/assets/images/scientific/imola.png) | ```cmaps.imola``` | 256|
| lajolla| ![lajolla](/colormaps/assets/images/scientific/lajolla.png) | ```cmaps.lajolla``` | 256|
| lapaz| ![lapaz](/colormaps/assets/images/scientific/lapaz.png) | ```cmaps.lapaz``` | 256|
| lipari| ![lipari](/assets/images/scientific/lipari.png) | ```cmaps.lipari``` | 256|
| lisbon| ![lisbon](/assets/images/scientific/lisbon.png) | ```cmaps.lisbon``` | 256|
| managua| ![managua](/assets/images/scientific/managua.png) | ```cmaps.managua``` | 256|
| navia| ![navia](/assets/images/scientific/navia.png) | ```cmaps.navia``` | 256|
| naviaw| ![naviaw](/assets/images/scientific/naviaw.png) | ```cmaps.naviaw``` | 256|
| nuuk| ![nuuk](/colormaps/assets/images/scientific/nuuk.png) | ```cmaps.nuuk``` | 256|
| oleron| ![oleron](/colormaps/assets/images/scientific/oleron.png) | ```cmaps.oleron``` | 256|
| oslo| ![oslo](/colormaps/assets/images/scientific/oslo.png) | ```cmaps.oslo``` | 256|
Expand All @@ -47,10 +57,17 @@

| Name | Colormap | Code | Levels |
| ----------- | ----------- | -----------| -----------|
| bam| ![bam](/assets/images/scientific/bam.png) | ```cmaps.bam``` | 256|
| bamo| ![bamo](/assets/images/scientific/bamo.png) | ```cmaps.bamo``` | 256|
| berlin| ![berlin](/colormaps/assets/images/scientific/berlin.png) | ```cmaps.berlin``` | 256|
| broc| ![broc](/colormaps/assets/images/scientific/broc.png) | ```cmaps.broc``` | 256|
| brocO| ![brocO](/assets/images/scientific/brocO.png) | ```cmaps.brocO``` | 256|
| cork| ![cork](/colormaps/assets/images/scientific/cork.png) | ```cmaps.cork``` | 256|
| corko| ![corko](/assets/images/scientific/corko.png) | ```cmaps.corko``` | 256|
| lisbon| ![lisbon](/colormaps/assets/images/scientific/lisbon.png) | ```cmaps.lisbon``` | 256|
| roma| ![roma](/colormaps/assets/images/scientific/roma.png) | ```cmaps.roma``` | 256|
| romao| ![romao](/assets/images/scientific/romao.png) | ```cmaps.romao``` | 256|
| tofino| ![tofino](/colormaps/assets/images/scientific/tofino.png) | ```cmaps.tofino``` | 256|
| vanimo| ![vanimo](/assets/images/scientific/vanimo.png) | ```cmaps.vanimo``` | 256|
| vik| ![vik](/colormaps/assets/images/scientific/vik.png) | ```cmaps.vik``` | 256|
| viko| ![viko](/assets/images/scientific/viko.png) | ```cmaps.viko``` | 256|
Loading

0 comments on commit 73a2db9

Please sign in to comment.