Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many colormaps not working with matplotlib #9

Closed
andreaskoelsch opened this issue Jan 18, 2018 · 1 comment
Closed

Many colormaps not working with matplotlib #9

andreaskoelsch opened this issue Jan 18, 2018 · 1 comment

Comments

@andreaskoelsch
Copy link

I tried many colormaps with matplotlib.pyplot, but most of them give similar errors. Here is an example for a grey colormap.

import colorcet as cc
import matplotlib.pyplot as plt

# Neither of the following work
plt.set_cmap(cc.m_linear_grey_0_100_c0)
plt.set_cmap("cet_linear_grey_0_100_c0")
plt.set_cmap(cc.cm["linear_grey_0_100_c0"])

plt.imshow(arr)

ValueError: Colormap linear_grey_0_100_c0 is not recognized. Possible values are: Accent, Accent_r, Blues, Blues_r, BrBG, BrBG_r, BuGn, BuGn_r, BuPu, BuPu_r, CMRmap, CMRmap_r, Dark2, Dark2_r, GnBu, GnBu_r, Greens, Greens_r, Greys, Greys_r, OrRd, OrRd_r, Oranges, Oranges_r, PRGn, PRGn_r, Paired, Paired_r, Pastel1, Pastel1_r, Pastel2, Pastel2_r, PiYG, PiYG_r, PuBu, PuBuGn, PuBuGn_r, PuBu_r, PuOr, PuOr_r, PuRd, PuRd_r, Purples, Purples_r, RdBu, RdBu_r, RdGy, RdGy_r, RdPu, RdPu_r, RdYlBu, RdYlBu_r, RdYlGn, RdYlGn_r, Reds, Reds_r, Set1, Set1_r, Set2, Set2_r, Set3, Set3_r, Spectral, Spectral_r, Vega10, Vega10_r, Vega20, Vega20_r, Vega20b, Vega20b_r, Vega20c, Vega20c_r, Wistia, Wistia_r, YlGn, YlGnBu, YlGnBu_r, YlGn_r, YlOrBr, YlOrBr_r, YlOrRd, YlOrRd_r, afmhot, afmhot_r, autumn, autumn_r, binary, binary_r, bone, bone_r, brg, brg_r, bwr, bwr_r, cet_bgy, cet_bgy_r, cet_bgyw, cet_bgyw_r, cet_bjy, cet_bjy_r, cet_bkr, cet_bkr_r, cet_bky, cet_bky_r, cet_blues, cet_blues_r, cet_bmw, cet_bmw_r, cet_bmy, cet_bmy_r, cet_colorwheel, cet_colorwheel_r, cet_coolwarm, cet_coolwarm_r, cet_cyclic_grey_15_85_c0, cet_cyclic_grey_15_85_c0_r, cet_cyclic_grey_15_85_c0_s25, cet_cyclic_grey_15_85_c0_s25_r, cet_cyclic_mrybm_35_75_c68, cet_cyclic_mrybm_35_75_c68_r, cet_cyclic_mrybm_35_75_c68_s25, cet_cyclic_mrybm_35_75_c68_s25_r, cet_cyclic_mygbm_30_95_c78, cet_cyclic_mygbm_30_95_c78_r, cet_cyclic_mygbm_30_95_c78_s25, cet_cyclic_mygbm_30_95_c78_s25_r, cet_cyclic_wrwbw_40_90_c42, cet_cyclic_wrwbw_40_90_c42_r, cet_cyclic_wrwbw_40_90_c42_s25, cet_cyclic_wrwbw_40_90_c42_s25_r, cet_dimgray, cet_dimgray_r, cet_diverging_bkr_55_10_c35, cet_diverging_bkr_55_10_c35_r, cet_diverging_bky_60_10_c30, cet_diverging_bky_60_10_c30_r, cet_diverging_bwr_40_95_c42, cet_diverging_bwr_40_95_c42_r, cet_diverging_bwr_55_98_c37, cet_diverging_bwr_55_98_c37_r, cet_diverging_cwm_80_100_c22, cet_diverging_cwm_80_100_c22_r, cet_diverging_gkr_60_10_c40, cet_diverging_gkr_60_10_c40_r, cet_diverging_gwr_55_95_c38, cet_diverging_gwr_55_95_c38_r, cet_diverging_gwv_55_95_c39, cet_diverging_gwv_55_95_c39_r, cet_diverging_isoluminant_cjm_75_c23, cet_diverging_isoluminant_cjm_75_c23_r, cet_diverging_isoluminant_cjm_75_c24, cet_diverging_isoluminant_cjm_75_c24_r, cet_diverging_isoluminant_cjo_70_c25, cet_diverging_isoluminant_cjo_70_c25_r, cet_diverging_linear_bjr_30_55_c53, cet_diverging_linear_bjr_30_55_c53_r, cet_diverging_linear_bjy_30_90_c45, cet_diverging_linear_bjy_30_90_c45_r, cet_diverging_rainbow_bgymr_45_85_c67, cet_diverging_rainbow_bgymr_45_85_c67_r, cet_fire, cet_fire_r, cet_gray, cet_gray_r, cet_gwv, cet_gwv_r, cet_isolum, cet_isolum_r, cet_isoluminant_cgo_70_c39, cet_isoluminant_cgo_70_c39_r, cet_isoluminant_cgo_80_c38, cet_isoluminant_cgo_80_c38_r, cet_isoluminant_cm_70_c39, cet_isoluminant_cm_70_c39_r, cet_kb, cet_kb_r, cet_kbc, cet_kbc_r, cet_kg, cet_kg_r, cet_kgy, cet_kgy_r, cet_kr, cet_kr_r, cet_linear_bgy_10_95_c74, cet_linear_bgy_10_95_c74_r, cet_linear_bgyw_15_100_c67, cet_linear_bgyw_15_100_c67_r, cet_linear_bgyw_15_100_c68, cet_linear_bgyw_15_100_c68_r, cet_linear_blue_5_95_c73, cet_linear_blue_5_95_c73_r, cet_linear_blue_95_50_c20, cet_linear_blue_95_50_c20_r, cet_linear_bmw_5_95_c86, cet_linear_bmw_5_95_c86_r, cet_linear_bmw_5_95_c89, cet_linear_bmw_5_95_c89_r, cet_linear_bmy_10_95_c71, cet_linear_bmy_10_95_c71_r, cet_linear_bmy_10_95_c78, cet_linear_bmy_10_95_c78_r, cet_linear_gow_60_85_c27, cet_linear_gow_60_85_c27_r, cet_linear_gow_65_90_c35, cet_linear_gow_65_90_c35_r, cet_linear_green_5_95_c69, cet_linear_green_5_95_c69_r, cet_linear_grey_0_100_c0, cet_linear_grey_0_100_c0_r, cet_linear_grey_10_95_c0, cet_linear_grey_10_95_c0_r, cet_linear_kry_5_95_c72, cet_linear_kry_5_95_c72_r, cet_linear_kry_5_98_c75, cet_linear_kry_5_98_c75_r, cet_linear_kryw_0_100_c71, cet_linear_kryw_0_100_c71_r, cet_linear_kryw_5_100_c64, cet_linear_kryw_5_100_c64_r, cet_linear_kryw_5_100_c67, cet_linear_kryw_5_100_c67_r, cet_linear_ternary_blue_0_44_c57, cet_linear_ternary_blue_0_44_c57_r, cet_linear_ternary_green_0_46_c42, cet_linear_ternary_green_0_46_c42_r, cet_linear_ternary_red_0_50_c52, cet_linear_ternary_red_0_50_c52_r, cet_rainbow, cet_rainbow_bgyr_35_85_c72, cet_rainbow_bgyr_35_85_c72_r, cet_rainbow_bgyr_35_85_c73, cet_rainbow_bgyr_35_85_c73_r, cet_rainbow_bgyrm_35_85_c69, cet_rainbow_bgyrm_35_85_c69_r, cet_rainbow_bgyrm_35_85_c71, cet_rainbow_bgyrm_35_85_c71_r, cet_rainbow_r, cool, cool_r, coolwarm, coolwarm_r, copper, copper_r, cubehelix, cubehelix_r, flag, flag_r, gist_earth, gist_earth_r, gist_gray, gist_gray_r, gist_heat, gist_heat_r, gist_ncar, gist_ncar_r, gist_rainbow, gist_rainbow_r, gist_stern, gist_stern_r, gist_yarg, gist_yarg_r, gnuplot, gnuplot2, gnuplot2_r, gnuplot_r, gray, gray_r, hot, hot_r, hsv, hsv_r, inferno, inferno_r, jet, jet_r, magma, magma_r, nipy_spectral, nipy_spectral_r, ocean, ocean_r, pink, pink_r, plasma, plasma_r, prism, prism_r, rainbow, rainbow_r, seismic, seismic_r, spectral, spectral_r, spring, spring_r, summer, summer_r, tab10, tab10_r, tab20, tab20_r, tab20b, tab20b_r, tab20c, tab20c_r, terrain, terrain_r, viridis, viridis_r, winter, winter_r
@jsignell
Copy link
Member

It seems likely that you had an old version of colorcet. Please reopen if upgrading doesn't solve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants